]> git.saurik.com Git - apple/xnu.git/commitdiff
xnu-344.23.tar.gz mac-os-x-1023 v344.23
authorApple <opensource@apple.com>
Tue, 12 Aug 2003 23:41:36 +0000 (23:41 +0000)
committerApple <opensource@apple.com>
Tue, 12 Aug 2003 23:41:36 +0000 (23:41 +0000)
1869 files changed:
APPLE_LICENSE
EXTERNAL_HEADERS/ar.h
EXTERNAL_HEADERS/architecture/byte_order.h
EXTERNAL_HEADERS/architecture/i386/asm_help.h
EXTERNAL_HEADERS/architecture/i386/byte_order.h
EXTERNAL_HEADERS/architecture/i386/cpu.h
EXTERNAL_HEADERS/architecture/i386/desc.h
EXTERNAL_HEADERS/architecture/i386/fpu.h
EXTERNAL_HEADERS/architecture/i386/frame.h
EXTERNAL_HEADERS/architecture/i386/io.h
EXTERNAL_HEADERS/architecture/i386/reg_help.h
EXTERNAL_HEADERS/architecture/i386/sel.h
EXTERNAL_HEADERS/architecture/i386/table.h
EXTERNAL_HEADERS/architecture/i386/tss.h
EXTERNAL_HEADERS/architecture/ppc/asm_help.h
EXTERNAL_HEADERS/architecture/ppc/basic_regs.h
EXTERNAL_HEADERS/architecture/ppc/byte_order.h
EXTERNAL_HEADERS/architecture/ppc/cframe.h
EXTERNAL_HEADERS/architecture/ppc/fp_regs.h
EXTERNAL_HEADERS/architecture/ppc/macro_help.h
EXTERNAL_HEADERS/architecture/ppc/pseudo_inst.h
EXTERNAL_HEADERS/architecture/ppc/reg_help.h
EXTERNAL_HEADERS/bsd/i386/ansi.h
EXTERNAL_HEADERS/bsd/i386/limits.h
EXTERNAL_HEADERS/bsd/ppc/ansi.h
EXTERNAL_HEADERS/bsd/ppc/limits.h
EXTERNAL_HEADERS/mach-o/fat.h
EXTERNAL_HEADERS/mach-o/kld.h
EXTERNAL_HEADERS/mach-o/loader.h
EXTERNAL_HEADERS/mach-o/nlist.h
EXTERNAL_HEADERS/mach-o/reloc.h
EXTERNAL_HEADERS/machine/limits.h
EXTERNAL_HEADERS/stdarg.h
bsd/conf/MASTER
bsd/conf/files
bsd/conf/param.c
bsd/conf/version.minor
bsd/conf/version.variant
bsd/dev/busvar.h
bsd/dev/disk.h
bsd/dev/disk_label.h
bsd/dev/i386/conf.c
bsd/dev/i386/cons.c
bsd/dev/i386/cons.h
bsd/dev/i386/kern_machdep.c
bsd/dev/i386/km.c
bsd/dev/i386/lock_stubs.c
bsd/dev/i386/mem.c
bsd/dev/i386/memmove.c
bsd/dev/i386/pci_device.h
bsd/dev/i386/pio.h
bsd/dev/i386/sel.h
bsd/dev/i386/sel_inline.h
bsd/dev/i386/stubs.c
bsd/dev/i386/table_inline.h
bsd/dev/i386/unix_signal.c
bsd/dev/i386/unix_startup.c
bsd/dev/kmreg_com.h
bsd/dev/ldd.h
bsd/dev/memdev.c [deleted file]
bsd/dev/memdev.h [deleted file]
bsd/dev/ppc/conf.c
bsd/dev/ppc/cons.c
bsd/dev/ppc/cons.h
bsd/dev/ppc/ffs.c
bsd/dev/ppc/ffs.s
bsd/dev/ppc/kern_machdep.c
bsd/dev/ppc/km.c
bsd/dev/ppc/machdep.c
bsd/dev/ppc/mem.c
bsd/dev/ppc/memmove.c
bsd/dev/ppc/nvram.c
bsd/dev/ppc/ppc_init.c
bsd/dev/ppc/stubs.c
bsd/dev/ppc/systemcalls.c
bsd/dev/ppc/unix_signal.c
bsd/dev/ppc/unix_startup.c
bsd/dev/ppc/xsumas.s
bsd/dev/random/YarrowCoreLib/include/WindowsTypesForMac.h
bsd/dev/random/YarrowCoreLib/include/yarrow.h
bsd/dev/random/YarrowCoreLib/include/yarrowUtils.h
bsd/dev/random/YarrowCoreLib/port/smf.c
bsd/dev/random/YarrowCoreLib/src/assertverify.h
bsd/dev/random/YarrowCoreLib/src/comp.c
bsd/dev/random/YarrowCoreLib/src/comp.h
bsd/dev/random/YarrowCoreLib/src/entropysources.h
bsd/dev/random/YarrowCoreLib/src/macOnly.h
bsd/dev/random/YarrowCoreLib/src/prng.c
bsd/dev/random/YarrowCoreLib/src/prng.h
bsd/dev/random/YarrowCoreLib/src/prngpriv.h
bsd/dev/random/YarrowCoreLib/src/sha1mod.c
bsd/dev/random/YarrowCoreLib/src/sha1mod.h
bsd/dev/random/YarrowCoreLib/src/smf.h
bsd/dev/random/YarrowCoreLib/src/userdefines.h
bsd/dev/random/YarrowCoreLib/src/yarrowUtils.c
bsd/dev/random/randomdev.c
bsd/dev/random/randomdev.h
bsd/dev/vn/shadow.c
bsd/dev/vn/shadow.h
bsd/hfs/MacOSStubs.c
bsd/hfs/hfs.h
bsd/hfs/hfs_attrlist.c
bsd/hfs/hfs_attrlist.h
bsd/hfs/hfs_btreeio.c
bsd/hfs/hfs_catalog.c
bsd/hfs/hfs_catalog.h
bsd/hfs/hfs_chash.c
bsd/hfs/hfs_cnode.c
bsd/hfs/hfs_cnode.h
bsd/hfs/hfs_dbg.h
bsd/hfs/hfs_encodinghint.c
bsd/hfs/hfs_encodings.c
bsd/hfs/hfs_encodings.h
bsd/hfs/hfs_endian.c
bsd/hfs/hfs_endian.h
bsd/hfs/hfs_format.h
bsd/hfs/hfs_link.c
bsd/hfs/hfs_lockf.c
bsd/hfs/hfs_lockf.h
bsd/hfs/hfs_lookup.c
bsd/hfs/hfs_macos_defs.h
bsd/hfs/hfs_mount.h
bsd/hfs/hfs_quota.c
bsd/hfs/hfs_quota.h
bsd/hfs/hfs_readwrite.c
bsd/hfs/hfs_search.c
bsd/hfs/hfs_vfsops.c
bsd/hfs/hfs_vfsutils.c
bsd/hfs/hfs_vnops.c
bsd/hfs/hfscommon/BTree/BTree.c
bsd/hfs/hfscommon/BTree/BTreeAllocate.c
bsd/hfs/hfscommon/BTree/BTreeMiscOps.c
bsd/hfs/hfscommon/BTree/BTreeNodeOps.c
bsd/hfs/hfscommon/BTree/BTreeScanner.c
bsd/hfs/hfscommon/BTree/BTreeTreeOps.c
bsd/hfs/hfscommon/Catalog/Catalog.c
bsd/hfs/hfscommon/Catalog/CatalogIterators.c
bsd/hfs/hfscommon/Catalog/CatalogUtilities.c
bsd/hfs/hfscommon/Catalog/FileIDsServices.c
bsd/hfs/hfscommon/Misc/BTreeWrapper.c
bsd/hfs/hfscommon/Misc/FileExtentMapping.c
bsd/hfs/hfscommon/Misc/VolumeAllocation.c
bsd/hfs/hfscommon/Unicode/UCStringCompareData.h
bsd/hfs/hfscommon/Unicode/UnicodeWrappers.c
bsd/hfs/hfscommon/headers/BTreeScanner.h
bsd/hfs/hfscommon/headers/BTreesInternal.h
bsd/hfs/hfscommon/headers/BTreesPrivate.h
bsd/hfs/hfscommon/headers/CatalogPrivate.h
bsd/hfs/hfscommon/headers/FileMgrInternal.h
bsd/hfs/hfscommon/headers/HFSUnicodeWrappers.h
bsd/hfs/rangelist.c
bsd/hfs/rangelist.h
bsd/i386/cpu.h
bsd/i386/disklabel.h
bsd/i386/endian.h
bsd/i386/exec.h
bsd/i386/label_t.h
bsd/i386/param.h
bsd/i386/profile.h
bsd/i386/psl.h
bsd/i386/ptrace.h
bsd/i386/reboot.h
bsd/i386/reg.h
bsd/i386/setjmp.h
bsd/i386/signal.h
bsd/i386/spl.h
bsd/i386/table.h
bsd/i386/types.h
bsd/i386/ucontext.h
bsd/i386/user.h
bsd/i386/vmparam.h
bsd/if/ppc/if_en.c
bsd/if/ppc/if_en.h
bsd/if/ppc/mace.c
bsd/if/ppc/mace.h
bsd/isofs/cd9660/cd9660_bmap.c
bsd/isofs/cd9660/cd9660_lookup.c
bsd/isofs/cd9660/cd9660_mount.h
bsd/isofs/cd9660/cd9660_node.c
bsd/isofs/cd9660/cd9660_node.h
bsd/isofs/cd9660/cd9660_rrip.c
bsd/isofs/cd9660/cd9660_rrip.h
bsd/isofs/cd9660/cd9660_util.c
bsd/isofs/cd9660/cd9660_vfsops.c
bsd/isofs/cd9660/cd9660_vnops.c
bsd/isofs/cd9660/iso.h
bsd/isofs/cd9660/iso_rrip.h
bsd/kern/ast.h
bsd/kern/bsd_init.c
bsd/kern/bsd_stubs.c
bsd/kern/init_sysent.c
bsd/kern/kdebug.c
bsd/kern/kern_acct.c
bsd/kern/kern_clock.c
bsd/kern/kern_control.c
bsd/kern/kern_core.c
bsd/kern/kern_descrip.c
bsd/kern/kern_event.c
bsd/kern/kern_exec.c
bsd/kern/kern_exit.c
bsd/kern/kern_fork.c
bsd/kern/kern_ktrace.c
bsd/kern/kern_lock.c
bsd/kern/kern_malloc.c
bsd/kern/kern_mib.c
bsd/kern/kern_mman.c
bsd/kern/kern_newsysctl.c
bsd/kern/kern_panicinfo.c
bsd/kern/kern_pcsamples.c
bsd/kern/kern_physio.c
bsd/kern/kern_proc.c
bsd/kern/kern_prot.c
bsd/kern/kern_resource.c
bsd/kern/kern_shutdown.c
bsd/kern/kern_sig.c
bsd/kern/kern_subr.c
bsd/kern/kern_symfile.c
bsd/kern/kern_synch.c
bsd/kern/kern_sysctl.c
bsd/kern/kern_time.c
bsd/kern/kern_xxx.c
bsd/kern/mach_fat.c
bsd/kern/mach_header.c
bsd/kern/mach_header.h
bsd/kern/mach_loader.c
bsd/kern/mach_loader.h
bsd/kern/mach_process.c
bsd/kern/netboot.c
bsd/kern/posix_sem.c
bsd/kern/posix_shm.c
bsd/kern/preload.h
bsd/kern/qsort.c
bsd/kern/spl.c
bsd/kern/subr_log.c
bsd/kern/subr_prf.c
bsd/kern/subr_prof.c
bsd/kern/subr_xxx.c
bsd/kern/sys_domain.c
bsd/kern/sys_generic.c
bsd/kern/sys_socket.c
bsd/kern/syscalls.c
bsd/kern/sysctl_init.c
bsd/kern/sysv_ipc.c
bsd/kern/sysv_msg.c
bsd/kern/sysv_sem.c
bsd/kern/sysv_shm.c
bsd/kern/tty.c
bsd/kern/tty_compat.c
bsd/kern/tty_conf.c
bsd/kern/tty_pty.c
bsd/kern/tty_subr.c
bsd/kern/tty_tb.c
bsd/kern/tty_tty.c
bsd/kern/ubc_subr.c
bsd/kern/uipc_domain.c
bsd/kern/uipc_mbuf.c
bsd/kern/uipc_mbuf2.c
bsd/kern/uipc_proto.c
bsd/kern/uipc_socket.c
bsd/kern/uipc_socket2.c
bsd/kern/uipc_syscalls.c
bsd/kern/uipc_usrreq.c
bsd/libkern/bcd.c
bsd/libkern/bcmp.c
bsd/libkern/inet_ntoa.c
bsd/libkern/libkern.h
bsd/libkern/locc.c
bsd/libkern/random.c
bsd/libkern/rindex.c
bsd/libkern/scanc.c
bsd/libkern/skpc.c
bsd/libkern/strtol.c
bsd/machine/ansi.h
bsd/machine/byte_order.h
bsd/machine/cons.h
bsd/machine/cpu.h
bsd/machine/disklabel.h
bsd/machine/endian.h
bsd/machine/exec.h
bsd/machine/label_t.h
bsd/machine/param.h
bsd/machine/proc.h
bsd/machine/profile.h
bsd/machine/psl.h
bsd/machine/ptrace.h
bsd/machine/reboot.h
bsd/machine/reg.h
bsd/machine/setjmp.h
bsd/machine/signal.h
bsd/machine/spl.h
bsd/machine/table.h
bsd/machine/trap.h
bsd/machine/types.h
bsd/machine/ucontext.h
bsd/machine/unix_traps.h
bsd/machine/user.h
bsd/machine/vmparam.h
bsd/miscfs/deadfs/dead_vnops.c
bsd/miscfs/devfs/devfs.h
bsd/miscfs/devfs/devfs_proto.h
bsd/miscfs/devfs/devfs_tree.c
bsd/miscfs/devfs/devfs_vfsops.c
bsd/miscfs/devfs/devfs_vnops.c
bsd/miscfs/devfs/devfsdefs.h
bsd/miscfs/fdesc/fdesc.h
bsd/miscfs/fdesc/fdesc_vfsops.c
bsd/miscfs/fdesc/fdesc_vnops.c
bsd/miscfs/fifofs/fifo.h
bsd/miscfs/fifofs/fifo_vnops.c
bsd/miscfs/nullfs/null.h
bsd/miscfs/nullfs/null_subr.c
bsd/miscfs/nullfs/null_vfsops.c
bsd/miscfs/nullfs/null_vnops.c
bsd/miscfs/specfs/spec_vnops.c
bsd/miscfs/specfs/specdev.h
bsd/miscfs/synthfs/synthfs.h
bsd/miscfs/synthfs/synthfs_util.c
bsd/miscfs/synthfs/synthfs_vfsops.c
bsd/miscfs/synthfs/synthfs_vnops.c
bsd/miscfs/union/union.h
bsd/miscfs/union/union_subr.c
bsd/miscfs/union/union_vfsops.c
bsd/miscfs/union/union_vnops.c
bsd/miscfs/volfs/volfs.h
bsd/miscfs/volfs/volfs_vfsops.c
bsd/miscfs/volfs/volfs_vnops.c
bsd/net/bpf.c
bsd/net/bpf.h
bsd/net/bpf_compat.h
bsd/net/bpf_filter.c
bsd/net/bpfdesc.h
bsd/net/bridge.c
bsd/net/bridge.h
bsd/net/bsd_comp.c
bsd/net/dlil.c
bsd/net/dlil.h
bsd/net/dlil_pvt.h
bsd/net/ether_at_pr_module.c
bsd/net/ether_if_module.c
bsd/net/ether_inet6_pr_module.c
bsd/net/ether_inet_pr_module.c
bsd/net/etherdefs.h
bsd/net/ethernet.h
bsd/net/if.c
bsd/net/if.h
bsd/net/if_arp.h
bsd/net/if_atm.h
bsd/net/if_disc.c
bsd/net/if_dl.h
bsd/net/if_dummy.c
bsd/net/if_ethersubr.c
bsd/net/if_faith.c
bsd/net/if_fddisubr.c
bsd/net/if_gif.c
bsd/net/if_gif.h
bsd/net/if_llc.h
bsd/net/if_loop.c
bsd/net/if_media.c
bsd/net/if_media.h
bsd/net/if_mib.c
bsd/net/if_mib.h
bsd/net/if_ppp.h
bsd/net/if_pppvar.h
bsd/net/if_slvar.h
bsd/net/if_sppp.h
bsd/net/if_tun.c
bsd/net/if_tun.h
bsd/net/if_tunvar.h
bsd/net/if_types.h
bsd/net/if_var.h
bsd/net/if_vlan.c
bsd/net/if_vlan_var.h
bsd/net/kext_net.c
bsd/net/kext_net.h
bsd/net/ndrv.c
bsd/net/ndrv.h
bsd/net/ndrv_var.h
bsd/net/net_osdep.c
bsd/net/net_osdep.h
bsd/net/netisr.c
bsd/net/netisr.h
bsd/net/pfkeyv2.h
bsd/net/ppp_comp.h
bsd/net/ppp_deflate.c
bsd/net/ppp_defs.h
bsd/net/radix.c
bsd/net/radix.h
bsd/net/raw_cb.c
bsd/net/raw_cb.h
bsd/net/raw_usrreq.c
bsd/net/route.c
bsd/net/route.h
bsd/net/rtsock.c
bsd/net/rtsock_mip.c
bsd/net/slcompress.c
bsd/net/slcompress.h
bsd/net/slip.h
bsd/net/zlib.c
bsd/netat/adsp.c
bsd/netat/adsp.h
bsd/netat/adsp_CLDeny.c
bsd/netat/adsp_CLListen.c
bsd/netat/adsp_Close.c
bsd/netat/adsp_Control.c
bsd/netat/adsp_Init.c
bsd/netat/adsp_InitGlobals.c
bsd/netat/adsp_NewCID.c
bsd/netat/adsp_Open.c
bsd/netat/adsp_Options.c
bsd/netat/adsp_Packet.c
bsd/netat/adsp_Read.c
bsd/netat/adsp_RxAttn.c
bsd/netat/adsp_RxData.c
bsd/netat/adsp_Status.c
bsd/netat/adsp_Timer.c
bsd/netat/adsp_TimerElem.c
bsd/netat/adsp_Write.c
bsd/netat/adsp_attention.c
bsd/netat/adsp_internal.h
bsd/netat/adsp_misc.c
bsd/netat/adsp_reset.c
bsd/netat/adsp_stream.c
bsd/netat/appletalk.h
bsd/netat/asp.h
bsd/netat/asp_proto.c
bsd/netat/at.c
bsd/netat/at_aarp.h
bsd/netat/at_config.h
bsd/netat/at_ddp_brt.h
bsd/netat/at_pat.h
bsd/netat/at_pcb.c
bsd/netat/at_pcb.h
bsd/netat/at_proto.c
bsd/netat/at_snmp.h
bsd/netat/at_var.h
bsd/netat/atp.h
bsd/netat/atp_alloc.c
bsd/netat/atp_misc.c
bsd/netat/atp_open.c
bsd/netat/atp_read.c
bsd/netat/atp_write.c
bsd/netat/aurp.h
bsd/netat/aurp_aurpd.c
bsd/netat/aurp_cfg.c
bsd/netat/aurp_gdata.c
bsd/netat/aurp_misc.c
bsd/netat/aurp_open.c
bsd/netat/aurp_rd.c
bsd/netat/aurp_ri.c
bsd/netat/aurp_rx.c
bsd/netat/aurp_tickle.c
bsd/netat/aurp_tx.c
bsd/netat/aurp_zi.c
bsd/netat/ddp.c
bsd/netat/ddp.h
bsd/netat/ddp_aarp.c
bsd/netat/ddp_aep.c
bsd/netat/ddp_brt.c
bsd/netat/ddp_lap.c
bsd/netat/ddp_nbp.c
bsd/netat/ddp_proto.c
bsd/netat/ddp_r_rtmp.c
bsd/netat/ddp_r_zip.c
bsd/netat/ddp_rtmp.c
bsd/netat/ddp_rtmptable.c
bsd/netat/ddp_sip.c
bsd/netat/ddp_usrreq.c
bsd/netat/debug.h
bsd/netat/drv_dep.c
bsd/netat/ep.h
bsd/netat/lap.h
bsd/netat/nbp.h
bsd/netat/pap.h
bsd/netat/routing_tables.h
bsd/netat/rtmp.h
bsd/netat/sys_dep.c
bsd/netat/sys_glue.c
bsd/netat/sysglue.h
bsd/netat/zip.h
bsd/netinet/bootp.h
bsd/netinet/dhcp.h
bsd/netinet/dhcp_options.h
bsd/netinet/icmp6.h
bsd/netinet/icmp_var.h
bsd/netinet/if_atm.c
bsd/netinet/if_atm.h
bsd/netinet/if_ether.c
bsd/netinet/if_ether.h
bsd/netinet/if_fddi.h
bsd/netinet/if_tun.h
bsd/netinet/igmp.c
bsd/netinet/igmp.h
bsd/netinet/igmp_var.h
bsd/netinet/in.c
bsd/netinet/in.h
bsd/netinet/in_bootp.c
bsd/netinet/in_cksum.c
bsd/netinet/in_gif.c
bsd/netinet/in_gif.h
bsd/netinet/in_pcb.c
bsd/netinet/in_pcb.h
bsd/netinet/in_proto.c
bsd/netinet/in_rmx.c
bsd/netinet/in_systm.h
bsd/netinet/in_var.h
bsd/netinet/ip.h
bsd/netinet/ip6.h
bsd/netinet/ip_compat.h
bsd/netinet/ip_divert.c
bsd/netinet/ip_dummynet.c
bsd/netinet/ip_dummynet.h
bsd/netinet/ip_ecn.c
bsd/netinet/ip_ecn.h
bsd/netinet/ip_encap.c
bsd/netinet/ip_encap.h
bsd/netinet/ip_flow.c
bsd/netinet/ip_flow.h
bsd/netinet/ip_fw.h
bsd/netinet/ip_icmp.c
bsd/netinet/ip_icmp.h
bsd/netinet/ip_input.c
bsd/netinet/ip_mroute.c
bsd/netinet/ip_mroute.h
bsd/netinet/ip_output.c
bsd/netinet/ip_var.h
bsd/netinet/raw_ip.c
bsd/netinet/tcp.h
bsd/netinet/tcp_debug.c
bsd/netinet/tcp_debug.h
bsd/netinet/tcp_fsm.h
bsd/netinet/tcp_input.c
bsd/netinet/tcp_output.c
bsd/netinet/tcp_seq.h
bsd/netinet/tcp_subr.c
bsd/netinet/tcp_timer.c
bsd/netinet/tcp_timer.h
bsd/netinet/tcp_usrreq.c
bsd/netinet/tcp_var.h
bsd/netinet/tcpip.h
bsd/netinet/udp.h
bsd/netinet/udp_usrreq.c
bsd/netinet/udp_var.h
bsd/netinet6/ip6_fw.h
bsd/netinet6/ipsec.c
bsd/nfs/krpc.h
bsd/nfs/krpc_subr.c
bsd/nfs/nfs.h
bsd/nfs/nfs_bio.c
bsd/nfs/nfs_boot.c
bsd/nfs/nfs_node.c
bsd/nfs/nfs_nqlease.c
bsd/nfs/nfs_serv.c
bsd/nfs/nfs_socket.c
bsd/nfs/nfs_srvcache.c
bsd/nfs/nfs_subs.c
bsd/nfs/nfs_syscalls.c
bsd/nfs/nfs_vfsops.c
bsd/nfs/nfs_vnops.c
bsd/nfs/nfsdiskless.h
bsd/nfs/nfsm_subs.h
bsd/nfs/nfsmount.h
bsd/nfs/nfsnode.h
bsd/nfs/nfsproto.h
bsd/nfs/nfsrtt.h
bsd/nfs/nfsrvcache.h
bsd/nfs/nqnfs.h
bsd/nfs/rpcv2.h
bsd/nfs/xdr_subs.h
bsd/ppc/cpu.h
bsd/ppc/disklabel.h
bsd/ppc/endian.h
bsd/ppc/exec.h
bsd/ppc/label_t.h
bsd/ppc/param.h
bsd/ppc/profile.h
bsd/ppc/psl.h
bsd/ppc/ptrace.h
bsd/ppc/reboot.h
bsd/ppc/reg.h
bsd/ppc/setjmp.h
bsd/ppc/signal.h
bsd/ppc/spl.h
bsd/ppc/table.h
bsd/ppc/types.h
bsd/ppc/ucontext.h
bsd/ppc/user.h
bsd/ppc/vmparam.h
bsd/sys/acct.h
bsd/sys/appleapiopts.h
bsd/sys/attr.h
bsd/sys/buf.h
bsd/sys/callout.h
bsd/sys/cdefs.h
bsd/sys/clist.h
bsd/sys/conf.h
bsd/sys/dir.h
bsd/sys/dirent.h
bsd/sys/disk.h
bsd/sys/disklabel.h
bsd/sys/disktab.h
bsd/sys/dkstat.h
bsd/sys/dmap.h
bsd/sys/domain.h
bsd/sys/errno.h
bsd/sys/ev.h
bsd/sys/exec.h
bsd/sys/fcntl.h
bsd/sys/file.h
bsd/sys/filedesc.h
bsd/sys/filio.h
bsd/sys/fsctl.h
bsd/sys/gmon.h
bsd/sys/ioccom.h
bsd/sys/ioctl.h
bsd/sys/ioctl_compat.h
bsd/sys/ipc.h
bsd/sys/kdebug.h
bsd/sys/kern_control.h
bsd/sys/kern_event.h
bsd/sys/kernel.h
bsd/sys/ktrace.h
bsd/sys/linker_set.h
bsd/sys/loadable_fs.h
bsd/sys/lock.h
bsd/sys/lockf.h
bsd/sys/mach_swapon.h
bsd/sys/malloc.h
bsd/sys/mbuf.h
bsd/sys/mman.h
bsd/sys/mount.h
bsd/sys/msg.h
bsd/sys/msgbuf.h
bsd/sys/mtio.h
bsd/sys/namei.h
bsd/sys/netport.h
bsd/sys/param.h
bsd/sys/paths.h
bsd/sys/poll.h
bsd/sys/proc.h
bsd/sys/protosw.h
bsd/sys/ptrace.h
bsd/sys/queue.h
bsd/sys/quota.h
bsd/sys/random.h
bsd/sys/reboot.h
bsd/sys/resource.h
bsd/sys/resourcevar.h
bsd/sys/select.h
bsd/sys/sem.h
bsd/sys/semaphore.h
bsd/sys/shm.h
bsd/sys/signal.h
bsd/sys/signalvar.h
bsd/sys/socket.h
bsd/sys/socketvar.h
bsd/sys/sockio.h
bsd/sys/stat.h
bsd/sys/subr_prf.h
bsd/sys/sys_domain.h
bsd/sys/syscall.h
bsd/sys/sysctl.h
bsd/sys/syslimits.h
bsd/sys/syslog.h
bsd/sys/systm.h
bsd/sys/table.h
bsd/sys/termios.h
bsd/sys/time.h
bsd/sys/timeb.h
bsd/sys/times.h
bsd/sys/tprintf.h
bsd/sys/trace.h
bsd/sys/tty.h
bsd/sys/ttychars.h
bsd/sys/ttycom.h
bsd/sys/ttydefaults.h
bsd/sys/ttydev.h
bsd/sys/types.h
bsd/sys/ubc.h
bsd/sys/ucontext.h
bsd/sys/ucred.h
bsd/sys/uio.h
bsd/sys/un.h
bsd/sys/unistd.h
bsd/sys/unpcb.h
bsd/sys/user.h
bsd/sys/utfconv.h
bsd/sys/utsname.h
bsd/sys/ux_exception.h
bsd/sys/vadvise.h
bsd/sys/vcmd.h
bsd/sys/version.h
bsd/sys/vlimit.h
bsd/sys/vm.h
bsd/sys/vmmeter.h
bsd/sys/vmparam.h
bsd/sys/vnode.h
bsd/sys/vnode_if.h
bsd/sys/vstat.h
bsd/sys/wait.h
bsd/ufs/ffs/ffs_alloc.c
bsd/ufs/ffs/ffs_balloc.c
bsd/ufs/ffs/ffs_extern.h
bsd/ufs/ffs/ffs_inode.c
bsd/ufs/ffs/ffs_subr.c
bsd/ufs/ffs/ffs_tables.c
bsd/ufs/ffs/ffs_vfsops.c
bsd/ufs/ffs/ffs_vnops.c
bsd/ufs/ffs/fs.h
bsd/ufs/mfs/mfs_extern.h
bsd/ufs/mfs/mfs_vfsops.c
bsd/ufs/mfs/mfs_vnops.c
bsd/ufs/mfs/mfsiom.h
bsd/ufs/mfs/mfsnode.h
bsd/ufs/ufs/dinode.h
bsd/ufs/ufs/dir.h
bsd/ufs/ufs/inode.h
bsd/ufs/ufs/lockf.h
bsd/ufs/ufs/quota.h
bsd/ufs/ufs/ufs_bmap.c
bsd/ufs/ufs/ufs_byte_order.c
bsd/ufs/ufs/ufs_byte_order.h
bsd/ufs/ufs/ufs_extern.h
bsd/ufs/ufs/ufs_ihash.c
bsd/ufs/ufs/ufs_inode.c
bsd/ufs/ufs/ufs_lockf.c
bsd/ufs/ufs/ufs_lookup.c
bsd/ufs/ufs/ufs_quota.c
bsd/ufs/ufs/ufs_readwrite.c
bsd/ufs/ufs/ufs_vfsops.c
bsd/ufs/ufs/ufs_vnops.c
bsd/ufs/ufs/ufsmount.h
bsd/uxkern/ux_exception.c
bsd/vfs/vfs_bio.c
bsd/vfs/vfs_cache.c
bsd/vfs/vfs_cluster.c
bsd/vfs/vfs_conf.c
bsd/vfs/vfs_init.c
bsd/vfs/vfs_journal.c
bsd/vfs/vfs_journal.h
bsd/vfs/vfs_lookup.c
bsd/vfs/vfs_quota.c
bsd/vfs/vfs_subr.c
bsd/vfs/vfs_support.c
bsd/vfs/vfs_support.h
bsd/vfs/vfs_syscalls.c
bsd/vfs/vfs_utfconv.c
bsd/vfs/vfs_utfconvdata.h
bsd/vfs/vfs_vnops.c
bsd/vfs/vnode_if.c
bsd/vm/dp_backing_file.c
bsd/vm/vm_pageout.h
bsd/vm/vm_pager.h
bsd/vm/vm_unix.c
bsd/vm/vnode_pager.c
bsd/vm/vnode_pager.h
config/System.kext/Contents/Info.plist
config/System.kext/Contents/PlugIns/AppleNMI.kext/Contents/Info.plist
config/System.kext/Contents/PlugIns/ApplePlatformFamily.kext/Contents/Info.plist
config/System.kext/Contents/PlugIns/BSDKernel.kext/Contents/Info.plist
config/System.kext/Contents/PlugIns/IOADBFamily.kext/Contents/Info.plist
config/System.kext/Contents/PlugIns/IOKit.kext/Contents/Info.plist
config/System.kext/Contents/PlugIns/IONVRAMFamily.kext/Contents/Info.plist
config/System.kext/Contents/PlugIns/IOSystemManagement.kext/Contents/Info.plist
config/System.kext/Contents/PlugIns/Libkern.kext/Contents/Info.plist
config/System.kext/Contents/PlugIns/Mach.kext/Contents/Info.plist
iokit/Drivers/platform/drvAppleI386Generic/AppleI386CPU.cpp
iokit/Drivers/platform/drvAppleI386Generic/AppleI386CPU.h
iokit/Drivers/platform/drvAppleI386Generic/AppleI386PlatformExpert.cpp
iokit/Drivers/platform/drvAppleI386Generic/AppleI386PlatformExpert.h
iokit/Drivers/platform/drvAppleIntelClassicPIC/AppleIntelClassicPIC.h
iokit/Drivers/platform/drvAppleIntelClassicPIC/PIC8259.cpp
iokit/Drivers/platform/drvAppleIntelClock/AppleIntelClock.h
iokit/Drivers/platform/drvAppleIntelClock/IntelClock.cpp
iokit/Drivers/platform/drvAppleMacIO/AppleMacIO.cpp
iokit/Drivers/platform/drvAppleNMI/AppleNMI.cpp
iokit/Drivers/platform/drvAppleNVRAM/AppleNVRAM.cpp
iokit/Drivers/platform/drvAppleNVRAM/AppleNVRAM.h
iokit/Drivers/platform/drvApplePMU/IOPMUADBController.cpp
iokit/Drivers/platform/drvApplePMU/IOPMUADBController.h
iokit/Drivers/platform/drvApplePlatformExpert/AppleCPU.cpp
iokit/Drivers/platform/drvApplePlatformExpert/AppleCPU.h
iokit/Drivers/platform/drvApplePlatformExpert/ApplePlatformExpert.cpp
iokit/Drivers/platform/drvAppleRootDomain/RootDomain.cpp
iokit/Drivers/platform/drvAppleRootDomain/RootDomainUserClient.cpp
iokit/Drivers/platform/drvAppleRootDomain/RootDomainUserClient.h
iokit/Examples/drvGenericInterruptController/GenericInterruptController.cpp
iokit/Examples/drvGenericInterruptController/GenericInterruptController.h
iokit/Families/IOADBBus/IOADBBus.cpp
iokit/Families/IOADBBus/IOADBBusPriv.h
iokit/Families/IOADBBus/IOADBController.cpp
iokit/Families/IOADBBus/IOADBControllerUserClient.cpp
iokit/Families/IOADBBus/IOADBControllerUserClient.h
iokit/Families/IOADBBus/IOADBDevice.cpp
iokit/Families/IONVRAM/IONVRAMController.cpp
iokit/Families/IOSystemManagement/IOWatchDogTimer.cpp
iokit/IOKit/IOBSD.h
iokit/IOKit/IOBufferMemoryDescriptor.h
iokit/IOKit/IOCPU.h
iokit/IOKit/IOCatalogue.h
iokit/IOKit/IOCommand.h
iokit/IOKit/IOCommandGate.h
iokit/IOKit/IOCommandPool.h
iokit/IOKit/IOCommandQueue.h
iokit/IOKit/IOConditionLock.h
iokit/IOKit/IODataQueue.h
iokit/IOKit/IODataQueueShared.h
iokit/IOKit/IODeviceMemory.h
iokit/IOKit/IODeviceTreeSupport.h
iokit/IOKit/IOEventSource.h
iokit/IOKit/IOFilterInterruptEventSource.h
iokit/IOKit/IOInterruptController.h
iokit/IOKit/IOInterruptEventSource.h
iokit/IOKit/IOInterrupts.h
iokit/IOKit/IOKitDebug.h
iokit/IOKit/IOKitKeys.h
iokit/IOKit/IOKitServer.h
iokit/IOKit/IOLib.h
iokit/IOKit/IOLocks.h
iokit/IOKit/IOMapper.h [deleted file]
iokit/IOKit/IOMemoryCursor.h
iokit/IOKit/IOMemoryDescriptor.h
iokit/IOKit/IOMessage.h
iokit/IOKit/IOMultiMemoryDescriptor.h
iokit/IOKit/IONVRAM.h
iokit/IOKit/IONotifier.h
iokit/IOKit/IOPlatformExpert.h
iokit/IOKit/IORangeAllocator.h
iokit/IOKit/IORegistryEntry.h
iokit/IOKit/IOReturn.h
iokit/IOKit/IOService.h
iokit/IOKit/IOServicePM.h
iokit/IOKit/IOSharedLock.h
iokit/IOKit/IOSyncer.h
iokit/IOKit/IOTimeStamp.h
iokit/IOKit/IOTimerEventSource.h
iokit/IOKit/IOTypes.h
iokit/IOKit/IOUserClient.h
iokit/IOKit/IOWorkLoop.h
iokit/IOKit/Makefile
iokit/IOKit/OSMessageNotification.h
iokit/IOKit/adb/IOADBBus.h
iokit/IOKit/adb/IOADBController.h
iokit/IOKit/adb/IOADBDevice.h
iokit/IOKit/adb/IOADBLib.h
iokit/IOKit/adb/adb.h
iokit/IOKit/assert.h
iokit/IOKit/i386/IOSharedLockImp.h
iokit/IOKit/machine/IOSharedLockImp.h
iokit/IOKit/nvram/IONVRAMController.h
iokit/IOKit/pci/IOAGPDevice.h [new file with mode: 0644]
iokit/IOKit/pci/IOPCIBridge.h [new file with mode: 0644]
iokit/IOKit/pci/IOPCIDevice.h
iokit/IOKit/pci/Makefile [new file with mode: 0644]
iokit/IOKit/platform/AppleMacIO.h
iokit/IOKit/platform/AppleMacIODevice.h
iokit/IOKit/platform/AppleNMI.h
iokit/IOKit/platform/ApplePlatformExpert.h
iokit/IOKit/power/IOPwrController.h
iokit/IOKit/ppc/IODBDMA.h
iokit/IOKit/ppc/IOSharedLockImp.h
iokit/IOKit/pwr_mgt/IOPM.h
iokit/IOKit/pwr_mgt/IOPMLibDefs.h
iokit/IOKit/pwr_mgt/IOPMPagingPlexus.h
iokit/IOKit/pwr_mgt/IOPMPowerSource.h
iokit/IOKit/pwr_mgt/IOPMPowerSourceList.h
iokit/IOKit/pwr_mgt/IOPMPrivate.h
iokit/IOKit/pwr_mgt/IOPMchangeNoteList.h
iokit/IOKit/pwr_mgt/IOPMinformee.h
iokit/IOKit/pwr_mgt/IOPMinformeeList.h
iokit/IOKit/pwr_mgt/IOPMlog.h
iokit/IOKit/pwr_mgt/IOPMpmChild.h
iokit/IOKit/pwr_mgt/IOPMpowerState.h
iokit/IOKit/pwr_mgt/IOPowerConnection.h
iokit/IOKit/pwr_mgt/RootDomain.h
iokit/IOKit/rtc/IORTCController.h
iokit/IOKit/system.h
iokit/IOKit/system_management/IOWatchDogTimer.h
iokit/Kernel/IOBufferMemoryDescriptor.cpp
iokit/Kernel/IOCPU.cpp
iokit/Kernel/IOCatalogue.cpp
iokit/Kernel/IOCommand.cpp
iokit/Kernel/IOCommandGate.cpp
iokit/Kernel/IOCommandPool.cpp
iokit/Kernel/IOCommandQueue.cpp
iokit/Kernel/IOConditionLock.cpp
iokit/Kernel/IODataQueue.cpp
iokit/Kernel/IODeviceMemory.cpp
iokit/Kernel/IODeviceTreeSupport.cpp
iokit/Kernel/IOEventSource.cpp
iokit/Kernel/IOFilterInterruptEventSource.cpp
iokit/Kernel/IOInterruptController.cpp
iokit/Kernel/IOInterruptEventSource.cpp
iokit/Kernel/IOKitDebug.cpp
iokit/Kernel/IOLib.c
iokit/Kernel/IOLocks.cpp
iokit/Kernel/IOMapper.cpp [deleted file]
iokit/Kernel/IOMemoryCursor.cpp
iokit/Kernel/IOMemoryDescriptor.cpp
iokit/Kernel/IOMultiMemoryDescriptor.cpp
iokit/Kernel/IONVRAM.cpp
iokit/Kernel/IOPMPagingPlexus.cpp
iokit/Kernel/IOPMPowerSource.cpp
iokit/Kernel/IOPMPowerSourceList.cpp
iokit/Kernel/IOPMchangeNoteList.cpp
iokit/Kernel/IOPMinformee.cpp
iokit/Kernel/IOPMinformeeList.cpp
iokit/Kernel/IOPMpmChild.cpp
iokit/Kernel/IOPlatformExpert.cpp
iokit/Kernel/IOPowerConnection.cpp
iokit/Kernel/IORangeAllocator.cpp
iokit/Kernel/IORegistryEntry.cpp
iokit/Kernel/IOService.cpp
iokit/Kernel/IOServicePM.cpp
iokit/Kernel/IOServicePrivate.h
iokit/Kernel/IOStartIOKit.cpp
iokit/Kernel/IOStringFuncs.c
iokit/Kernel/IOSyncer.cpp
iokit/Kernel/IOTimerEventSource.cpp
iokit/Kernel/IOUserClient.cpp
iokit/Kernel/IOWorkLoop.cpp
iokit/Kernel/PMmisc.cpp
iokit/Kernel/i386/IOAsmSupport.s
iokit/Kernel/i386/IOSharedLock.s
iokit/Kernel/ppc/IOAsmSupport.s
iokit/Kernel/ppc/IODBDMA.cpp
iokit/Kernel/ppc/IOSharedLock.s
iokit/KernelConfigTables.cpp
iokit/Tests/TestCollections.cpp
iokit/Tests/TestContainers.cpp
iokit/Tests/TestDevice.cpp
iokit/Tests/Tests.cpp
iokit/Tests/Tests.h
iokit/bsddev/IOKitBSDInit.cpp
iokit/bsddev/IOKitBSDInit.h
iokit/conf/Makefile.template
iokit/conf/files
iokit/conf/version.minor
iokit/conf/version.variant
iokit/include/DeviceTree.h
iokit/include/architecture/i386/kernBootStruct.h
iokit/include/architecture/i386/pio.h
iokit/include/assert.h
iokit/include/bsddev/EventShmemLock.h
iokit/include/bsddev/ev_keymap.h
iokit/include/bsddev/ev_types.h
iokit/include/bsddev/event.h
iokit/include/bsddev/evio.h
iokit/include/bsddev/evsio.h
iokit/include/bsddev/i386/EventShmemLock.h
iokit/include/bsddev/i386/event.h
iokit/include/bsddev/i386/evio.h
iokit/include/bsddev/i386/evsio.h
iokit/include/bsddev/machine/EventShmemLock.h
iokit/include/bsddev/machine/event.h
iokit/include/bsddev/machine/evio.h
iokit/include/bsddev/machine/evsio.h
iokit/include/bsddev/ppc/EventShmemLock.h
iokit/include/bsddev/ppc/event.h
iokit/include/bsddev/ppc/evio.h
iokit/include/bsddev/ppc/evsio.h
iokit/include/drivers/event_status_driver.h
iokit/include/mach/mach.h
iokit/mach-o/mach_header.h
libkern/c++/OSArray.cpp
libkern/c++/OSBoolean.cpp
libkern/c++/OSCPPDebug.cpp
libkern/c++/OSCollection.cpp
libkern/c++/OSCollectionIterator.cpp
libkern/c++/OSData.cpp
libkern/c++/OSDictionary.cpp
libkern/c++/OSIterator.cpp
libkern/c++/OSMetaClass.cpp
libkern/c++/OSNumber.cpp
libkern/c++/OSObject.cpp
libkern/c++/OSOrderedSet.cpp
libkern/c++/OSRuntime.cpp
libkern/c++/OSSerialize.cpp
libkern/c++/OSSet.cpp
libkern/c++/OSString.cpp
libkern/c++/OSSymbol.cpp
libkern/c++/OSUnserialize.cpp
libkern/c++/OSUnserializeXML.cpp
libkern/c++/Tests/TestSerialization/test1.kmodproj/test1_main.cpp
libkern/c++/Tests/TestSerialization/test1.kmodproj/test1_main.h
libkern/c++/Tests/TestSerialization/test2.kmodproj/test2_main.cpp
libkern/conf/version.minor
libkern/conf/version.variant
libkern/gen/OSAtomicOperations.c
libkern/i386/OSAtomic.c
libkern/i386/OSAtomic.s
libkern/kmod/c_start.c
libkern/kmod/c_stop.c
libkern/kmod/cplus_start.c
libkern/kmod/cplus_stop.c
libkern/libkern/OSAtomic.h
libkern/libkern/OSBase.h
libkern/libkern/OSByteOrder.h
libkern/libkern/OSReturn.h
libkern/libkern/OSTypes.h
libkern/libkern/c++/OSArray.h
libkern/libkern/c++/OSBoolean.h
libkern/libkern/c++/OSCPPDebug.h
libkern/libkern/c++/OSCollection.h
libkern/libkern/c++/OSCollectionIterator.h
libkern/libkern/c++/OSContainers.h
libkern/libkern/c++/OSData.h
libkern/libkern/c++/OSDictionary.h
libkern/libkern/c++/OSIterator.h
libkern/libkern/c++/OSLib.h
libkern/libkern/c++/OSMetaClass.h
libkern/libkern/c++/OSNumber.h
libkern/libkern/c++/OSObject.h
libkern/libkern/c++/OSOrderedSet.h
libkern/libkern/c++/OSSerialize.h
libkern/libkern/c++/OSSet.h
libkern/libkern/c++/OSString.h
libkern/libkern/c++/OSSymbol.h
libkern/libkern/c++/OSUnserialize.h
libkern/libkern/i386/OSByteOrder.h
libkern/libkern/machine/OSByteOrder.h
libkern/libkern/ppc/OSByteOrder.h
libkern/mach-o/loader.h
libkern/mach-o/mach_header.h
libkern/ppc/OSAtomic.s
libkern/ppc/bcmp.s
libkern/ppc/memcmp.s
libkern/ppc/strlen.s
libsa/bootstrap.cpp
libsa/bsearch.c
libsa/c++rem3.h
libsa/catalogue.cpp
libsa/conf/version.minor
libsa/conf/version.variant
libsa/i386/setjmp.s
libsa/kld_patch.c
libsa/kld_patch.h
libsa/kmod.cpp
libsa/libsa/i386/setjmp.h
libsa/libsa/malloc.h
libsa/libsa/ppc/setjmp.h
libsa/libsa/setjmp.h
libsa/libsa/stdlib.h
libsa/mach.c
libsa/mach_loader.h
libsa/malloc.c
libsa/misc.c
libsa/mkext.c
libsa/ppc/setjmp.s
libsa/sort.c
libsa/strrchr.c
libsa/strstr.c
makedefs/MakeInc.def
osfmk/Makefile
osfmk/UserNotification/KUNCUserNotifications.c
osfmk/UserNotification/KUNCUserNotifications.h
osfmk/UserNotification/UNDReply.defs
osfmk/UserNotification/UNDRequest.defs
osfmk/UserNotification/UNDTypes.defs
osfmk/UserNotification/UNDTypes.h
osfmk/conf/files.i386
osfmk/conf/files.ppc
osfmk/conf/kernelversion.minor
osfmk/conf/kernelversion.variant
osfmk/conf/version.minor
osfmk/conf/version.variant
osfmk/ddb/db_access.c
osfmk/ddb/db_access.h
osfmk/ddb/db_aout.c
osfmk/ddb/db_aout.h
osfmk/ddb/db_break.c
osfmk/ddb/db_break.h
osfmk/ddb/db_coff.h
osfmk/ddb/db_command.c
osfmk/ddb/db_command.h
osfmk/ddb/db_cond.c
osfmk/ddb/db_cond.h
osfmk/ddb/db_examine.c
osfmk/ddb/db_examine.h
osfmk/ddb/db_expr.c
osfmk/ddb/db_expr.h
osfmk/ddb/db_ext_symtab.c
osfmk/ddb/db_input.c
osfmk/ddb/db_input.h
osfmk/ddb/db_lex.c
osfmk/ddb/db_lex.h
osfmk/ddb/db_macro.c
osfmk/ddb/db_macro.h
osfmk/ddb/db_output.c
osfmk/ddb/db_output.h
osfmk/ddb/db_print.c
osfmk/ddb/db_print.h
osfmk/ddb/db_run.c
osfmk/ddb/db_run.h
osfmk/ddb/db_sym.c
osfmk/ddb/db_sym.h
osfmk/ddb/db_task_thread.c
osfmk/ddb/db_task_thread.h
osfmk/ddb/db_trap.c
osfmk/ddb/db_trap.h
osfmk/ddb/db_variables.c
osfmk/ddb/db_variables.h
osfmk/ddb/db_watch.c
osfmk/ddb/db_watch.h
osfmk/ddb/db_write_cmd.c
osfmk/ddb/db_write_cmd.h
osfmk/ddb/makedis.c
osfmk/ddb/nlist.h
osfmk/ddb/orig/db_print.c
osfmk/ddb/stab.h
osfmk/ddb/tr.c
osfmk/ddb/tr.h
osfmk/default_pager/default_pager.c
osfmk/default_pager/default_pager_alerts.defs
osfmk/default_pager/default_pager_internal.h
osfmk/default_pager/default_pager_object.defs
osfmk/default_pager/default_pager_types.defs
osfmk/default_pager/default_pager_types.h
osfmk/default_pager/diag.h
osfmk/default_pager/dp_backing_store.c
osfmk/default_pager/dp_memory_object.c
osfmk/device/device.defs
osfmk/device/device_init.c
osfmk/device/device_port.h
osfmk/device/device_types.defs
osfmk/device/device_types.h
osfmk/device/iokit_rpc.c
osfmk/device/subrs.c
osfmk/i386/AT386/asm_startup.h
osfmk/i386/AT386/autoconf.c
osfmk/i386/AT386/bbclock.c
osfmk/i386/AT386/bbclock_entries.h
osfmk/i386/AT386/conf.c
osfmk/i386/AT386/config.h
osfmk/i386/AT386/cram.h
osfmk/i386/AT386/himem.c
osfmk/i386/AT386/himem.h
osfmk/i386/AT386/iso_scan_font.h
osfmk/i386/AT386/kernBootStruct.h
osfmk/i386/AT386/misc_protos.h
osfmk/i386/AT386/model_dep.c
osfmk/i386/AT386/mp/boot.h
osfmk/i386/AT386/mp/mp.c
osfmk/i386/AT386/mp/mp.h
osfmk/i386/AT386/mp/mp_events.h
osfmk/i386/AT386/mp/mp_v1_1.c
osfmk/i386/AT386/mp/mp_v1_1.h
osfmk/i386/AT386/mp/slave_boot.s
osfmk/i386/AT386/physmem_entries.h
osfmk/i386/AT386/rtc.h
osfmk/i386/AT386/video_console.c
osfmk/i386/AT386/video_console.h
osfmk/i386/Makefile
osfmk/i386/_setjmp.s
osfmk/i386/apic.h
osfmk/i386/arch_types.h
osfmk/i386/asm.h
osfmk/i386/ast.h
osfmk/i386/ast_check.c
osfmk/i386/ast_types.h
osfmk/i386/bcopy.s
osfmk/i386/bsd_i386.c
osfmk/i386/bzero.s
osfmk/i386/commpage/commpage.c [deleted file]
osfmk/i386/commpage/commpage.h [deleted file]
osfmk/i386/cpu.c
osfmk/i386/cpu_capabilities.h [deleted file]
osfmk/i386/cpu_data.h
osfmk/i386/cpu_number.h
osfmk/i386/cpuid.c
osfmk/i386/cpuid.h
osfmk/i386/cswitch.s
osfmk/i386/db_disasm.c
osfmk/i386/db_gcc_aout.c
osfmk/i386/db_interface.c
osfmk/i386/db_machdep.h
osfmk/i386/db_trace.c
osfmk/i386/eflags.h
osfmk/i386/endian.h
osfmk/i386/exec.h
osfmk/i386/flipc_page.h
osfmk/i386/fpu.c
osfmk/i386/fpu.h
osfmk/i386/gcc.s
osfmk/i386/gdb_defs.h
osfmk/i386/gdt.c
osfmk/i386/genassym.c
osfmk/i386/hardclock.c
osfmk/i386/hardclock_entries.h
osfmk/i386/hi_res_clock.h
osfmk/i386/hi_res_clock_map.c
osfmk/i386/hw_lock_types.h
osfmk/i386/i386_lock.s
osfmk/i386/idt.s
osfmk/i386/intel_read_fault.h
osfmk/i386/io_emulate.c
osfmk/i386/io_emulate.h
osfmk/i386/io_map.c
osfmk/i386/io_map_entries.h
osfmk/i386/io_port.h
osfmk/i386/iopb.c
osfmk/i386/iopb.h
osfmk/i386/iopb_entries.h
osfmk/i386/ipl.h
osfmk/i386/ktss.c
osfmk/i386/ldt.c
osfmk/i386/lock.h
osfmk/i386/locore.s
osfmk/i386/loose_ends.c
osfmk/i386/mach_param.h
osfmk/i386/machdep_call.c
osfmk/i386/machdep_call.h
osfmk/i386/machine_routines.c
osfmk/i386/machine_routines.h
osfmk/i386/machine_routines_asm.s
osfmk/i386/machine_rpc.h
osfmk/i386/machlimits.h
osfmk/i386/machparam.h
osfmk/i386/misc_protos.h
osfmk/i386/mp_desc.c
osfmk/i386/mp_desc.h
osfmk/i386/net_filter.c
osfmk/i386/ntoh.h
osfmk/i386/ntoh.s
osfmk/i386/pcb.c
osfmk/i386/phys.c
osfmk/i386/pic.h
osfmk/i386/pio.h
osfmk/i386/pit.h
osfmk/i386/pmap.c
osfmk/i386/pmap.h
osfmk/i386/proc_reg.h
osfmk/i386/read_fault.c
osfmk/i386/rtclock.c
osfmk/i386/rtclock_entries.h
osfmk/i386/sched_param.h
osfmk/i386/seg.h
osfmk/i386/setjmp.h
osfmk/i386/setjmp.s
osfmk/i386/stab.h
osfmk/i386/start.s
osfmk/i386/task.h
osfmk/i386/thread.h
osfmk/i386/thread_act.h
osfmk/i386/timer.h
osfmk/i386/trap.c
osfmk/i386/trap.h
osfmk/i386/tss.h
osfmk/i386/user_ldt.c
osfmk/i386/user_ldt.h
osfmk/i386/vm_tuning.h
osfmk/i386/xpr.h
osfmk/ipc/ipc_entry.c
osfmk/ipc/ipc_entry.h
osfmk/ipc/ipc_hash.c
osfmk/ipc/ipc_hash.h
osfmk/ipc/ipc_init.c
osfmk/ipc/ipc_init.h
osfmk/ipc/ipc_kmsg.c
osfmk/ipc/ipc_kmsg.h
osfmk/ipc/ipc_machdep.h
osfmk/ipc/ipc_mqueue.c
osfmk/ipc/ipc_mqueue.h
osfmk/ipc/ipc_notify.c
osfmk/ipc/ipc_notify.h
osfmk/ipc/ipc_object.c
osfmk/ipc/ipc_object.h
osfmk/ipc/ipc_port.c
osfmk/ipc/ipc_port.h
osfmk/ipc/ipc_print.h
osfmk/ipc/ipc_pset.c
osfmk/ipc/ipc_pset.h
osfmk/ipc/ipc_right.c
osfmk/ipc/ipc_right.h
osfmk/ipc/ipc_space.c
osfmk/ipc/ipc_space.h
osfmk/ipc/ipc_splay.c
osfmk/ipc/ipc_splay.h
osfmk/ipc/ipc_table.c
osfmk/ipc/ipc_table.h
osfmk/ipc/ipc_types.h
osfmk/ipc/mach_debug.c
osfmk/ipc/mach_msg.c
osfmk/ipc/mach_port.c
osfmk/ipc/mig_log.c
osfmk/ipc/port.h
osfmk/kdp/kdp.c
osfmk/kdp/kdp.h
osfmk/kdp/kdp_en_debugger.h
osfmk/kdp/kdp_internal.h
osfmk/kdp/kdp_private.h
osfmk/kdp/kdp_protocol.h
osfmk/kdp/kdp_udp.c
osfmk/kdp/kdp_udp.h
osfmk/kdp/ml/i386/kdp_machdep.c
osfmk/kdp/ml/i386/kdp_vm.c
osfmk/kdp/ml/ppc/kdp_asm.s
osfmk/kdp/ml/ppc/kdp_machdep.c
osfmk/kdp/ml/ppc/kdp_misc.s
osfmk/kdp/ml/ppc/kdp_vm.c
osfmk/kdp/pe/POWERMAC/kdp_mace.c [new file with mode: 0644]
osfmk/kdp/pe/POWERMAC/kdp_mace.h [new file with mode: 0644]
osfmk/kern/assert.h
osfmk/kern/ast.c
osfmk/kern/ast.h
osfmk/kern/bits.c
osfmk/kern/bsd_kern.c
osfmk/kern/call_entry.h
osfmk/kern/clock.c
osfmk/kern/clock.h
osfmk/kern/counters.c
osfmk/kern/counters.h
osfmk/kern/cpu_data.c
osfmk/kern/cpu_data.h
osfmk/kern/cpu_number.h
osfmk/kern/debug.c
osfmk/kern/debug.h
osfmk/kern/etap.c
osfmk/kern/etap_macros.h
osfmk/kern/etap_map.c
osfmk/kern/etap_map.h
osfmk/kern/etap_options.h
osfmk/kern/etap_pool.c
osfmk/kern/etap_pool.h
osfmk/kern/exception.c
osfmk/kern/exception.h
osfmk/kern/host.c
osfmk/kern/host.h
osfmk/kern/host_statistics.h
osfmk/kern/ipc_clock.c
osfmk/kern/ipc_host.c
osfmk/kern/ipc_host.h
osfmk/kern/ipc_kobject.c
osfmk/kern/ipc_kobject.h
osfmk/kern/ipc_mig.c
osfmk/kern/ipc_mig.h
osfmk/kern/ipc_sync.c
osfmk/kern/ipc_sync.h
osfmk/kern/ipc_tt.c
osfmk/kern/ipc_tt.h
osfmk/kern/kalloc.c
osfmk/kern/kalloc.h
osfmk/kern/kern_print.h
osfmk/kern/kern_types.h
osfmk/kern/kmod.c
osfmk/kern/ledger.c
osfmk/kern/ledger.h
osfmk/kern/lock.c
osfmk/kern/lock.h
osfmk/kern/lock_mon.c
osfmk/kern/mach_clock.c
osfmk/kern/mach_factor.c
osfmk/kern/mach_param.h
osfmk/kern/machine.c
osfmk/kern/machine.h
osfmk/kern/macro_help.h
osfmk/kern/misc_protos.h
osfmk/kern/mk_sp.c
osfmk/kern/mk_sp.h
osfmk/kern/mk_timer.c
osfmk/kern/mk_timer.h
osfmk/kern/norma_protos.h
osfmk/kern/printf.c
osfmk/kern/priority.c
osfmk/kern/processor.c
osfmk/kern/processor.h
osfmk/kern/profile.c
osfmk/kern/profile.h
osfmk/kern/queue.c
osfmk/kern/queue.h
osfmk/kern/sched.h
osfmk/kern/sched_prim.c
osfmk/kern/sched_prim.h
osfmk/kern/simple_lock.h
osfmk/kern/simple_lock_types.h
osfmk/kern/spl.c
osfmk/kern/spl.h
osfmk/kern/sscanf.c
osfmk/kern/startup.c
osfmk/kern/startup.h
osfmk/kern/sync_lock.c
osfmk/kern/sync_lock.h
osfmk/kern/sync_sema.c
osfmk/kern/sync_sema.h
osfmk/kern/syscall_emulation.c
osfmk/kern/syscall_emulation.h
osfmk/kern/syscall_subr.c
osfmk/kern/syscall_subr.h
osfmk/kern/syscall_sw.c
osfmk/kern/syscall_sw.h
osfmk/kern/task.c
osfmk/kern/task.h
osfmk/kern/task_policy.c
osfmk/kern/task_swap.c
osfmk/kern/task_swap.h
osfmk/kern/thread.c
osfmk/kern/thread.h
osfmk/kern/thread_act.c
osfmk/kern/thread_act.h
osfmk/kern/thread_call.c
osfmk/kern/thread_call.h
osfmk/kern/thread_policy.c
osfmk/kern/thread_swap.c
osfmk/kern/thread_swap.h
osfmk/kern/time_out.h
osfmk/kern/timer.c
osfmk/kern/timer.h
osfmk/kern/timer_call.c
osfmk/kern/timer_call.h
osfmk/kern/wait_queue.c
osfmk/kern/wait_queue.h
osfmk/kern/xpr.c
osfmk/kern/xpr.h
osfmk/kern/zalloc.c
osfmk/kern/zalloc.h
osfmk/libsa/ctype.h
osfmk/libsa/errno.h
osfmk/libsa/float.h
osfmk/libsa/i386/float.h
osfmk/libsa/i386/math.h
osfmk/libsa/i386/stdarg.h
osfmk/libsa/i386/types.h
osfmk/libsa/i386/va_list.h
osfmk/libsa/ieeefloat.h
osfmk/libsa/machine/stdarg.h
osfmk/libsa/machine/stdarg_apple.h
osfmk/libsa/machine/types.h
osfmk/libsa/machine/va_list.h
osfmk/libsa/math.h
osfmk/libsa/ppc/float.h
osfmk/libsa/ppc/math.h
osfmk/libsa/ppc/stdarg.h
osfmk/libsa/ppc/stdarg_apple.h
osfmk/libsa/ppc/types.h
osfmk/libsa/ppc/va_list.h
osfmk/libsa/stdarg.h
osfmk/libsa/stdio.h
osfmk/libsa/stdlib.h
osfmk/libsa/string.h
osfmk/libsa/sys/timers.h
osfmk/libsa/types.h
osfmk/libsa/va_list.h
osfmk/mach-o/loader.h
osfmk/mach-o/mach_header.c
osfmk/mach-o/mach_header.h
osfmk/mach/alert.h
osfmk/mach/boolean.h
osfmk/mach/boot_info.h
osfmk/mach/bootstrap.h
osfmk/mach/clock.defs
osfmk/mach/clock_priv.defs
osfmk/mach/clock_reply.defs
osfmk/mach/clock_types.defs
osfmk/mach/clock_types.h
osfmk/mach/error.h
osfmk/mach/etap.h
osfmk/mach/etap_events.h
osfmk/mach/events_info.h
osfmk/mach/exc.defs
osfmk/mach/exception.h
osfmk/mach/exception_types.h
osfmk/mach/flipc_cb.h
osfmk/mach/flipc_debug.h
osfmk/mach/flipc_device.h
osfmk/mach/flipc_locks.h
osfmk/mach/flipc_types.h
osfmk/mach/host_info.h
osfmk/mach/host_priv.defs
osfmk/mach/host_reboot.h
osfmk/mach/host_security.defs
osfmk/mach/i386/boolean.h
osfmk/mach/i386/exception.h
osfmk/mach/i386/flipc_dep.h
osfmk/mach/i386/fp_reg.h
osfmk/mach/i386/kern_return.h
osfmk/mach/i386/mach_i386.defs
osfmk/mach/i386/mach_i386_types.h
osfmk/mach/i386/machine_types.defs
osfmk/mach/i386/ndr_def.h
osfmk/mach/i386/processor_info.h
osfmk/mach/i386/rpc.h
osfmk/mach/i386/syscall_sw.h
osfmk/mach/i386/thread_state.h
osfmk/mach/i386/thread_status.h
osfmk/mach/i386/vm_param.h
osfmk/mach/i386/vm_types.h
osfmk/mach/kern_return.h
osfmk/mach/kmod.h
osfmk/mach/ledger.defs
osfmk/mach/lock_set.defs
osfmk/mach/mach.h
osfmk/mach/mach_host.defs
osfmk/mach/mach_interface.h
osfmk/mach/mach_norma.defs
osfmk/mach/mach_param.h
osfmk/mach/mach_port.defs
osfmk/mach/mach_syscalls.h
osfmk/mach/mach_time.h
osfmk/mach/mach_traps.h
osfmk/mach/mach_types.defs
osfmk/mach/mach_types.h
osfmk/mach/machine.h
osfmk/mach/machine/asm.h
osfmk/mach/machine/boolean.h
osfmk/mach/machine/exception.h
osfmk/mach/machine/kern_return.h
osfmk/mach/machine/machine_types.defs
osfmk/mach/machine/ndr_def.h
osfmk/mach/machine/processor_info.h
osfmk/mach/machine/rpc.h
osfmk/mach/machine/syscall_sw.h
osfmk/mach/machine/thread_state.h
osfmk/mach/machine/thread_status.h
osfmk/mach/machine/vm_param.h
osfmk/mach/machine/vm_types.h
osfmk/mach/memory_object.defs
osfmk/mach/memory_object.h
osfmk/mach/memory_object_control.defs
osfmk/mach/memory_object_default.defs
osfmk/mach/memory_object_name.defs
osfmk/mach/memory_object_types.h
osfmk/mach/message.h
osfmk/mach/mig.h
osfmk/mach/mig_errors.h
osfmk/mach/mig_log.h
osfmk/mach/mk_timer.h
osfmk/mach/mk_traps.h
osfmk/mach/msg_type.h
osfmk/mach/ndr.h
osfmk/mach/norma_special_ports.h
osfmk/mach/notify.defs
osfmk/mach/notify.h
osfmk/mach/policy.h
osfmk/mach/port.h
osfmk/mach/ppc/boolean.h
osfmk/mach/ppc/exception.h
osfmk/mach/ppc/kern_return.h
osfmk/mach/ppc/machine_types.defs
osfmk/mach/ppc/ndr_def.h
osfmk/mach/ppc/processor_info.h
osfmk/mach/ppc/rpc.h
osfmk/mach/ppc/syscall_sw.h
osfmk/mach/ppc/thread_state.h
osfmk/mach/ppc/thread_status.h
osfmk/mach/ppc/vm_param.h
osfmk/mach/ppc/vm_types.h
osfmk/mach/processor.defs
osfmk/mach/processor_info.h
osfmk/mach/processor_set.defs
osfmk/mach/prof.defs
osfmk/mach/prof_types.h
osfmk/mach/rpc.h
osfmk/mach/semaphore.defs
osfmk/mach/semaphore.h
osfmk/mach/shared_memory_server.h
osfmk/mach/std_types.defs
osfmk/mach/std_types.h
osfmk/mach/sync.defs
osfmk/mach/sync_policy.h
osfmk/mach/syscall_sw.h
osfmk/mach/task.defs
osfmk/mach/task_info.h
osfmk/mach/task_ledger.h
osfmk/mach/task_policy.h
osfmk/mach/task_special_ports.h
osfmk/mach/thread_act.defs
osfmk/mach/thread_info.h
osfmk/mach/thread_policy.h
osfmk/mach/thread_special_ports.h
osfmk/mach/thread_status.h
osfmk/mach/thread_switch.h
osfmk/mach/time_value.h
osfmk/mach/upl.defs
osfmk/mach/vm_attributes.h
osfmk/mach/vm_behavior.h
osfmk/mach/vm_inherit.h
osfmk/mach/vm_map.defs
osfmk/mach/vm_param.h
osfmk/mach/vm_prot.h
osfmk/mach/vm_region.h
osfmk/mach/vm_statistics.h
osfmk/mach/vm_sync.h
osfmk/mach/vm_types.h
osfmk/mach_debug/hash_info.h
osfmk/mach_debug/ipc_info.h
osfmk/mach_debug/mach_debug.h
osfmk/mach_debug/mach_debug_types.defs
osfmk/mach_debug/mach_debug_types.h
osfmk/mach_debug/page_info.h
osfmk/mach_debug/vm_info.h
osfmk/mach_debug/zone_info.h
osfmk/machine/Makefile
osfmk/machine/asm.h
osfmk/machine/ast.h
osfmk/machine/ast_types.h
osfmk/machine/commpage.h [deleted file]
osfmk/machine/cpu_capabilities.h [deleted file]
osfmk/machine/cpu_data.h
osfmk/machine/cpu_number.h
osfmk/machine/db_machdep.h
osfmk/machine/disk.h
osfmk/machine/endian.h
osfmk/machine/gdb_defs.h
osfmk/machine/hw_lock_types.h
osfmk/machine/io_map_entries.h
osfmk/machine/iobus.h
osfmk/machine/kgdb_defs.h
osfmk/machine/kgdb_setjmp.h
osfmk/machine/lock.h
osfmk/machine/mach_param.h
osfmk/machine/machine_routines.h
osfmk/machine/machine_rpc.h
osfmk/machine/machlimits.h
osfmk/machine/machparam.h
osfmk/machine/pmap.h
osfmk/machine/sched_param.h
osfmk/machine/setjmp.h
osfmk/machine/spl.h
osfmk/machine/task.h
osfmk/machine/thread.h
osfmk/machine/thread_act.h
osfmk/machine/timer.h
osfmk/machine/trap.h
osfmk/machine/vm_tuning.h
osfmk/machine/xpr.h
osfmk/ppc/AltiAssist.s
osfmk/ppc/Diagnostics.c
osfmk/ppc/Diagnostics.h
osfmk/ppc/Emulate.s
osfmk/ppc/Emulate64.s [deleted file]
osfmk/ppc/Firmware.h
osfmk/ppc/Firmware.s
osfmk/ppc/FirmwareC.c
osfmk/ppc/FirmwareCalls.h
osfmk/ppc/MPinterfaces.s
osfmk/ppc/Makefile
osfmk/ppc/POWERMAC/dbdma.c
osfmk/ppc/POWERMAC/dbdma.h
osfmk/ppc/POWERMAC/mp/MPPlugIn.h [new file with mode: 0644]
osfmk/ppc/POWERMAC/mp/MP_2p.s [new file with mode: 0644]
osfmk/ppc/POWERMAC/mp/mp.c [new file with mode: 0644]
osfmk/ppc/POWERMAC/mp/mp.h [new file with mode: 0644]
osfmk/ppc/POWERMAC/scc_8530.h
osfmk/ppc/POWERMAC/serial_io.c
osfmk/ppc/POWERMAC/serial_io.h
osfmk/ppc/POWERMAC/video_console.c
osfmk/ppc/POWERMAC/video_console.h
osfmk/ppc/POWERMAC/video_console_entries.h
osfmk/ppc/POWERMAC/video_scroll.s
osfmk/ppc/PPCcalls.c
osfmk/ppc/PPCcalls.h
osfmk/ppc/Performance.h
osfmk/ppc/Performance.s
osfmk/ppc/PseudoKernel.c
osfmk/ppc/PseudoKernel.h
osfmk/ppc/_setjmp.s
osfmk/ppc/aligned_data.s
osfmk/ppc/asm.h
osfmk/ppc/ast.h
osfmk/ppc/ast_types.h
osfmk/ppc/atomic_switch.h
osfmk/ppc/atomic_switch.s
osfmk/ppc/bat_init.c
osfmk/ppc/bcopy.s
osfmk/ppc/bcopytest.c [deleted file]
osfmk/ppc/bits.s
osfmk/ppc/boot.h
osfmk/ppc/bsd_asm.s [new file with mode: 0644]
osfmk/ppc/bsd_ppc.c [new file with mode: 0644]
osfmk/ppc/bzero.s
osfmk/ppc/cache.s
osfmk/ppc/clock.h
osfmk/ppc/commpage/bcopy_64.s [deleted file]
osfmk/ppc/commpage/bcopy_970.s [deleted file]
osfmk/ppc/commpage/bcopy_g3.s [deleted file]
osfmk/ppc/commpage/bcopy_g4.s [deleted file]
osfmk/ppc/commpage/bigcopy_970.s [deleted file]
osfmk/ppc/commpage/bzero_128.s [deleted file]
osfmk/ppc/commpage/bzero_32.s [deleted file]
osfmk/ppc/commpage/cacheflush.s [deleted file]
osfmk/ppc/commpage/commpage.c [deleted file]
osfmk/ppc/commpage/commpage.h [deleted file]
osfmk/ppc/commpage/commpage_asm.s [deleted file]
osfmk/ppc/commpage/gettimeofday.s [deleted file]
osfmk/ppc/commpage/mach_absolute_time.s [deleted file]
osfmk/ppc/commpage/pthread.s [deleted file]
osfmk/ppc/commpage/spinlocks.s [deleted file]
osfmk/ppc/conf.c
osfmk/ppc/console_feed.c
osfmk/ppc/console_feed_entries.h
osfmk/ppc/cpu.c
osfmk/ppc/cpu_capabilities.h [deleted file]
osfmk/ppc/cpu_data.h
osfmk/ppc/cpu_number.h
osfmk/ppc/cswtch.s
osfmk/ppc/db_asm.s
osfmk/ppc/db_disasm.c
osfmk/ppc/db_interface.c
osfmk/ppc/db_low_trace.c
osfmk/ppc/db_low_trace.h
osfmk/ppc/db_machdep.h
osfmk/ppc/db_trace.c
osfmk/ppc/endian.h
osfmk/ppc/exception.h
osfmk/ppc/fpu_protos.h
osfmk/ppc/genassym.c
osfmk/ppc/hardclock_entries.h
osfmk/ppc/hexfont.h
osfmk/ppc/hw_counters.h [new file with mode: 0644]
osfmk/ppc/hw_exception.s
osfmk/ppc/hw_lock.s
osfmk/ppc/hw_lock_types.h
osfmk/ppc/hw_perfmon.c [deleted file]
osfmk/ppc/hw_perfmon.h [deleted file]
osfmk/ppc/hw_perfmon_mmcr.h [deleted file]
osfmk/ppc/hw_vm.s
osfmk/ppc/instrumentation.h [deleted file]
osfmk/ppc/interrupt.c
osfmk/ppc/io_map.c
osfmk/ppc/io_map_entries.h
osfmk/ppc/iso_font.h
osfmk/ppc/lock.h
osfmk/ppc/low_trace.h
osfmk/ppc/lowglobals.h [deleted file]
osfmk/ppc/lowmem_vectors.s
osfmk/ppc/mach_param.h
osfmk/ppc/machine_cpu.h
osfmk/ppc/machine_routines.c
osfmk/ppc/machine_routines.h
osfmk/ppc/machine_routines_asm.s
osfmk/ppc/machine_rpc.h
osfmk/ppc/machlimits.h
osfmk/ppc/machparam.h
osfmk/ppc/mappings.c
osfmk/ppc/mappings.h
osfmk/ppc/mem.c [new file with mode: 0644]
osfmk/ppc/mem.h
osfmk/ppc/misc.c
osfmk/ppc/misc_asm.s
osfmk/ppc/misc_protos.h
osfmk/ppc/model_dep.c
osfmk/ppc/movc.s
osfmk/ppc/mp.h
osfmk/ppc/net_filter.c [new file with mode: 0644]
osfmk/ppc/new_screen.h
osfmk/ppc/notify_interrupt.c [new file with mode: 0644]
osfmk/ppc/pcb.c
osfmk/ppc/pmap.c
osfmk/ppc/pmap.h
osfmk/ppc/pmap_internals.h [new file with mode: 0644]
osfmk/ppc/ppc_disasm.i
osfmk/ppc/ppc_init.c
osfmk/ppc/ppc_vm_init.c
osfmk/ppc/proc_reg.h
osfmk/ppc/rtclock.c
osfmk/ppc/savearea.c
osfmk/ppc/savearea.h
osfmk/ppc/savearea_asm.s
osfmk/ppc/sched_param.h
osfmk/ppc/screen_switch.h
osfmk/ppc/serial_console.c
osfmk/ppc/serial_defs.h
osfmk/ppc/setjmp.h
osfmk/ppc/skiplists.s [deleted file]
osfmk/ppc/spec_reg.h
osfmk/ppc/start.s
osfmk/ppc/status.c
osfmk/ppc/task.h
osfmk/ppc/testjump.c
osfmk/ppc/thread.h
osfmk/ppc/thread_act.h
osfmk/ppc/trap.c
osfmk/ppc/trap.h
osfmk/ppc/vm_tuning.h
osfmk/ppc/vmachmon.c
osfmk/ppc/vmachmon.h
osfmk/ppc/vmachmon_asm.s
osfmk/ppc/xpr.h
osfmk/profiling/i386/profile-asm.s
osfmk/profiling/i386/profile-md.c
osfmk/profiling/i386/profile-md.h
osfmk/profiling/machine/profile-md.h
osfmk/profiling/ppc/profile-md.h
osfmk/profiling/profile-internal.h
osfmk/profiling/profile-kgmon.c
osfmk/profiling/profile-mk.c
osfmk/profiling/profile-mk.h
osfmk/sys/scsi.h
osfmk/sys/sdi.h
osfmk/sys/sdi_edt.h
osfmk/sys/syslog.h
osfmk/sys/time.h
osfmk/sys/tm.h
osfmk/sys/types.h
osfmk/sys/varargs.h
osfmk/sys/version.h
osfmk/vm/bsd_vm.c
osfmk/vm/cpm.h
osfmk/vm/device_vm.c
osfmk/vm/memory_object.c
osfmk/vm/memory_object.h
osfmk/vm/pmap.h
osfmk/vm/task_working_set.c
osfmk/vm/task_working_set.h
osfmk/vm/vm_debug.c
osfmk/vm/vm_debug.h
osfmk/vm/vm_external.c
osfmk/vm/vm_external.h
osfmk/vm/vm_fault.c
osfmk/vm/vm_fault.h
osfmk/vm/vm_init.c
osfmk/vm/vm_init.h
osfmk/vm/vm_kern.c
osfmk/vm/vm_kern.h
osfmk/vm/vm_map.c
osfmk/vm/vm_map.h
osfmk/vm/vm_object.c
osfmk/vm/vm_object.h
osfmk/vm/vm_page.h
osfmk/vm/vm_pageout.c
osfmk/vm/vm_pageout.h
osfmk/vm/vm_print.h
osfmk/vm/vm_resident.c
osfmk/vm/vm_shared_memory_server.c
osfmk/vm/vm_shared_memory_server.h
osfmk/vm/vm_user.c
pexpert/conf/version.minor
pexpert/conf/version.variant
pexpert/gen/bootargs.c
pexpert/gen/device_tree.c
pexpert/gen/pe_gen.c
pexpert/i386/boot_images.h
pexpert/i386/fakePPCDeviceTree.c
pexpert/i386/fakePPCDeviceTree.h
pexpert/i386/fakePPCStructs.h
pexpert/i386/kd.c
pexpert/i386/kdasm.s
pexpert/i386/pe_bootargs.c
pexpert/i386/pe_identify_machine.c
pexpert/i386/pe_init.c
pexpert/i386/pe_interrupt.c
pexpert/i386/pe_kprintf.c
pexpert/i386/pe_misc.s
pexpert/i386/pe_spl.c
pexpert/i386/text_console.c
pexpert/i386/video_console.h
pexpert/pexpert/boot.h
pexpert/pexpert/device_tree.h
pexpert/pexpert/i386/boot.h
pexpert/pexpert/i386/fb_entries.h
pexpert/pexpert/i386/kd_entries.h
pexpert/pexpert/i386/kdsoft.h
pexpert/pexpert/i386/protos.h
pexpert/pexpert/machine/boot.h
pexpert/pexpert/machine/protos.h
pexpert/pexpert/pe_images.h
pexpert/pexpert/pexpert.h
pexpert/pexpert/ppc/boot.h
pexpert/pexpert/ppc/dbdma.h
pexpert/pexpert/ppc/interrupts.h
pexpert/pexpert/ppc/powermac.h
pexpert/pexpert/ppc/protos.h
pexpert/pexpert/protos.h
pexpert/ppc/pe_bootargs.c
pexpert/ppc/pe_clock_speed.c
pexpert/ppc/pe_clock_speed_asm.s
pexpert/ppc/pe_identify_machine.c
pexpert/ppc/pe_init.c
pexpert/ppc/pe_kprintf.c
pexpert/ppc/pe_misc.s

index fe81a60cae982c042a69f97623b427666c455093..a0a84169ddac3c1cefe5427af965d22c5a08b89e 100644 (file)
@@ -1,19 +1,26 @@
 APPLE PUBLIC SOURCE LICENSE
-Version 2.0 - August 6, 2003
+Version 1.1 - April 19,1999
 
 Please read this License carefully before downloading this software.
-By downloading or using this software, you are agreeing to be bound by
-the terms of this License. If you do not or cannot agree to the terms
-of this License, please do not download or use the software.
-
-1. General; Definitions. This License applies to any program or other
-work which Apple Computer, Inc. ("Apple") makes publicly available and
-which contains a notice placed by Apple identifying such program or
-work as "Original Code" and stating that it is subject to the terms of
-this Apple Public Source License version 2.0 ("License"). As used in
-this License:
-
-1.1 "Applicable Patent Rights" mean: (a) in the case where Apple is
+By downloading and using this software, you are agreeing to be bound
+by the terms of this License.  If you do not or cannot agree to the
+terms of this License, please do not download or use the software.
+
+1. General; Definitions.  This License applies to any program or other
+work which Apple Computer, Inc. ("Apple") publicly announces as
+subject to this Apple Public Source License and which contains a
+notice placed by Apple identifying such program or work as "Original
+Code" and stating that it is subject to the terms of this Apple Public
+Source License version 1.1 (or subsequent version thereof), as it may
+be revised from time to time by Apple ("License").  As used in this
+License:
+
+1.1 "Affected Original Code" means only those specific portions of
+Original Code that allegedly infringe upon any party's intellectual
+property rights or are otherwise the subject of a claim of
+infringement.
+
+1.2 "Applicable Patent Rights" mean: (a) in the case where Apple is
 the grantor of rights, (i) claims of patents that are now or hereafter
 acquired, owned by or assigned to Apple and (ii) that cover subject
 matter contained in the Original Code, but only to the extent
@@ -23,27 +30,22 @@ rights, (i) claims of patents that are now or hereafter acquired,
 owned by or assigned to You and (ii) that cover subject matter in Your
 Modifications, taken alone or in combination with Original Code.
 
-1.2 "Contributor" means any person or entity that creates or
-contributes to the creation of Modifications.
-
 1.3 "Covered Code" means the Original Code, Modifications, the
 combination of Original Code and any Modifications, and/or any
 respective portions thereof.
 
-1.4 "Externally Deploy" means: (a) to sublicense, distribute or
-otherwise make Covered Code available, directly or indirectly, to
-anyone other than You; and/or (b) to use Covered Code, alone or as
-part of a Larger Work, in any way to provide a service, including but
-not limited to delivery of content, through electronic communication
-with a client other than You.
+1.4 "Deploy" means to use, sublicense or distribute Covered Code other
+than for Your internal research and development (R&D), and includes
+without limitation, any and all internal use or distribution of
+Covered Code within Your business or organization except for R&D use,
+as well as direct or indirect sublicensing or distribution of Covered
+Code by You to any third party in any form or manner.
 
 1.5 "Larger Work" means a work which combines Covered Code or portions
 thereof with code not governed by the terms of this License.
 
 1.6 "Modifications" mean any addition to, deletion from, and/or change
-to, the substance and/or structure of the Original Code, any previous
-Modifications, the combination of Original Code and any previous
-Modifications, and/or any respective portions thereof. When code is
+to, the substance and/or structure of Covered Code.  When code is
 released as a series of files, a Modification is: (a) any addition to
 or deletion from the contents of a file containing Covered Code;
 and/or (b) any new file or other representation of computer program
@@ -64,7 +66,7 @@ scripts used to control compilation and installation of an executable
 (object code).
 
 1.9 "You" or "Your" means an individual or a legal entity exercising
-rights under this License. For legal entities, "You" or "Your"
+rights under this License.  For legal entities, "You" or "Your"
 includes any entity which controls, is controlled by, or is under
 common control with, You, where "control" means (a) the power, direct
 or indirect, to cause the direction or management of such entity,
@@ -72,253 +74,258 @@ whether by contract or otherwise, or (b) ownership of fifty percent
 (50%) or more of the outstanding shares or beneficial ownership of
 such entity.
 
-2. Permitted Uses; Conditions & Restrictions. Subject to the terms
+2. Permitted Uses; Conditions & Restrictions.  Subject to the terms
 and conditions of this License, Apple hereby grants You, effective on
 the date You accept this License and download the Original Code, a
-world-wide, royalty-free, non-exclusive license, to the extent of
+world-wide, royalty-free, non- exclusive license, to the extent of
 Apple's Applicable Patent Rights and copyrights covering the Original
 Code, to do the following:
 
-2.1 Unmodified Code. You may use, reproduce, display, perform,
-internally distribute within Your organization, and Externally Deploy
-verbatim, unmodified copies of the Original Code, for commercial or
-non-commercial purposes, provided that in each instance:
-
-(a) You must retain and reproduce in all copies of Original Code the
-copyright and other proprietary notices and disclaimers of Apple as
-they appear in the Original Code, and keep intact all notices in the
-Original Code that refer to this License; and
-
-(b) You must include a copy of this License with every copy of Source
-Code of Covered Code and documentation You distribute or Externally
-Deploy, and You may not offer or impose any terms on such Source Code
-that alter or restrict this License or the recipients' rights
-hereunder, except as permitted under Section 6.
-
-2.2 Modified Code. You may modify Covered Code and use, reproduce,
-display, perform, internally distribute within Your organization, and
-Externally Deploy Your Modifications and Covered Code, for commercial
-or non-commercial purposes, provided that in each instance You also
-meet all of these conditions:
-
-(a) You must satisfy all the conditions of Section 2.1 with respect to
-the Source Code of the Covered Code;
-
-(b) You must duplicate, to the extent it does not already exist, the
-notice in Exhibit A in each file of the Source Code of all Your
-Modifications, and cause the modified files to carry prominent notices
-stating that You changed the files and the date of any change; and
-
-(c) If You Externally Deploy Your Modifications, You must make
-Source Code of all Your Externally Deployed Modifications either
-available to those to whom You have Externally Deployed Your
-Modifications, or publicly available. Source Code of Your Externally
-Deployed Modifications must be released under the terms set forth in
-this License, including the license grants set forth in Section 3
-below, for as long as you Externally Deploy the Covered Code or twelve
-(12) months from the date of initial External Deployment, whichever is
-longer. You should preferably distribute the Source Code of Your
-Externally Deployed Modifications electronically (e.g. download from a
-web site).
-
-2.3 Distribution of Executable Versions. In addition, if You
-Externally Deploy Covered Code (Original Code and/or Modifications) in
-object code, executable form only, You must include a prominent
-notice, in the code itself as well as in related documentation,
-stating that Source Code of the Covered Code is available under the
-terms of this License with information on how and where to obtain such
-Source Code.
-
-2.4 Third Party Rights. You expressly acknowledge and agree that
-although Apple and each Contributor grants the licenses to their
-respective portions of the Covered Code set forth herein, no
-assurances are provided by Apple or any Contributor that the Covered
-Code does not infringe the patent or other intellectual property
-rights of any other entity. Apple and each Contributor disclaim any
-liability to You for claims brought by any other entity based on
-infringement of intellectual property rights or otherwise. As a
-condition to exercising the rights and licenses granted hereunder, You
-hereby assume sole responsibility to secure any other intellectual
-property rights needed, if any. For example, if a third party patent
-license is required to allow You to distribute the Covered Code, it is
-Your responsibility to acquire that license before distributing the
-Covered Code.
-
-3. Your Grants. In consideration of, and as a condition to, the
-licenses granted to You under this License, You hereby grant to any
-person or entity receiving or distributing Covered Code under this
-License a non-exclusive, royalty-free, perpetual, irrevocable license,
-under Your Applicable Patent Rights and other intellectual property
-rights (other than patent) owned or controlled by You, to use,
-reproduce, display, perform, modify, sublicense, distribute and
-Externally Deploy Your Modifications of the same scope and extent as
-Apple's licenses under Sections 2.1 and 2.2 above.
-
-4. Larger Works. You may create a Larger Work by combining Covered
+2.1 You may use, copy, modify and distribute Original Code, with or
+without Modifications, solely for Your internal research and
+development, provided that You must in each instance:
+
+(a) retain and reproduce in all copies of Original Code the copyright
+and other proprietary notices and disclaimers of Apple as they appear
+in the Original Code, and keep intact all notices in the Original Code
+that refer to this License;
+
+(b) include a copy of this License with every copy of Source Code of
+Covered Code and documentation You distribute, and You may not offer
+or impose any terms on such Source Code that alter or restrict this
+License or the recipients' rights hereunder, except as permitted under
+Section 6; and
+
+(c) completely and accurately document all Modifications that you have
+made and the date of each such Modification, designate the version of
+the Original Code you used, prominently include a file carrying such
+information with the Modifications, and duplicate the notice in
+Exhibit A in each file of the Source Code of all such Modifications.
+
+2.2 You may Deploy Covered Code, provided that You must in each
+  instance:
+
+(a) satisfy all the conditions of Section 2.1 with respect to the
+Source Code of the Covered Code;
+
+(b) make all Your Deployed Modifications publicly available in Source
+Code form via electronic distribution (e.g. download from a web site)
+under the terms of this License and subject to the license grants set
+forth in Section 3 below, and any additional terms You may choose to
+offer under Section 6.  You must continue to make the Source Code of
+Your Deployed Modifications available for as long as you Deploy the
+Covered Code or twelve (12) months from the date of initial
+Deployment, whichever is longer;
+
+(c) if You Deploy Covered Code containing Modifications made by You,
+inform others of how to obtain those Modifications by filling out and
+submitting the information found at
+http://www.apple.com/publicsource/modifications.html, if available;
+and
+
+(d) if You Deploy Covered Code in object code, executable form only,
+include a prominent notice, in the code itself as well as in related
+documentation, stating that Source Code of the Covered Code is
+available under the terms of this License with information on how and
+where to obtain such Source Code.
+
+3. Your Grants.  In consideration of, and as a condition to, the
+licenses granted to You under this License:
+
+(a) You hereby grant to Apple and all third parties a non-exclusive,
+royalty-free license, under Your Applicable Patent Rights and other
+intellectual property rights owned or controlled by You, to use,
+reproduce, modify, distribute and Deploy Your Modifications of the
+same scope and extent as Apple's licenses under Sections 2.1 and 2.2;
+and
+
+(b) You hereby grant to Apple and its subsidiaries a non-exclusive,
+worldwide, royalty-free, perpetual and irrevocable license, under Your
+Applicable Patent Rights and other intellectual property rights owned
+or controlled by You, to use, reproduce, execute, compile, display,
+perform, modify or have modified (for Apple and/or its subsidiaries),
+sublicense and distribute Your Modifications, in any form, through
+multiple tiers of distribution.
+
+4. Larger Works.  You may create a Larger Work by combining Covered
 Code with other code not governed by the terms of this License and
-distribute the Larger Work as a single product. In each such instance,
-You must make sure the requirements of this License are fulfilled for
-the Covered Code or any portion thereof.
+distribute the Larger Work as a single product.  In each such
+instance, You must make sure the requirements of this License are
+fulfilled for the Covered Code or any portion thereof.
 
-5. Limitations on Patent License. Except as expressly stated in
+5. Limitations on Patent License.  Except as expressly stated in
 Section 2, no other patent rights, express or implied, are granted by
-Apple herein. Modifications and/or Larger Works may require additional
-patent licenses from Apple which Apple may grant in its sole
-discretion.
-
-6. Additional Terms. You may choose to offer, and to charge a fee for,
-warranty, support, indemnity or liability obligations and/or other
-rights consistent with the scope of the license granted herein
-("Additional Terms") to one or more recipients of Covered Code.
-However, You may do so only on Your own behalf and as Your sole
-responsibility, and not on behalf of Apple or any Contributor. You
-must obtain the recipient's agreement that any such Additional Terms
-are offered by You alone, and You hereby agree to indemnify, defend
-and hold Apple and every Contributor harmless for any liability
-incurred by or claims asserted against Apple or such Contributor by
-reason of any such Additional Terms.
-
-7. Versions of the License. Apple may publish revised and/or new
-versions of this License from time to time. Each version will be given
-a distinguishing version number. Once Original Code has been published
-under a particular version of this License, You may continue to use it
-under the terms of that version. You may also choose to use such
-Original Code under the terms of any subsequent version of this
-License published by Apple. No one other than Apple has the right to
+Apple herein.  Modifications and/or Larger Works may require
+additional patent licenses from Apple which Apple may grant in its
+sole discretion.
+
+6. Additional Terms.  You may choose to offer, and to charge a fee
+for, warranty, support, indemnity or liability obligations and/or
+other rights consistent with the scope of the license granted herein
+("Additional Terms") to one or more recipients of Covered
+Code. However, You may do so only on Your own behalf and as Your sole
+responsibility, and not on behalf of Apple. You must obtain the
+recipient's agreement that any such Additional Terms are offered by
+You alone, and You hereby agree to indemnify, defend and hold Apple
+harmless for any liability incurred by or claims asserted against
+Apple by reason of any such Additional Terms.
+
+7. Versions of the License.  Apple may publish revised and/or new
+versions of this License from time to time.  Each version will be
+given a distinguishing version number.  Once Original Code has been
+published under a particular version of this License, You may continue
+to use it under the terms of that version. You may also choose to use
+such Original Code under the terms of any subsequent version of this
+License published by Apple.  No one other than Apple has the right to
 modify the terms applicable to Covered Code created under this
 License.
 
-8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in
-part pre-release, untested, or not fully tested works. The Covered
-Code may contain errors that could cause failures or loss of data, and
-may be incomplete or contain inaccuracies. You expressly acknowledge
-and agree that use of the Covered Code, or any portion thereof, is at
-Your sole and entire risk. THE COVERED CODE IS PROVIDED "AS IS" AND
-WITHOUT WARRANTY, UPGRADES OR SUPPORT OF ANY KIND AND APPLE AND
-APPLE'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS "APPLE" FOR THE
-PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY DISCLAIM
-ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT
-NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF
-MERCHANTABILITY, OF SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR
-PURPOSE, OF ACCURACY, OF QUIET ENJOYMENT, AND NONINFRINGEMENT OF THIRD
-PARTY RIGHTS. APPLE AND EACH CONTRIBUTOR DOES NOT WARRANT AGAINST
-INTERFERENCE WITH YOUR ENJOYMENT OF THE COVERED CODE, THAT THE
-FUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR REQUIREMENTS,
-THAT THE OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED OR
-ERROR-FREE, OR THAT DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO
-ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY APPLE, AN APPLE
-AUTHORIZED REPRESENTATIVE OR ANY CONTRIBUTOR SHALL CREATE A WARRANTY.
-You acknowledge that the Covered Code is not intended for use in the
-operation of nuclear facilities, aircraft navigation, communication
-systems, or air traffic control machines in which case the failure of
-the Covered Code could lead to death, personal injury, or severe
-physical or environmental damage.
-
-9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO
-EVENT SHALL APPLE OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL,
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING
-TO THIS LICENSE OR YOUR USE OR INABILITY TO USE THE COVERED CODE, OR
-ANY PORTION THEREOF, WHETHER UNDER A THEORY OF CONTRACT, WARRANTY,
-TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, EVEN IF
-APPLE OR SUCH CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY
-REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY OF
-INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT APPLY
-TO YOU. In no event shall Apple's total liability to You for all
-damages (other than as may be required by applicable law) under this
-License exceed the amount of fifty dollars ($50.00).
-
-10. Trademarks. This License does not grant any rights to use the
-trademarks or trade names "Apple", "Apple Computer", "Mac", "Mac OS",
-"QuickTime", "QuickTime Streaming Server" or any other trademarks,
-service marks, logos or trade names belonging to Apple (collectively
-"Apple Marks") or to any trademark, service mark, logo or trade name
-belonging to any Contributor. You agree not to use any Apple Marks in
-or as part of the name of products derived from the Original Code or
-to endorse or promote products derived from the Original Code other
-than as expressly permitted by and in strict compliance at all times
-with Apple's third party trademark usage guidelines which are posted
-at http://www.apple.com/legal/guidelinesfor3rdparties.html.
-
-11. Ownership. Subject to the licenses granted under this License,
-each Contributor retains all rights, title and interest in and to any
-Modifications made by such Contributor. Apple retains all rights,
-title and interest in and to the Original Code and any Modifications
-made by or on behalf of Apple ("Apple Modifications"), and such Apple
-Modifications will not be automatically subject to this License. Apple
-may, at its sole discretion, choose to license such Apple
-Modifications under this License, or on different terms from those
-contained in this License or may choose not to license them at all.
+8. NO WARRANTY OR SUPPORT.  The Original Code may contain in whole or
+in part pre-release, untested, or not fully tested works.  The
+Original Code may contain errors that could cause failures or loss of
+data, and may be incomplete or contain inaccuracies.  You expressly
+acknowledge and agree that use of the Original Code, or any portion
+thereof, is at Your sole and entire risk.  THE ORIGINAL CODE IS
+PROVIDED "AS IS" AND WITHOUT WARRANTY, UPGRADES OR SUPPORT OF ANY KIND
+AND APPLE AND APPLE'S LICENSOR(S) (FOR THE PURPOSES OF SECTIONS 8 AND
+9, APPLE AND APPLE'S LICENSOR(S) ARE COLLECTIVELY REFERRED TO AS
+"APPLE") EXPRESSLY DISCLAIM ALL WARRANTIES AND/OR CONDITIONS, EXPRESS
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+AND/OR CONDITIONS OF MERCHANTABILITY OR SATISFACTORY QUALITY AND
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY
+RIGHTS.  APPLE DOES NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE
+ORIGINAL CODE WILL MEET YOUR REQUIREMENTS, OR THAT THE OPERATION OF
+THE ORIGINAL CODE WILL BE UNINTERRUPTED OR ERROR- FREE, OR THAT
+DEFECTS IN THE ORIGINAL CODE WILL BE CORRECTED.  NO ORAL OR WRITTEN
+INFORMATION OR ADVICE GIVEN BY APPLE OR AN APPLE AUTHORIZED
+REPRESENTATIVE SHALL CREATE A WARRANTY OR IN ANY WAY INCREASE THE
+SCOPE OF THIS WARRANTY.  You acknowledge that the Original Code is not
+intended for use in the operation of nuclear facilities, aircraft
+navigation, communication systems, or air traffic control machines in
+which case the failure of the Original Code could lead to death,
+personal injury, or severe physical or environmental damage.
+
+9. Liability.
+
+9.1 Infringement.  If any portion of, or functionality implemented by,
+the Original Code becomes the subject of a claim of infringement,
+Apple may, at its option: (a) attempt to procure the rights necessary
+for Apple and You to continue using the Affected Original Code; (b)
+modify the Affected Original Code so that it is no longer infringing;
+or (c) suspend Your rights to use, reproduce, modify, sublicense and
+distribute the Affected Original Code until a final determination of
+the claim is made by a court or governmental administrative agency of
+competent jurisdiction and Apple lifts the suspension as set forth
+below.  Such suspension of rights will be effective immediately upon
+Apple's posting of a notice to such effect on the Apple web site that
+is used for implementation of this License.  Upon such final
+determination being made, if Apple is legally able, without the
+payment of a fee or royalty, to resume use, reproduction,
+modification, sublicensing and distribution of the Affected Original
+Code, Apple will lift the suspension of rights to the Affected
+Original Code by posting a notice to such effect on the Apple web site
+that is used for implementation of this License.  If Apple suspends
+Your rights to Affected Original Code, nothing in this License shall
+be construed to restrict You, at Your option and subject to applicable
+law, from replacing the Affected Original Code with non-infringing
+code or independently negotiating for necessary rights from such third
+party.
+
+9.2 LIMITATION OF LIABILITY.  UNDER NO CIRCUMSTANCES SHALL APPLE BE
+LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES
+ARISING OUT OF OR RELATING TO THIS LICENSE OR YOUR USE OR INABILITY TO
+USE THE ORIGINAL CODE, OR ANY PORTION THEREOF, WHETHER UNDER A THEORY
+OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY
+OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF
+ANY REMEDY.  In no event shall Apple's total liability to You for all
+damages under this License exceed the amount of fifty dollars
+($50.00).
+
+10. Trademarks.  This License does not grant any rights to use the
+trademarks or trade names "Apple", "Apple Computer", "Mac OS X", "Mac
+OS X Server" or any other trademarks or trade names belonging to Apple
+(collectively "Apple Marks") and no Apple Marks may be used to endorse
+or promote products derived from the Original Code other than as
+permitted by and in strict compliance at all times with Apple's third
+party trademark usage guidelines which are posted at
+http://www.apple.com/legal/guidelinesfor3rdparties.html.
+
+11. Ownership.  Apple retains all rights, title and interest in and to
+the Original Code and any Modifications made by or on behalf of Apple
+("Apple Modifications"), and such Apple Modifications will not be
+automatically subject to this License.  Apple may, at its sole
+discretion, choose to license such Apple Modifications under this
+License, or on different terms from those contained in this License or
+may choose not to license them at all.  Apple's development, use,
+reproduction, modification, sublicensing and distribution of Covered
+Code will not be subject to this License.
 
 12. Termination.
 
-12.1 Termination. This License and the rights granted hereunder will
-terminate:
+12.1 Termination.  This License and the rights granted hereunder will
+   terminate:
 
 (a) automatically without notice from Apple if You fail to comply with
 any term(s) of this License and fail to cure such breach within 30
-days of becoming aware of such breach;
-
-(b) immediately in the event of the circumstances described in Section
-13.5(b); or
-
-(c) automatically without notice from Apple if You, at any time during
-the term of this License, commence an action for patent infringement
-against Apple; provided that Apple did not first commence
-an action for patent infringement against You in that instance.
-
-12.2 Effect of Termination. Upon termination, You agree to immediately
-stop any further use, reproduction, modification, sublicensing and
-distribution of the Covered Code. All sublicenses to the Covered Code
-which have been properly granted prior to termination shall survive
-any termination of this License. Provisions which, by their nature,
-should remain in effect beyond the termination of this License shall
-survive, including but not limited to Sections 3, 5, 8, 9, 10, 11,
-12.2 and 13. No party will be liable to any other for compensation,
-indemnity or damages of any sort solely as a result of terminating
-this License in accordance with its terms, and termination of this
-License will be without prejudice to any other right or remedy of
-any party.
-
-13. Miscellaneous.
-
-13.1 Government End Users. The Covered Code is a "commercial item" as
-defined in FAR 2.101. Government software and technical data rights in
-the Covered Code include only those rights customarily provided to the
-public as defined in this License. This customary commercial license
-in technical data and software is provided in accordance with FAR
-12.211 (Technical Data) and 12.212 (Computer Software) and, for
+days of becoming aware of such breach; (b) immediately in the event of
+the circumstances described in Section 13.5(b); or (c) automatically
+without notice from Apple if You, at any time during the term of this
+License, commence an action for patent infringement against Apple.
+
+12.2 Effect of Termination.  Upon termination, You agree to
+immediately stop any further use, reproduction, modification,
+sublicensing and distribution of the Covered Code and to destroy all
+copies of the Covered Code that are in your possession or control.
+All sublicenses to the Covered Code which have been properly granted
+prior to termination shall survive any termination of this License.
+Provisions which, by their nature, should remain in effect beyond the
+termination of this License shall survive, including but not limited
+to Sections 3, 5, 8, 9, 10, 11, 12.2 and 13.  Neither party will be
+liable to the other for compensation, indemnity or damages of any sort
+solely as a result of terminating this License in accordance with its
+terms, and termination of this License will be without prejudice to
+any other right or remedy of either party.
+
+13.  Miscellaneous.
+
+13.1 Government End Users.  The Covered Code is a "commercial item" as
+defined in FAR 2.101.  Government software and technical data rights
+in the Covered Code include only those rights customarily provided to
+the public as defined in this License. This customary commercial
+license in technical data and software is provided in accordance with
+FAR 12.211 (Technical Data) and 12.212 (Computer Software) and, for
 Department of Defense purchases, DFAR 252.227-7015 (Technical Data --
 Commercial Items) and 227.7202-3 (Rights in Commercial Computer
-Software or Computer Software Documentation). Accordingly, all U.S.
+Software or Computer Software Documentation).  Accordingly, all U.S.
 Government End Users acquire Covered Code with only those rights set
 forth herein.
 
-13.2 Relationship of Parties. This License will not be construed as
+13.2 Relationship of Parties.  This License will not be construed as
 creating an agency, partnership, joint venture or any other form of
-legal association between or among You, Apple or any Contributor, and
-You will not represent to the contrary, whether expressly, by
-implication, appearance or otherwise.
+legal association between You and Apple, and You will not represent to
+the contrary, whether expressly, by implication, appearance or
+otherwise.
 
-13.3 Independent Development. Nothing in this License will impair
+13.3 Independent Development.  Nothing in this License will impair
 Apple's right to acquire, license, develop, have others develop for
 it, market and/or distribute technology or products that perform the
 same or similar functions as, or otherwise compete with,
 Modifications, Larger Works, technology or products that You may
 develop, produce, market or distribute.
 
-13.4 Waiver; Construction. Failure by Apple or any Contributor to
-enforce any provision of this License will not be deemed a waiver of
-future enforcement of that or any other provision. Any law or
-regulation which provides that the language of a contract shall be
-construed against the drafter will not apply to this License.
+13.4 Waiver; Construction.  Failure by Apple to enforce any provision
+of this License will not be deemed a waiver of future enforcement of
+that or any other provision.  Any law or regulation which provides
+that the language of a contract shall be construed against the drafter
+will not apply to this License.
 
-13.5 Severability. (a) If for any reason a court of competent
+13.5 Severability.  (a) If for any reason a court of competent
 jurisdiction finds any provision of this License, or portion thereof,
 to be unenforceable, that provision of the License will be enforced to
 the maximum extent permissible so as to effect the economic benefits
 and intent of the parties, and the remainder of this License will
-continue in full force and effect. (b) Notwithstanding the foregoing,
+continue in full force and effect.  (b) Notwithstanding the foregoing,
 if applicable law prohibits or restricts You from fully and/or
 specifically complying with Sections 2 and/or 3 or prevents the
 enforceability of either of those Sections, this License will
@@ -326,7 +333,7 @@ immediately terminate and You must immediately discontinue any use of
 the Covered Code and destroy all copies of it that are in your
 possession or control.
 
-13.6 Dispute Resolution. Any litigation or other dispute resolution
+13.6 Dispute Resolution.  Any litigation or other dispute resolution
 between You and Apple relating to this License shall take place in the
 Northern District of California, and You and Apple hereby consent to
 the personal jurisdiction of, and venue in, the state and federal
@@ -334,9 +341,9 @@ courts within that District with respect to this License. The
 application of the United Nations Convention on Contracts for the
 International Sale of Goods is expressly excluded.
 
-13.7 Entire Agreement; Governing Law. This License constitutes the
+13.7 Entire Agreement; Governing Law.  This License constitutes the
 entire agreement between the parties with respect to the subject
-matter hereof. This License shall be governed by the laws of the
+matter hereof.  This License shall be governed by the laws of the
 United States and the State of California, except that body of
 California law concerning conflicts of law.
 
@@ -348,20 +355,18 @@ connexes soient rediges en anglais.
 
 EXHIBIT A.
 
-"Portions Copyright (c) 1999-2003 Apple Computer, Inc. All Rights
-Reserved.
-
-This file contains Original Code and/or Modifications of Original Code
-as defined in and that are subject to the Apple Public Source License
-Version 2.0 (the 'License'). You may not use this file except in
-compliance with the License. Please obtain a copy of the License at
-http://www.opensource.apple.com/apsl/ and read it before using this
-file.
+"Portions Copyright (c) 1999-2000 Apple Computer, Inc.  All Rights
+Reserved.  This file contains Original Code and/or Modifications of
+Original Code as defined in and that are subject to the Apple Public
+Source License Version 1.1 (the "License").  You may not use this file
+except in compliance with the License.  Please obtain a copy of the
+License at http://www.apple.com/publicsource and read it before using
+this file.
 
 The Original Code and all software distributed under the License are
-distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
 EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
 INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
-Please see the License for the specific language governing rights and
-limitations under the License."
+FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT.  Please see the
+License for the specific language governing rights and limitations
+under the License."
index a0a7c9a8dc2700b77d341deb55f70fad73307b89..def1c43203b3151a80fde7d03d40db42e099e08d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6e6fd4c3a02342fabdf450e726bccc3d54fe92d7..b39c272cb532e058937f46a814d32f4cd9e0c6ce 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a401c2004c12ed52bac2fc64cef1dded8c5b3e51..0da8f189c2cf529cc8549bd6ebcd5d6a1ad25c5f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f2f54d624af183a682b0f490d37c006c5b5ac7f7..6b1bb5ed9a9ead53a2819e2b61d34fe361311c6e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 53dc1897292c21a9f8f2d75e34d821a5e0ae1451..5db7029a3dddd47fbd3bae1c51a24ce153152089 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7d7d174f1ac718ab24b87549491eedb089065fcb..4d3c62cac12f4e03a4b769322adf2d6694534321 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e584e5efb8e27d756380455cbd1d79dff74f0f16..a353a12b1ed8f777ef5158d5e2c2bd8d73d13d40 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 71e222c5adf962e9f6b9ab2e1e4e06cf9699cd53..ec5604667c998ca797d5070712a9a6dda8407043 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 478d89525d915905ec411d89c548431b11f9cc6e..2fe56c292466bc8aa44ccbe5e0e1c610073bfefd 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 44d2595c397382ff30468a621ae8382d7effb849..89dc49a086838b3e620e72da0bde7cc3a9a6cab2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 67cadccb7def40654c0ebf150beb9d759c9c9847..8588273e59315522ebfa5d31fdb7f21d83dd544f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4af4ebb01b6c1f16c808bf4a8701073b3f5fb2de..cba52e4146c5cebb3ea8b8eb13435628b389e872 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 33a31347b5b8b74cff7ce0c164acc559169893a4..68c9029009622a36d89c403bf05c4131c41d8faa 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9365bbd61233f1c4c0efdcf9ac328fe42611d504..9d8181e2178e0e13c94732df46e6f34229f4f451 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d2d21cdebc8309f120e17335dec66a7f23fc0bfb..f902cb0842ed6ed6c492165f266d212935c471c1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0bb1a4e6161af7d5550a311d427de3ad335138c8..77927e97a7f80623a117012242b500cb6dfacfa5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5dd724d29e559d1989b6c1ee00e04d9b32d40f48..80a08ab6c0910a5e38225f1cf32294c786633112 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2cee7935219e86ab0a0ab50fa8d85f9b1f4fec3c..51b78d404d3b2160282e2e8b9717578c8c494ee2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f42f1fd69656430e46fc960b82cee686f6193967..17152ca394cb745bdfdec3f49ac769f306dcab4c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b6ade988d2a7cbe2cbe1bf7075db5e728b71e410..c2514014e91a3c0f29e42de2b5093d2f5553b45a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0508de67e8c537aa0270337053de6fe6db0b0fd7..d9d1b5ec9394f44af118153518c2e5171f2d9446 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8bb3e31af5dd1a2400270b4b75282c5ef7489ace..5689939b2140c278f60cfd8187a3c18843c9e02f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 721d6a909e1d30a338dea7adeac440702850d039..64eecd5a26566405950ece8e8750e04e4c50b347 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e9c40a6b1a239c4f8dc374e586b98e556f58da33..8e1d219a4a08b4943b2048e39177e2166dc7d11e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index fd10358051bdcf6f5bfc284107302a720c6edfcf..a5bc0b5df892cb71b1f2030d66753c4f1e97b94c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3c6728cdd92aa45af4fb99e4f5887dd5c176c4e5..3558e4acfc3be966a60c159d0bd7317d20c75f99 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 02e7b69e9dd34d609c67f34877a8f6c6311dd0fa..4a63602cff66fef8171712f3d49421288a764ab5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f4d37ef7d76997ff9d0deebe7264cfe5e116a08f..4bd6bf4d6ca7f607b0f731707c0bcf9686ee5d10 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2eb7d09aff2fdb724d7fbf4caa6c9293779fd322..91763d098a4aa05c3c25d20fcbdb306f4f3715d6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c6ecf13b71ac4389eeef8c75c56972483011c461..8b8e29273174b49da1a5d7ee07156e167db01bbf 100644 (file)
@@ -3,22 +3,21 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
+ * Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
+ * Reserved.  This file contains Original Code and/or Modifications of
+ * Original Code as defined in and that are subject to the Apple Public
+ * Source License Version 1.1 (the "License").  You may not use this file
+ * except in compliance with the License.  Please obtain a copy of the
+ * License at http://www.apple.com/publicsource and read it before using
+ * this file.
  * 
  * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 671a768a7d2c3962086686298418e7b29192117a..2c5eac77a33472323b92b691c6e30f185bebdee2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8ca01ae59f6f8e379e228c5a749c47ac6f68b569..dc927b2948c4ac8715c53d32576cab14b0cc9b88 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 93d21615c99d63f8c4d29787fc8419a78e05b864..aa6d7ff538d72f5c6bd71ac0b1ef5ce7b6cddadd 100644 (file)
@@ -246,10 +246,6 @@ pseudo-device      pty     128 init pty_init
 # vnode device
 pseudo-device  vndevice        4       init    vndevice_init
 
-#
-# memory device
-pseudo-device  mdevdevice      1       init    mdevinit
-
 #
 #
 # packet filter device
index 485ece6056fdb1271955f56aea5e72759f0cc1ed..817d99f42882c3fde203f74a8c1670f331df1ed5 100644 (file)
@@ -115,9 +115,6 @@ bsd/dev/random/YarrowCoreLib/src/comp.c                             standard
 bsd/dev/random/YarrowCoreLib/src/prng.c                                standard
 bsd/dev/random/YarrowCoreLib/src/sha1mod.c                     standard
 bsd/dev/random/YarrowCoreLib/src/yarrowUtils.c         standard
-
-bsd/dev/memdev.c                               standard
-
 bsd/dev/vn/vn.c                                optional vndevice
 bsd/dev/vn/shadow.c                    optional vndevice
 
index 6594795befe73de1e243f469ff0d537f20382ff6..9de9d895cafcfd21a6ff9c91476070ba946759e8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 45a4fb75db864000d01701c0f7a51864bd4daabf..00750edc07d6415dcc07ae0351e9397b0222b7ba 100644 (file)
@@ -1 +1 @@
-8
+3
index 7ed6ff82de6bcc2a78243fc9c54d3ef5ac14da69..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1 +0,0 @@
-5
index 303e450ad9228dfaf1ee733c41f929cd9b4c41e1..e6508ebed6349d972259e43b184705d2bb4fc5c9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8d672d97c3ccf9cd83367fd126fbac6232c31a4f..f174e4ef196ba932fd587ad6e8923c68bcb3f249 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 20e7a0ece939165295b99e27d00a7c30ae6b957d..460b5bc9fd9d380fbc77b366be1d4f1689191ccb 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 854d04873a141610f02b3e449fb2aeb753cf54a8..f06b30fc6a0d02584c8f93b4e105af763d058008 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c2122a600e20b7926f34b12fafdbc6a8be6f7aa0..118878bd1197da648879c5c4e03ac9c89d75b201 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 67a391a839aa9e4c135d1c609160625e5b98b8d3..00d91a155f2608b3507464a3d5439d540f69ed91 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b6fcf37a63fb71ca11317d41249999f0778894fe..0c3684b58f8f883165baa85bd55defa3fd95e4d2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2ce9ce21c55ab421b61456b9abe09d5185b99dc1..ff1fa1978aa65319c4443509e2d7c0da072cc4f8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f25fd3533301fbccb6b17033f1233e6bea733b43..2b207335a31c034c41d7aabfb4c2e8232c3f3585 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 233b5964314aeaf3b3f31d9c8718bffa0b05f67f..5c3422a6426fb926b6f05f96f069aa9aee04893b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index fdbc131e164b934421c138160ccbfb3b6f7ee428..12b0e2070cd7c884448242650dd6df4b47dc45e5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b14176bdbb607b4149039a6084b2e2926660f230..92f6a0905930fad1d978eadb8bb1c0d98cfdf8d1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d99fe9d80c1f05ca0e4fdaf721efb8d990b9cde5..66992563d5dc4eb994625cdade594dd9aa9b4826 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4470c297a597ff50cc0f8ebc2997b276a131ea26..3d882428662f908d433bd09e1bd8af85ac751f38 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ad551474b71c723f31e4159f7259c36e89ca16c9..e972af7b5174dbce67d28fdbfd4ffd1dfde0f768 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index beb116a101233c09ec6c49822496732e0dfe8517..a4a7ad1133f18f18ccd2dbb7d25c5035ce0d5074 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b891021443f754a72d57edebb5813015b85fc948..a4bb2937a1ae9e4c15f773c58ee0cc01c71b6992 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6cd4684f3becbc1a318940130d54fd65209f9aba..0c06ff2fd865a706566de961e1abc504f38c56a9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 
 #define        NULL_SEG        0
 
-/* Signal handler flavors supported */
-/* These defns should match the Libc implmn */
-#define UC_TRAD                        1
-
 /*
  * Send an interrupt to process.
  *
@@ -120,7 +113,7 @@ sendsig(p, catcher, sig, mask, code)
        /* Handler should call sigreturn to get out of it */
        frame.retaddr = 0xffffffff;     
        frame.catcher = catcher;
-       frame.sigstyle = UC_TRAD;
+       frame.sigstyle = 1;
        frame.sig = sig;
 
        if (sig == SIGILL || sig == SIGFPE) {
index 9437554c773ca008d127484f130aea52f9d7684c..f341af01a26bde56b199359ef1c8441dd5daf8c8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f9f16eef5e49670ec4540e9c52c74859f1d27485..1d4a7224f0fc77fbf855a5da54ce3b016d0f646c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1995216edb22e20d5e96b2b16b1368d21d42f3d1..9e33d5123a0850a12fa44b561afa552d43ab2ffd 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
diff --git a/bsd/dev/memdev.c b/bsd/dev/memdev.c
deleted file mode 100644 (file)
index bc41c0d..0000000
+++ /dev/null
@@ -1,575 +0,0 @@
-/*
- * Copyright (c) 1988 University of Utah.
- * Copyright (c) 1990, 1993
- *     The Regents of the University of California.  All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * the Systems Programming Group of the University of Utah Computer
- * Science Department.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by the University of
- *     California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: Utah Hdr: vn.c 1.13 94/04/02
- *
- *     from: @(#)vn.c  8.6 (Berkeley) 4/1/94
- * $FreeBSD: src/sys/dev/vn/vn.c,v 1.105.2.4 2001/11/18 07:11:00 dillon Exp $
- */
-
-/*
- * RAM disk driver.
- *
- * Block interface to a ramdisk.  
- *
- */
-
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/mount.h>
-#include <sys/namei.h>
-#include <sys/proc.h>
-#include <sys/buf.h>
-#include <sys/malloc.h>
-#include <sys/mount.h>
-#include <sys/vnode.h>
-#include <sys/fcntl.h>
-#include <sys/conf.h>
-#include <dev/disk.h>
-#include <sys/stat.h>
-
-#include <sys/vm.h>
-
-#include <vm/vm_pager.h>
-#include <vm/vm_pageout.h>
-#include <mach/memory_object_types.h>
-
-#include <miscfs/devfs/devfs.h>
-
-static open_close_fcn_t                mdevopen;
-static open_close_fcn_t                mdevclose;
-static psize_fcn_t             mdevsize;
-static strategy_fcn_t          mdevstrategy;
-static int mdevbioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p);
-static int mdevcioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p);
-static int mdevrw(dev_t dev, struct uio *uio, int ioflag);
-static char *nonspace(char *pos, char *end);
-static char *getspace(char *pos, char *end);
-static char *cvtnum(char *pos, char *end, unsigned int *num);
-
-/*
- * cdevsw
- *     D_DISK          we want to look like a disk
- *     D_CANFREE       We support B_FREEBUF
- */
-
-static struct bdevsw mdevbdevsw = {
-       /* open */      mdevopen,
-       /* close */     mdevclose,
-       /* strategy */  mdevstrategy,
-       /* ioctl */     mdevbioctl,
-       /* dump */      eno_dump,
-       /* psize */     mdevsize,
-       /* flags */     D_DISK,
-};
-
-static struct cdevsw mdevcdevsw = {
-       /* open */      mdevopen,
-       /* close */     mdevclose,
-       /* read */      mdevrw,
-       /* write */     mdevrw,
-       /* ioctl */     mdevcioctl,
-       /* stop */      eno_stop,
-       /* reset */     eno_reset,
-       /* ttys */      0,
-       /* select */    eno_select,
-       /* mmap */      eno_mmap,
-       /* strategy */  eno_strat,
-       /* getc */      eno_getc,
-       /* putc */      eno_putc,
-       /* flags */     D_DISK,
-};
-
-struct mdev {
-       vm_offset_t     mdBase;         /* file size in bytes */
-       uint32_t        mdSize;         /* file size in bytes */
-       int                     mdFlags;        /* flags */
-       int                     mdSecsize;      /* sector size */
-       int                     mdBDev;         /* Block device number */
-       int                     mdCDev;         /* Character device number */
-       void *          mdbdevb;
-       void *          mdcdevb;
-} mdev[16];
-
-/* mdFlags */
-#define mdInited       0x01    /* This device defined */
-#define        mdRO            0x02    /* This device is read-only */
-#define        mdPhys          0x04    /* This device is in physical memory */
-
-int mdevBMajor = -1;
-int mdevCMajor = -1;
-
-static int mdevioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p, int is_char);
-dev_t mdevadd(int devid, ppnum_t base, unsigned int size, int phys);
-dev_t mdevlookup(int devid);
-
-static int mdevclose(dev_t dev, int flags, int devtype, struct proc *p) {
-       return (0);
-}
-
-static int mdevopen(dev_t dev, int flags, int devtype, struct proc *p) {
-       
-       int devid;
-
-       devid = minor(dev);                                                                     /* Get minor device number */
-
-       if (devid > 16) return (ENXIO);                                         /* Not valid */
-
-       if ((flags & FWRITE) && (mdev[devid].mdFlags & mdRO)) return (EACCES);  /* Currently mounted RO */
-
-       return(0);
-}
-
-static int mdevrw(dev_t dev, struct uio *uio, int ioflag) {
-       int                     status;
-       int                     unit;
-       addr64_t                mdata;
-       int devid;
-       enum uio_seg saveflag;
-
-       devid = minor(dev);                                                                     /* Get minor device number */
-
-       if (devid > 16) return (ENXIO);                                         /* Not valid */
-       if (!(mdev[devid].mdFlags & mdInited))  return (ENXIO); /* Have we actually been defined yet? */
-
-       mdata = ((addr64_t)mdev[devid].mdBase << 12) + uio->uio_offset; /* Point to the area in "file" */
-       
-       saveflag = uio->uio_segflg;                                                     /* Remember what the request is */
-       if (mdev[devid].mdFlags & mdPhys) uio->uio_segflg = UIO_PHYS_USERSPACE; /* Make sure we are moving from physical ram if physical device */
-       status = uiomove64(mdata, uio->uio_resid, uio);         /* Move the data */
-       uio->uio_segflg = saveflag;                                                     /* Restore the flag */
-
-       return (status);
-}
-
-static void mdevstrategy(struct buf *bp) {
-       int unmap;
-       unsigned int sz, left, lop, csize;
-       kern_return_t ret;
-       vm_offset_t vaddr, blkoff;
-       struct buf *tbuf;
-       int devid;
-       addr64_t paddr, fvaddr;
-       ppnum_t pp;
-
-       devid = minor(bp->b_dev);                                                       /* Get minor device number */
-
-       if ((mdev[devid].mdFlags & mdInited) == 0) {            /* Have we actually been defined yet? */
-               bp->b_error = ENXIO;
-               bp->b_flags |= B_ERROR;
-               biodone(bp);
-               return;
-       }
-
-       bp->b_resid = bp->b_bcount;                                                     /* Set byte count */
-       
-       blkoff = bp->b_blkno * mdev[devid].mdSecsize;           /* Get offset into file */
-
-/*
- *     Note that reading past end is an error, but reading at end is an EOF.  For these
- *     we just return with b_resid == b_bcount.
- */
-
-       if (blkoff >= (mdev[devid].mdSize << 12)) {                     /* Are they trying to read/write at/after end? */
-               if(blkoff != (mdev[devid].mdSize << 12)) {              /* Are we trying to read after EOF? */
-                       bp->b_error = EINVAL;                                           /* Yeah, this is an error */
-                       bp->b_flags |= B_ERROR | B_INVAL;
-               }
-               biodone(bp);                                                                    /* Return */
-               return;
-       }
-
-       if ((blkoff + bp->b_bcount) > (mdev[devid].mdSize << 12)) {             /* Will this read go past end? */
-               bp->b_bcount = ((mdev[devid].mdSize << 12) - blkoff);   /* Yes, trim to max */
-       }
-
-       vaddr = 0;                                                                                      /* Assume not mapped yet */
-       unmap = 0;
-
-       if (bp->b_flags & B_VECTORLIST) {                                       /* Do we have a list of UPLs? */
-               tbuf = (struct buf *)bp->b_real_bp;                             /* Get this for C's inadequacies */
-               if((bp->b_flags & B_NEED_IODONE) &&                             /* If we have a UPL, is it already mapped? */
-                 tbuf && 
-                 tbuf->b_data) {
-                       vaddr = tbuf->b_data;                                           /* We already have this mapped in, get base address */
-               }
-               else {                                                                                  /* Not mapped yet */                                                                            
-                       ret = ubc_upl_map(bp->b_pagelist, &vaddr);      /* Map it in */
-                       if(ret != KERN_SUCCESS) panic("ramstrategy: ubc_upl_map failed, rc = %08X\n", ret);
-                       unmap = 1;                                                                      /* Remember to unmap later */
-               }
-               vaddr = vaddr += bp->b_uploffset;                               /* Calculate actual vaddr */
-       }
-       else vaddr = bp->b_data;                                                        /* No UPL, we already have address */
-       
-       fvaddr = (mdev[devid].mdBase << 12) + blkoff;           /* Point to offset into ram disk */
-       
-       if(bp->b_flags & B_READ) {                                                      /* Is this a read? */
-               if(!(mdev[devid].mdFlags & mdPhys)) {                   /* Physical mapped disk? */
-                       bcopy((void *)fvaddr, (void *)vaddr, bp->b_bcount);     /* This is virtual, just get the data */
-               }
-               else {
-                       left = bp->b_bcount;                                            /* Init the amount left to copy */
-                       while(left) {                                                           /* Go until it is all copied */
-                               
-                               lop = min((4096 - (vaddr & 4095)), (4096 - (fvaddr & 4095)));   /* Get smallest amount left on sink and source */
-                               csize = min(lop, left);                                 /* Don't move more than we need to */
-                               
-                               pp = pmap_find_phys(kernel_pmap, (addr64_t)((unsigned int)vaddr));      /* Get the sink physical address */
-                               if(!pp) {                                                               /* Not found, what gives? */
-                                       panic("mdevstrategy: sink address %016llX not mapped\n", (addr64_t)((unsigned int)vaddr));
-                               }
-                               paddr = (addr64_t)(((addr64_t)pp << 12) | (addr64_t)(vaddr & 4095));    /* Get actual address */
-                               bcopy_phys(fvaddr, paddr, csize);               /* Copy this on in */
-                               mapping_set_mod(paddr >> 12);                   /* Make sure we know that it is modified */
-                               
-                               left = left - csize;                                    /* Calculate what is left */
-                               vaddr = vaddr + csize;                                  /* Move to next sink address */
-                               fvaddr = fvaddr + csize;                                /* Bump to next physical address */
-                       }
-               }
-       }
-       else {                                                                                          /* This is a write */
-               if(!(mdev[devid].mdFlags & mdPhys)) {                   /* Physical mapped disk? */
-                       bcopy((void *)vaddr, (void *)fvaddr, bp->b_bcount);     /* This is virtual, just put the data */
-               }
-               else {
-                       left = bp->b_bcount;                                            /* Init the amount left to copy */
-                       while(left) {                                                           /* Go until it is all copied */
-                               
-                               lop = min((4096 - (vaddr & 4095)), (4096 - (fvaddr & 4095)));   /* Get smallest amount left on sink and source */
-                               csize = min(lop, left);                                 /* Don't move more than we need to */
-                               
-                               pp = pmap_find_phys(kernel_pmap, (addr64_t)((unsigned int)vaddr));      /* Get the source physical address */
-                               if(!pp) {                                                               /* Not found, what gives? */
-                                       panic("mdevstrategy: source address %016llX not mapped\n", (addr64_t)((unsigned int)vaddr));
-                               }
-                               paddr = (addr64_t)(((addr64_t)pp << 12) | (addr64_t)(vaddr & 4095));    /* Get actual address */
-                       
-                               bcopy_phys(paddr, fvaddr, csize);               /* Move this on out */
-                               
-                               left = left - csize;                                    /* Calculate what is left */
-                               vaddr = vaddr + csize;                                  /* Move to next sink address */
-                               fvaddr = fvaddr + csize;                                /* Bump to next physical address */
-                       }
-               }
-       }
-       
-       if (unmap) {                                                                            /* Do we need to unmap this? */
-               ubc_upl_unmap(bp->b_pagelist);                                  /* Yes, unmap it */
-       }
-
-       bp->b_resid = 0;                                                                        /* Nothing more to do */        
-       biodone(bp);                                                                            /* Say we've finished */
-}
-
-static int mdevbioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) {
-       return (mdevioctl(dev, cmd, data, flag, p, 0));
-}
-
-static int mdevcioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) {
-       return (mdevioctl(dev, cmd, data, flag, p, 1));
-}
-
-static int mdevioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p, int is_char) {
-
-       int error;
-       u_long *f;
-       u_int64_t *o;
-       int devid;
-
-       devid = minor(dev);                                                                     /* Get minor device number */
-
-       if (devid > 16) return (ENXIO);                                         /* Not valid */
-
-       error = suser(p->p_ucred, &p->p_acflag);                        /* Are we superman? */
-       if (error) return (error);                                                      /* Nope... */
-
-       f = (u_long*)data;
-       o = (u_int64_t *)data;
-
-       switch (cmd) {
-
-               case DKIOCGETMAXBLOCKCOUNTREAD:
-                       *o = 32;
-                       break;
-               
-               case DKIOCGETMAXBLOCKCOUNTWRITE:
-                       *o = 32;
-                       break;
-               
-               case DKIOCGETMAXSEGMENTCOUNTREAD:
-                       *o = 32;
-                       break;
-               
-               case DKIOCGETMAXSEGMENTCOUNTWRITE:
-                       *o = 32;
-                       break;
-               
-               case DKIOCGETBLOCKSIZE:
-                       *f = mdev[devid].mdSecsize;
-                       break;
-               
-               case DKIOCSETBLOCKSIZE:
-                       if (is_char) return (ENODEV);                           /* We can only do this for a block */
-
-                       if (*f < DEV_BSIZE) return (EINVAL);            /* Too short? */
-
-                       mdev[devid].mdSecsize = *f;                                     /* set the new block size */
-                       break;
-                       
-               case DKIOCISWRITABLE:
-                       *f = 1;
-                       break;
-                       
-               case DKIOCGETBLOCKCOUNT32:
-                       if(!(mdev[devid].mdFlags & mdInited)) return (ENXIO);
-                       *f = ((mdev[devid].mdSize << 12) + mdev[devid].mdSecsize - 1) / mdev[devid].mdSecsize;
-                       break;
-                       
-               case DKIOCGETBLOCKCOUNT64:
-                       if(!(mdev[devid].mdFlags & mdInited)) return (ENXIO);
-                       *o = ((mdev[devid].mdSize << 12) + mdev[devid].mdSecsize - 1) / mdev[devid].mdSecsize;
-                       break;
-                       
-               default:
-                       error = ENOTTY;
-                       break;
-       }
-       return(error);
-}
-
-
-static int mdevsize(dev_t dev) {
-
-       int devid;
-
-       devid = minor(dev);                                                                     /* Get minor device number */
-       if (devid > 16) return (ENXIO);                                         /* Not valid */
-
-       if ((mdev[devid].mdFlags & mdInited) == 0) return(-1);          /* Not inited yet */
-
-       return(mdev[devid].mdSecsize);
-}
-
-
-void mdevinit(int cnt) {
-
-       int devid, phys;
-       ppnum_t base;
-       unsigned int size;
-       char *ba, *lp;
-       dev_t dev;
-       
-       
-       ba = PE_boot_args();                                                            /* Get the boot arguments */
-       lp = ba + 256;                                                                          /* Point to the end */
-               
-       while(1) {                                                                                      /* Step through, looking for our keywords */
-               phys = 0;                                                                               /* Assume virtual memory device */
-               ba = nonspace(ba, lp);                                                  /* Find non-space */
-               if(ba >= lp) return;                                                    /* We are done if no more... */
-               if(((ba[0] != 'v') && (ba[0] != 'p'))  
-                 || (ba[1] != 'm') || (ba[2] != 'd') || (ba[4] != '=')
-                 || (ba[3] < '0') || (ba[3] > 'f') 
-                 || ((ba[3] > '9') && (ba[3] < 'a'))) {                /* Is this of form "vmdx=" or "pmdx=" where x is hex digit? */
-                       
-                       ba = getspace(ba, lp);                                          /* Find next white space or end */
-                       continue;                                                                       /* Start looking for the next one */
-               }
-               
-               if(ba[0] == 'p') phys = 1;                                              /* Set physical memory disk */
-               
-               devid = ba[3] & 0xF;                                                    /* Assume digit */
-               if(ba[3] > '9') devid += 9;                                             /* Adjust for hex digits */
-       
-               ba = &ba[5];                                                                    /* Step past keyword */
-               ba = cvtnum(ba, lp, &base);                                             /* Convert base of memory disk */
-               if(ba >= lp) return;                                                    /* Malformed one at the end, leave */
-               if(ba[0] != '.') continue;                                              /* If not length separater, try next... */
-               if(base & 0xFFF) continue;                                              /* Only allow page aligned stuff */
-       
-               ba++;                                                                                   /* Step past '.' */
-               ba = cvtnum(ba, lp, &size);                                             /* Try to convert it */
-               if(!size || (size & 0xFFF)) continue;                   /* Allow only non-zer page size multiples */
-               if(ba < lp) {                                                                   /* If we are not at end, check end character */
-                       if((ba[0] != ' ') && (ba[0] != 0)) continue;    /* End must be null or space */
-               }
-               
-               dev = mdevadd(devid, base >> 12, size >> 12, phys);     /* Go add the device */ 
-       }
-
-       return;
-
-}
-
-char *nonspace(char *pos, char *end) {                                 /* Find next non-space in string */
-
-       if(pos >= end) return end;                                                      /* Don't go past end */
-       if(pos[0] == 0) return end;                                                     /* If at null, make end */
-       
-       while(1) {                                                                                      /* Keep going */
-               if(pos[0] != ' ') return pos;                                   /* Leave if we found one */
-               pos++;                                                                                  /* Stop */
-               if(pos >= end) return end;                                              /* Quit if we run off end */
-       }
-}
-
-char *getspace(char *pos, char *end) {                                 /* Find next non-space in string */
-
-       while(1) {                                                                                      /* Keep going */
-               if(pos >= end) return end;                                              /* Don't go past end */
-               if(pos[0] == 0) return end;                                             /* Leave if we hit null */
-               if(pos[0] == ' ') return pos;                                   /* Leave if we found one */
-               pos++;                                                                                  /* Stop */
-       }
-}
-
-char *cvtnum(char *pos, char *end, unsigned int *num) {                /* Convert to a number */
-
-       int rad, dig;
-       
-       *num = 0;                                                                                       /* Set answer to 0 to start */  
-       rad = 10;
-
-       if(pos >= end) return end;                                                      /* Don't go past end */
-       if(pos[0] == 0) return end;                                                     /* If at null, make end */
-       
-       if(pos[0] == '0' && ((pos[1] == 'x') || (pos[1] == 'x'))) {     /* A hex constant? */
-               rad = 16;
-               pos += 2;                                                                               /* Point to the number */
-       }
-       
-       while(1) {                                                                                      /* Convert it */
-               
-               if(pos >= end) return end;                                              /* Don't go past end */
-               if(pos[0] == 0) return end;                                             /* If at null, make end */
-               if(pos[0] < '0') return pos;                                    /* Leave if non-digit */
-               dig = pos[0] & 0xF;                                                             /* Extract digit */
-               if(pos[0] > '9') {                                                              /* Is it bigger than 9? */
-                       if(rad == 10) return pos;                                       /* Leave if not base 10 */
-                       if(!(((pos[0] >= 'A') && (pos[0] <= 'F')) 
-                         || ((pos[0] >= 'a') && (pos[0] <= 'f')))) return pos; /* Leave if bogus char */
-                        dig = dig + 9;                                                         /* Adjust for character */
-               }
-               *num = (*num * rad) + dig;                                              /* Accumulate the number */
-               pos++;                                                                                  /* Step on */
-       }
-}
-
-dev_t mdevadd(int devid, ppnum_t base, unsigned int size, int phys) {
-       
-       int i;
-       
-       if(devid < 0) {
-
-               devid = -1;
-               for(i = 0; i < 16; i++) {                                               /* Search all known memory devices */
-                       if(!(mdev[i].mdFlags & mdInited)) {                     /* Is this a free one? */
-                               if(devid < 0)devid = i;                                 /* Remember first free one */
-                               continue;                                                               /* Skip check */
-                       }
-                       if(!(((base + size -1 ) < mdev[i].mdBase) || ((mdev[i].mdBase + mdev[i].mdSize - 1) < base))) { /* Is there any overlap? */
-                               panic("mdevadd: attempt to add overlapping memory device at %08X-%08X\n", mdev[i].mdBase, mdev[i].mdBase + mdev[i].mdSize - 1);
-                       }
-               }
-               if(devid < 0) {                                                                 /* Do we have free slots? */
-                       panic("mdevadd: attempt to add more than 16 memory devices\n");
-               }
-       }
-       else {
-               if(devid >= 16) {                                                               /* Giving us something bogus? */
-                       panic("mdevadd: attempt to explicitly add a bogus memory device: &08X\n", devid);
-               }
-               if(mdev[devid].mdFlags &mdInited) {                             /* Already there? */
-                       panic("mdevadd: attempt to explicitly add a previously defined memory device: &08X\n", devid);
-               }
-       }
-       
-       if(mdevBMajor < 0) {                                                            /* Have we gotten a major number yet? */
-               mdevBMajor = bdevsw_add(-1, &mdevbdevsw);               /* Add to the table and figure out a major number */
-               if (mdevBMajor < 0) {
-                       printf("mdevadd: error - bdevsw_add() returned %d\n", mdevBMajor);
-                       return -1;
-               }
-       }
-       
-       if(mdevCMajor < 0) {                                                            /* Have we gotten a major number yet? */
-               mdevCMajor = cdevsw_add_with_bdev(-1, &mdevcdevsw, mdevBMajor);         /* Add to the table and figure out a major number */
-               if (mdevCMajor < 0) {
-                       printf("ramdevice_init: error - cdevsw_add() returned %d\n", mdevCMajor);
-                       return -1;
-               }
-       }
-
-       mdev[devid].mdBDev = makedev(mdevBMajor, devid);        /* Get the device number */
-       mdev[devid].mdbdevb = devfs_make_node(mdev[devid].mdBDev, DEVFS_BLOCK,  /* Make the node */
-                                                 UID_ROOT, GID_OPERATOR, 
-                                                 0600, "md%d", devid);
-       if (mdev[devid].mdbdevb == NULL) {                                      /* Did we make one? */
-               printf("mdevadd: devfs_make_node for block failed!\n");
-               return -1;                                                                              /* Nope... */
-       }
-
-       mdev[devid].mdCDev = makedev(mdevCMajor, devid);        /* Get the device number */
-       mdev[devid].mdcdevb = devfs_make_node(mdev[devid].mdCDev, DEVFS_CHAR,           /* Make the node */
-                                                 UID_ROOT, GID_OPERATOR, 
-                                                 0600, "rmd%d", devid);
-       if (mdev[devid].mdcdevb == NULL) {                                      /* Did we make one? */
-               printf("mdevadd: devfs_make_node for character failed!\n");
-               return -1;                                                                              /* Nope... */
-       }
-       
-       mdev[devid].mdBase = base;                                                      /* Set the base address of ram disk */
-       mdev[devid].mdSize = size;                                                      /* Set the length of the ram disk */
-       mdev[devid].mdSecsize = DEV_BSIZE;                                      /* Set starting block size */
-       if(phys) mdev[devid].mdFlags |= mdPhys;                         /* Show that we are in physical memory */
-       mdev[devid].mdFlags |= mdInited;                                        /* Show we are all set up */
-       printf("Added memory device md%x/rmd%x (%08X/%08X) at %08X for %08X\n", 
-               devid, devid, mdev[devid].mdBDev, mdev[devid].mdCDev, base << 12, size << 12);
-       return mdev[devid].mdBDev;
-}
-
-
-dev_t mdevlookup(int devid) {
-       
-       if((devid < 0) || (devid > 15)) return -1;                      /* Filter any bogus requests */
-       if(!(mdev[devid].mdFlags & mdInited)) return -1;        /* This one hasn't been defined */
-       return mdev[devid].mdBDev;                                                      /* Return the device number */
-}
diff --git a/bsd/dev/memdev.h b/bsd/dev/memdev.h
deleted file mode 100644 (file)
index a07b5d2..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-
-#ifndef _SYS_MEMDEV_H_
-#define _SYS_MEMDEV_H_
-
-#include <sys/appleapiopts.h>
-
-#ifdef KERNEL_PRIVATE
-
-#ifdef __APPLE_API_PRIVATE
-
-void mdevinit(vm_offset_t base, unsigned int size);
-
-#endif /* __APPLE_API_PRIVATE */
-
-#endif KERNEL_PRIVATE
-
-#endif /* _SYS_MEMDEV_H_*/
index ba13fc3ee874bfe3bbe8b1da8832b9530d3726f2..bfe8c9a0c9a023ff5695319483dcbf909481a97a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 148e5f668bdc81df5573e384adb604502c0c50da..26290d9a37d86d3998b083a3edd9b50b219afa87 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 67a391a839aa9e4c135d1c609160625e5b98b8d3..00d91a155f2608b3507464a3d5439d540f69ed91 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 63bb63a087496d4d9f4d5191e14c9cbddca603ca..fa02a4795f79d07802cbe9ba44aa6597b97cca87 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index dd076c4d066de08549580c56839459bfa3d55c2e..75ec0dea48e83d4b1847edf76ae1fce06a8a536c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6f9d2a154c4634f91e4de0491ef40f75cf83bf9d..38a00cc3c4cc019edede095fd1eef2a56424ddd2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -55,11 +52,18 @@ check_cpu_subtype(cpu_subtype_t cpu_subtype)
        if (cpu_subtype == ms->cpu_subtype)
                return (TRUE);
 
+       if (cpu_subtype == CPU_SUBTYPE_POWERPC_601)
+               return (FALSE);
+
        switch (cpu_subtype) {
-               case CPU_SUBTYPE_POWERPC_970:
                case CPU_SUBTYPE_POWERPC_7450:
                case CPU_SUBTYPE_POWERPC_7400:
                case CPU_SUBTYPE_POWERPC_750:
+               case CPU_SUBTYPE_POWERPC_604e:
+               case CPU_SUBTYPE_POWERPC_604:
+               case CPU_SUBTYPE_POWERPC_603ev:
+               case CPU_SUBTYPE_POWERPC_603e:
+               case CPU_SUBTYPE_POWERPC_603:
                case CPU_SUBTYPE_POWERPC_ALL:
                        return (TRUE);
        }
@@ -86,32 +90,43 @@ grade_cpu_subtype(cpu_subtype_t cpu_subtype)
         * cctools project.  As of 2/16/98 this is what has been agreed upon for
         * the PowerPC subtypes.  If an exact match is not found the subtype will
         * be picked from the following order:
-        *              970, 7450, 7400, 750, ALL
+        *              7400, 750, 604e, 604, 603ev, 603e, 603, ALL
         * Note the 601 is NOT in the list above.  It is only picked via an exact
         * match. For details see Radar 2213821.
         *
         * To implement this function to follow what was agreed upon above, we use
-        * the fact there are currently 4 different subtypes.  Exact matches return
-        * the value 6, and the values 5 thru 1 are returned for the
-        * subtypes listed in the order above.
+        * the fact there are currently 10 different subtypes.  Exact matches return
+        * the value 10, the value 0 is returned for 601 that is not an exact match,
+        * and the values 9 thru 1 are returned for the subtypes listed in the order
+        * above.
         */
        if (ms->cpu_subtype == cpu_subtype)
-               return 6;
+               return 10;
+       if (cpu_subtype == CPU_SUBTYPE_POWERPC_601)
+               return 0;
        switch (cpu_subtype) {
-               case CPU_SUBTYPE_POWERPC_970:
-                       return 5;
                case CPU_SUBTYPE_POWERPC_7450:
-                       return 4;
+                       return 9;
                case CPU_SUBTYPE_POWERPC_7400:
-                       return 3;
+                       return 8;
                case CPU_SUBTYPE_POWERPC_750:
+                       return 7;
+               case CPU_SUBTYPE_POWERPC_604e:
+                       return 6;
+               case CPU_SUBTYPE_POWERPC_604:
+                       return 5;
+               case CPU_SUBTYPE_POWERPC_603ev:
+                       return 4;
+               case CPU_SUBTYPE_POWERPC_603e:
+                       return 3;
+               case CPU_SUBTYPE_POWERPC_603:
                        return 2;
                case CPU_SUBTYPE_POWERPC_ALL:
                        return 1;
        }
        /*
-        * If we get here it is because it is a cpusubtype we don't support
-        * or a new cpusubtype that was added since this code was written.  Both
+        * If we get here it is because it is a cpusubtype we don't support (602 and
+        * 620) or new cpusubtype that was added since this code was written.  Both
         * will be considered unacceptable.
         */
        return 0;
@@ -126,7 +141,7 @@ kernacc(
        off_t base;
        off_t end;
     
-       base = trunc_page_64(start);
+       base = trunc_page(start);
        end = start + len;
        
        while (base < end) {
index 4885c7abb2c83ef13d34c5e9607f1cd6bb2b083f..9bf068b0b66f6fdc8c3955ffb1ea29c0f3e7c83f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8b4d93f15c1be0cd72c1289f565fc894876e66b5..6e44b5eb9d7014d7db508b7c2c04bfaf747b3962 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7bd8b66f7d42ec7329c865cba3e47b613cf6b244..ba9a0f80037c0fc36656a1d70150b1296e99d33f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -89,6 +86,7 @@
 
 static caddr_t devzerobuf;
 
+extern vm_offset_t mem_actual;
 extern pmap_t kernel_pmap;
 
 mmread(dev, uio)
@@ -114,7 +112,6 @@ mmrw(dev, uio, rw)
 {
        register int o;
        register u_int c, v;
-       addr64_t vll;
        register struct iovec *iov;
        int error = 0;
        vm_offset_t     where;
@@ -135,48 +132,45 @@ mmrw(dev, uio, rw)
 
 /* minor device 0 is physical memory */
                case 0:
-                       vll = trunc_page_64(uio->uio_offset);
-                       if(((vll >> 31) == 1) || vll >= ((dgWork.dgFlags & enaDiagDM) ? mem_actual : max_mem))
+                       v = trunc_page(uio->uio_offset);
+                       if (uio->uio_offset >= ((dgWork.dgFlags & enaDiagDM) ? mem_actual : mem_size))
                                goto fault;
 
+                       size= PAGE_SIZE;
+
                        if(dgWork.dgFlags & enaDiagDM) {                        /* Can we really get all memory? */
-                               if (kmem_alloc_pageable(kernel_map, &where, PAGE_SIZE) != KERN_SUCCESS) {
+                               if (kmem_alloc_pageable(kernel_map, &where, size) != KERN_SUCCESS) {
                                        goto fault;
                                }
                                else {
-                                       addr64_t collad;
-                                       
-                                       collad = mapping_make(kernel_pmap, (addr64_t)where, (ppnum_t)(vll >> 12), 0, 1, VM_PROT_READ);  /* Map it in for the moment */
-                                       if(collad) {                                            /* See if it failed (shouldn't happen)  */
-                                               kmem_free(kernel_map, where, PAGE_SIZE);        /* Toss the page */
-                                               goto fault;                                             /* Kill the transfer */
-                                       }
+                                       (void)mapping_make(kernel_pmap, 0, where, v, 
+                                               VM_PROT_READ, 2, 0);    /* Map it in for the moment */
                                }
                        }
                        else {
-                               if (kmem_alloc(kernel_map, &where, 4096
+                               if (kmem_alloc(kernel_map, &where, size
                                        != KERN_SUCCESS) {
                                        goto fault;
                                }
                        }
-                       o = uio->uio_offset - vll;
+                       o = uio->uio_offset - v;
                        c = min(PAGE_SIZE - o, (u_int)iov->iov_len);
-                       error = uiomove((where + o), c, uio);
+                       error = uiomove((caddr_t) (where + o), c, uio);
 
-                       if(dgWork.dgFlags & enaDiagDM) (void)mapping_remove(kernel_pmap, (addr64_t)where);      /* Unmap it */
+                       if(dgWork.dgFlags & enaDiagDM) (void)mapping_remove(kernel_pmap, where);        /* Unmap it */
                        kmem_free(kernel_map, where, PAGE_SIZE);
                        continue;
 
                /* minor device 1 is kernel memory */
                case 1:
                        /* Do some sanity checking */
-                       if (((addr64_t)uio->uio_offset > vm_last_addr) ||
-                               ((addr64_t)uio->uio_offset < VM_MIN_KERNEL_ADDRESS))
+                       if (((caddr_t)uio->uio_offset >= VM_MAX_KERNEL_ADDRESS) ||
+                               ((caddr_t)uio->uio_offset <= VM_MIN_KERNEL_ADDRESS))
                                goto fault;
                        c = iov->iov_len;
-                       if (!kernacc(uio->uio_offset, c))
+                       if (!kernacc((caddr_t)uio->uio_offset, c))
                                goto fault;
-                       error = uiomove64(uio->uio_offset, (int)c, uio);
+                       error = uiomove((caddr_t)uio->uio_offset, (int)c, uio);
                        continue;
 
                /* minor device 2 is EOF/RATHOLE */
index 93a384550c9e017e4b6d9f4be2178ba161d9eb79..e36599aa8bb55ba170cf230b0a173d346d7d19c9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0f7506319fb0d026769370d21dc01b2bc08c7943..d4900147fcc6d8477f72b220d966d5fbcd0fb278 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 85e0df88266937093400aaecf1a0386b8778d393..293ac2a6a4d12383ca427a361e73655a32e27680 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9ba788aee18f3c06bbbfd3b2d447db398f486b58..630a1b0b625b5eaa232e6c052bf502e9600179ec 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #include <vm/vm_map.h>
 
 
+/* 
+ * copy a null terminated string from the kernel address space into
+ * the user address space.
+ *   - if the user is denied write access, return EFAULT.
+ *   - if the end of string isn't found before
+ *     maxlen bytes are copied,  return ENAMETOOLONG,
+ *     indicating an incomplete copy.
+ *   - otherwise, return 0, indicating success.
+ * the number of bytes copied is always returned in lencopied.
+ */
+int
+copyoutstr(from, to, maxlen, lencopied)
+    void * from, * to;
+    size_t maxlen, *lencopied;
+{
+       int slen,len,error=0;
+
+       /* XXX Must optimize this */
+
+       slen = strlen(from) + 1;
+       if (slen > maxlen)
+               error = ENAMETOOLONG;
+
+       len = min(maxlen,slen);
+       if (copyout(from, to, len))
+               error = EFAULT;
+       *lencopied = len;
+
+       return error;
+}
+
+
 /* 
  * copy a null terminated string from one point to another in 
  * the kernel address space.
index 2387c0a80ba05e43d58d19a5748661b525c99158..e84fd36dc675abda15167e80d75bc2a8e637b3be 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -27,7 +24,6 @@
 #include <kern/thread.h>
 #include <kern/thread_act.h>
 #include <kern/assert.h>
-#include <kern/clock.h>
 #include <mach/machine/thread_status.h>
 #include <ppc/savearea.h>
 
@@ -50,8 +46,8 @@ extern struct savearea *
 find_user_regs(
        thread_act_t act);
 
-extern void enter_funnel_section(funnel_t *funnel_lock);
-extern void exit_funnel_section(void);
+extern enter_funnel_section(funnel_t *funnel_lock);
+extern exit_funnel_section(funnel_t *funnel_lock);
 
 /*
  * Function:   unix_syscall
@@ -82,7 +78,7 @@ unix_syscall(
        else
                proc = current_proc();
 
-       flavor = (((unsigned int)regs->save_r0) == NULL)? 1: 0;
+       flavor = (regs->save_r0 == NULL)? 1: 0;
 
        uthread->uu_ar0 = (int *)regs;
 
@@ -165,7 +161,7 @@ unix_syscall(
                regs->save_srr0 -= 8;
        } else if (error != EJUSTRETURN) {
                if (error) {
-                       regs->save_r3 = (long long)error;
+                       regs->save_r3 = error;
                        /* set the "pc" to execute cerror routine */
                        regs->save_srr0 -= 4;
                } else { /* (not error) */
@@ -178,7 +174,10 @@ unix_syscall(
        if (KTRPOINT(proc, KTR_SYSRET))
                ktrsysret(proc, code, error, uthread->uu_rval[0], funnel_type);
 
-        exit_funnel_section();
+       if(funnel_type == KERNEL_FUNNEL) 
+                exit_funnel_section(kernel_flock);
+       else if (funnel_type == NETWORK_FUNNEL)
+                exit_funnel_section(network_flock);
 
        if (kdebug_enable && (code != 180)) {
                KERNEL_DEBUG_CONSTANT(BSDDBG_CODE(DBG_BSD_EXCP_SC, code) | DBG_FUNC_END,
@@ -212,7 +211,7 @@ unix_syscall_return(error)
                regs->save_srr0 -= 8;
        } else if (error != EJUSTRETURN) {
                if (error) {
-                       regs->save_r3 = (long long)error;
+                       regs->save_r3 = error;
                        /* set the "pc" to execute cerror routine */
                        regs->save_srr0 -= 4;
                } else { /* (not error) */
@@ -234,7 +233,10 @@ unix_syscall_return(error)
        if (KTRPOINT(proc, KTR_SYSRET))
                ktrsysret(proc, code, error, uthread->uu_rval[0], funnel_type);
 
-        exit_funnel_section();
+       if(funnel_type == KERNEL_FUNNEL) 
+                exit_funnel_section(kernel_flock);
+       else if (funnel_type == NETWORK_FUNNEL)
+                exit_funnel_section(network_flock);
 
        if (kdebug_enable && (code != 180)) {
                KERNEL_DEBUG_CONSTANT(BSDDBG_CODE(DBG_BSD_EXCP_SC, code) | DBG_FUNC_END,
@@ -258,29 +260,31 @@ struct gettimeofday_args{
        struct timeval *tp;
        struct timezone *tzp;
 };
-/*  NOTE THIS implementation is for  ppc architectures only.
- *  It is infrequently called, since the commpage intercepts
- *  most calls in user mode.
- */
+/*  NOTE THIS implementation is for  ppc architectures only */
 int
 ppc_gettimeofday(p, uap, retval)
        struct proc *p;
        register struct gettimeofday_args *uap;
        register_t *retval;
 {
+       struct timeval atv;
        int error = 0;
-
-       if (uap->tp)
-               clock_gettimeofday(&retval[0], &retval[1]);
+       struct timezone ltz;
+       //struct savearea *child_state;
+       extern simple_lock_data_t tz_slock;
+
+       if (uap->tp) {
+               microtime(&atv);
+               retval[0] = atv.tv_sec;
+               retval[1] = atv.tv_usec;
+       }
        
        if (uap->tzp) {
-               struct timezone ltz;
-               extern simple_lock_data_t tz_slock;
-        
-               usimple_lock(&tz_slock);
+               usimple_lock(&tz_slock);
                ltz = tz;
                usimple_unlock(&tz_slock);
-               error = copyout((caddr_t)&ltz, (caddr_t)uap->tzp, sizeof (tz));
+               error = copyout((caddr_t)&ltz, (caddr_t)uap->tzp,
+                   sizeof (tz));
        }
 
        return(error);
index 941ae0fe66d07ddab36b81c4c3b22550ebfa4020..bc2a1f20f14f0a556917cd9eac6246ea59df6efa 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -41,6 +38,7 @@
 #include <kern/thread.h>
 #include <kern/thread_act.h>
 #include <mach/ppc/thread_status.h>
+#define __ELF__ 0
 #include <ppc/proc_reg.h>
 
 #define        C_REDZONE_LEN           224
 #define        C_LINKAGE_LEN           48
 #define TRUNC_DOWN(a,b,c)  (((((unsigned)a)-(b))/(c)) * (c))
 
-/*
- * The stack layout possibilities (info style); This needs to mach with signal trampoline code
- *
- * Traditional:                        1
- * Traditional64:              20
- * Traditional64with vec:      25
- * 32bit context               30
- * 32bit context with vector   35
- * 64bit context               40
- * 64bit context with vector   45
- * Dual context                        50
- * Dual context with vector    55
- *
- */
-#define UC_TRAD                        1
-#define UC_TRAD64              20
-#define UC_TRAD64_VEC          25
-#define UC_FLAVOR              30
-#define UC_FLAVOR_VEC          35
-#define UC_FLAVOR64            40
-#define UC_FLAVOR64_VEC                45
-#define UC_DUAL                        50
-#define UC_DUAL_VEC            55
-
- /* The following are valid mcontext sizes */
-#define UC_FLAVOR_SIZE ((PPC_THREAD_STATE_COUNT + PPC_EXCEPTION_STATE_COUNT + PPC_FLOAT_STATE_COUNT) * sizeof(int))
-
-#define UC_FLAVOR_VEC_SIZE ((PPC_THREAD_STATE_COUNT + PPC_EXCEPTION_STATE_COUNT + PPC_FLOAT_STATE_COUNT + PPC_VECTOR_STATE_COUNT) * sizeof(int))
-
-#define UC_FLAVOR64_SIZE ((PPC_THREAD_STATE64_COUNT + PPC_EXCEPTION_STATE64_COUNT + PPC_FLOAT_STATE_COUNT) * sizeof(int))
-
-#define UC_FLAVOR64_VEC_SIZE ((PPC_THREAD_STATE64_COUNT + PPC_EXCEPTION_STATE64_COUNT + PPC_FLOAT_STATE_COUNT + PPC_VECTOR_STATE_COUNT) * sizeof(int))
-
-
 /*
  * Arrange for this process to run a signal handler
  */
@@ -96,7 +59,6 @@ sendsig(p, catcher, sig, mask, code)
        u_long code;
 {
        struct mcontext mctx, *p_mctx;
-       struct mcontext64 mctx64, *p_mctx64;
        struct ucontext uctx, *p_uctx;
        siginfo_t sinfo, *p_sinfo;
        struct sigacts *ps = p->p_sigacts;
@@ -107,115 +69,42 @@ sendsig(p, catcher, sig, mask, code)
        thread_act_t th_act;
        struct uthread *ut;
        unsigned long paramp,linkp;
-       int infostyle = UC_TRAD;
-       int dualcontext =0;
+       int infostyle = 1;
        sig_t trampact;
        int vec_used = 0;
        int stack_size = 0;
        int stack_flags = 0;
-       void * tstate;
-       int flavor;
-        int ctx32 = 1;
-       int is_64signalregset(void);
 
        th_act = current_act();
        ut = get_bsdthread_info(th_act);
 
-       
-       if (p->p_sigacts->ps_siginfo & sigmask(sig)) {
-               infostyle = UC_FLAVOR;
-        }
-       if(is_64signalregset() && (infostyle == UC_FLAVOR)) {
-               dualcontext = 1;
-               infostyle = UC_DUAL;    
-       }
-       if (p->p_sigacts->ps_64regset & sigmask(sig))  {
-               dualcontext = 0;
-                ctx32 = 0;
-               infostyle = UC_FLAVOR64;
-       }
-        if (is_64signalregset() && (infostyle == UC_TRAD)) {
-                ctx32=0;
-               infostyle = UC_TRAD64;
-       }
-       
-       /* I need this for SIGINFO anyway */
-       flavor = PPC_THREAD_STATE;
-       tstate = (void *)&mctx.ss;
+       state_count = PPC_EXCEPTION_STATE_COUNT;
+       if (act_machine_get_state(th_act, PPC_EXCEPTION_STATE, &mctx.es, &state_count)  != KERN_SUCCESS) {
+               goto bad;
+       }       
        state_count = PPC_THREAD_STATE_COUNT;
-       if (thread_getstatus(th_act, flavor, (thread_state_t)tstate, &state_count)  != KERN_SUCCESS)
+       if (act_machine_get_state(th_act, PPC_THREAD_STATE, &mctx.ss, &state_count)  != KERN_SUCCESS) {
                goto bad;
-
-       if ((ctx32 == 0) || dualcontext) {
-               flavor = PPC_THREAD_STATE64;
-               tstate = (void *)&mctx64.ss;
-               state_count = PPC_THREAD_STATE64_COUNT;
-                if (thread_getstatus(th_act, flavor, (thread_state_t)tstate, &state_count)  != KERN_SUCCESS)
-                    goto bad;
-       }
-
-        if ((ctx32 == 1) || dualcontext) {
-                flavor = PPC_EXCEPTION_STATE;
-               tstate = (void *)&mctx.es;
-               state_count = PPC_EXCEPTION_STATE_COUNT;
-                if (thread_getstatus(th_act, flavor, (thread_state_t)tstate, &state_count)  != KERN_SUCCESS)
-                    goto bad;
-       } 
-       
-       if ((ctx32 == 0) || dualcontext) {
-               flavor = PPC_EXCEPTION_STATE64;
-               tstate = (void *)&mctx64.es;
-               state_count = PPC_EXCEPTION_STATE64_COUNT;
-       
-                if (thread_getstatus(th_act, flavor, (thread_state_t)tstate, &state_count)  != KERN_SUCCESS)
-                    goto bad;
-                
-        }
-       
-
-        if ((ctx32 == 1) || dualcontext) {
-                flavor = PPC_FLOAT_STATE;
-               tstate = (void *)&mctx.fs;
-               state_count = PPC_FLOAT_STATE_COUNT;
-                if (thread_getstatus(th_act, flavor, (thread_state_t)tstate, &state_count)  != KERN_SUCCESS)
-                    goto bad;
-       } 
-       
-       if ((ctx32 == 0) || dualcontext) {
-               flavor = PPC_FLOAT_STATE;
-               tstate = (void *)&mctx64.fs;
-               state_count = PPC_FLOAT_STATE_COUNT;
-                       if (thread_getstatus(th_act, flavor, (thread_state_t)tstate, &state_count)  != KERN_SUCCESS)
-                    goto bad;
-                
-        }
-
+       }       
+       state_count = PPC_FLOAT_STATE_COUNT;
+       if (act_machine_get_state(th_act, PPC_FLOAT_STATE, &mctx.fs, &state_count)  != KERN_SUCCESS) {
+               goto bad;
+       }       
 
        vec_save(th_act);
        if (find_user_vec(th_act)) {
                vec_used = 1;
-
-                if ((ctx32 == 1) || dualcontext) {
-                    flavor = PPC_VECTOR_STATE;
-                    tstate = (void *)&mctx.vs;
-                    state_count = PPC_VECTOR_STATE_COUNT;
-                    if (thread_getstatus(th_act, flavor, (thread_state_t)tstate, &state_count)  != KERN_SUCCESS)
-                    goto bad;
-                    infostyle += 5;
-            } 
-       
-            if ((ctx32 == 0) || dualcontext) {
-                    flavor = PPC_VECTOR_STATE;
-                    tstate = (void *)&mctx64.vs;
-                    state_count = PPC_VECTOR_STATE_COUNT;
-                    if (thread_getstatus(th_act, flavor, (thread_state_t)tstate, &state_count)  != KERN_SUCCESS)
-                        goto bad;
-                    infostyle += 5;
-           }
-       }  
+               state_count = PPC_VECTOR_STATE_COUNT;
+               if (act_machine_get_state(th_act, PPC_VECTOR_STATE, &mctx.vs, &state_count)  != KERN_SUCCESS) {
+                       goto bad;
+               }       
+               
+       }
 
        trampact = ps->ps_trampact[sig];
        oonstack = ps->ps_sigstk.ss_flags & SA_ONSTACK;
+       if (p->p_sigacts->ps_siginfo & sigmask(sig))
+               infostyle = 2;
 
        /* figure out where our new stack lives */
        if ((ps->ps_flags & SAS_ALTSTACK) && !oonstack &&
@@ -225,30 +114,13 @@ sendsig(p, catcher, sig, mask, code)
                stack_size = ps->ps_sigstk.ss_size;
                ps->ps_sigstk.ss_flags |= SA_ONSTACK;
        }
-       else {
-               if (ctx32 == 0)
-                       sp = (unsigned int)mctx64.ss.r1;
-               else
-                       sp = mctx.ss.r1;
-       }
+       else
+               sp = mctx.ss.r1;
 
-       
-       /* put siginfo on top */
-        
        /* preserve RED ZONE area */
        sp = TRUNC_DOWN(sp, C_REDZONE_LEN, C_STK_ALIGN);
 
-        /* next are the saved registers */
-        if ((ctx32 == 0) || dualcontext) {
-            sp -= sizeof(*p_mctx64);
-            p_mctx64 = (struct mcontext64 *)sp;
-        }
-        if ((ctx32 == 1) || dualcontext) {
-            sp -= sizeof(*p_mctx);
-            p_mctx = (struct mcontext *)sp;
-        }    
-        
-        /* context goes first on stack */
+       /* context goes first on stack */
        sp -= sizeof(*p_uctx);
        p_uctx = (struct ucontext *) sp;
 
@@ -256,9 +128,13 @@ sendsig(p, catcher, sig, mask, code)
        sp -= sizeof(*p_sinfo);
        p_sinfo = (siginfo_t *) sp;
 
+       /* next are the saved registers */
+       sp -= sizeof(*p_mctx);
+       p_mctx = (struct mcontext *)sp;
+
        /* C calling conventions, create param save and linkage
-       *  areas
-       */
+        *  areas
+        */
 
        sp = TRUNC_DOWN(sp, C_PARAMSAVE_LEN, C_STK_ALIGN);
        paramp = sp;
@@ -273,25 +149,14 @@ sendsig(p, catcher, sig, mask, code)
                uctx.uc_stack.ss_flags |= SS_ONSTACK;
                
        uctx.uc_link = 0;
-       if (ctx32 == 0)
-               uctx.uc_mcsize = (size_t)((PPC_EXCEPTION_STATE64_COUNT + PPC_THREAD_STATE64_COUNT + PPC_FLOAT_STATE_COUNT) * sizeof(int));
-       else
-               uctx.uc_mcsize = (size_t)((PPC_EXCEPTION_STATE_COUNT + PPC_THREAD_STATE_COUNT + PPC_FLOAT_STATE_COUNT) * sizeof(int));
-       
+       uctx.uc_mcsize = (size_t)((PPC_EXCEPTION_STATE_COUNT + PPC_THREAD_STATE_COUNT + PPC_FLOAT_STATE_COUNT) * sizeof(int));
        if (vec_used) 
                uctx.uc_mcsize += (size_t)(PPC_VECTOR_STATE_COUNT * sizeof(int));
-        
-       if (ctx32 == 0)
-             uctx.uc_mcontext = (void *)p_mctx64;
-       else
-            uctx.uc_mcontext = (void *)p_mctx;
+       uctx.uc_mcontext = p_mctx;
 
        /* setup siginfo */
        bzero((caddr_t)&sinfo, sizeof(siginfo_t));
        sinfo.si_signo = sig;
-       sinfo.si_addr = (void *)mctx.ss.srr0;
-       sinfo.pad[0] = (unsigned int)mctx.ss.r1;
-
        switch (sig) {
                case SIGCHLD:
                        sinfo.si_pid = p->si_pid;
@@ -365,23 +230,13 @@ sendsig(p, catcher, sig, mask, code)
                        break;
        }
 
-
        /* copy info out to user space */
        if (copyout((caddr_t)&uctx, (caddr_t)p_uctx, sizeof(struct ucontext)))
                goto bad;
        if (copyout((caddr_t)&sinfo, (caddr_t)p_sinfo, sizeof(siginfo_t)))
                goto bad;
-        if ((ctx32 == 0) || dualcontext) {
-               tstate = &mctx64;
-            if (copyout((caddr_t)tstate, (caddr_t)p_mctx64, uctx.uc_mcsize))
+       if (copyout((caddr_t)&mctx, (caddr_t)p_mctx, uctx.uc_mcsize))
                goto bad;
-        }
-        if ((ctx32 == 1) || dualcontext) {
-               tstate = &mctx;
-            if (copyout((caddr_t)tstate, (caddr_t)p_mctx, uctx.uc_mcsize))
-               goto bad;
-        }    
-
 
        /* Place our arguments in arg registers: rtm dependent */
 
@@ -395,9 +250,10 @@ sendsig(p, catcher, sig, mask, code)
        mctx.ss.srr1 = get_msr_exportmask();    /* MSR_EXPORT_MASK_SET */
        mctx.ss.r1 = sp;
        state_count = PPC_THREAD_STATE_COUNT;
-       if (thread_setstatus(th_act, PPC_THREAD_STATE, &mctx.ss, &state_count)  != KERN_SUCCESS) {
+       if (act_machine_set_state(th_act, PPC_THREAD_STATE, &mctx.ss, &state_count)  != KERN_SUCCESS) {
                goto bad;
        }       
+
        return;
 
 bad:
@@ -421,121 +277,8 @@ bad:
  * psl to gain improper priviledges or to cause
  * a machine fault.
  */
-
-#define FOR64_TRANSITION 1
-
-#ifdef FOR64_TRANSITION
-
-struct osigreturn_args {
-       struct ucontext *uctx;
-};
-
-/* ARGSUSED */
-int
-osigreturn(p, uap, retval)
-       struct proc *p;
-       struct osigreturn_args *uap;
-       int *retval;
-{
-       struct ucontext uctx;
-       struct ucontext *p_uctx;
-       struct mcontext64 mctx64;
-       struct mcontext64 *p_64mctx;
-       struct mcontext  *p_mctx;
-       int error;
-       thread_act_t th_act;
-       struct sigacts *ps = p->p_sigacts;
-       sigset_t mask;  
-       register sig_t action;
-       unsigned long state_count;
-       unsigned int state_flavor;
-       struct uthread * ut;
-       int vec_used = 0;
-       void *tsptr, *fptr, *vptr, *mactx;
-       void ppc_checkthreadstate(void *, int);
-
-       th_act = current_act();
-       /* lets use the larger one */
-       mactx = (void *)&mctx64;
-
-       ut = (struct uthread *)get_bsdthread_info(th_act);
-       if (error = copyin(uap->uctx, &uctx, sizeof(struct ucontext))) {
-               return(error);
-       }
-       if (error = copyin(uctx.uc_mcontext, mactx, uctx.uc_mcsize)) {
-               return(error);
-       }
-       
-       if (uctx.uc_onstack & 01)
-                       p->p_sigacts->ps_sigstk.ss_flags |= SA_ONSTACK;
-       else
-               p->p_sigacts->ps_sigstk.ss_flags &= ~SA_ONSTACK;
-
-       ut->uu_sigmask = uctx.uc_sigmask & ~sigcantmask;
-       if (ut->uu_siglist & ~ut->uu_sigmask)
-               signal_setast(current_act());   
-
-       vec_used = 0;
-       switch (uctx.uc_mcsize)  {
-               case UC_FLAVOR64_VEC_SIZE :
-                       vec_used = 1;
-               case UC_FLAVOR64_SIZE : {
-                       p_64mctx = (struct mcontext64 *)mactx;  
-                       tsptr = (void *)&p_64mctx->ss;
-                       fptr = (void *)&p_64mctx->fs;
-                       vptr = (void *)&p_64mctx->vs;
-                       state_flavor = PPC_THREAD_STATE64;
-                       state_count = PPC_THREAD_STATE64_COUNT;
-                       }
-                       break;
-               case UC_FLAVOR_VEC_SIZE :
-                       vec_used = 1;
-               case UC_FLAVOR_SIZE:
-               default: {
-                       p_mctx = (struct mcontext *)mactx;      
-                       tsptr = (void *)&p_mctx->ss;
-                       fptr = (void *)&p_mctx->fs;
-                       vptr = (void *)&p_mctx->vs;
-                       state_flavor = PPC_THREAD_STATE;
-                       state_count = PPC_THREAD_STATE_COUNT;
-               }
-               break;
-       } /* switch () */
-
-       /* validate the thread state, set/reset appropriate mode bits in srr1 */
-       (void)ppc_checkthreadstate(tsptr, state_flavor);
-
-       if (thread_setstatus(th_act, state_flavor, tsptr, &state_count)  != KERN_SUCCESS) {
-               return(EINVAL);
-       }       
-
-       state_count = PPC_FLOAT_STATE_COUNT;
-       if (thread_setstatus(th_act, PPC_FLOAT_STATE, fptr, &state_count)  != KERN_SUCCESS) {
-               return(EINVAL);
-       }       
-
-       mask = sigmask(SIGFPE);
-       if (((ut->uu_sigmask & mask) == 0) && (p->p_sigcatch & mask) && ((p->p_sigignore & mask) == 0)) {
-               action = ps->ps_sigact[SIGFPE];
-               if((action != SIG_DFL) && (action != SIG_IGN)) {
-                       thread_enable_fpe(th_act, 1);
-               }
-       }
-
-       if (vec_used) {
-               state_count = PPC_VECTOR_STATE_COUNT;
-               if (thread_setstatus(th_act, PPC_VECTOR_STATE, vptr, &state_count)  != KERN_SUCCESS) {
-                       return(EINVAL);
-               }       
-       }
-       return (EJUSTRETURN);
-}
-
-#endif /* FOR64_TRANSITION */
-
 struct sigreturn_args {
        struct ucontext *uctx;
-        int infostyle;
 };
 
 /* ARGSUSED */
@@ -545,23 +288,19 @@ sigreturn(p, uap, retval)
        struct sigreturn_args *uap;
        int *retval;
 {
-       struct ucontext uctx;
-       struct ucontext *p_uctx;
-        char mactx[sizeof(struct mcontext64)];
-       struct mcontext  *p_mctx;
-       struct mcontext64 *p_64mctx;
+       struct ucontext uctx, *p_uctx;
+       struct mcontext mctx, *p_mctx;
        int error;
        thread_act_t th_act;
+       struct ppc_float_state fs;
+       struct ppc_exception_state es;
        struct sigacts *ps = p->p_sigacts;
        sigset_t mask;  
        register sig_t action;
        unsigned long state_count;
-       unsigned int state_flavor;
+       unsigned int nbits, rbits;
        struct uthread * ut;
        int vec_used = 0;
-       void *tsptr, *fptr, *vptr;
-        int infostyle = uap->infostyle;
-       void ppc_checkthreadstate(void *, int);
 
        th_act = current_act();
 
@@ -569,9 +308,7 @@ sigreturn(p, uap, retval)
        if (error = copyin(uap->uctx, &uctx, sizeof(struct ucontext))) {
                return(error);
        }
-        
-        
-       if (error = copyin(uctx.uc_mcontext, mactx, uctx.uc_mcsize)) {
+       if (error = copyin(uctx.uc_mcontext, &mctx, sizeof(struct mcontext))) {
                return(error);
        }
        
@@ -579,49 +316,32 @@ sigreturn(p, uap, retval)
                        p->p_sigacts->ps_sigstk.ss_flags |= SA_ONSTACK;
        else
                p->p_sigacts->ps_sigstk.ss_flags &= ~SA_ONSTACK;
-
        ut->uu_sigmask = uctx.uc_sigmask & ~sigcantmask;
+
+
        if (ut->uu_siglist & ~ut->uu_sigmask)
                signal_setast(current_act());   
 
-       vec_used = 0;
-       switch (infostyle)  {
-                case UC_FLAVOR64_VEC:
-                case UC_TRAD64_VEC:
-                                vec_used = 1;
-                case UC_TRAD64:
-               case UC_FLAVOR64:  {
-                            p_64mctx = (struct mcontext64 *)mactx;     
-                            tsptr = (void *)&p_64mctx->ss;
-                            fptr = (void *)&p_64mctx->fs;
-                            vptr = (void *)&p_64mctx->vs;
-                            state_flavor = PPC_THREAD_STATE64;
-                            state_count = PPC_THREAD_STATE64_COUNT;
-                    } 
-                    break;
-               case UC_FLAVOR_VEC :
-                                vec_used = 1;
-               case UC_FLAVOR :
-               default: {
-                       p_mctx = (struct mcontext *)mactx;      
-                       tsptr = (void *)&p_mctx->ss;
-                       fptr = (void *)&p_mctx->fs;
-                       vptr = (void *)&p_mctx->vs;
-                       state_flavor = PPC_THREAD_STATE;
-                       state_count = PPC_THREAD_STATE_COUNT;
-               }
-               break;
-       } /* switch () */
+       nbits = get_msr_nbits();
+       rbits = get_msr_rbits();
+       /* adjust the critical fields */
+       /* make sure naughty bits are off */
+       mctx.ss.srr1 &= ~(nbits);
+       /* make sure necessary bits are on */
+       mctx.ss.srr1 |= (rbits);
 
-       /* validate the thread state, set/reset appropriate mode bits in srr1 */
-       (void)ppc_checkthreadstate(tsptr, state_flavor);
+       state_count = (size_t)((PPC_EXCEPTION_STATE_COUNT + PPC_THREAD_STATE_COUNT + PPC_FLOAT_STATE_COUNT) * sizeof(int));
 
-       if (thread_setstatus(th_act, state_flavor, tsptr, &state_count)  != KERN_SUCCESS) {
+       if (uctx.uc_mcsize > state_count)
+               vec_used = 1;
+
+       state_count = PPC_THREAD_STATE_COUNT;
+       if (act_machine_set_state(th_act, PPC_THREAD_STATE, &mctx.ss, &state_count)  != KERN_SUCCESS) {
                return(EINVAL);
        }       
 
        state_count = PPC_FLOAT_STATE_COUNT;
-       if (thread_setstatus(th_act, PPC_FLOAT_STATE, fptr, &state_count)  != KERN_SUCCESS) {
+       if (act_machine_set_state(th_act, PPC_FLOAT_STATE, &mctx.fs, &state_count)  != KERN_SUCCESS) {
                return(EINVAL);
        }       
 
@@ -635,10 +355,11 @@ sigreturn(p, uap, retval)
 
        if (vec_used) {
                state_count = PPC_VECTOR_STATE_COUNT;
-               if (thread_setstatus(th_act, PPC_VECTOR_STATE, vptr, &state_count)  != KERN_SUCCESS) {
+               if (act_machine_set_state(th_act, PPC_VECTOR_STATE, &mctx.vs, &state_count)  != KERN_SUCCESS) {
                        return(EINVAL);
                }       
        }
+
        return (EJUSTRETURN);
 }
 
index 1b84c433d66351650a429fd149da06ec1d22a369..531a75a0b13947a9710290ca1467baccc0c13741 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -68,7 +65,7 @@ bsd_startupearly()
        kern_return_t   ret;
 
        if (nbuf == 0)
-               nbuf = atop_64(sane_size / 100); /* Get 1% of ram, but no more than we can map */
+               nbuf = atop(mem_size / 100); /* 1% */
        if (nbuf > 8192)
                nbuf = 8192;
        if (nbuf < 256)
@@ -82,7 +79,7 @@ bsd_startupearly()
                niobuf = 128;
 
        size = (nbuf + niobuf) * sizeof (struct buf);
-       size = round_page_32(size);
+       size = round_page(size);
 
        ret = kmem_suballoc(kernel_map,
                        &firstaddr,
@@ -106,13 +103,13 @@ bsd_startupearly()
        buf = (struct buf * )firstaddr;
        bzero(buf,size);
 
-       if ((sane_size > (64 * 1024 * 1024)) || ncl) {
+       if ((mem_size > (64 * 1024 * 1024)) || ncl) {
                int scale;
                extern u_long tcp_sendspace;
                extern u_long tcp_recvspace;
 
                if ((nmbclusters = ncl) == 0) {
-                       if ((nmbclusters = ((sane_size / 16) / MCLBYTES)) > 16384)
+                       if ((nmbclusters = ((mem_size / 16) / MCLBYTES)) > 16384)
                                nmbclusters = 16384;
                }
                if ((scale = nmbclusters / NMBCLUSTERS) > 1) {
index 765e56af6fe27618c7e7e72c0aa0702a6fe362ff..c83a688f1af492c0745d5692caad4d30972114f7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 42b82b3d3fd2d73db1eb6a86b405ec5110d250e4..bdab3ea8af105b0993de6c9d9f4a0342f32cf934 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 001d7b686bc381bb968a3fbf03767fde7eb2b2c4..af6b23bf1a0ba17d1447d7965159d4b49ac7dae8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f21180bf5f1eb3649b76ae7fea5605d2299db9ce..c253149917b1036c8d309c7cb0e02b76dc8234c9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index fff85ddd935da648a71de02a0c66ad0f312fa453..838a87601d5bce1fd9de09b1fea67195a981d882 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7b775cb73f084aaa526c226281fee0833cf7defe..feff7245c25cf91755b205a266773352e9cc5e0a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f3f54b57ef82f5094d683c264fcc7146193856fd..91c1844a00e685c4f8232ec1192c4d189da36572 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 941261cf59504f9e06382a36dfcf044cf8b3bd05..e264e2c0020841c64c4ab1c9b9b1c4007557bc20 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a51ddc995951b6eb42203d44216d5daf749e8483..ad9cfb2ec77283bb25e0deddad03de09a31e052e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c05e53e9c8083504e2b396756cc36fcc3e5d6b4d..ea1d86b42cd22309bb856e5a52521fa14f9a2d22 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index aaf58cbaa8f2f2295f2fd927d0f69120aa92c0bd..fa4ab5fec7df0b2bd0b52524e06c5de34bb0bcdd 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5c344fae4a0cb158b93e726497f0f602106701eb..8524068a65c0423015ed7d9e98ce65715c1dc6b2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c8b3eb11570673fa6d983f7f9a5b795decd3a989..e2919d0d214fff2205708656970b3c9acbf92875 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 109199df65b94658f98efc918398da33e8d7db6b..03dfa5a238b91eb806a02475dcc659f3b443c5d2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3ac950048539d8aaa2f65b842c0e6c57cf41027c..839168e8bf22a73b8938a8a4dac6c482e085d8ef 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 07de90a398274e2541304bbc7cf4bd506cc125cf..538b815f4cbb279e206c379764ad29533fc60cb5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 61e1c339a2f6093741647b351bc119d004a22d5b..9ca48cc251b9e241e9bed3e6714589819f40b2b8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a47ff7dcfe8992e4a8c91bb2302180047ec7c416..a441c27801022a898ed37172ab30a4124df81c13 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 96f997e24d0324d9da3231448ce3c48ec9d78580..f7830f40eced169f5d1d2b5ae2eccd0df0b033a8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 25e3e274e89c8e3bb4864db97e8854077b18e1e4..efa6703e92cb8d174aeb05c83c255b77f4bcbd0a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 20b78be748f5af50873ca6939ecf02d80df9edee..aef372aae26ed1e0d3259d55c708dee1b7c1309e 100644 (file)
@@ -4,22 +4,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c536eaadda17d8d205f26e02b620c981daab13e2..074ba9e4c8dee3a06df00ac3bbc30ae0c3439a32 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 41bd02c82e05741ff4e0c3b7b8a237f1fdc96b65..1dd6e686053ca1ca9f2c71db529b7a91ae4c7d49 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1cfb21d13bcac4996080cafb4c3a091433852f76..f2f5ce61ff8b8e46d22adbe4c784a88e7d6c8421 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b52bed88f931cd5260d0555629a35d3f3697c463..f53d05e3fdac0368525211a2f3af3fb8e8fc5860 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c3ba907528284e103552fb91a9e1e326b949950f..e5da460ee67466e3a8a30a490d4c5c2b08973eba 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3f7c3cc0ccb9707815275970f802db62cbe28de7..a70290d05b909fe756aca2939b8d9a0425a010a5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 32bc234de966b0d06b9a6df84592439b657cb5fa..769576d7ecf3d4edc8e4954af96732eaacc192ae 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8ed86ba3143d8267089cb26040f088034d06a3a0..da27320b137f6f74437d06064564189c9d6ba41a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index eb2204aa830ece7ff8b8210dd851d543ccc23dcd..5cc8d871db061b3a996568028277ba7762f9e98a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -140,7 +137,7 @@ loop:
                        (void)tsleep((caddr_t)cp, PINOD, "hfs_chashget-2", 0);
                        goto loop;
                }
-               if (cp->c_flag & (C_NOEXISTS | C_DELETED))
+               if (cp->c_flag & C_NOEXISTS)
                        continue;
 
                /*
index e1549bab5ee593500d6ab1757830509e391a1974..231e374f148b5717763c6e54b5841dd1869be900 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -85,14 +82,15 @@ hfs_inactive(ap)
                ++forkcount;
 
        /* If needed, get rid of any fork's data for a deleted file */
-       if ((vp->v_type == VREG) && (cp->c_flag & C_DELETED)) {
-               if (VTOF(vp)->ff_blocks != 0) {
-                       error = VOP_TRUNCATE(vp, (off_t)0, IO_NDELAY, NOCRED, p);
-                       if (error)
-                               goto out;
-                       truncated = 1;
-               }
+       if ((cp->c_flag & C_DELETED) &&
+           vp->v_type == VREG &&
+           (VTOF(vp)->ff_blocks != 0)) {                       
+               error = VOP_TRUNCATE(vp, (off_t)0, IO_NDELAY, NOCRED, p);
+               truncated = 1;
+               // have to do this to prevent the lost ubc_info panic
+               SET(cp->c_flag, C_TRANSIT);
                recycle = 1;
+               if (error) goto out;
        }
 
        /*
index eeaee061709ba11c279b94c27700451e3b706a63..998514360ae59c264d7cdd9c526c5c92b159bdb7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 101f17baa806da71ad07788762279d0a3a82d63b..0b4942f366a666d3ba41314f3aa7094a404af6bf 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 630779e2467ab333d3b2bd8d329a7b994eccdc55..c82f1a148d9ca80d5c402d9e16289c9fd22cfe37 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index fdf03bc701619538fb374d0ac28db89b7e95f9bd..185e145034e593d6b2be418324083213db304ad1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d637fdaa243b5c9f2807ca50b51ae0c025612227..233af5ba72136243b2b8bceebf74e3ee9c7be3df 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 47bb66a7f90d34d17011552e690ccf31522a7f63..89809b608fea02e6a565571f887e4a2d391e083d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 96e121b6e11a821d19b97f74b5b9a74675592737..a1b91fdf9af36e7ab749ec5ad29a9c6a11c1d763 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2bb4ae55b9f3ece336fe09714e9761e1d727a022..a8833dedd85c15d258bbd4dcb02d0cc52d34e89d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 602e96380a0b48979a91e7b559759d62539f1380..3761c0e35f17b5b42d5846f0386d3d0de8e5f46d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2d2e07091745972c6323208f4f6d2c3183761a1e..63c1c0cb458479441d872ee9e2df72e71752277e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 426fe11ca5dd21583b2bf50fbbff16bde0373679..0ae8db7586428c07fadedf4b76c50c74d91890a3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c4013f4c36418df98da9cfabeab40fa445133ae4..db88b99c045fe853d137424d98ca1ec558c34a57 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ba73a15ef4ca80560aac7409e74009ae697833cd..33461cc175910c97825e03cc66b48422504a73ea 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 38aac250e2a3093e1777b187451bc9a42e1b9682..502926a427e70aa569fad238ec5ce181bef07a5b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c486d3a1c7f4f63e08b08de8521152f591215df4..11278c5f5876fae716bb5af66bf1b1d759efd15f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c3dac3283aeb2b2de2f2e0807774e7fe15f66404..2b4ded302d092f0b472d8ba323ebf92701fac94f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8bde675daca8d5c6e14372e47fb3f8efb51db44b..6f0311411a8af16e6a32141c64f3c232562ea658 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -1001,7 +998,6 @@ hfs_cmap(ap)
                return (0);
 
        p = current_proc();
-  retry:
        if (fp->ff_unallocblocks) {
                lockExtBtree = 1;
 
@@ -1040,22 +1036,6 @@ hfs_cmap(ap)
        if (fp->ff_unallocblocks) {
                SInt64 reqbytes, actbytes;
 
-               //
-               // Make sure we have a transaction.  It's possible
-               // that we came in and fp->ff_unallocblocks was zero
-               // but during the time we blocked acquiring the extents
-               // btree, ff_unallocblocks became non-zero and so we
-               // will need to start a transaction.
-               //
-               if (hfsmp->jnl && started_tr == 0) {
-                   if (lockExtBtree) {
-                       (void) hfs_metafilelocking(hfsmp, kHFSExtentsFileID, LK_RELEASE, p);
-                       lockExtBtree = 0;
-                   }
-    
-                   goto retry;
-               }
-
                reqbytes = (SInt64)fp->ff_unallocblocks *
                             (SInt64)HFSTOVCB(hfsmp)->blockSize;
                /*
index 589e044312ee924d73acf390a6c575ecfc5e651c..84aecbb016dd7c3090fc5a70172f15509f47fe63 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  *
index 513f49ca6b7fff71fb12bef0f6fb62081b351659..554bbc305763f380637a5430ca9c2b15557ebdf2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 63aa2a90ea671d19a392e081ca03df519bf74425..247b36129f9d9718d4af8f68523819ea8ba3b92d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b53d8eb2fb41c44190fde32d4a50c12df599f11c..7412131ca71a2a55a59637b7038ac9a5027da6bc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -61,8 +58,6 @@
 
 extern uid_t console_user;
 
-extern unsigned long strtoul(const char *, char **, int);
-
 /* Global vfs data structures for hfs */
 
 
@@ -1081,23 +1076,6 @@ hfs_exchange(ap)
 
        hfs_chashinsert(from_cp);
        hfs_chashinsert(to_cp);
-
-       /*
-        * When a file moves out of "Cleanup At Startup"
-        * we can drop its NODUMP status.
-        */
-       if ((from_cp->c_flags & UF_NODUMP) &&
-           (from_cp->c_parentcnid != to_cp->c_parentcnid)) {
-               from_cp->c_flags &= ~UF_NODUMP;
-               from_cp->c_flag |= C_CHANGE;
-       }
-
-       if ((to_cp->c_flags & UF_NODUMP) &&
-           (to_cp->c_parentcnid != from_cp->c_parentcnid)) {
-               to_cp->c_flags &= ~UF_NODUMP;
-               to_cp->c_flag |= C_CHANGE;
-       }
-
 Err_Exit:
        if (to_rvp)
                vrele(to_rvp);
@@ -1177,11 +1155,8 @@ hfs_fsync(ap)
         * When MNT_WAIT is requested and the zero fill timeout
         * has expired then we must explicitly zero out any areas
         * that are currently marked invalid (holes).
-        *
-        * Files with NODUMP can bypass zero filling here.
         */
        if ((wait || (cp->c_flag & C_ZFWANTSYNC)) &&
-           ((cp->c_flags & UF_NODUMP) == 0) &&
            UBCINFOEXISTS(vp) && (fp = VTOF(vp)) &&
            cp->c_zftimeout != 0) {
                int devblksize;
@@ -1707,8 +1682,15 @@ hfs_remove(ap)
                        cp->c_mode = 0;            /* Suppress VOP_UPDATES */
                        error = VOP_TRUNCATE(rvp, (off_t)0, IO_NDELAY, NOCRED, p);
                        cp->c_mode = mode;
-                       if (error)
+                       if (error && !dataforkbusy)
                                goto out;
+                       else {
+                               /*
+                                * XXX could also force an update on vp
+                                * and fail the remove.
+                                */
+                               error = 0;
+                       }
                        truncated = 1;
                }
        }
@@ -1838,11 +1820,10 @@ hfs_remove(ap)
 
        } else /* Not busy */ {
 
-               if (cp->c_blocks > 0) {
-                       printf("hfs_remove: attempting to delete a non-empty file!");
-                       error = EBUSY;
-                       goto out;
-               }
+               if (vp->v_type == VDIR && cp->c_entries > 0)
+                       panic("hfs_remove: attempting to delete a non-empty directory!");
+               if (vp->v_type != VDIR && cp->c_blocks > 0)
+                       panic("hfs_remove: attempting to delete a non-empty file!");
 
                /* Lock catalog b-tree */
                error = hfs_metafilelocking(hfsmp, kHFSCatalogFileID, LK_EXCLUSIVE, p);
@@ -1851,7 +1832,7 @@ hfs_remove(ap)
 
                error = cat_delete(hfsmp, &cp->c_desc, &cp->c_attr);
 
-               if (error && error != ENXIO && error != ENOENT && truncated) {
+               if (error && error != ENXIO && truncated) {
                        if ((cp->c_datafork && cp->c_datafork->ff_data.cf_size != 0) ||
                                (cp->c_rsrcfork && cp->c_rsrcfork->ff_data.cf_size != 0)) {
                                panic("hfs: remove: couldn't delete a truncated file! (%d, data sz %lld; rsrc sz %lld)",
@@ -2230,21 +2211,6 @@ hfs_rename(ap)
        fdcp = VTOC(fdvp);
        fcp = VTOC(fvp);
 
-       /*
-        * When a file moves out of "Cleanup At Startup"
-        * we can drop its NODUMP status.
-        */
-       if ((fcp->c_flags & UF_NODUMP) &&
-           (fvp->v_type == VREG) &&
-           (fdvp != tdvp) &&
-           (fdcp->c_desc.cd_nameptr != NULL) &&
-           (strcmp(fdcp->c_desc.cd_nameptr, "Cleanup At Startup") == 0)) {
-               fcp->c_flags &= ~UF_NODUMP;
-               fcp->c_flag |= C_CHANGE;
-               tv = time;
-               (void) VOP_UPDATE(fvp, &tv, &tv, 0);
-       }
-
        hfs_global_shared_lock_acquire(hfsmp);
        grabbed_lock = 1;
        if (hfsmp->jnl) {
@@ -3434,38 +3400,7 @@ exit:
 
        if ((cnp->cn_flags & (HASBUF | SAVESTART)) == HASBUF)
                FREE_ZONE(cnp->cn_pnbuf, cnp->cn_pnlen, M_NAMEI);
-
-       /*
-        * Check if a file is located in the "Cleanup At Startup"
-        * directory.  If it is then tag it as NODUMP so that we
-        * can be lazy about zero filling data holes.
-        */
-       if ((error == 0) && (vnodetype == VREG) &&
-           (dcp->c_desc.cd_nameptr != NULL) &&
-           (strcmp(dcp->c_desc.cd_nameptr, "Cleanup At Startup") == 0)) {
-               struct vnode *ddvp;
-               cnid_t parid;
-
-               parid = dcp->c_parentcnid;
-               vput(dvp);
-               dvp = NULL;
-
-               /*
-                * The parent of "Cleanup At Startup" should
-                * have the ASCII name of the userid.
-                */
-               if (VFS_VGET(HFSTOVFS(hfsmp), &parid, &ddvp) == 0) {
-                       if (VTOC(ddvp)->c_desc.cd_nameptr &&
-                           (cp->c_uid == strtoul(VTOC(ddvp)->c_desc.cd_nameptr, 0, 0))) {
-                               cp->c_flags |= UF_NODUMP;
-                               cp->c_flag |= C_CHANGE;
-                       }
-                       vput(ddvp);
-               }
-       }
-
-       if (dvp)
-               vput(dvp);
+       vput(dvp);
 
        // XXXdbg
        if (started_tr) {
index 0061a3900ed7d1184a72877d93f12984e2d852d0..65c12839f4cd882fef81e68ccab1fb6a98204055 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 557cd19cf299c405d64b099163b57da1c6c1b8c3..a902d5087aef9ac162c5a802fe6883333f771171 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index bd4282a1286c69575f49bf06ff0e4286bc108a72..7d56bf4f8f2801160db42fd476cd8c75f08b2f7b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e8d8f091e7ecf4b870f925372241069fbca3dd38..fe9b141dfb989a348f2ca85c19d8ec93fcafb6f9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a406754bf048f2eae344bd2f3f04a1c3c9f7042c..8cc50aaa18d8d41629ac7088b34994a6081c0a0e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  *
index 5268c653ca09197412996749b99df537968f5e1b..3a8463911628ac01863caf5fa273401276c94a23 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 17c35c795b351121aa6ea23bc09944121cbf6160..e7134028f5b16839c9f9f5363948c4af188a1b21 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c3a385c905ede043f172c7e74e70e2627ed4b6b4..56751bc4b9a8a9c4c1764b455b3fa7725975f7a5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 85cdddbf8a6ed5ea24163ebe8a9e90f38f3bb6a5..d1a43afb85401e0fd1f9e6ac23976194e6d4f440 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2481b7463cc471b823563c548759099a137d6e81..44e5996a0ac604b43a27f814ff73be24fcec148b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index bb2a1b5ffa297e7213b51c34b8a1945a9099e10e..767e54bec8229fe9471e5d3b7f457750b9640447 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7a38d6d71dc96bf74f961f8d6ce7f29f92efe43e..6831d79c0c8898162afa9045fd8ecca1d4aef086 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8908358e537359ad3e23d20bb942546d30335cf0..4fe6499214d2987b85693abafd71ddf6e88b18c8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 71aa61c3e615d2fa8e99f001633bc07c7733dcbf..b975465d329f28a9dfc8f0e13d7323717f1c3278 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index efd8b8a4cc27a3376eee0c872a9e998f3e23b7bd..1e02d093237531e02b2b6afaf560113b01e70f02 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7bcec72732266e0642912371bf1ef1f069829846..ce9cf300253062a49d2caa8be2854843dd699953 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  *
index 1657de34d7a67b6d02f1ff8d0ae619dbaf96e0b6..4ae9e7ad31c3ddaeabd81165957bc52095e84619 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d9beee4acd0485b9a7652adf559ad79bd6bc1a85..805c86346b69ffbf7c10eb804171c3dda4ed8ece 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9c51d65f1f2f8482dc09cea1a411939e67fd70ae..4fce1168a869ff3c9c6ec382c5a47cf7d9850f9c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2ed9ad24f654aaea2559d9465b1688e2e7905b26..519cd4965e84411c7e48e1e31b5e1034cc12ad85 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3d986f9a26408c54e730d254ecb4bba962ad580e..56a7e4bdddedffe1f5d203d1ab3943ec3de9dcf5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index fb5072a42581a2f910d9cf257b71bc0e6e51de0f..cc062004fb4add536e6a1bce3924c09fe12595e4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8b55318c4e8450c2b4d9dec2ecdb8daee5cbd213..86b4c0c066bfc182cbeef831dde240866f052a2f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f7eabe8242d8d440bf5de338442764ab8169c4c5..fbace41fc8a2900fd046f2e7a1a4c05ad996962f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 38a2c38560ae0edac85adf6055b961f2859205ca..97cab07c3cab6018849b7a00b7f66a282d628a19 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f512aa16988052c344ced41b3e6757b5a159a3f0..2d9a1d3a1575d75906606a60b08734e3ba78b2a6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6e20fd83febee40b8e795713761cccee7f6f2e03..237ecd5fc9e1bfaf45ced9975a14b73b05c1d34c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 45d567a35682dc9f224a5c3deb617fd19c40cef3..f47065afff847162b596b1f7df1540c1ae5a27e9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 084e9f30fa3cb27e13ddb5d4dfea04a97b4ce2fa..f5e43d3f6769d6409d4319dce9a720e9b92dc9b8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e7711c564a3c12e8219026a9dc39ba11d9f04038..c3dd8dea3c458e9ff4421a72cd0e26cbdfa260c4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 52db82da72f5dea18fd4587c82867472e4432994..bea431e18693a5901a68dbcdf73fbdd78fda2edf 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f63ccbd6e93894bf80be22f35965ef32315b7e89..32cbfbbb4b99f766e8a5e1736ea2fb6732893fe0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ff84a01281446667c73b33bee70d5a62b3672d5e..dad563257346ea04bfab76915efda92e21d8d62a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1bc1848f2bd00beac0ee83dc9958447f3c10fbfb..35bb1130df570b321d6b237f0115933ab259261c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8de83979389db01064e5dc0bffa7cbee4a708033..b2584eb47132b7a190196fbdb970d18c33fb5ad3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5f9f0d985bf6ca43753cdc61bcc1421a0d9dfa43..3c73b16a97e1c7e6fe0639fe406047f0a142c6aa 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6ca195efe5fc79ccb7396d3186333b8caf5c2e67..0f6be556517b5ed45d2995b81e05002ff3f4703c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b15eafe5d681f1e9846f6b310e8730f52d621f86..f55484ddc77ab2e682871f28e93765d9962a51eb 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b3c08099b89049252027c1035135e0e97f24ce42..f370e9bf1b0caa88f3ebee370c8de64c397a2513 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4af2eb2789266cad2736d22aea45d5be0abbdffa..0256c0f53e16b4a01be4f19028c94541e5b41e0c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -43,13 +40,6 @@ struct mcontext {
 
 typedef struct mcontext * mcontext_t;
 
-struct mcontext64 {
-       struct sigcontext sc;
-};
-#define I386_MCONTEXT64_SIZE   sizeof(struct mcontext64)       
-
-typedef struct mcontext64 * mcontext64_t;
-
 #endif /* __APPLE_API_UNSTABLE */
 
 #endif /* _I386_UCONTEXT_H_ */
index e1b856fbad33a2545b5392c9ebef8f1ebb51b82d..edc737230320950de082be153547f4ee88501e15 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b8603cf7f26f5a308f30c510ceb569affaf3ec1a..a1c9daeece6549a10c65c54e2b560ba835916334 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3df54955d14d76d2bfe92c101f3b27c9577d1090..a1b2a1b9656430f32a45ab250343fc20e2eac885 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7654c29335391bd95dc27d912de873f9f6be414d..8e56ff5331fc0e5231ad935b9ee6feb81a39aadc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 40921aeff31f99f35c8e33714eb591b800ac8599..b66ddd3e982889106b8c0e221d4641dc9b1b8de2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index bb82bb51e508f9a08912c21179bd5c6222bbba88..c439e4cccbea07ae95a2941a9e804453837cbe91 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b0d7d46017cc7775e28b910532bfda5b02f5fffe..f031630e2828194d995fcfebd74821135a9f04c1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ba3050e95aa13d1cbcc6cf4fb8a656273bd2655b..1c20c4b21753767d1e2263983b19c3c664de17aa 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8be4d37063c08d7f79a58fa585b72519167136b4..caa7e5c8565d0fe4a31e828743adb00e28c03f14 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b9b0cdcce8c98343d31f1d7a4b0d5c04ba51fb59..f9e201a3210f1c9d6191f335d0702be89d4996a7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 57318b873e20800d7e575ab7a4c5fff13a01c103..78f1239c305950bd895933a94a47446e5da8ae64 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 25b2b69794b25680d5edf74ab51dd53af28731dc..f73a873cd036469e41fec3eecee58ecf29201550 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7469632462c7eefaae75ef8450b2e00a02cdadd0..4a3c17192a568a7de51760562fc8e8ca6238cbee 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index dc724462a30fe6b7d695c188d0dda33d1a81cc40..ace849705dcfff08fa2ea7dbe4b52e34ef5c08be 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 929eb5446d26c34df89dfab56a0765798371bd55..b053db39e048e063e9ad5e90c2e6d8dcb414fd2c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index aa94424e6d66e52d0f64c641fb6064787adae9f4..3f199baccb420d53001121cf85305798ffa390c2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5cbf9b001b015dbf4cac1aae1891804357f43ff9..1b69d791c305d2fc8247c1e20bb51be5b11252b8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 87e58b794f05133e7610aadf3ce6452208cfbde1..5081d1bdc9050e20c39ee24f3c99d8442de6d22d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ae121ed84eee6a30726d9917f7bfb89b1ef02850..f2b6aa07e7b255e9855ab3397d1623f220191cc9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cd7fbbc456dbbf9b1952471a3e060b2672122139..1b81ced7b7517c0bb4843960f3c45bbb2d85886c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #include <mach/shared_memory_server.h>
 #include <vm/vm_shared_memory_server.h>
 
+extern shared_region_mapping_t       system_shared_region;
 extern int app_profile;                /* on/off switch for pre-heat cache */
 
 char    copyright[] =
@@ -414,7 +412,6 @@ bsd_init()
         */
        s = splimp();
        sysctl_register_fixed(); 
-       sysctl_mib_init();
        dlil_init();
        socketinit();
        domaininit();
@@ -530,7 +527,6 @@ bsdinit_task(void)
        struct uthread *ut;
        kern_return_t   kr;
        thread_act_t th_act;
-       shared_region_mapping_t system_region;
 
        proc_name("init", p);
 
@@ -560,14 +556,8 @@ bsdinit_task(void)
        bsd_hardclockinit = 1;  /* Start bsd hardclock */
        bsd_init_task = get_threadtask(th_act);
        init_task_failure_data[0] = 0;
-       system_region = lookup_default_shared_region(
-                       ENV_DEFAULT_ROOT, ENV_DEFAULT_SYSTEM);
-        if (system_region == NULL) {
-               shared_file_boot_time_init(
-                       ENV_DEFAULT_ROOT, ENV_DEFAULT_SYSTEM);
-       } else {
-               vm_set_shared_region(get_threadtask(th_act), system_region);
-       }
+       shared_region_mapping_ref(system_shared_region);
+       vm_set_shared_region(get_threadtask(th_act), system_shared_region);
        load_init_program(p);
        /* turn on app-profiling i.e. pre-heating */
        app_profile = 1;
index 8a41d1d8df5347784afa76179b5c5bb1584df0a5..bfe0a85c4f80dadcf081727dcc7efa5b8aadcc20 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -123,7 +120,7 @@ bdevsw_add(int index, struct bdevsw * bsw)
        struct bdevsw *devsw;
 
        if (index == -1) {
-           devsw = &bdevsw[1];         /* Start at slot 1 - this is a hack to fix the index=1 hack */
+           devsw = bdevsw;
            /* yes, start at 1 to avoid collision with volfs (Radar 2842228) */
            for(index=1; index < nblkdev; index++, devsw++) {
                if(memcmp((char *)devsw, 
index 4f1fc3c272801fd257ef09e5c9ec362d1591ece1..b6fc7528770c9a0c284d351167ed1bb534cdb6ac 100644 (file)
@@ -1,24 +1,21 @@
 /*
- * Copyright (c) 1995-1999, 2000-2003 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 1995-1999, 2000-2002 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -127,9 +124,6 @@ int setpriority();
 int    socket();
 int    connect();
 int    getpriority();
-#ifdef __ppc__
-int    osigreturn();
-#endif
 int    sigreturn();
 int    bind();
 int    setsockopt();
@@ -429,11 +423,7 @@ struct sysent sysent[] = {
        sysp(getpriority,2),    /* 100 = getpriority */
        comaptnet(send,4),              /* 101 = old send */
        comaptnet(recv,4),              /* 102 = old recv */
-#ifdef __ppc__
-       syss(osigreturn,1),             /* 103 = sigreturn ; compat for jaguar*/
-#else
-       syss(sigreturn,1),              /* 103 = sigreturn  */
-#endif
+       syss(sigreturn,1),              /* 103 = sigreturn */
        sysnets(bind,3),                /* 104 = bind */
        sysnets(setsockopt,5),  /* 105 = setsockopt */
        sysnets(listen,2),              /* 106 = listen */
@@ -527,11 +517,7 @@ struct sysent sysent[] = {
        syss(setgid,1),                 /* 181 */
        syss(setegid,1),                /* 182 */
        syss(seteuid,1),                /* 183 */
-#ifdef __ppc__
-       syss(sigreturn, 2),             /* 184 = nosys */
-#else
        syss(nosys,0),                  /* 184 = nosys */
-#endif
        syss(nosys,0),                  /* 185 = nosys */
        syss(nosys,0),                  /* 186 = nosys */
        syss(nosys,0),                  /* 187 = nosys */
index 1e09d8bcedc20c77a812140924ef63ad7f3c0b6d..82c594c8bc649e8985566bc73a6e345cd89c87c4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -1025,9 +1022,9 @@ struct proc *p, *curproc;
                      kdbg_mapinit();
                  break;
                case KERN_KDSETBUF:
-                 /* We allow a maximum buffer size of 25% of either ram or max mapped address, whichever is smaller */
+                 /* We allow a maximum buffer size of 25% of memory */
                  /* 'value' is the desired number of trace entries */
-                       max_entries = (sane_size/4) / sizeof(kd_buf);
+                       max_entries = (mem_size/4) / sizeof(kd_buf);
                        if (value <= max_entries)
                                nkdbufs = value;
                        else
@@ -1204,10 +1201,3 @@ kd_buf * my_kd_bufptr;
        } /* end if count */
        return (EINVAL);
 }
-
-unsigned char *getProcName(struct proc *proc);
-unsigned char *getProcName(struct proc *proc) {
-
-       return &proc->p_comm;   /* Return pointer to the proc name */
-
-}
index 05b719d2196d1d9c3e70a2dcfee2092d815d60d2..3654a9dc8e4aea911d34391942abcc874361e023 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 25c65d59562dc5ae48916a1a27f5664aea77ba0f..a1b35394e14fd478ac44c428ee5804b87802e418 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7319540f53e19ec32f96b721774c1ef7a39c7c45..6e3288a6ab979dda7aef7786872aa132e90bd624 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4ef5b24cec980eaa44b7020fe76b148c82008f73..ebab0fa6e99b36ba167c280fb9e6b13707c10c7e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -68,10 +65,9 @@ typedef struct {
 mythread_state_flavor_t thread_flavor_array[]={
                {PPC_THREAD_STATE , PPC_THREAD_STATE_COUNT},
                {PPC_FLOAT_STATE, PPC_FLOAT_STATE_COUNT}, 
-               {PPC_EXCEPTION_STATE, PPC_EXCEPTION_STATE_COUNT},
-               {PPC_VECTOR_STATE, PPC_VECTOR_STATE_COUNT}
+               {PPC_EXCEPTION_STATE, PPC_EXCEPTION_STATE_COUNT}
                };
-int mynum_flavors=4;
+int mynum_flavors=3;
 #elif defined (__i386__)
 mythread_state_flavor_t thread_flavor_array [] = { 
                {i386_THREAD_STATE, i386_THREAD_STATE_COUNT},
@@ -256,7 +252,7 @@ coredump(p)
        mh->sizeofcmds = command_size;
 
        hoffset = sizeof(struct mach_header);   /* offset into header */
-       foffset = round_page_32(header_size);   /* offset into file */
+       foffset = round_page(header_size);      /* offset into file */
        vmoffset = VM_MIN_ADDRESS;              /* offset into VM */
        /* We use to check for an error, here, now we try and get 
         * as much as we can
index b1f7469d476304896ab0ed617ea174cda9613105..6a5cce2a537fe0f803024a91e8b7038a4126217b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f298f525b42f3098def80ad2e23816dd3e6bc989..aa0d6326f113ae4b585231622f82ec55a140c09e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  *
index 88b0a60c3ada531a0a271af0b9887ab0aec429dc..6eb6ebe8fd295ee59e2bb18397bfdd1511566c6d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -169,7 +166,7 @@ execve(p, uap, retval)
        vm_map_t old_map;
        vm_map_t map;
        int i;
-       boolean_t               clean_regions = FALSE;
+       boolean_t               new_shared_regions = FALSE;
        union {
                /* #! and name of interpreter */
                char                    ex_shell[SHSIZE];
@@ -535,11 +532,23 @@ again:
        VOP_UNLOCK(vp, 0, p);
        if(ws_cache_name) {
                tws_handle_startup_file(task, cred->cr_uid, 
-                       ws_cache_name, vp, &clean_regions);
+                       ws_cache_name, vp, &new_shared_regions);
+       }
+       if (new_shared_regions) {
+               shared_region_mapping_t new_shared_region;
+               shared_region_mapping_t old_shared_region;
+       
+               if (shared_file_create_system_region(&new_shared_region))
+                       panic("couldn't create system_shared_region\n");
+
+               vm_get_shared_region(task, &old_shared_region);
+               vm_set_shared_region(task, new_shared_region);
+
+               shared_region_mapping_dealloc(old_shared_region);
        }
 
        lret = load_machfile(vp, mach_header, arch_offset,
-               arch_size, &load_result, thr_act, map, clean_regions);
+                               arch_size, &load_result, thr_act, map);
 
        if (lret != LOAD_SUCCESS) {
                error = load_return_to_errno(lret);
@@ -832,8 +841,8 @@ create_unix_stack(map, user_stack, customstack, p)
 
        p->user_stack = user_stack;
        if (!customstack) {
-               size = round_page_64(unix_stack_size(p));
-               addr = trunc_page_32(user_stack - size);
+               size = round_page(unix_stack_size(p));
+               addr = trunc_page(user_stack - size);
                return (vm_allocate(map,&addr, size, FALSE));
        } else
                return(KERN_SUCCESS);
index 25dc9ef7122edf290c3150770e7c49bf5771c637..3f6aa72361a9680a301d9e8d1f2036df2fe9d2b1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index da5fec8f85d58155543f5292e72cb94982b80fd8..c34b51b31a2632fa3eb896d3bb8614f352dcfadb 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -245,7 +242,6 @@ procdup(
        thread_act_t            thread;
        task_t                  task;
        kern_return_t   result;
-       pmap_t                  pmap;
        extern task_t kernel_task;
 
        if (parent->task == kernel_task)
@@ -259,7 +255,6 @@ procdup(
        set_bsdtask_info(task, child);
        if (child->p_nice != 0)
                resetpriority(child);
-               
        result = thread_create(task, &thread);
        if (result != KERN_SUCCESS)
            printf("fork/procdup: thread_create failed. Code: 0x%x\n", result);
index 2a4d1c3d31dbbac8b8848efc1374c8ee73c0b4e2..a4ccca92a0e7cf705dbd9f25f129c25cfed4b59a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 25f845707c6ef3ebb42296b26f85a04f3b4c4ac0..d8ba1e858b0078cd110e9885eef62c6eddd8a0ad 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6af52d4ee4b850822bc13cd2043a733c80675a29..cfa44959768f19be51a35ef469702c9d68fa7af6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 42db0d01ad6cefeae93eee33ed7951e25d929907..d6c43effe2bab79ef219a14063f598b7084877ad 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #include <machine/smp.h>
 #endif
 
-#include <sys/param.h>  /* XXX prune includes */
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/malloc.h>
-#include <sys/proc.h>
-#include <sys/file.h>
-#include <sys/vnode.h>
-#include <sys/unistd.h>
-#include <sys/buf.h>
-#include <sys/ioctl.h>
-#include <sys/namei.h>
-#include <sys/tty.h>
-#include <sys/disklabel.h>
-#include <sys/vm.h>
-#include <sys/sysctl.h>
-#include <sys/user.h>
-#include <mach/machine.h>
-#include <mach/mach_types.h>
-#include <mach/vm_param.h>
-#include <kern/task.h>
-#include <vm/vm_kern.h>
-#include <mach/host_info.h>
-
-extern vm_map_t bsd_pageable_map;
-
-#include <sys/mount.h>
-#include <sys/kdebug.h>
-
-#include <IOKit/IOPlatformExpert.h>
-#include <pexpert/pexpert.h>
-
-#include <machine/machine_routines.h>
-#include <machine/cpu_capabilities.h>
-
-
 SYSCTL_NODE(, 0,         sysctl, CTLFLAG_RW, 0,
        "Sysctl internal magic");
 SYSCTL_NODE(, CTL_KERN,          kern,   CTLFLAG_RW, 0,
@@ -128,310 +90,3 @@ SYSCTL_NODE(, CTL_MACHDEP, machdep, CTLFLAG_RW, 0,
 SYSCTL_NODE(, CTL_USER,          user,   CTLFLAG_RW, 0,
        "user-level");
 
-#define SYSCTL_RETURN(r, x)    SYSCTL_OUT(r, &x, sizeof(x))
-
-/******************************************************************************
- * hw.* MIB
- */
-
-#define CTLHW_RETQUAD  (1 << 31)
-
-/*
- * Supporting some variables requires us to do "real" work.  We 
- * gather some of that here.
- */
-static int
-sysctl_hw_generic SYSCTL_HANDLER_ARGS
-{
-       char dummy[65];
-       int  epochTemp;
-       extern int vm_page_wire_count;
-       ml_cpu_info_t cpu_info;
-       int val, doquad;
-       long long qval;
-
-       /*
-        * Test and mask off the 'return quad' flag.
-        * Note that only some things here support it.
-        */
-       doquad = arg2 & CTLHW_RETQUAD;
-       arg2 &= ~CTLHW_RETQUAD;
-
-       ml_cpu_get_info(&cpu_info);
-
-       /*
-        * Handle various OIDs.
-        *
-        * OIDs that can return int or quad set val and qval and then break.
-        * Errors and int-only values return inline.
-        */
-       switch (arg2) {
-       case HW_NCPU:
-               {
-               host_basic_info_data_t hinfo;
-               kern_return_t kret;
-               int count = HOST_BASIC_INFO_COUNT;
-#define BSD_HOST 1
-
-                       kret = host_info(BSD_HOST, HOST_BASIC_INFO, &hinfo, &count);
-                       if (kret == KERN_SUCCESS) {
-                               return(SYSCTL_RETURN(req, hinfo.max_cpus));
-                       } else {
-                               return(EINVAL);
-                       }
-               }
-       case HW_AVAILCPU:
-               {
-               host_basic_info_data_t hinfo;
-               kern_return_t kret;
-               int count = HOST_BASIC_INFO_COUNT;
-#define BSD_HOST 1
-
-                       kret = host_info(BSD_HOST, HOST_BASIC_INFO, &hinfo, &count);
-                       if (kret == KERN_SUCCESS) {
-                               return(SYSCTL_RETURN(req, hinfo.avail_cpus));
-                       } else {
-                               return(EINVAL);
-                       }
-               }
-       case HW_CACHELINE:
-               val = cpu_info.cache_line_size;
-               qval = (long long)val;
-               break;
-       case HW_L1ICACHESIZE:
-               val = cpu_info.l1_icache_size;
-               qval = (long long)val;
-               break;
-       case HW_L1DCACHESIZE:
-               val = cpu_info.l1_dcache_size;
-               qval = (long long)val;
-               break;
-       case HW_L2CACHESIZE:
-               if (cpu_info.l2_cache_size == 0xFFFFFFFF)
-                       return(EINVAL);
-               val = cpu_info.l2_cache_size;
-               qval = (long long)val;
-               break;
-       case HW_L3CACHESIZE:
-               if (cpu_info.l3_cache_size == 0xFFFFFFFF)
-                       return(EINVAL);
-               val = cpu_info.l3_cache_size;
-               qval = (long long)val;
-               break;
-
-               /*
-                * Deprecated variables.  We still support these for
-                * backwards compatibility purposes only.
-                */
-       case HW_MACHINE:
-               bzero(dummy, sizeof(dummy));
-               if(!PEGetMachineName(dummy,64))
-                       return(EINVAL);
-               dummy[64] = 0;
-               return(SYSCTL_OUT(req, dummy, strlen(dummy) + 1));
-       case HW_MODEL:
-               bzero(dummy, sizeof(dummy));
-               if(!PEGetModelName(dummy,64))
-                       return(EINVAL);
-               dummy[64] = 0;
-               return(SYSCTL_OUT(req, dummy, strlen(dummy) + 1));
-       case HW_USERMEM:
-               {
-               int usermem = mem_size - vm_page_wire_count * page_size;
-
-                       return(SYSCTL_RETURN(req, usermem));
-               }
-       case HW_EPOCH:
-               epochTemp = PEGetPlatformEpoch();
-               if (epochTemp == -1)
-                       return(EINVAL);
-               return(SYSCTL_RETURN(req, epochTemp));
-       case HW_VECTORUNIT:
-               return(SYSCTL_RETURN(req, cpu_info.vector_unit));
-       case HW_L2SETTINGS:
-               if (cpu_info.l2_cache_size == 0xFFFFFFFF)
-                       return(EINVAL);
-               return(SYSCTL_RETURN(req, cpu_info.l2_settings));
-       case HW_L3SETTINGS:
-               if (cpu_info.l3_cache_size == 0xFFFFFFFF)
-                       return(EINVAL);
-               return(SYSCTL_RETURN(req, cpu_info.l3_settings));
-       default:
-               return(ENOTSUP);
-       }
-       /*
-        * Callers may come to us with either int or quad buffers.
-        */
-       if (doquad) {
-               return(SYSCTL_RETURN(req, qval));
-       }
-       return(SYSCTL_RETURN(req, val));
-}
-
-/*
- * hw.* MIB variables.
- */
-SYSCTL_PROC    (_hw, HW_NCPU, ncpu, CTLTYPE_INT  | CTLFLAG_RD | CTLFLAG_KERN, 0, HW_NCPU, sysctl_hw_generic, "I", "");
-SYSCTL_PROC    (_hw, HW_AVAILCPU, activecpu, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_KERN, 0, HW_AVAILCPU, sysctl_hw_generic, "I", "");
-SYSCTL_INT     (_hw, HW_BYTEORDER, byteorder, CTLFLAG_RD | CTLFLAG_KERN, NULL, BYTE_ORDER, "");
-SYSCTL_INT     (_hw, OID_AUTO, cputype, CTLFLAG_RD | CTLFLAG_KERN, &machine_slot[0].cpu_type, 0, "");
-SYSCTL_INT     (_hw, OID_AUTO, cpusubtype, CTLFLAG_RD | CTLFLAG_KERN, &machine_slot[0].cpu_subtype, 0, "");
-SYSCTL_INT2QUAD(_hw, OID_AUTO, pagesize, CTLFLAG_RD | CTLFLAG_KERN, &page_size, "");
-SYSCTL_QUAD    (_hw, OID_AUTO, busfrequency, CTLFLAG_RD | CTLFLAG_KERN, &gPEClockFrequencyInfo.bus_frequency_hz, "");
-SYSCTL_QUAD    (_hw, OID_AUTO, busfrequency_min, CTLFLAG_RD | CTLFLAG_KERN, &gPEClockFrequencyInfo.bus_frequency_min_hz, "");
-SYSCTL_QUAD    (_hw, OID_AUTO, busfrequency_max, CTLFLAG_RD | CTLFLAG_KERN, &gPEClockFrequencyInfo.bus_frequency_max_hz, "");
-SYSCTL_QUAD    (_hw, OID_AUTO, cpufrequency, CTLFLAG_RD | CTLFLAG_KERN, &gPEClockFrequencyInfo.cpu_frequency_hz, "");
-SYSCTL_QUAD    (_hw, OID_AUTO, cpufrequency_min, CTLFLAG_RD | CTLFLAG_KERN, &gPEClockFrequencyInfo.cpu_frequency_min_hz, "");
-SYSCTL_QUAD    (_hw, OID_AUTO, cpufrequency_max, CTLFLAG_RD | CTLFLAG_KERN, &gPEClockFrequencyInfo.cpu_frequency_max_hz, "");
-SYSCTL_PROC    (_hw, OID_AUTO, cachelinesize, CTLTYPE_QUAD | CTLFLAG_RD | CTLFLAG_KERN, 0, HW_CACHELINE | CTLHW_RETQUAD, sysctl_hw_generic, "Q", "");
-SYSCTL_PROC    (_hw, OID_AUTO, l1icachesize, CTLTYPE_QUAD | CTLFLAG_RD | CTLFLAG_KERN, 0, HW_L1ICACHESIZE | CTLHW_RETQUAD, sysctl_hw_generic, "Q", "");
-SYSCTL_PROC    (_hw, OID_AUTO, l1dcachesize, CTLTYPE_QUAD | CTLFLAG_RD | CTLFLAG_KERN, 0, HW_L1DCACHESIZE | CTLHW_RETQUAD, sysctl_hw_generic, "Q", "");
-SYSCTL_PROC    (_hw, OID_AUTO, l2cachesize, CTLTYPE_QUAD | CTLFLAG_RD | CTLFLAG_KERN, 0, HW_L2CACHESIZE | CTLHW_RETQUAD, sysctl_hw_generic, "Q", "");
-SYSCTL_PROC    (_hw, OID_AUTO, l3cachesize, CTLTYPE_QUAD | CTLFLAG_RD | CTLFLAG_KERN, 0, HW_L3CACHESIZE | CTLHW_RETQUAD, sysctl_hw_generic, "Q", "");
-SYSCTL_INT2QUAD(_hw, OID_AUTO, tbfrequency, CTLFLAG_RD | CTLFLAG_KERN, &gPEClockFrequencyInfo.timebase_frequency_hz, "");
-SYSCTL_QUAD    (_hw, HW_MEMSIZE, memsize, CTLFLAG_RD | CTLFLAG_KERN, &max_mem, "");
-
-/*
- * Optional features can register nodes below hw.optional.
- *
- * If the feature is not present, the node should either not be registered,
- * or it should return -1.  If the feature is present, the node should return
- * 0.  If the feature is present and its use is advised, the node should 
- * return 1.
- */
-SYSCTL_NODE(_hw, OID_AUTO, optional, CTLFLAG_RW, NULL, "optional features");
-
-SYSCTL_INT(_hw_optional, OID_AUTO, floatingpoint, CTLFLAG_RD | CTLFLAG_KERN, 0, 1, "");        /* always set */
-
-/*
- * Deprecated variables.  These are supported for backwards compatibility
- * purposes only.  The MASKED flag requests that the variables not be
- * printed by sysctl(8) and similar utilities.
- *
- * The variables named *_compat here are int-sized versions of variables
- * that are now exported as quads.  The int-sized versions are normally
- * looked up only by number, wheras the quad-sized versions should be
- * looked up by name.
- *
- * The *_compat nodes are *NOT* visible within the kernel.
- */
-SYSCTL_INT (_hw, HW_PAGESIZE,     pagesize_compat, CTLFLAG_RD | CTLFLAG_MASKED, &page_size, 0, "");
-SYSCTL_INT (_hw, HW_BUS_FREQ,     busfrequency_compat, CTLFLAG_RD | CTLFLAG_MASKED, &gPEClockFrequencyInfo.bus_clock_rate_hz, 0, "");
-SYSCTL_INT (_hw, HW_CPU_FREQ,     cpufrequency_compat, CTLFLAG_RD | CTLFLAG_MASKED, &gPEClockFrequencyInfo.cpu_clock_rate_hz, 0, "");
-SYSCTL_PROC(_hw, HW_CACHELINE,    cachelinesize_compat, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MASKED, 0, HW_CACHELINE, sysctl_hw_generic, "I", "");
-SYSCTL_PROC(_hw, HW_L1ICACHESIZE, l1icachesize_compat, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MASKED, 0, HW_L1ICACHESIZE, sysctl_hw_generic, "I", "");
-SYSCTL_PROC(_hw, HW_L1DCACHESIZE, l1dcachesize_compat, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MASKED, 0, HW_L1DCACHESIZE, sysctl_hw_generic, "I", "");
-SYSCTL_PROC(_hw, HW_L2CACHESIZE,  l2cachesize_compat, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MASKED, 0, HW_L2CACHESIZE, sysctl_hw_generic, "I", "");
-SYSCTL_PROC(_hw, HW_L3CACHESIZE,  l3cachesize_compat, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MASKED, 0, HW_L3CACHESIZE, sysctl_hw_generic, "I", "");
-SYSCTL_INT (_hw, HW_TB_FREQ,      tbfrequency_compat, CTLFLAG_RD | CTLFLAG_MASKED, &gPEClockFrequencyInfo.timebase_frequency_hz, 0, "");
-SYSCTL_PROC(_hw, HW_MACHINE,      machine, CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MASKED, 0, HW_MACHINE, sysctl_hw_generic, "A", "");
-SYSCTL_PROC(_hw, HW_MODEL,        model, CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MASKED, 0, HW_MODEL, sysctl_hw_generic, "A", "");
-SYSCTL_INT (_hw, HW_PHYSMEM,      physmem, CTLFLAG_RD | CTLFLAG_MASKED, &mem_size, 0, "");
-SYSCTL_PROC(_hw, HW_USERMEM,      usermem, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MASKED, 0, HW_USERMEM,   sysctl_hw_generic, "I", "");
-SYSCTL_PROC(_hw, HW_EPOCH,        epoch, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MASKED, 0, HW_EPOCH, sysctl_hw_generic, "I", "");
-SYSCTL_PROC(_hw, HW_VECTORUNIT,   vectorunit, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MASKED, 0, HW_VECTORUNIT, sysctl_hw_generic, "I", "");
-SYSCTL_PROC(_hw, HW_L2SETTINGS,   l2settings, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MASKED, 0, HW_L2SETTINGS, sysctl_hw_generic, "I", "");
-SYSCTL_PROC(_hw, HW_L3SETTINGS,   l3settings, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MASKED, 0, HW_L3SETTINGS, sysctl_hw_generic, "I", "");
-
-/******************************************************************************
- * Generic MIB initialisation.
- *
- * This is a hack, and should be replaced with SYSINITs
- * at some point.
- */
-void
-sysctl_mib_init(void)
-{
-       
-       /*
-        * Populate the optional portion of the hw.* MIB.
-        *
-        * XXX This could be broken out into parts of the code
-        *     that actually directly relate to the functions in
-        *     question.
-        */
-#ifdef __ppc__
-       {
-               static int altivec_flag = -1;
-               static SYSCTL_INT(_hw_optional, OID_AUTO, altivec, CTLFLAG_RD | CTLFLAG_NOAUTO | CTLFLAG_KERN, &altivec_flag, 0, "");
-
-               if (_cpu_capabilities & kHasAltivec) {
-                       altivec_flag = 1;
-                       sysctl_register_oid(&sysctl__hw_optional_altivec);
-               }
-       }
-       {
-               static int graphicsops_flag = -1;
-               static SYSCTL_INT(_hw_optional, OID_AUTO, graphicsops, CTLFLAG_RD | CTLFLAG_NOAUTO | CTLFLAG_KERN, &graphicsops_flag, 0, "");
-
-               if (_cpu_capabilities & kHasGraphicsOps) {
-                       graphicsops_flag = 1;
-                       sysctl_register_oid(&sysctl__hw_optional_graphicsops);
-               }               
-       }
-       {
-               static int x64bitops_flag = -1;
-               static SYSCTL_INT(_hw_optional, OID_AUTO, 64bitops, CTLFLAG_RD | CTLFLAG_NOAUTO | CTLFLAG_KERN, &x64bitops_flag, 0, "");
-
-               if (_cpu_capabilities & k64Bit) {
-                       x64bitops_flag = 1;
-                       sysctl_register_oid(&sysctl__hw_optional_64bitops);
-               }               
-       }
-       {
-               static int fsqrt_flag = -1;
-               static SYSCTL_INT(_hw_optional, OID_AUTO, fsqrt, CTLFLAG_RD | CTLFLAG_NOAUTO | CTLFLAG_KERN, &fsqrt_flag, 0, "");
-
-               if (_cpu_capabilities & kHasFsqrt) {
-                       fsqrt_flag = 1;
-                       sysctl_register_oid(&sysctl__hw_optional_fsqrt);
-               }               
-       }
-       {
-               static int stfiwx_flag = -1;
-               static SYSCTL_INT(_hw_optional, OID_AUTO, stfiwx, CTLFLAG_RD | CTLFLAG_NOAUTO | CTLFLAG_KERN, &stfiwx_flag, 0, "");
-
-               if (_cpu_capabilities & kHasStfiwx) {
-                       stfiwx_flag = 1;
-                       sysctl_register_oid(&sysctl__hw_optional_stfiwx);
-               }               
-       }
-       {
-               static int dcba_flag = -1;
-               static SYSCTL_INT(_hw_optional, OID_AUTO, dcba, CTLFLAG_RD | CTLFLAG_NOAUTO | CTLFLAG_KERN, &dcba_flag, 0, "");
-
-               if (_cpu_capabilities & kDcbaAvailable)
-                       dcba_flag = 0;
-               if (_cpu_capabilities & kDcbaRecommended)
-                       dcba_flag = 1;
-               if (dcba_flag >= 0)
-                       sysctl_register_oid(&sysctl__hw_optional_dcba);
-       }
-       {
-               static int datastreams_flag = -1;
-               static SYSCTL_INT(_hw_optional, OID_AUTO, datastreams, CTLFLAG_RD | CTLFLAG_NOAUTO | CTLFLAG_KERN, &datastreams_flag, 0, "");
-
-               if (_cpu_capabilities & kDataStreamsAvailable)
-                       datastreams_flag = 0;
-               if (_cpu_capabilities & kDataStreamsRecommended)
-                       datastreams_flag = 1;
-               if (datastreams_flag >= 0)
-                       sysctl_register_oid(&sysctl__hw_optional_datastreams);
-       }
-       {
-               static int dcbtstreams_flag = -1;
-               static SYSCTL_INT(_hw_optional, OID_AUTO, dcbtstreams, CTLFLAG_RD | CTLFLAG_NOAUTO | CTLFLAG_KERN, &dcbtstreams_flag, 0, "");
-
-               if (_cpu_capabilities & kDcbtStreamsAvailable)
-                       dcbtstreams_flag = 0;
-               if (_cpu_capabilities & kDcbtStreamsRecommended)
-                       dcbtstreams_flag = 1;
-               if (dcbtstreams_flag >= 0)
-                       sysctl_register_oid(&sysctl__hw_optional_dcbtstreams);
-       }
-#else
-# warning we do not support this platform yet
-#endif /* __ppc__ */
-
-
-}
index 2d03d5f13589245319497107bac75437d4cbaf20..3febc75bf148f077d4170a500f510a4288151304 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -246,7 +243,7 @@ mmap(p, uap, retval)
 
        /* Adjust size for rounding (on both ends). */
        user_size += pageoff;                   /* low end... */
-       user_size = (vm_size_t) round_page_32(user_size);       /* hi end */
+       user_size = (vm_size_t) round_page(user_size);  /* hi end */
 
 
        /*
@@ -280,8 +277,8 @@ mmap(p, uap, retval)
         * There should really be a pmap call to determine a reasonable
         * location.
         */
-       else if (addr < round_page_32(p->p_vmspace->vm_daddr + MAXDSIZ))
-               addr = round_page_32(p->p_vmspace->vm_daddr + MAXDSIZ);
+       else if (addr < round_page(p->p_vmspace->vm_daddr + MAXDSIZ))
+               addr = round_page(p->p_vmspace->vm_daddr + MAXDSIZ);
 
 #endif
 
@@ -374,7 +371,7 @@ mmap(p, uap, retval)
         *      We bend a little - round the start and end addresses
         *      to the nearest page boundary.
         */
-       user_size = round_page_32(user_size);
+       user_size = round_page(user_size);
 
        if (file_pos & PAGE_MASK_64)
                return (EINVAL);
@@ -383,9 +380,9 @@ mmap(p, uap, retval)
 
        if ((flags & MAP_FIXED) == 0) {
                find_space = TRUE;
-               user_addr = round_page_32(user_addr); 
+               user_addr = round_page(user_addr); 
        } else {
-               if (user_addr != trunc_page_32(user_addr))
+               if (user_addr != trunc_page(user_addr))
                        return (EINVAL);
                find_space = FALSE;
                (void) vm_deallocate(user_map, user_addr, user_size);
@@ -510,7 +507,7 @@ msync(p, uap, retval)
        pageoff = (addr & PAGE_MASK);
        addr -= pageoff;
        size = uap->len;
-       size = (vm_size_t) round_page_32(size);
+       size = (vm_size_t) round_page(size);
        flags = uap->flags;
 
        if (addr + size < addr)
@@ -590,7 +587,7 @@ munmap(p, uap, retval)
 
        user_addr -= pageoff;
        user_size += pageoff;
-       user_size = round_page_32(user_size);
+       user_size = round_page(user_size);
        if (user_addr + user_size < user_addr)
                return(EINVAL);
 
@@ -654,7 +651,7 @@ mprotect(p, uap, retval)
        pageoff = (user_addr & PAGE_MASK);
        user_addr -= pageoff;
        user_size += pageoff;
-       user_size = round_page_32(user_size);
+       user_size = round_page(user_size);
        if (user_addr + user_size < user_addr)
                return(EINVAL);
 
@@ -697,7 +694,7 @@ minherit(p, uap, retval)
        pageoff = (addr & PAGE_MASK);
        addr -= pageoff;
        size += pageoff;
-       size = (vm_size_t) round_page_32(size);
+       size = (vm_size_t) round_page(size);
        if (addr + size < addr)
                return(EINVAL);
 
@@ -747,8 +744,8 @@ madvise(p, uap, retval)
         * Since this routine is only advisory, we default to conservative
         * behavior.
         */
-       start = trunc_page_32((vm_offset_t) uap->addr);
-       end = round_page_32((vm_offset_t) uap->addr + uap->len);
+       start = trunc_page((vm_offset_t) uap->addr);
+       end = round_page((vm_offset_t) uap->addr + uap->len);
        
        user_map = current_map();
 
@@ -812,8 +809,8 @@ mincore(p, uap, retval)
         * Make sure that the addresses presented are valid for user
         * mode.
         */
-       first_addr = addr = trunc_page_32((vm_offset_t) uap->addr);
-       end = addr + (vm_size_t)round_page_32(uap->len);
+       first_addr = addr = trunc_page((vm_offset_t) uap->addr);
+       end = addr + (vm_size_t)round_page(uap->len);
 
        if (VM_MAX_ADDRESS > 0 && end > VM_MAX_ADDRESS)
                return (EINVAL);
@@ -913,7 +910,7 @@ mlock(p, uap, retval)
        pageoff = (addr & PAGE_MASK);
        addr -= pageoff;
        size += pageoff;
-       size = (vm_size_t) round_page_32(size);
+       size = (vm_size_t) round_page(size);
 
        /* disable wrap around */
        if (addr + size < addr)
@@ -962,7 +959,7 @@ munlock(p, uap, retval)
        pageoff = (addr & PAGE_MASK);
        addr -= pageoff;
        size += pageoff;
-       size = (vm_size_t) round_page_32(size);
+       size = (vm_size_t) round_page(size);
 
        /* disable wrap around */
        if (addr + size < addr)
@@ -1102,7 +1099,7 @@ kern_return_t map_fd_funneled(
                printf("map_fd: file offset not page aligned(%d : %s)\n",p->p_pid, p->p_comm);
                return (KERN_INVALID_ARGUMENT);
        }
-       map_size = round_page_32(size);
+       map_size = round_page(size);
 
        /*
         * Allow user to map in a zero length file.
@@ -1135,7 +1132,7 @@ kern_return_t map_fd_funneled(
                vm_map_copy_t   tmp;
 
                if (copyin(va, &dst_addr, sizeof (dst_addr))    ||
-                                       trunc_page_32(dst_addr) != dst_addr) {
+                                       trunc_page(dst_addr) != dst_addr) {
                        (void) vm_map_remove(
                                        my_map,
                                        map_addr, map_addr + map_size,
index 09da4572b834be42022a1a0dae152c606722f74b..399bbdb92e3ee90aaacea52c23b4d025b79918b4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -96,33 +93,6 @@ static struct sysctl_lock {
        int     sl_locked;
 } memlock;
 
-/*
- * XXX this does not belong here
- */
-static funnel_t *
-spl_kernel_funnel(void)
-{
-       funnel_t *cfunnel;
-
-       cfunnel = thread_funnel_get();
-       if (cfunnel != kernel_flock) {
-               if (cfunnel != NULL)
-                       thread_funnel_set(cfunnel, FALSE);
-               thread_funnel_set(kernel_flock, TRUE);
-       }
-       return(cfunnel);
-}
-
-static void
-splx_kernel_funnel(funnel_t *saved)
-{
-       if (saved != kernel_flock) {
-               thread_funnel_set(kernel_flock, FALSE);
-               if (saved != NULL) 
-                       thread_funnel_set(saved, TRUE);
-       }
-}
-
 static int sysctl_root SYSCTL_HANDLER_ARGS;
 
 struct sysctl_oid_list sysctl__children; /* root list */
@@ -139,9 +109,6 @@ void sysctl_register_oid(struct sysctl_oid *oidp)
        struct sysctl_oid *p;
        struct sysctl_oid *q;
        int n;
-       funnel_t *fnl;
-
-       fnl = spl_kernel_funnel();
 
        /*
         * If this oid has a number OID_AUTO, give it a number which
@@ -172,17 +139,11 @@ void sysctl_register_oid(struct sysctl_oid *oidp)
                SLIST_INSERT_AFTER(q, oidp, oid_link);
        else
                SLIST_INSERT_HEAD(parent, oidp, oid_link);
-
-       splx_kernel_funnel(fnl);
 }
 
 void sysctl_unregister_oid(struct sysctl_oid *oidp)
 {
-       funnel_t *fnl;
-
-       fnl = spl_kernel_funnel();
        SLIST_REMOVE(oidp->oid_parent, oidp, sysctl_oid, oid_link);
-       splx_kernel_funnel(fnl);
 }
 
 /*
@@ -620,64 +581,6 @@ sysctl_handle_long SYSCTL_HANDLER_ARGS
        return (error);
 }
 
-/*
- * Handle a quad, signed or unsigned.  arg1 points to it.
- */
-
-int
-sysctl_handle_quad SYSCTL_HANDLER_ARGS
-{
-       int error = 0;
-
-       if (!arg1)
-               return (EINVAL);
-       error = SYSCTL_OUT(req, arg1, sizeof(long long));
-
-       if (error || !req->newptr)
-               return (error);
-
-       error = SYSCTL_IN(req, arg1, sizeof(long long));
-       return (error);
-}
-
-/*
- * Expose an int value as a quad.
- *
- * This interface allows us to support interfaces defined
- * as using quad values while the implementation is still
- * using ints.
- */
-int
-sysctl_handle_int2quad SYSCTL_HANDLER_ARGS
-{
-       int error = 0;
-       long long val;
-       int newval;
-
-       if (!arg1)
-               return (EINVAL);
-       val = (long long)*(int *)arg1;
-       error = SYSCTL_OUT(req, &val, sizeof(long long));
-
-       if (error || !req->newptr)
-               return (error);
-
-       error = SYSCTL_IN(req, &val, sizeof(long long));
-       if (!error) {
-               /*
-                * Value must be representable; check by
-                * casting and then casting back.
-                */
-               newval = (int)val;
-               if ((long long)newval != val) {
-                       error = ERANGE;
-               } else {
-                       *(int *)arg1 = newval;
-               }
-       }
-       return (error);
-}
-
 /*
  * Handle our generic '\0' terminated 'C' string.
  * Two cases:
@@ -728,6 +631,7 @@ sysctl_handle_opaque SYSCTL_HANDLER_ARGS
 
 /*
  * Transfer functions to/from kernel space.
+ * XXX: rather untested at this point
  */
 static int
 sysctl_old_kernel(struct sysctl_req *req, const void *p, size_t l)
@@ -739,8 +643,11 @@ sysctl_old_kernel(struct sysctl_req *req, const void *p, size_t l)
                i = l;
                if (i > req->oldlen - req->oldidx)
                        i = req->oldlen - req->oldidx;
-               if (i > 0)
-                       bcopy((void*)p, (char *)req->oldptr + req->oldidx, i);
+               if (i > 0) {
+                       error = copyout((void*)p, (char *)req->oldptr + req->oldidx, i);
+                       if (error)
+                           return error;
+               }
        }
        req->oldidx += l;
        if (req->oldptr && i != l)
@@ -755,40 +662,38 @@ sysctl_new_kernel(struct sysctl_req *req, void *p, size_t l)
                return 0;
        if (req->newlen - req->newidx < l)
                return (EINVAL);
-       bcopy((char *)req->newptr + req->newidx, p, l);
+       copyin((char *)req->newptr + req->newidx, p, l);
        req->newidx += l;
        return (0);
 }
 
 int
-kernel_sysctl(struct proc *p, int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen)
+kernel_sysctl(struct proc *p, int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen, size_t *retval)
 {
        int error = 0;
        struct sysctl_req req;
-       funnel_t *fnl;
 
-       /*
-        * Construct request.
-        */
        bzero(&req, sizeof req);
+
        req.p = p;
-       if (oldlenp)
+
+       if (oldlenp) {
                req.oldlen = *oldlenp;
-       if (old)
+       }
+
+       if (old) {
                req.oldptr= old;
+       }
+
        if (newlen) {
                req.newlen = newlen;
                req.newptr = new;
        }
+
        req.oldfunc = sysctl_old_kernel;
        req.newfunc = sysctl_new_kernel;
        req.lock = 1;
 
-       /*
-        * Locking.  Tree traversal always begins with the kernel funnel held.
-        */
-       fnl = spl_kernel_funnel();
-
        /* XXX this should probably be done in a general way */
        while (memlock.sl_lock) {
                memlock.sl_want = 1;
@@ -797,10 +702,8 @@ kernel_sysctl(struct proc *p, int *name, u_int namelen, void *old, size_t *oldle
        }
        memlock.sl_lock = 1;
 
-       /* make the request */
        error = sysctl_root(0, name, namelen, &req);
 
-       /* unlock memory if required */
        if (req.lock == 2)
                vsunlock(req.oldptr, req.oldlen, B_WRITE);
 
@@ -811,17 +714,15 @@ kernel_sysctl(struct proc *p, int *name, u_int namelen, void *old, size_t *oldle
                wakeup((caddr_t)&memlock);
        }
 
-       /*
-        * Undo locking.
-        */
-       splx_kernel_funnel(fnl);
-
        if (error && error != ENOMEM)
                return (error);
 
-       if (oldlenp)
-               *oldlenp = req.oldidx;
-
+       if (retval) {
+               if (req.oldptr && req.oldidx > req.oldlen)
+                       *retval = req.oldlen;
+               else
+                       *retval = req.oldidx;
+       }
        return (error);
 }
 
@@ -913,13 +814,6 @@ found:
                return (EPERM);
        }
 
-       /*
-        * If we're inside the kernel, the OID must be marked as kernel-valid.
-        * XXX This mechanism for testing is bad.
-        */
-       if ((req->oldfunc == sysctl_old_kernel) && !(oid->oid_kind & CTLFLAG_KERN))
-               return(EPERM);
-
        /* Most likely only root can write */
        if (!(oid->oid_kind & CTLFLAG_ANYBODY) &&
            req->newptr && req->p &&
@@ -1052,55 +946,214 @@ userland_sysctl(struct proc *p, int *name, u_int namelen, void *old, size_t *old
        }
        return (error);
 }
+#if 0
+
+#if COMPAT_43
+#include <sys/socket.h>
+#include <vm/vm_param.h>
+
+#define        KINFO_PROC              (0<<8)
+#define        KINFO_RT                (1<<8)
+#define        KINFO_VNODE             (2<<8)
+#define        KINFO_FILE              (3<<8)
+#define        KINFO_METER             (4<<8)
+#define        KINFO_LOADAVG           (5<<8)
+#define        KINFO_CLOCKRATE         (6<<8)
+
+/* Non-standard BSDI extension - only present on their 4.3 net-2 releases */
+#define        KINFO_BSDI_SYSINFO      (101<<8)
 
 /*
- * Kernel versions of the userland sysctl helper functions.
- *
- * These allow sysctl to be used in the same fashion in both
- * userland and the kernel.
- *
- * Note that some sysctl handlers use copyin/copyout, which
- * may not work correctly.
+ * XXX this is bloat, but I hope it's better here than on the potentially
+ * limited kernel stack...  -Peter
  */
 
-static int
-sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, size_t newlen)
-{
+static struct {
+       int     bsdi_machine;           /* "i386" on BSD/386 */
+/*      ^^^ this is an offset to the string, relative to the struct start */
+       char    *pad0;
+       long    pad1;
+       long    pad2;
+       long    pad3;
+       u_long  pad4;
+       u_long  pad5;
+       u_long  pad6;
+
+       int     bsdi_ostype;            /* "BSD/386" on BSD/386 */
+       int     bsdi_osrelease;         /* "1.1" on BSD/386 */
+       long    pad7;
+       long    pad8;
+       char    *pad9;
+
+       long    pad10;
+       long    pad11;
+       int     pad12;
+       long    pad13;
+       quad_t  pad14;
+       long    pad15;
+
+       struct  timeval pad16;
+       /* we dont set this, because BSDI's uname used gethostname() instead */
+       int     bsdi_hostname;          /* hostname on BSD/386 */
+
+       /* the actual string data is appended here */
+
+} bsdi_si;
+/*
+ * this data is appended to the end of the bsdi_si structure during copyout.
+ * The "char *" offsets are relative to the base of the bsdi_si struct.
+ * This contains "FreeBSD\02.0-BUILT-nnnnnn\0i386\0", and these strings
+ * should not exceed the length of the buffer here... (or else!! :-)
+ */
+static char bsdi_strings[80];  /* It had better be less than this! */
 
-       return(kernel_sysctl(current_proc(), name, namelen, oldp, oldlenp, newp, newlen));
-}
+#ifndef _SYS_SYSPROTO_H_
+struct getkerninfo_args {
+       int     op;
+       char    *where;
+       size_t  *size;
+       int     arg;
+};
+#endif
 
-static int
-sysctlnametomib(const char *name, int *mibp, size_t *sizep)
+int
+ogetkerninfo(struct proc *p, struct getkerninfo_args *uap)
 {
-       int oid[2];
-       int error;
+       int error, name[6];
+       size_t size;
+
+       switch (uap->op & 0xff00) {
+
+       case KINFO_RT:
+               name[0] = CTL_NET;
+               name[1] = PF_ROUTE;
+               name[2] = 0;
+               name[3] = (uap->op & 0xff0000) >> 16;
+               name[4] = uap->op & 0xff;
+               name[5] = uap->arg;
+               error = userland_sysctl(p, name, 6, uap->where, uap->size,
+                       0, 0, 0, &size);
+               break;
+
+       case KINFO_VNODE:
+               name[0] = CTL_KERN;
+               name[1] = KERN_VNODE;
+               error = userland_sysctl(p, name, 2, uap->where, uap->size,
+                       0, 0, 0, &size);
+               break;
+
+       case KINFO_PROC:
+               name[0] = CTL_KERN;
+               name[1] = KERN_PROC;
+               name[2] = uap->op & 0xff;
+               name[3] = uap->arg;
+               error = userland_sysctl(p, name, 4, uap->where, uap->size,
+                       0, 0, 0, &size);
+               break;
+
+       case KINFO_FILE:
+               name[0] = CTL_KERN;
+               name[1] = KERN_FILE;
+               error = userland_sysctl(p, name, 2, uap->where, uap->size,
+                       0, 0, 0, &size);
+               break;
+
+       case KINFO_METER:
+               name[0] = CTL_VM;
+               name[1] = VM_METER;
+               error = userland_sysctl(p, name, 2, uap->where, uap->size,
+                       0, 0, 0, &size);
+               break;
+
+       case KINFO_LOADAVG:
+               name[0] = CTL_VM;
+               name[1] = VM_LOADAVG;
+               error = userland_sysctl(p, name, 2, uap->where, uap->size,
+                       0, 0, 0, &size);
+               break;
+
+       case KINFO_CLOCKRATE:
+               name[0] = CTL_KERN;
+               name[1] = KERN_CLOCKRATE;
+               error = userland_sysctl(p, name, 2, uap->where, uap->size,
+                       0, 0, 0, &size);
+               break;
+
+       case KINFO_BSDI_SYSINFO: {
+               /*
+                * this is pretty crude, but it's just enough for uname()
+                * from BSDI's 1.x libc to work.
+                *
+                * In particular, it doesn't return the same results when
+                * the supplied buffer is too small.  BSDI's version apparently
+                * will return the amount copied, and set the *size to how
+                * much was needed.  The emulation framework here isn't capable
+                * of that, so we just set both to the amount copied.
+                * BSDI's 2.x product apparently fails with ENOMEM in this
+                * scenario.
+                */
 
-       /* magic service node */
-       oid[0] = 0;
-       oid[1] = 3;
+               u_int needed;
+               u_int left;
+               char *s;
 
-       /* look up OID for name */
-       *sizep *= sizeof(int);
-       error = sysctl(oid, 2, mibp, sizep, (void *)name, strlen(name));
-       *sizep /= sizeof(int);
-       return(error);
-}
+               bzero((char *)&bsdi_si, sizeof(bsdi_si));
+               bzero(bsdi_strings, sizeof(bsdi_strings));
 
-int
-sysctlbyname(const char *name, void *oldp, size_t *oldlenp, void *newp, size_t newlen)
-{
-       int oid[CTL_MAXNAME + 2];
-       int error;
-       size_t oidlen;
+               s = bsdi_strings;
 
-       /* look up the OID */
-       oidlen = CTL_MAXNAME;
-       error = sysctlnametomib(name, oid, &oidlen);
+               bsdi_si.bsdi_ostype = (s - bsdi_strings) + sizeof(bsdi_si);
+               strcpy(s, ostype);
+               s += strlen(s) + 1;
 
-       /* now use the OID */
-       if (error == 0)
-               error = sysctl(oid, oidlen, oldp, oldlenp, newp, newlen);
-       return(error);
+               bsdi_si.bsdi_osrelease = (s - bsdi_strings) + sizeof(bsdi_si);
+               strcpy(s, osrelease);
+               s += strlen(s) + 1;
+
+               bsdi_si.bsdi_machine = (s - bsdi_strings) + sizeof(bsdi_si);
+               strcpy(s, machine);
+               s += strlen(s) + 1;
+
+               needed = sizeof(bsdi_si) + (s - bsdi_strings);
+
+               if (uap->where == NULL) {
+                       /* process is asking how much buffer to supply.. */
+                       size = needed;
+                       error = 0;
+                       break;
+               }
+
+
+               /* if too much buffer supplied, trim it down */
+               if (size > needed)
+                       size = needed;
+
+               /* how much of the buffer is remaining */
+               left = size;
+
+               if ((error = copyout((char *)&bsdi_si, uap->where, left)) != 0)
+                       break;
+
+               /* is there any point in continuing? */
+               if (left > sizeof(bsdi_si)) {
+                       left -= sizeof(bsdi_si);
+                       error = copyout(&bsdi_strings,
+                                       uap->where + sizeof(bsdi_si), left);
+               }
+               break;
+       }
+
+       default:
+               return (EOPNOTSUPP);
+       }
+       if (error)
+               return (error);
+       p->p_retval[0] = size;
+       if (uap->size)
+               error = copyout((caddr_t)&size, (caddr_t)uap->size,
+                   sizeof(size));
+       return (error);
 }
+#endif /* COMPAT_43 */
 
+#endif
index db92fb59a747e2c43a2d6efc0d68b3de1598ecb4..62f79dafe5d0208518cd27c91ebc8836f84cad95 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9a0a3ced59e174ebb6f1ee1d2f7b1d87c8adbc7f..7d338236a83d967730520ae8f3c39ffc46cd89cf 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index def3db88675ccfde6be53f2d7cf3922319b501d5..c4f2415f5189ecb14280d67e7029635dee9c2318 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 125fde90a30ec564f9733dcda1bf16f1a3282be8..97f98cc1d370a27362e5326812ac7b4543695c4b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2cd41c3b1f1ade3b2a77bbbe0151afbc60d5fcd8..66c98a1373125394c047b06dfbd88cf4dae69624 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0e54ed45d06b1f1ade73075b4ac820a56c641b0b..5a41676e229fd11d46f3487d92a321b423d5da10 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -353,14 +350,14 @@ dosetrlimit(p, which, limp)
                        
                        if (limp->rlim_cur > alimp->rlim_cur) {
                                /* grow stack */
-                               size = round_page_64(limp->rlim_cur);
-                               size -= round_page_64(alimp->rlim_cur);
+                               size = round_page(limp->rlim_cur);
+                               size -= round_page(alimp->rlim_cur);
 
 #if STACK_GROWTH_UP
                                /* go to top of current stack */
-                               addr = trunc_page((unsigned int)(p->user_stack + alimp->rlim_cur));
+                               addr = trunc_page(p->user_stack + alimp->rlim_cur);
 #else STACK_GROWTH_UP
-                               addr = trunc_page_32((unsigned int)(p->user_stack - alimp->rlim_cur));
+                               addr = trunc_page(p->user_stack - alimp->rlim_cur);
                                addr -= size;
 #endif /* STACK_GROWTH_UP */
                                if (vm_allocate(current_map(),
index 809b9c6d353f55610aff0c1a8a28a27c98bd4c53..45697a58db7c60164b3a29d0a48055b4a0598aaa 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 546bfdf5cc9bb6478079b00087b042177a4db928..21c9358d9feaf0464f89b87c8a29caa610f68765 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -290,8 +287,6 @@ sigaction(p, uap, retval)
                        sa->sa_flags |= SA_SIGINFO;
                if (ps->ps_signodefer & bit)
                        sa->sa_flags |= SA_NODEFER;
-               if (ps->ps_64regset & bit)
-                       sa->sa_flags |= SA_64REGSET;
                if ((signum == SIGCHLD) && (p->p_flag & P_NOCLDSTOP))
                        sa->sa_flags |= SA_NOCLDSTOP;
                if ((signum == SIGCHLD) && (p->p_flag & P_NOCLDWAIT))
@@ -435,10 +430,6 @@ setsigvec(p, signum, sa)
                ps->ps_siginfo |= bit;
        else
                ps->ps_siginfo &= ~bit;
-       if (sa->sa_flags & SA_64REGSET)
-               ps->ps_64regset |= bit;
-       else
-               ps->ps_64regset &= ~bit;
        if ((sa->sa_flags & SA_RESTART) == 0)
                ps->ps_sigintr |= bit;
        else
@@ -2139,7 +2130,6 @@ issignal(p)
                                do_bsdexception(EXC_SOFTWARE, EXC_SOFT_SIGNAL, signum);
                                signal_lock(p);
                        } else {
-//                             panic("Unsupportef gdb option \n");;
                                pp->si_pid = p->p_pid;
                                pp->si_status = p->p_xstat;
                                pp->si_code = CLD_TRAPPED;
index 7e94acb9c9aa474a6b7f08854207997f50862e5f..be0f738ff1638a2698d4edd5a4d8495ccbcfa49f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -68,7 +65,6 @@
 #include <sys/proc.h>
 #include <sys/malloc.h>
 #include <sys/queue.h>
-#include <vm/pmap.h>
 
 #include <kdebug.h>
 
 #define DBG_UIO_COPYOUT 16
 #define DBG_UIO_COPYIN  17
 
+
 int
 uiomove(cp, n, uio)
        register caddr_t cp;
        register int n;
        register struct uio *uio;
-{
-       return uiomove64((addr64_t)((unsigned int)cp), n, uio);
-}
-
-int
-uiomove64(addr64_t cp, int n, struct uio *uio)
 {
        register struct iovec *iov;
        u_int cnt;
@@ -116,22 +107,22 @@ uiomove64(addr64_t cp, int n, struct uio *uio)
                        if (uio->uio_rw == UIO_READ)
                          {
                                KERNEL_DEBUG((FSDBG_CODE(DBG_FSRW, DBG_UIO_COPYOUT)) | DBG_FUNC_START,
-                                        (caddr_t)cp, iov->iov_base, cnt, 0,0);
+                                        cp, iov->iov_base, cnt, 0,0);
 
-                               error = copyout((caddr_t)cp, iov->iov_base, cnt);
+                               error = copyout(cp, iov->iov_base, cnt);
 
                                KERNEL_DEBUG((FSDBG_CODE(DBG_FSRW, DBG_UIO_COPYOUT)) | DBG_FUNC_END,
-                                        (caddr_t)cp, iov->iov_base, cnt, 0,0);
+                                        cp, iov->iov_base, cnt, 0,0);
                          }
                        else
                          {
                                KERNEL_DEBUG((FSDBG_CODE(DBG_FSRW, DBG_UIO_COPYIN)) | DBG_FUNC_START,
-                                        iov->iov_base, (caddr_t)cp, cnt, 0,0);
+                                        iov->iov_base, cp, cnt, 0,0);
 
-                               error = copyin(iov->iov_base, (caddr_t)cp, cnt);
+                               error = copyin(iov->iov_base, cp, cnt);
 
                                KERNEL_DEBUG((FSDBG_CODE(DBG_FSRW, DBG_UIO_COPYIN)) | DBG_FUNC_END,
-                                        iov->iov_base, (caddr_t)cp, cnt, 0,0);
+                                        iov->iov_base, cp, cnt, 0,0);
                          }
                        if (error)
                                return (error);
@@ -152,8 +143,8 @@ uiomove64(addr64_t cp, int n, struct uio *uio)
                                KERNEL_DEBUG((FSDBG_CODE(DBG_FSRW, DBG_UIO_COPYOUT)) | DBG_FUNC_START,
                                         cp, iov->iov_base, cnt, 1,0);
 
-                               if (error = copypv((addr64_t)cp, (addr64_t)((unsigned int)iov->iov_base), cnt, cppvPsrc | cppvNoRefSrc))        /* Copy physical to virtual */
-                                       error = EFAULT;
+                               error = copyp2v(cp, iov->iov_base, cnt);
+
 
                                KERNEL_DEBUG((FSDBG_CODE(DBG_FSRW, DBG_UIO_COPYOUT)) | DBG_FUNC_END,
                                         cp, iov->iov_base, cnt, 1,0);
@@ -163,8 +154,7 @@ uiomove64(addr64_t cp, int n, struct uio *uio)
                                KERNEL_DEBUG((FSDBG_CODE(DBG_FSRW, DBG_UIO_COPYIN)) | DBG_FUNC_START,
                                         iov->iov_base, cp, cnt, 1,0);
 
-                               if (error = copypv((addr64_t)((unsigned int)iov->iov_base), (addr64_t)cp, cnt, cppvPsnk | cppvNoRefSrc | cppvNoModSnk)) /* Copy virtual to physical */
-                                       error = EFAULT;
+                               panic("copyv2p not implemented yet\n");
 
                                KERNEL_DEBUG((FSDBG_CODE(DBG_FSRW, DBG_UIO_COPYIN)) | DBG_FUNC_END,
                                         iov->iov_base, cp, cnt, 1,0);
index 4fd60fab29ece9405e123aae01e821608dacf414..f4607b9d3aa85078766c1787689b09a2f33cceeb 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -112,13 +109,13 @@ static int output_kernel_symbols(struct proc *p)
                                (void **)&orig_mh, &orig_mhsize);
     if (rc_mh && orig_mh)
        IODTFreeLoaderInfo("Kernel-__HEADER",
-                           (void *)orig_mh, round_page_32(orig_mhsize));
+                           (void *)orig_mh, round_page(orig_mhsize));
 
     rc_sc = IODTGetLoaderInfo("Kernel-__SYMTAB",
                                (void **) &orig_st, &orig_st_size);
     if (rc_sc && orig_st)
        IODTFreeLoaderInfo("Kernel-__SYMTAB",
-                           (void *)orig_st, round_page_32(orig_st_size));
+                           (void *)orig_st, round_page(orig_st_size));
 
     if (pcred->p_svuid != pcred->p_ruid || pcred->p_svgid != pcred->p_rgid)
        goto out;
@@ -207,7 +204,7 @@ static int output_kernel_symbols(struct proc *p)
     mh->flags      = orig_mh->flags;
 
     // Initialise the current file offset and addr
-    offset = round_page_32(header_size);
+    offset = round_page(header_size);
     addr = (caddr_t) const_text->addr; // Load address of __TEXT,__const
 
     /*
@@ -220,7 +217,7 @@ static int output_kernel_symbols(struct proc *p)
     sg->vmaddr   = (unsigned long) addr;
     sg->vmsize   = const_text->size;
     sg->fileoff  = 0;
-    sg->filesize = const_text->size + round_page_32(header_size);
+    sg->filesize = const_text->size + round_page(header_size);
     sg->maxprot  = 0;
     sg->initprot = 0;
     sg->flags    = 0;
@@ -237,7 +234,7 @@ static int output_kernel_symbols(struct proc *p)
            const_text = se;
        }
     }
-    offset = round_page_32((vm_address_t) offset);
+    offset = round_page((vm_address_t) offset);
 
     // Now copy of the __DATA segment load command, the image need
     // not be stored to disk nobody needs it, yet!
@@ -258,7 +255,7 @@ static int output_kernel_symbols(struct proc *p)
        se->offset = offset;
        se->nreloc = 0;
     }
-    offset = round_page_32(offset);
+    offset = round_page(offset);
 
 
     /*
index 06f1d4591d7f54d43fd11a040a98707d989283e4..f7d68435fb1ea1bd3ff93acee000113c200cdd59 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 58551e20ffd1a044adc8dfe2afb7620aa0b73a01..6aefc6796c5193d53dd9a4b1eb6da605b0a3f07f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -100,6 +97,7 @@ extern vm_map_t bsd_pageable_map;
 #endif
 
 sysctlfn kern_sysctl;
+sysctlfn hw_sysctl;
 #ifdef DEBUG
 sysctlfn debug_sysctl;
 #endif
@@ -215,6 +213,9 @@ __sysctl(p, uap, retval)
                        && (name[1] != KERN_PROC))
                        dolock = 0;
                break;
+       case CTL_HW:
+               fn = hw_sysctl;
+               break;
        case CTL_VM:
                fn = vm_sysctl;
                break;
@@ -449,6 +450,100 @@ kern_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
        /* NOTREACHED */
 }
 
+/*
+ * hardware related system variables.
+ */
+hw_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
+       int *name;
+       u_int namelen;
+       void *oldp;
+       size_t *oldlenp;
+       void *newp;
+       size_t newlen;
+       struct proc *p;
+{
+       char dummy[65];
+       int  epochTemp;
+       extern int vm_page_wire_count;
+#if __ppc__
+       ml_ppc_cpu_info_t cpu_info;
+
+       ml_ppc_get_info(&cpu_info);
+#endif
+
+       /* all sysctl names at this level are terminal */
+       if (namelen != 1)
+               return (ENOTDIR);               /* overloaded */
+
+       switch (name[0]) {
+       case HW_MACHINE:
+               if(!PEGetMachineName(dummy,64))
+                       return(EINVAL);
+               return (sysctl_rdstring(oldp, oldlenp, newp, dummy));
+       case HW_MODEL:
+               if(!PEGetModelName(dummy,64))
+                       return(EINVAL);
+               return (sysctl_rdstring(oldp, oldlenp, newp, dummy));
+       case HW_NCPU:
+               {
+               int numcpus=1;
+               host_basic_info_data_t hinfo;
+               kern_return_t kret;
+               int count= HOST_BASIC_INFO_COUNT;
+#define BSD_HOST 1
+
+                       kret = host_info(BSD_HOST, HOST_BASIC_INFO, &hinfo, &count);
+                       if (kret == KERN_SUCCESS) {
+                               numcpus = hinfo.avail_cpus;
+                               return (sysctl_rdint(oldp, oldlenp, newp, numcpus));
+                       } else {
+                               return(EINVAL);
+                       }
+               }
+       case HW_BYTEORDER:
+               return (sysctl_rdint(oldp, oldlenp, newp, BYTE_ORDER));
+       case HW_PHYSMEM:
+               return (sysctl_rdint(oldp, oldlenp, newp, mem_size));
+       case HW_USERMEM:
+               return (sysctl_rdint(oldp, oldlenp, newp,
+                   (mem_size - vm_page_wire_count * page_size)));
+       case HW_PAGESIZE:
+               return (sysctl_rdint(oldp, oldlenp, newp, page_size));
+       case HW_EPOCH:
+               epochTemp = PEGetPlatformEpoch();
+               if (epochTemp == -1) return(EINVAL);
+               return (sysctl_rdint(oldp, oldlenp, newp, epochTemp));
+       case HW_BUS_FREQ:
+               return (sysctl_rdint(oldp, oldlenp, newp, gPEClockFrequencyInfo.bus_clock_rate_hz));
+       case HW_CPU_FREQ:
+               return (sysctl_rdint(oldp, oldlenp, newp, gPEClockFrequencyInfo.cpu_clock_rate_hz));
+#if __ppc__
+       case HW_VECTORUNIT:
+               return (sysctl_rdint(oldp, oldlenp, newp, cpu_info.vector_unit));
+       case HW_CACHELINE:
+               return (sysctl_rdint(oldp, oldlenp, newp, cpu_info.cache_line_size));
+       case HW_L1ICACHESIZE:
+               return (sysctl_rdint(oldp, oldlenp, newp, cpu_info.l1_icache_size));
+       case HW_L1DCACHESIZE:
+               return (sysctl_rdint(oldp, oldlenp, newp, cpu_info.l1_dcache_size));
+       case HW_L2SETTINGS:
+               if (cpu_info.l2_cache_size == 0xFFFFFFFF) return(EINVAL);
+               return (sysctl_rdint(oldp, oldlenp, newp, cpu_info.l2_settings));
+       case HW_L2CACHESIZE:
+               if (cpu_info.l2_cache_size == 0xFFFFFFFF) return(EINVAL);
+               return (sysctl_rdint(oldp, oldlenp, newp, cpu_info.l2_cache_size));
+       case HW_L3SETTINGS:
+               if (cpu_info.l3_cache_size == 0xFFFFFFFF) return(EINVAL);
+               return (sysctl_rdint(oldp, oldlenp, newp, cpu_info.l3_settings));
+       case HW_L3CACHESIZE:
+               if (cpu_info.l3_cache_size == 0xFFFFFFFF) return(EINVAL);
+               return (sysctl_rdint(oldp, oldlenp, newp, cpu_info.l3_cache_size));
+#endif
+       default:
+               return (EOPNOTSUPP);
+       }
+}
+
 #ifdef DEBUG
 /*
  * Debugging related system variables.
@@ -1116,20 +1211,20 @@ sysctl_procargs(name, namelen, where, sizep, cur_proc)
                goto restart;
        }
 
-       ret = kmem_alloc(kernel_map, &copy_start, round_page_32(arg_size));
+       ret = kmem_alloc(kernel_map, &copy_start, round_page(arg_size));
        if (ret != KERN_SUCCESS) {
                task_deallocate(task);
                return(ENOMEM);
        }
 
        proc_map = get_task_map(task);
-       copy_end = round_page_32(copy_start + arg_size);
+       copy_end = round_page(copy_start + arg_size);
 
-       if( vm_map_copyin(proc_map, trunc_page(arg_addr), round_page_32(arg_size), 
+       if( vm_map_copyin(proc_map, trunc_page(arg_addr), round_page(arg_size), 
                        FALSE, &tmp) != KERN_SUCCESS) {
                        task_deallocate(task);
                        kmem_free(kernel_map, copy_start,
-                                       round_page_32(arg_size));
+                                       round_page(arg_size));
                        return (EIO);
        }
 
@@ -1142,7 +1237,7 @@ sysctl_procargs(name, namelen, where, sizep, cur_proc)
        if( vm_map_copy_overwrite(kernel_map, copy_start, 
                tmp, FALSE) != KERN_SUCCESS) {
                        kmem_free(kernel_map, copy_start,
-                                       round_page_32(arg_size));
+                                       round_page(arg_size));
                        return (EIO);
        }
 
index c31bbb507750444a277a35cf041d2bec4ddfbc75..d41be2383098022f463968f454ac56b714e0f9fb 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 49d35c1571330ba284ac1bd183d1b447be9b82a0..7da98c9eecd9330e67aa5d4ac2a740df9009b932 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6ccadf16e2c8667d959c66dae111239a74082370..6c25ae9d446ceca4bd1854aff8e772a75bc1c937 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -107,7 +104,7 @@ fatfile_getarch(
        /*
         *      Round size of fat_arch structures up to page boundry.
         */
-       size = round_page_32(end_of_archs);
+       size = round_page(end_of_archs);
        if (size <= 0)
                return(LOAD_BADMACHO);
 
index 2510daa92a8132b16477d193de79ac24783e93b4..fe3c023123da810b5ae289f616c31e026448f3cb 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index fecf4daec5929e124ff8b6d637fe0956773f919c..1e4cbeaba97d18142aa897c59d33b04d5287e808 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7de9bed8c0976a066abb95252e9007a52c9a5224..0a995612513d2d0e3052832368dbbd98aa143b4b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -77,8 +74,7 @@ parse_machfile(
        unsigned long           file_offset,
        unsigned long           macho_size,
        int                                     depth,
-       load_result_t           *result,
-       boolean_t               clean_regions
+       load_result_t           *result
 ),
 load_segment(
        struct segment_command  *scp,
@@ -122,8 +118,7 @@ load_dylinker(
        vm_map_t                                map,
        thread_act_t                    thr_act,
        int                                             depth,
-       load_result_t                   *result,
-       boolean_t                       clean_regions
+       load_result_t                   *result
 ),
 get_macho_vnode(
        char                            *path,
@@ -141,8 +136,7 @@ load_machfile(
        unsigned long           macho_size,
        load_result_t           *result,
        thread_act_t            thr_act,
-       vm_map_t                new_map,
-       boolean_t               clean_regions
+       vm_map_t                        new_map
 )
 {
        pmap_t                  pmap;
@@ -171,22 +165,20 @@ load_machfile(
                                TRUE); /**** FIXME ****/
        } else
                map = new_map;
-               
+
        if (!result)
                result = &myresult;
 
        *result = (load_result_t) { 0 };
 
        lret = parse_machfile(vp, map, thr_act, header, file_offset, macho_size,
-                            0, result, clean_regions);
+                            0, result);
 
        if (lret != LOAD_SUCCESS) {
-               if (create_map) {
+               if (create_map)
                        vm_map_deallocate(map); /* will lose pmap reference too */
-               }
                return(lret);
        }
-
        /*
         *      Commit to new map.  First make sure that the current
         *      users of the task get done with it, and that we clean
@@ -216,6 +208,7 @@ load_machfile(
 }
 
 int    dylink_test = 1;
+extern vm_offset_t     system_shared_region;
 
 static
 load_return_t
@@ -227,8 +220,7 @@ parse_machfile(
        unsigned long           file_offset,
        unsigned long           macho_size,
        int                     depth,
-       load_result_t           *result,
-       boolean_t               clean_regions
+       load_result_t           *result
 )
 {
        struct machine_slot     *ms;
@@ -236,7 +228,7 @@ parse_machfile(
        struct load_command     *lcp, *next;
        struct dylinker_command *dlp = 0;
        void *                  pager;
-       load_return_t           ret = LOAD_SUCCESS;
+       load_return_t           ret;
        vm_offset_t             addr, kl_addr;
        vm_size_t               size,kl_size;
        int                     offset;
@@ -304,7 +296,7 @@ parse_machfile(
        /*
         *      Round size of Mach-O commands up to page boundry.
         */
-       size = round_page_32(sizeof (struct mach_header) + header->sizeofcmds);
+       size = round_page(sizeof (struct mach_header) + header->sizeofcmds);
        if (size <= 0)
                return(LOAD_BADMACHO);
 
@@ -381,13 +373,13 @@ parse_machfile(
                        case LC_LOAD_DYLINKER:
                                if (pass != 2)
                                        break;
-                               if ((depth == 1) && (dlp == 0))
+                               if (depth == 1 || dlp == 0)
                                        dlp = (struct dylinker_command *)lcp;
                                else
                                        ret = LOAD_FAILURE;
                                break;
                        default:
-                               ret = LOAD_SUCCESS;/* ignore other stuff */
+                               ret = KERN_SUCCESS;/* ignore other stuff */
                        }
                        if (ret != LOAD_SUCCESS)
                                break;
@@ -395,7 +387,7 @@ parse_machfile(
                if (ret != LOAD_SUCCESS)
                        break;
        }
-       if ((ret == LOAD_SUCCESS) && (depth == 1)) {
+       if (ret == LOAD_SUCCESS && dlp != 0) {
                vm_offset_t addr;
                shared_region_mapping_t shared_region;
                struct shared_region_task_mappings      map_info;
@@ -413,91 +405,33 @@ RedoLookup:
                        &(map_info.client_base),
                        &(map_info.alternate_base),
                        &(map_info.alternate_next), 
-                       &(map_info.fs_base),
-                       &(map_info.system),
                        &(map_info.flags), &next);
 
-               if((map_info.flags & SHARED_REGION_FULL) ||
-                       (map_info.flags & SHARED_REGION_STALE)) {
-                       shared_region_mapping_t system_region;
-                       system_region = lookup_default_shared_region(
-                               map_info.fs_base, map_info.system);
-                       if((map_info.self != (vm_offset_t)system_region) &&
-                               (map_info.flags & SHARED_REGION_SYSTEM)) {
-                          if(system_region == NULL) {
-                               shared_file_boot_time_init(
-                                       map_info.fs_base, map_info.system);
-                          } else {
-                               vm_set_shared_region(task, system_region);
-                          }
-                          shared_region_mapping_dealloc(
+               if((map_info.self != (vm_offset_t)system_shared_region) &&
+                       (map_info.flags & SHARED_REGION_SYSTEM)) {
+                       shared_region_mapping_ref(system_shared_region);
+                       vm_set_shared_region(task, system_shared_region);
+                       shared_region_mapping_dealloc(
                                        (shared_region_mapping_t)map_info.self);
-                          goto RedoLookup;
-                       } else if (map_info.flags & SHARED_REGION_SYSTEM) {
-                             shared_region_mapping_dealloc(system_region);
-                             shared_file_boot_time_init(
-                                       map_info.fs_base, map_info.system);
-                             shared_region_mapping_dealloc(
-                                    (shared_region_mapping_t)map_info.self);
-                       } else {
-                             shared_region_mapping_dealloc(system_region);
-                       }
+                       goto RedoLookup;
                }
 
 
                if (dylink_test) {
                        p->p_flag |=  P_NOSHLIB; /* no shlibs in use */
                        addr = map_info.client_base;
-                       if(clean_regions) {
-                          vm_map(map, &addr, map_info.text_size, 
-                               0, SHARED_LIB_ALIAS,
-                               map_info.text_region, 0, FALSE,
-                               VM_PROT_READ, VM_PROT_READ, VM_INHERIT_SHARE);
-                       } else {
-                          vm_map(map, &addr, map_info.text_size, 0, 
+                       vm_map(map, &addr, map_info.text_size, 0, 
                                (VM_MEMORY_SHARED_PMAP << 24) 
                                                | SHARED_LIB_ALIAS,
                                map_info.text_region, 0, FALSE,
                                VM_PROT_READ, VM_PROT_READ, VM_INHERIT_SHARE);
-                       }
                        addr = map_info.client_base + map_info.text_size;
                        vm_map(map, &addr, map_info.data_size, 
                                0, SHARED_LIB_ALIAS,
                                map_info.data_region, 0, TRUE,
                                VM_PROT_READ, VM_PROT_READ, VM_INHERIT_SHARE);
-       
-                       while (next) {
-                          /* this should be fleshed out for the general case */
-                          /* but this is not necessary for now.  Indeed we   */
-                          /* are handling the com page inside of the         */
-                          /* shared_region mapping create calls for now for  */
-                          /* simplicities sake.  If more general support is  */
-                          /* needed the code to manipulate the shared range  */
-                          /* chain can be pulled out and moved to the callers*/
-                          shared_region_mapping_info(next,
-                               &(map_info.text_region),   
-                               &(map_info.text_size),
-                               &(map_info.data_region),
-                               &(map_info.data_size),
-                               &(map_info.region_mappings),
-                               &(map_info.client_base),
-                               &(map_info.alternate_base),
-                               &(map_info.alternate_next), 
-                               &(map_info.fs_base),
-                               &(map_info.system),
-                               &(map_info.flags), &next);
-
-                          addr = map_info.client_base;
-                          vm_map(map, &addr, map_info.text_size, 
-                               0, SHARED_LIB_ALIAS,
-                               map_info.text_region, 0, FALSE,
-                               VM_PROT_READ, VM_PROT_READ, VM_INHERIT_SHARE);
-                       }
                }
-        if (dlp != 0) {
-            ret = load_dylinker(dlp, map, thr_act, 
-                        depth, result, clean_regions);
-        }
+               ret = load_dylinker(dlp, map, thr_act, depth, result);
        }
 
        if (kl_addr )
@@ -541,15 +475,15 @@ load_segment(
        if (scp->fileoff + scp->filesize > macho_size)
                return (LOAD_BADMACHO);
 
-       seg_size = round_page_32(scp->vmsize);
+       seg_size = round_page(scp->vmsize);
        if (seg_size == 0)
                return(KERN_SUCCESS);
 
        /*
         *      Round sizes to page size.
         */
-       map_size = round_page_32(scp->filesize);
-       map_addr = trunc_page_32(scp->vmaddr);
+       map_size = round_page(scp->filesize);
+       map_addr = trunc_page(scp->vmaddr);
 
        map_offset = pager_offset + scp->fileoff;
 
@@ -846,8 +780,7 @@ load_dylinker(
        vm_map_t                map,
        thread_act_t    thr_act,
        int                     depth,
-       load_result_t           *result,
-       boolean_t               clean_regions
+       load_result_t           *result
 )
 {
        char                    *name;
@@ -888,7 +821,7 @@ load_dylinker(
 
        ret = parse_machfile(vp, copy_map, thr_act, &header,
                                file_offset, macho_size,
-                               depth, &myresult, clean_regions);
+                               depth, &myresult);
 
        if (ret)
                goto out;
index 9c7b1171e8726bf81839833021652c23dfbc189f..26cb05e9af22b7ddb9dddde70d0ba61a1fa51e5c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -62,8 +59,7 @@ load_return_t load_machfile(
        unsigned long           macho_size,
        load_result_t           *result,
        thread_act_t            thr_act,
-       vm_map_t                map,
-       boolean_t               clean_regions);
+       vm_map_t                        map);
 
 #define LOAD_SUCCESS           0
 #define LOAD_BADARCH           1       /* CPU type/subtype not found */
index 8e6a05af4af68b8eb50a2ac34ea14948e44fc210..e7df848def52a9b910a8026196e917dbcd46bea8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -117,7 +114,7 @@ ptrace(p, uap, retval)
        int             *locr0;
        int error = 0;
 #if defined(ppc)
-       struct ppc_thread_state64 statep;
+       struct ppc_thread_state statep;
 #elif  defined(i386)
        struct i386_saved_state statep;
 #else
@@ -291,8 +288,8 @@ ptrace(p, uap, retval)
                        goto errorLabel;
                }       
 #elif defined(ppc)
-               state_count = PPC_THREAD_STATE64_COUNT;
-               if (thread_getstatus(th_act, PPC_THREAD_STATE64, &statep, &state_count)  != KERN_SUCCESS) {
+               state_count = PPC_THREAD_STATE_COUNT;
+               if (thread_getstatus(th_act, PPC_THREAD_STATE, &statep, &state_count)  != KERN_SUCCESS) {
                        goto errorLabel;
                }       
 #else
@@ -306,9 +303,9 @@ ptrace(p, uap, retval)
                if (!ALIGNED((int)uap->addr, sizeof(int)))
                        return (ERESTART);
 
-               statep.srr0 = (uint64_t)((uint32_t)uap->addr);
-               state_count = PPC_THREAD_STATE64_COUNT;
-               if (thread_setstatus(th_act, PPC_THREAD_STATE64, &statep, &state_count)  != KERN_SUCCESS) {
+               statep.srr0 = (int)uap->addr;
+               state_count = PPC_THREAD_STATE_COUNT;
+               if (thread_setstatus(th_act, PPC_THREAD_STATE, &statep, &state_count)  != KERN_SUCCESS) {
                        goto errorLabel;
                }       
 #undef         ALIGNED
@@ -324,8 +321,8 @@ ptrace(p, uap, retval)
                        psignal_lock(t, uap->data, 0);
                 }
 #if defined(ppc)
-               state_count = PPC_THREAD_STATE64_COUNT;
-               if (thread_getstatus(th_act, PPC_THREAD_STATE64, &statep, &state_count)  != KERN_SUCCESS) {
+               state_count = PPC_THREAD_STATE_COUNT;
+               if (thread_getstatus(th_act, PPC_THREAD_STATE, &statep, &state_count)  != KERN_SUCCESS) {
                        goto errorLabel;
                }       
 #endif
@@ -349,8 +346,8 @@ ptrace(p, uap, retval)
 #endif
                }
 #if defined (ppc)
-               state_count = PPC_THREAD_STATE64_COUNT;
-               if (thread_setstatus(th_act, PPC_THREAD_STATE64, &statep, &state_count)  != KERN_SUCCESS) {
+               state_count = PPC_THREAD_STATE_COUNT;
+               if (thread_setstatus(th_act, PPC_THREAD_STATE, &statep, &state_count)  != KERN_SUCCESS) {
                        goto errorLabel;
                }       
 #endif
@@ -359,8 +356,7 @@ ptrace(p, uap, retval)
                t->p_stat = SRUN;
                if (t->sigwait) {
                        wakeup((caddr_t)&(t->sigwait));
-                       if ((t->p_flag & P_SIGEXC) == 0)
-                               task_release(task);
+                       task_release(task);
                }
                break;
                
index ce58ad6192cb802a6254bae9aff8ab26bed59e96..4043bc9d31d66bbb513213291d5382a8e005a8a8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 56b920a4f6f133354de6e862b0773bb47c4cacef..05f946900c6f34cd9bc75286df4a4e20158269c9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 952b28833613dd0744cd4cf1fd4e4f5d7eddfe56..1b25d26acff19d6e1c96ad70a1c6b80b3d38bc29 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -510,7 +507,7 @@ pshm_truncate(p, fp, fd, length, retval)
                return(EINVAL);
        }
 
-       size = round_page_64(length);
+       size = round_page (length);
        kret = vm_allocate(current_map(), &user_addr, size, TRUE);
        if (kret != KERN_SUCCESS) 
                goto out;
@@ -664,9 +661,9 @@ pshm_mmap(struct proc *p, struct mmap_args *uap, register_t *retval, struct file
 
        if ((flags & MAP_FIXED) == 0) {
                find_space = TRUE;
-               user_addr = round_page_32(user_addr); 
+               user_addr = round_page(user_addr); 
        } else {
-               if (user_addr != trunc_page_32(user_addr))
+               if (user_addr != trunc_page(user_addr))
                        return (EINVAL);
                find_space = FALSE;
                (void) vm_deallocate(user_map, user_addr, user_size);
index f0be62518f6c92426fbd61975b37c000fb3905a0..7db056c43bd59997fe5f386a2b2bff96755c84a4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d0424e50145697fe58f82c7befc7c6ececeaba46..d1505f175c7bdd5d3e79ea02f846164c79576d6d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9b0c38f064eb5ddbfbee976ab1d0a6dc075b05d0..4ab15677d42013d75167f3bedb6436a697a43843 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6703f0c194f97b436e21ccfd86e28a94a000c6f7..4a4a9a06ac4a900b7963422bd806346f0d22523b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2001154413558fbb2a984958742c46ab11ff813f..68867e8ea990231001fc4ba28d9960bfebb44771 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4b84e1430f4529f8fb543e94134b42cdf29e0573..2fcd135c7747a3b1c7b9b0e096c7a31bd1c076fa 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index fdf8a35ef64d3cb4927f1d00447d64e32d08fbe1..503401a6c0ca1417b8f36b711742dfbfef8fe50a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1fc9ee12a09587a9fce56072f31b6a8ad5ed5c10..ab3f6284708dfc18851c54c7453750b53bd183cd 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  *
index eb721f871d31a811c7d5b3d3450266338cf70dec..8897fa58895f2a577546f7d7b2e158a00df70a23 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a215a42bcee0924722e4448ddd15a9a0da4897f7..c276ed03614de11c7b7b1d38337b492f12ae3e27 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8c641bf49ab48fabe979f8d16930776a7d4ea4c7..27d915a0af34a05f979ca4568c83e88f3eb7c76f 100644 (file)
@@ -1,24 +1,21 @@
 /*
- * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -128,11 +125,7 @@ char *syscallnames[] = {
        "getpriority",          /* 100 = getpriority */
        "old_send",                     /* 101 = old send */
        "old_recv",                     /* 102 = old recv */
-#ifdef __ppc__
-       "osigreturn",           /* 103 = sigreturn */
-#else
        "sigreturn",            /* 103 = sigreturn */
-#endif
        "bind",                         /* 104 = bind */
        "setsockopt",           /* 105 = setsockopt */
        "listen",                       /* 106 = listen */
@@ -213,11 +206,7 @@ char *syscallnames[] = {
        "setgid",                       /* 181 = setgid */
        "setegid",                      /* 182 = setegid */
        "seteuid",                      /* 183 = seteuid */
-#ifdef __ppc__
-       "sigreturn",                    /* 184 = sigreturn */
-#else
        "#184",                         /* 184 = nosys */
-#endif
        "#185",                         /* 185 = nosys */
        "#186",                         /* 186 = nosys */
        "#187",                         /* 187 = nosys */
index af57f14575b17303c28c638eabd9880ff14651c4..3b659c97ebc1e0a02d5e8fa83ecf3f6b8dfbc523 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -41,47 +38,6 @@ extern struct sysctl_oid sysctl__debug_ttydebug;
 #endif
 #endif
 
-extern struct sysctl_oid sysctl__hw_machine;
-extern struct sysctl_oid sysctl__hw_model;
-extern struct sysctl_oid sysctl__hw_ncpu;
-extern struct sysctl_oid sysctl__hw_activecpu;
-extern struct sysctl_oid sysctl__hw_byteorder;
-extern struct sysctl_oid sysctl__hw_cputype;
-extern struct sysctl_oid sysctl__hw_cpusubtype;
-extern struct sysctl_oid sysctl__hw_physmem;
-extern struct sysctl_oid sysctl__hw_usermem;
-extern struct sysctl_oid sysctl__hw_pagesize;
-extern struct sysctl_oid sysctl__hw_epoch;
-extern struct sysctl_oid sysctl__hw_vectorunit;
-extern struct sysctl_oid sysctl__hw_busfrequency;
-extern struct sysctl_oid sysctl__hw_busfrequency_min;
-extern struct sysctl_oid sysctl__hw_busfrequency_max;
-extern struct sysctl_oid sysctl__hw_cpufrequency;
-extern struct sysctl_oid sysctl__hw_cpufrequency_min;
-extern struct sysctl_oid sysctl__hw_cpufrequency_max;
-extern struct sysctl_oid sysctl__hw_cachelinesize;
-extern struct sysctl_oid sysctl__hw_l1icachesize;
-extern struct sysctl_oid sysctl__hw_l1dcachesize;
-extern struct sysctl_oid sysctl__hw_l2settings;
-extern struct sysctl_oid sysctl__hw_l2cachesize;
-extern struct sysctl_oid sysctl__hw_l3settings;
-extern struct sysctl_oid sysctl__hw_l3cachesize;
-extern struct sysctl_oid sysctl__hw_tbfrequency;
-extern struct sysctl_oid sysctl__hw_memsize;
-
-extern struct sysctl_oid sysctl__hw_optional;
-extern struct sysctl_oid sysctl__hw_optional_floatingpoint;
-
-extern struct sysctl_oid sysctl__hw_pagesize_compat;
-extern struct sysctl_oid sysctl__hw_busfrequency_compat;
-extern struct sysctl_oid sysctl__hw_cpufrequency_compat;
-extern struct sysctl_oid sysctl__hw_cachelinesize_compat;
-extern struct sysctl_oid sysctl__hw_l1icachesize_compat;
-extern struct sysctl_oid sysctl__hw_l1dcachesize_compat;
-extern struct sysctl_oid sysctl__hw_l2cachesize_compat;
-extern struct sysctl_oid sysctl__hw_l3cachesize_compat;
-extern struct sysctl_oid sysctl__hw_tbfrequency_compat;
-
 extern struct sysctl_oid sysctl__kern_sysv_shmmax;
 extern struct sysctl_oid sysctl__kern_sysv_shmmin;
 extern struct sysctl_oid sysctl__kern_sysv_shmmni;
@@ -159,7 +115,6 @@ extern struct sysctl_oid sysctl__net_inet_tcp_keepintvl;
 extern struct sysctl_oid sysctl__net_inet_tcp_mssdflt;
 extern struct sysctl_oid sysctl__net_inet_tcp_recvspace;
 extern struct sysctl_oid sysctl__net_inet_tcp_sendspace;
-extern struct sysctl_oid sysctl__net_inet_tcp_slowlink_wsize;
 extern struct sysctl_oid sysctl__net_inet_tcp_blackhole;
 extern struct sysctl_oid sysctl__net_inet_tcp_tcp_lq_overflow;
 extern struct sysctl_oid sysctl__net_inet_tcp_path_mtu_discovery;
@@ -428,47 +383,6 @@ struct sysctl_oid *newsysctl_list[] =
     ,&sysctl__kern_ipc_somaxconn
     ,&sysctl__kern_ipc_sosendminchain
     ,&sysctl__kern_ipc_maxsockets
-
-    ,&sysctl__hw_machine
-    ,&sysctl__hw_model
-    ,&sysctl__hw_ncpu
-    ,&sysctl__hw_activecpu
-    ,&sysctl__hw_byteorder
-    ,&sysctl__hw_cputype
-    ,&sysctl__hw_cpusubtype
-    ,&sysctl__hw_physmem
-    ,&sysctl__hw_usermem
-    ,&sysctl__hw_pagesize
-    ,&sysctl__hw_epoch
-    ,&sysctl__hw_vectorunit
-    ,&sysctl__hw_busfrequency
-    ,&sysctl__hw_busfrequency_min
-    ,&sysctl__hw_busfrequency_max
-    ,&sysctl__hw_cpufrequency
-    ,&sysctl__hw_cpufrequency_min
-    ,&sysctl__hw_cpufrequency_max
-    ,&sysctl__hw_cachelinesize
-    ,&sysctl__hw_l1icachesize
-    ,&sysctl__hw_l1dcachesize
-    ,&sysctl__hw_l2settings
-    ,&sysctl__hw_l2cachesize
-    ,&sysctl__hw_l3settings
-    ,&sysctl__hw_l3cachesize
-    ,&sysctl__hw_tbfrequency
-    ,&sysctl__hw_memsize
-    ,&sysctl__hw_optional
-    ,&sysctl__hw_optional_floatingpoint
-
-    ,&sysctl__hw_pagesize_compat
-    ,&sysctl__hw_busfrequency_compat
-    ,&sysctl__hw_cpufrequency_compat
-    ,&sysctl__hw_cachelinesize_compat
-    ,&sysctl__hw_l1icachesize_compat
-    ,&sysctl__hw_l1dcachesize_compat
-    ,&sysctl__hw_l2cachesize_compat
-    ,&sysctl__hw_l3cachesize_compat
-    ,&sysctl__hw_tbfrequency_compat
-
     ,&sysctl__net_inet_icmp_icmplim
     ,&sysctl__net_inet_icmp_maskrepl
     ,&sysctl__net_inet_icmp_bmcastecho
@@ -528,7 +442,6 @@ struct sysctl_oid *newsysctl_list[] =
     ,&sysctl__net_inet_tcp_mssdflt
     ,&sysctl__net_inet_tcp_recvspace
     ,&sysctl__net_inet_tcp_sendspace
-    ,&sysctl__net_inet_tcp_slowlink_wsize
     ,&sysctl__net_inet_tcp_blackhole
     ,&sysctl__net_inet_tcp_tcp_lq_overflow
     ,&sysctl__net_inet_tcp_path_mtu_discovery
index 9b63e4fa1a63fc873391fd61fb6b1c3baad118a5..e39505b702471352413f09c0e36e7330a4e01613 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 55080db2463736a1982b817948ba1353fd2fed0f..dc3ca0a816f997127eb68c8e6fd3e3e2805291bf 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7270428f8fdc5c60053994593ae9e817be0b150b..7061dadc136266f02d40924aafe5a0131218a758 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 52ec2680594a7a59b01cefac136363dfe45a4438..c86c5d59058f2ea3d8a7227a182f266e9967962f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -173,7 +170,7 @@ shm_deallocate_segment(shmseg)
        char * ptr;
 
        shm_handle = shmseg->shm_internal;
-       size = round_page_32(shmseg->shm_segsz);
+       size = round_page(shmseg->shm_segsz);
        mach_destroy_memory_entry(shm_handle->shm_object);
        FREE((caddr_t)shm_handle, M_SHM);
        shmseg->shm_internal = NULL;
@@ -193,7 +190,7 @@ shm_delete_mapping(p, shmmap_s)
 
        segnum = IPCID_TO_IX(shmmap_s->shmid);
        shmseg = &shmsegs[segnum];
-       size = round_page_32(shmseg->shm_segsz);
+       size = round_page(shmseg->shm_segsz);
        result = vm_deallocate(current_map(), shmmap_s->va, size);
        if (result != KERN_SUCCESS)
                return EINVAL;
@@ -282,7 +279,7 @@ shmat(p, uap, retval)
        }
        if (i >= shminfo.shmseg)
                return EMFILE;
-       size = round_page_32(shmseg->shm_segsz);
+       size = round_page(shmseg->shm_segsz);
        prot = VM_PROT_READ;
        if ((uap->shmflg & SHM_RDONLY) == 0)
                prot |= VM_PROT_WRITE;
@@ -296,7 +293,7 @@ shmat(p, uap, retval)
                else
                        return EINVAL;
        } else {
-               attach_va = round_page_32((unsigned int)uap->shmaddr);
+               attach_va = round_page(uap->shmaddr);
        }
 
        shm_handle = shmseg->shm_internal;
@@ -525,7 +522,7 @@ shmget_allocate_segment(p, uap, mode, retval)
                return EINVAL;
        if (shm_nused >= shminfo.shmmni) /* any shmids left? */
                return ENOSPC;
-       size = round_page_32(uap->size);
+       size = round_page(uap->size);
        if (shm_committed + btoc(size) > shminfo.shmall)
                return ENOMEM;
        if (shm_last_free < 0) {
index c03484ceca3b244e1a5727c15cdec88821d58953..dee8138ff8a9a28b6143f8edc4607c3b90675cf6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e8cfe55a2a80d4cad670024484daafafdf78fb83..cf6e818b1c5ce60ff7c7e33a9619b0b62647e3b8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 69b0c5bfdbcefd4c5c1738e350eb8e2a7fe07221..bb4a8c9c09a0cdbf29f27fe5eec0a385fd36af03 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 34dc94304a3053d4ee6b33ac52a9ca4b8852ec38..43386b2a600a8c42737f68693e15ab703ba2d540 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8e2bf4d9f749619d1dde221c049d89951f6664a3..9bc116f30da2c1573bed00cf65039bd1e531a2b0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b52c16c0395a5c04ca5987dcd2fc96ecab27f0da..c04197e2451b085f4e877388f29274441ae36120 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 608db3a28c0797a562ebec9880ffdcfe69461b5a..359d7109627c6db33489fc6d0ed88e6c447a9c85 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d5154c5d8b3061cc7c79e56ea45beb8818e6e183..47cb041ab19db3152d4c426a69cd2d0c41532813 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -590,9 +587,6 @@ ubc_getobject(struct vnode *vp, int flags)
        if (UBCINVALID(vp))
                return (0);
 
-       if (flags & UBC_FOR_PAGEOUT)
-               return(vp->v_ubcinfo->ui_control);
-
        if ((recursed = ubc_busy(vp)) == 0)
                return (0);
 
@@ -1169,7 +1163,7 @@ ubc_page_op(
        struct vnode    *vp,
        off_t           f_offset,
        int             ops,
-       ppnum_t *phys_entryp,
+       vm_offset_t     *phys_entryp,
        int             *flagsp)
 {
        memory_object_control_t         control;
@@ -1195,21 +1189,14 @@ ubc_create_upl(
        int                             uplflags)
 {
        memory_object_control_t         control;
-       int                             count;
-       int                             ubcflags;
-       off_t                           file_offset;
-       kern_return_t                   kr;
+       int                                                     count;
+       off_t                                           file_offset;
+       kern_return_t                           kr;
        
        if (bufsize & 0xfff)
                return KERN_INVALID_ARGUMENT;
 
-       if (uplflags & UPL_FOR_PAGEOUT) {
-               uplflags &= ~UPL_FOR_PAGEOUT;
-               ubcflags  =  UBC_FOR_PAGEOUT;
-       } else
-               ubcflags = UBC_FLAGS_NONE;
-
-       control = ubc_getobject(vp, ubcflags);
+       control = ubc_getobject(vp, UBC_FLAGS_NONE);
        if (control == MEMORY_OBJECT_CONTROL_NULL)
                return KERN_INVALID_ARGUMENT;
 
index 94912be8fd367997bd07c5dd7a6b5fc6c3622f79..efb0a3cd625ed2b947004b1b671303746f7d61db 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5c6bc12ec566c449cbad322f7041eb53b2719ca7..0eed25410d5b559b8001fd894d630b457e556572 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #include <kern/kern_types.h>
 #include <kern/sched_prim.h>
 
-#include <IOKit/IOMapper.h>
-
 #define _MCLREF(p)       (++mclrefcnt[mtocl(p)])
 #define _MCLUNREF(p)     (--mclrefcnt[mtocl(p)] == 0)
 
-extern pmap_t kernel_pmap;    /* The kernel's pmap */
-/* kernel translater */
-extern ppnum_t pmap_find_phys(pmap_t pmap, addr64_t va);
+extern  kernel_pmap;    /* The kernel's pmap */
 
 decl_simple_lock_data(, mbuf_slock);
 struct mbuf    *mfree;         /* mbuf free list */
@@ -99,7 +92,6 @@ int           m_want;         /* sleepers on mbufs */
 extern int     nmbclusters;    /* max number of mapped clusters */
 short          *mclrefcnt;     /* mapped cluster reference counts */
 int             *mcl_paddr;
-static ppnum_t mcl_paddr_base; /* Handle returned by IOMapper::iovmAlloc() */
 union mcluster         *mclfree;       /* mapped cluster free list */
 int            max_linkhdr;    /* largest link-level header */
 int            max_protohdr;   /* largest protocol header */
@@ -173,11 +165,10 @@ mbinit()
 {
        int s,m;
        int initmcl = 32;
-        int mcl_pages;
 
        if (nclpp)
                return;
-       nclpp = round_page_32(MCLBYTES) / MCLBYTES;     /* see mbufgc() */
+       nclpp = round_page(MCLBYTES) / MCLBYTES;        /* see mbufgc() */
        if (nclpp < 1) nclpp = 1;
        MBUF_LOCKINIT();
 //     NETISR_LOCKINIT();
@@ -197,14 +188,11 @@ mbinit()
        for (m = 0; m < nmbclusters; m++)
                mclrefcnt[m] = -1;
 
-        /* Calculate the number of pages assigned to the cluster pool */
-        mcl_pages = nmbclusters/(PAGE_SIZE/CLBYTES);
-       MALLOC(mcl_paddr, int *, mcl_pages * sizeof(int), M_TEMP, M_WAITOK);
+       MALLOC(mcl_paddr, int *, (nmbclusters/(PAGE_SIZE/CLBYTES)) * sizeof (int),
+                                       M_TEMP, M_WAITOK);
        if (mcl_paddr == 0)
                panic("mbinit1");
-        /* Register with the I/O Bus mapper */
-        mcl_paddr_base = IOMapperIOVMAlloc(mcl_pages);
-       bzero((char *)mcl_paddr, mcl_pages * sizeof(int));
+       bzero((char *)mcl_paddr, (nmbclusters/(PAGE_SIZE/CLBYTES)) * sizeof (int));
 
        embutl = (union mcluster *)((unsigned char *)mbutl + (nmbclusters * MCLBYTES));
 
@@ -245,11 +233,11 @@ m_clalloc(ncl, nowait)
 
        if (ncl < i) 
                ncl = i;
-       size = round_page_32(ncl * MCLBYTES);
+       size = round_page(ncl * MCLBYTES);
        mcl = (union mcluster *)kmem_mb_alloc(mb_map, size);
 
        if (mcl == 0 && ncl > 1) {
-               size = round_page_32(MCLBYTES); /* Try for 1 if failed */
+               size = round_page(MCLBYTES); /* Try for 1 if failed */
                mcl = (union mcluster *)kmem_mb_alloc(mb_map, size);
        }
 
@@ -259,19 +247,8 @@ m_clalloc(ncl, nowait)
                for (i = 0; i < ncl; i++) {
                        if (++mclrefcnt[mtocl(mcl)] != 0)
                                panic("m_clalloc already there");
-                       if (((int)mcl & PAGE_MASK) == 0) {
-                                ppnum_t offset = ((char *)mcl - (char *)mbutl)/PAGE_SIZE;
-                                ppnum_t new_page = pmap_find_phys(kernel_pmap, (vm_address_t) mcl);
-
-                                /*
-                                 * In the case of no mapper being available
-                                 * the following code nops and returns the
-                                 * input page, if there is a mapper the I/O
-                                 * page appropriate is returned.
-                                 */
-                                new_page = IOMapperInsertPage(mcl_paddr_base, offset, new_page);
-                               mcl_paddr[offset] = new_page << 12;
-                        }
+                       if (((int)mcl & PAGE_MASK) == 0)
+                               mcl_paddr[((char *)mcl - (char *)mbutl)/PAGE_SIZE] = pmap_extract(kernel_pmap, (char *)mcl);
 
                        mcl->mcl_next = mclfree;
                        mclfree = mcl++;
index cc6064fb0a469af60467c1d7a0f4ab61f8fdddd9..02b4f8f4be02e1db96a410b0b21fffd422b44903 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1ae1863436ae031f9d6d0b9d58dc3d2669082f80..1d31b684a1c3adebf9624c04c03511be2a9264a4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5572ca926f2032f7618df961aa1d6def41bfd694..813dcf56450d2945403503d49fa63e7c45602a48 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 735acaf4c075dc2232bd1043607c972ca049fa9b..ae6a6cc9dad881b048f3b062bba78c9d684fe405 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7e73f9ff114d01e424e3e1ad82dfd2b4266f88d4..228d2d62a22cee702b673adffd46363cbfe5f694 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d8022230cdf1696fec6348b3dcd714cf09a1975d..905652beeb9f7f9373eb03008eea25d9c6767ed5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2fd9ca185c68b06953da88533a61c5aebb7201f0..02f3fde8b7b1fc6d85f1f91671126604d1c7ae70 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index fc12cc18649485a767836d022595e2e04ccf0c9f..e315fee7d69a0dd0055f889171e3ed8dcec896e4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3cef4257d0ec688c4e728b2a19100ac4b0872265..0925e8a3c5ae020a86ba5743922855188e3535a0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 03bb9d4700a87f913ed2d5a7e879bc8293a602b7..16c005525af5786dab9d0a12d3adf6c217442846 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 871ea09c36c43a01007dbf261c00102d71589040..29572e4eef5546faf89bc086256e91f3867112e4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 85c22265b370adfe18a9d76eab1d50fce7bfa0b7..8a002af2c22aa1465e897724e1820c3d608cf48b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d53735d420dd037e9577c619fad4ea83f0b88336..a8d4044a02edbab48244248a7d215c904180964b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0926a31b4b835a6413b92d4604f6159c616382cd..5be4e6f2f3e7c321f7f8f85c79c50b5cfa591660 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7e502bd3dd91ad7f66478cb9e5a099d99163d679..68110e8a56fbd6614f6da5401f1bb95c2355abb3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8ef9aeffbd61d9f2ab90b21b324f47b64df73363..440d7e587060f1630e41b790b0769921d140c6fc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4162f0e9e75e60f14ae54e31c5b2dc4e1d56b10b..8f34cdd797fe0f53e377c157f7ad5b0dbb62f468 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3cabac9f5863319d7a44111760a22b367d9c9e66..c100caa6f69a8f613ff34c4e5c563ab9b0983c3d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b04e01d2ea5f456f16f257eda8b0ae48635b2efc..c68a4af467acccfd350c53f0b8ba37521fcbdf06 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 53c9f1224b77f19a17585a474dc1297eb0777d37..36ca09b25fb3fb008b6cce3e84e66e3369c4fcf9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 492731dd37ee9812e3b92ee1b66be53d7919a675..fed73e500112489c60f4775c1b975f04f9a2762c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3c2da9bbedaad923b2c5dd0e3a9f6542049994d1..4aa1ad8f4c27901511fa89f2f01c985dd9af4e8b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index de38ac74a2f2a7de5008a685a867b9af0b4993f4..9790932896f5ad42ede48bacd1144a1c3bb20992 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4c0d966aa2c782e1b953b8da88362f0aec8af5fd..094c204acc514cc385f915d5664c47d4e6322d66 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b52d93e9edb0cb873a9d308c7c1d880dd8c8d201..4ee6af0fd82f3ecfce1f0393c77ab0e126a05899 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index bf096995fa99f218ed21c5c7723e1c72cb550719..47a46df417234e8bac8b5499976c753baf59cf3a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4c466cb00fe8e307a0a99310f6ac7a34cc64f52a..94c316745c501f74c695a3b5004c922b7ec52581 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e04c95016b9262ce4777fb1ad693591188d88867..e9763e864f45aa37058b6993f82d87c0a23b2860 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c592b07b665a70e8eda2ff1e67f82610ea138b3e..f2abe2b6aa190d0d517c54e98f1fcdec65ef782e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7f2c9ad83cfe30367eeaaa9be38d1faea4ac3ef8..368fa0aad97b6bed64bcecd89324eca4b3683012 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5625d60a702bb67ab25fc7923d88364af074ed26..add5145e2691c6770721239f7a2d615226b4cecb 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 810db580eaead2732a7ac594636c4d180ddaf184..c39a8ea779ae944788df7ad37112bee75d0725a9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a4abaf398c0e95b9b2006b062530cbe59516c9c8..b7c7300f17467e6f5603bbf317363fc260cccc7f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0bc27a097ce4f316f956ae9969aed56ecc95b4ef..89d75fad5c5c5ba46edb58665a5df2a32e02494c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 77cab6a33b50610eb7556de182ec5a04eb486818..e71d1101c416276268253bf0b75f6e36464127f5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 66238013dcbc19dac26a7ff3067f947f091c8ea3..6dd0fe1c72e25f46213b970d1b3ad0995c4c4fb2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f4c9dabb6c044cd31090d34d1c134d10fed8f670..f5ade7c2fe306514dc3050040b199ead6571802b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 841eacda9b167ec8a89ddfbee8eedec930318687..56cf8137df73110b2aa743f13c852307f9e7e59c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index aa0e2673449b5162da26e8dfd89ef5700618ea11..fc94186c815eb5a910d4e2ef6a6918dc8aa0c20e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8cab8fa006c443e851fb73fa79a36bfcaed92853..4aaf1bbf07d7cdbec0a7aefe04204da510afe00d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0697581d500ac106a5a84227b7154ed59dea8228..d1375d28018163ed0a674fc14a6550f059381023 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index eb08dc1ab4de4690ce7a783efa92d54ca26ada6a..aaca316c933d455132e813e07ba32013fcc4bf50 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a896e0cf0b7d316d3469e1ac55320384534cfffe..c76d8544ac224d3b2421a1ae5e5c9c338b25edeb 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3703d3642e5c6b8c6dd82cb5fcd78cb4d73369c4..3683d6b572f3b622b8da21a3e376cfaa0ec2170a 100644 (file)
@@ -2,24 +2,21 @@
  * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ *
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ *
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ *
  * @APPLE_LICENSE_HEADER_END@
  */
 /* THIS FILE HAS BEEN PRODUCED AUTOMATICALLY */
index b380cb3aa3f89a8bed330e2d086b68570362e56c..9707f8a9c154242322070bef3a1592e3e4a57a36 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -748,7 +745,6 @@ devfs_remove(void *dirent_p)
        devnode_t * dnp = ((devdirent_t *)dirent_p)->de_dnp;
        devnode_t * dnp2;
        boolean_t   funnel_state;
-       boolean_t   lastlink;
 
        funnel_state = thread_funnel_set(kernel_flock, TRUE);
 
@@ -769,11 +765,8 @@ devfs_remove(void *dirent_p)
                dnp->dn_nextsibling->dn_prevsiblingp = &(dnp->dn_nextsibling);
                dnp2->dn_nextsibling = dnp2;
                dnp2->dn_prevsiblingp = &(dnp2->dn_nextsibling);
-               if(dnp2->dn_linklist) {
-                       do {
-                               lastlink = (1 == dnp2->dn_links);
-                               dev_free_name(dnp2->dn_linklist);
-                       } while (!lastlink);
+               while(dnp2->dn_linklist) {
+                       dev_free_name(dnp2->dn_linklist);
                }
        }
 
@@ -782,11 +775,8 @@ devfs_remove(void *dirent_p)
         * If we are not running in SPLIT_DEVS mode, then
         * THIS is what gets rid of the propogated nodes.
         */
-       if(dnp->dn_linklist) {
-               do {
-                       lastlink = (1 == dnp->dn_links);
-                       dev_free_name(dnp->dn_linklist);
-               } while (!lastlink);
+       while(dnp->dn_linklist) {
+               dev_free_name(dnp->dn_linklist);
        }
        DEVFS_UNLOCK(0);
 out:
index 84cc758ae11b8f81743fc63cd6f80a1951d25ac5..136dc458edb23cd1299e14018727743ee6dcfeb9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5db06b9ce2c8b1b249f69d37a532e9eac41fa27f..6c25d8044731fabf33daffb4a72e445896731e41 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 118576cdc7e9257c3cb23684fd6e608785444f91..e6f299f3d9114212b5fa66eb3a89785774887123 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6c14f2c75145901f548d3fec32acb06bbcded8b2..a2c8ec310188b9823d16c91e758f27f6dc9872c2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1d26b20e9735fc618d8539bb47719e4975617576..0afbec394e8566d1e7f85e55f9b5e61d97a0ec04 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 466921d5b07ea59ddcfed578af82da734cda46c0..0ad6d806ec0c0ddab137a307b17d0832b54e2a50 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cbf2fa30bd508497ac1ff5164a138ce8aee1d532..1d212b694e167d587003e2ee9e0660baca10eed5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 446c8216b5b3132bc1fae8259f012f44b75bd577..93c037e3d2bb6ab9ed5eb1bef5c50c327ed6ca8b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 84e0fdf8583a8293b83792db51bd9d5cc73fa874..a4ccc0e36f7370fb874c4804f6ddcdeb30dac115 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 47f2d30950790a8c9a2f16e4875b8b3b659feb65..133cdb9323f573753f24cfc5b496df01673d42a5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 31aee40550cf379320e5747cb3ae5eefbb0ec214..66f61af3de3907170b3a020f49c37ffdabbeddd5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0bb2b76e0172c8263ba78b9241004c537ae9495b..fecb1278a00959b8664dbe31bc95cd85952329cd 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d5efd260bfc8a3473aca78e8f27ddef72ef01588..f44cd9323ad5e24a84d2e99f7f50b03a031e52e3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index bcaf8d9fd71b2751c19558a6b317713833bba37c..6db592f44c25435448155e1fed1009caed4e2d20 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 32b92db24c4d36960c731bdb8ecce1e5e73abcf6..28a85f8b2b332c363d22076e17c0ffcb7bd6189d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a712ff8791812d21a75bf572b2f86001d92690b2..814536547ccedfad4b1a9eeee4877e2abe9b5706 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 525a0a3ee27bbf8b9854b4f3dbec37d3617aaa7f..6d32cacb0d68c69f3710672c06a9b4767615e2f0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 64afea17a8230815b9f2b39991510ce7645a50aa..a009e147abd89b457d5e5092fa32f3797bebfec2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f7ee5f221839a119161a7f2234fb7b53050b2ef2..147df4c7f0c1cbf946be31d52c11f90055eaaa71 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 85c41ad1efbff58c3c1f0d01c0cae352ec542ab4..8f5ce12ace4cd7c6f438a7af77186e4b06afaf19 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 06578a15a849c7199469f6ded35686e33bc3bf0f..2ddfa135b20a38d459f6851b8fa8b1cb240e384a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e8a9f20a19016ba7306e831c23720fddf5279f7b..df60cb8a695c7d272d53f3b020a77a7821c08da1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 86d2aa74f2e837ffd8398cd45e194ce14ede7f90..92ea0b2addb69032f821b13607143169fe6e2f7a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b4aee57e5a6e5455c083bd9a3acddd57cccbed2b..096873b7f73e5b2f686b04d21aef537c076527f2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 881614d21e4f1bc950db2e9c4eb96427a66d2111..0f5c6ecb8918bec261a0bc30faa1e430503851a1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9f99cabaeae2e9c2f95426696db2072c178d52b3..4c75819d55faeae8804fde1d7b670c2cc12a1335 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8e611be77d39906729a9b710810ae52bd4adf9dd..6f3afea4d11675fc51ce380e8cf32ee808560596 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9897ce8ece1ab3d00ab27a094433d5c30fb7dae8..ddec919d9b9d49567669dbb932ca023a91540f67 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8a8c5c19c4979a7ad57b29ac1f246434612050fd..102e3c492b940161796ce58b7e488b0946d71a46 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 686be6c2d5ce8f3882a5e0325cf2134164d02e7c..b8f80bb63003e3b7f25d6aa1afa8d597747cd48f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1d6e46361e162ac019aa9d1bf4e31d54325677b3..2f364dee53ca4b2c78cb5913036ab128a1d0d9f7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 28a78c7b60cb9070a70d8fdc4e0afadaa9566960..a9c6b277d243d2a0a37563addb13f6ca79308ead 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 825478370b47a777304d357c4397aad255ea607d..d81e66f93b0267dc31e0e6b6b94afa485afe8fb1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 88afe04012be09287418e134dea8385e5b548611..a534c085227f6fd3817a65cee86ae887bbce3a23 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5a34f2823a487d9d2e39a329c2528a822a7648e3..1727d78ff593e60108d7b33e547bc78f161a4066 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c2594730affc9b09118f2b36f6f33c7057b0ff27..91da52b03bd538184375f2f58f3d7a515f25caa2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5cecfe47e59f98f87e099b3703d47f934a788160..d811b9c33155f111397d917b426b0c63f0756de9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4710f419b9327666e0aeddc62cc2c67a41da22f0..27e9dd8b8ecb6a058fa415beae407360c117dd80 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -335,24 +332,6 @@ int ether_demux(ifp, m, frame_header, proto)
             m->m_flags |= M_BCAST;
         else
             m->m_flags |= M_MCAST;
-    } else {
-        /*
-         * When the driver is put into promiscuous mode we may receive unicast
-         * frames that are not intended for our interfaces.  They are filtered
-         * here to keep them from traveling further up the stack to code that
-         * is not expecting them or prepared to deal with them.  In the near
-         * future, the filtering done here will be moved even further down the
-         * stack into the IONetworkingFamily, preventing even interface
-         * filter NKE's from receiving promiscuous packets.  Please use BPF.
-         */
-        #define ETHER_CMP(x, y) ( ((u_int16_t *) x)[0] != ((u_int16_t *) y)[0] || \
-                                  ((u_int16_t *) x)[1] != ((u_int16_t *) y)[1] || \
-                                  ((u_int16_t *) x)[2] != ((u_int16_t *) y)[2] )
-    
-        if (ETHER_CMP(eh->ether_dhost, ((struct arpcom *) ifp)->ac_enaddr)) {
-            m_freem(m);
-            return EJUSTRETURN;
-        }
     }
     
     data = mtod(m, u_int8_t*);
index 65901c1ebaadba989273bf020a6edcfe1fd1600f..9764e8a97f6d11c1aa597c9f1820bf20eb794e81 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f181de956edcc7f1696fdee8f299ed7847065173..59d7a8d49864e45b59083c7e218a8f63d431e484 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d321eb7bb41de45158c9edae5dd1b9ba500ff746..6e577eb14bc327514fc94128364a1b1e613bed12 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 86f3152b9bba813f75dc345160b9f3db922c0438..accdc05d0b5f02f43b74013a68a28a651ac8a299 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1f10ed96f61bf5cfe87b263e32166bf35bc58cb1..17213f3dbd3d454df8cf1b633c9a812aa77da3b2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -1397,6 +1394,6 @@ void if_rtproto_del(struct ifnet *ifp, int protocol)
        
         struct radix_node_head  *rnh;
 
-       if ((protocol <= AF_MAX) && ((rnh = rt_tables[protocol]) != NULL) && (ifp != NULL))
+       if (((rnh = rt_tables[protocol]) != NULL) && (ifp != NULL)) 
                (void) rnh->rnh_walktree(rnh, if_rtdel, ifp);
 }
index f572ff980327694ed47e95fd75da320540228160..7abb6cf6d574fc39891177b7c5b7bb443fb448ef 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9718e6291206450ca22a11c3d0417368f4613a56..af389b6a5f71e46815154c274147a825c15754ea 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cccc59b6de96dba659b18c516bd26e19e5e726fc..b9d1420eb92622801a0ea60a075e64511ae9ac62 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b2cc2c0534e59cae5b5534d2993667e3e7ec7440..c8c266bc477d64132c6766593c8ecf10a76b712e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8ff1d49a1527a715cd28211f7d2786859d5b0abe..16201a9092ed2d2549600885cc25d2badb5a4f46 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7079e75d5c4af45fb2677543614b772b08f6fd7e..50ce06568ad6cc7843c5c94cff9da60d3cc39719 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7e6c57d766f054a054d339e23c019dc847b0d234..892d07158ea69b7cd9518aa2bcd68092145b5c18 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index feed430a36e27f0fbd811fbfc6671abffa8d8a02..9c9d4ebe7096d1e6c11327bc6c4444e83acc8e53 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2b0498da77386da38bf9926163bb56b82c4b9a40..dd1ef3a328f2ae8e835c02dc45bdfe7bbbeaed15 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b8b75f0027b8510d8daa6a9fde44dcfea5c28a42..6ada7aa5e18b30bbcae9522b9434b4fbe1a180a7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a41683a5e89a1ccb0726da553f21c04401d1bfb1..a74b84a4e5206984e34832496e42b2683959ed94 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 16b8b3ef9ea1591e608dba9680a55f8452981eed..8f077d367048c74ae04389c221afaa237c10d50f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ca5e523854aad2f66f54d048f4a2d7dc6f96f6d8..6c90a9cca286bba160ed1ad8f27979dc7fab9a37 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 249f394e193df1cc40c5b3286e4dda3cb3a58879..ed5ec87ab3546dbfd390db869db01662c7ca54cd 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e0cc044fa4dab1c8485e160ccc7a778a32dbb9dd..f17ed30fa3669a47fa5fb678e0841409ba62c62a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 483d739fb096f3b72f2e77e7b67a6f63a79fbf99..fc94438febbb986aa198b2a308e395b0afb0e334 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9ccd0c31602b345ee0c76b95820a720392a88575..dc7417e89199f0b587413f0a530d8339e1e18f32 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 214c79784479f035caff5c242f47ef1be89cb417..9d5f7cd36f487dd5232b10a4d593cb1f52dc03ec 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d7a6ee6ad638bf841689b1f01043eb5c9891ee0e..ec688a95bddcb7e085d07a4505b576e90d0163ba 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index fcc06b056b88f8268cccc8ef48c520c3caccd544..cb3132ef153c79d56841b288fe5b21ae696c4130 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5979455425ff8d59e5955c1ad9f0f52b48d7ef24..f0b6435bce8569fa8dbd0c1b5b1f9b3dde433253 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9fad082c3108e6acbe7e9d64be132a53b1bfb614..8ed3afd27f11d66c491004be2ba2bd2a31025912 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e04bbe36292c3af34e91d33aae30b60cdd364f92..23731386f1b632003be6f18b7ab07a7b2d8fad92 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1f834c306eccc2dcaa008acf4374e16c65d6fda4..9b93e0867738b10d53e791db904200d6c825c5b9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c780dcf73840d4b5a4cbd30d037b0848216905b8..befa53907ce4f4a4ddffcdc12943c985293bc762 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2c69ea514f872993be9b68e21b6756373c68d03d..3209d2b0798fdf02cddd45298c6794c357b9eafa 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1ca90929239b9ce20de79a07506d38573a205abb..2bc4983769cc402b3a384247608af8b67f5d70a4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 338d6ef87c1d2e50a627a2893b660d277b65a9eb..6fe422d45d46dd32da403cc2f62881c78e5e3355 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e360fd7d4b5f4ed5c7eeb45bdc2e014f2899c80a..fe79fa1c54bfeb83ef0470a93e1f46eac12e00ec 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index dc134d2f1228d47043ada3e6a01b1fa58343affd..ebe88e6c3a7f225b5b54e417afa4f7a3282ada26 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4707ef7c5f5a60e9e978779a2f1eb199ab14106c..8c65a8faad9189855d413720df8055d8460a269d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d8c9a492839d0a687f9ae8be574a32957ce6d21d..0824dafca4437b5da939ccda9e3e041f74c2720d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index dd00bbeb2a53b4602cb4b3cc76eec4157a2ad56c..74f8aaf2b7f326d3911d3e4a8f4223e8db9e9915 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 11835f8c414fba3a3aeed132bc43f9c41dcc731f..8d2f62168858557a3dc8134f442b8c4f5b7c1dd4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index df43e22e3e997759507fcf08cbe2359cf9f09302..e350606ac00d17b879db508bd378a1a8125b9ea1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cb5d3d84d7d91a0e48380fe3f7bd99f6101b3506..2ae5be8eb967d12751bfdceb3f02708eb7fac6fc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 47b4b349b2cc909da241244ef35c5b00edc51235..8f4e03ba866c3a0edb301d848fcf04ac9deab607 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 14d610ea6bda01852381d4640cb56e9e7eea10ba..4b9ec8d8ceef43f1b056d898a860d76da4e6e79c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4423a6b8b0419b12d3c43c56c4443d7482191056..475e85e67332bde4a8360e64069e9e940cf5d0f5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d05231e037d5e57a3735bb4271ec7ecd065fd834..7d28a5b41f525198ce2bdba38eb1e85407f90127 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e07ea776f4bc2008f6b1b80beff749ad9ce7e521..416aa9ede38ae60d83e68ccc71089b621ea52a65 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1fb667e17e234861b5c4da5ca2c9f96a2aad0921..cfe85497436e19784fe6fbe26b3f20d6d5faf152 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1f0ccf517776bb54ea711e1f924b91db849345ff..833e9f7148f15bef04605755893c3703e8e0e3bc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b844434ffc00bedd9b29cd6eae3079054ffa7d7c..105ef13c869500c86d7a54072db5936e7c702c53 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 10082327cb724efa71ef7a88a370c3f0fd3c18bd..d047ae38f7dca6ebdea4e5e036c5950ae68bb357 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 217d0c6d20423966043eb7695e9bb5fb6a4fc97f..5e8a246a9268f72c897e10ac869eb4738e343f1b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ea463b5efb65d1adf0d91da93ad5380ac73da31c..5cebf16f6e2a1037b9cfff4df792d34c3da43274 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8c887994c940727961641820601468e5312be2b7..cd5060001f7d87ec54447f5038b014e1385c6581 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ae49c24c5f7ff610977b5795dadfd898185d7591..5a8dbbe7a4751813122d0e815e257245b2d61b86 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index eccfc1dd65c93451a629b6c22f76b1313b52f8fb..6a666220632db1174f87c91c48f327dbbc81ead1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index aa8f53f406b0fb68b164fb15ffb01735a24cfdbc..47108b410b6d7b81c33f9cafcc9b99bcd2f224c9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8cea51dda4e5735e594fbdc8c254372433f2a2c9..b784ad8dbcde0d5ed6a533ba3ff1ba24c5127c57 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index acb6273f856d097d491077af982e60ced9b48eb0..7a8c06c66236172e883775c14cdfa93ed173b195 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5d0935e679e53ccaa7c8aa0a804a0679e0b0722a..948f9298d906a72c064395bc72726c7123ddda5e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 056255a65fc0695188a58bba6fb81f671dc9e985..02d01c9632c7d41d98f59d3e5ddfe5cb67cdf84c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index bd044d6c1a2d2dfc543dbef1ce8e7a9e6356177c..bf40ffbd573a486e8fa3f0e61bdb836f4b0c7bc9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8addcbfc8c6e94e0a713de7f4ca19573a705d0b5..9d6a9b7e7cd007f5623add02088d2270caa501bc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 04ad111e801f950234bd0fba39092cd08c421a95..f4f33f25da13f913989c045bd993691ea73182d3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d2e9bbb75d076b8740b13f8bfbfb4d0590a88a0f..d7e276e7017d9b3102fda240941211b738be6f98 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 598df14177fb44a210d59824b2095fed97a1838b..69221b4fb84a8a03974909c486bd758af0ae65de 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8be1c25a5353c95a097a803ce86ab5d90b9106f9..b6ab21997e4364cde375e18fbddc61eb8f4278e4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d3ee093fcb79ad52f27c4864fca96488f1a61e0d..e15b0b74b40412f68d99dc93f2f417aa15cc10d4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 998d9ffdccd417dab637de0ab10ee8957ec8d1f7..0e15ee0a8079eac20988d4a4211558059836c292 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2441642044d00cd7bd1f38da2b6658821b8031a6..d73e2ee94f0c40dabf2a22236e7efb5512b5a502 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f2d2634563ffe23271defd3b085dfc8f7462b782..5e302bcaaf36f86c621608484471c9a94fd9f2f6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 67c52d0aa8343f7a4b3ab94e7d92063f54bca4a1..2b9a8f0ffd4a5fe514003a3d5e8ee50a5d2f71c4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5cd49bfbf85e8ad5bf2a5c3659d28f330bc8776b..fba5e4191a70c6d4a59062c4a1e83584c246d51e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0da1ec0d5dcd0ccd765cd3ee6b4f079f641f6eb5..8f62c8c1a67f89b521bb341651bae748485a300c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 96280bb611d0e46c42801025d9b4e83a0597876d..94d7f64d96a89f1c181bd04423d9d3a19722007e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0b49fda3fe95c3dbcaed428e356079c877e0c966..46880508b54e5681cf1830bfc6cddabd5835794a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f849093606253729785a172caf8b79a4ad3bf407..fe092e0b1052837d957739efa99df33fb3f4c170 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1da85f1270c2db590f4a8cd8de87112e87857948..d7f61ac1435a92ca512db791f22b263b6ae9bb77 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d71e24c2975cffcade2607f86580e5914b7c77f4..9a170cf50eba4f95971fb98299bad69e4cbf9dc4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 80e52686dee9f4d9cc4e3f9f4403eab8a3ac045f..18ce61f658dc1567dbde36edf51b312654321893 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ec42e4b9cc6ab462904e60d55f2fe3aedadd903b..268cbe068c752295ba40a7ee80cfcbafa5065d8a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7a6c1f5f36d4a282ff74db48e0880475ef20ccb8..8ee925709be3853c272ca0dfb905496b824090a3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b8e8e4293d45fdef64a63ef94a9a472d897b5fb1..bcb738907d96adc490834d8bccb619abf13ab6e5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2eea18fd428c1dbc37b9474dc7357da66aeecb75..13811b3a8e48bbd43ada0eb3fbde32fd5cb8f774 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d6e0c2e1b19f13dfccc9df62c5c7c992ccf11216..7fbc4e38ec6113232271eb188c0b95be41cb70a4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 99cdc553660d3305b2955c354429942395238026..a18a74d85b8f8bf90eb3af9b32749df41da55f6a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f9e0cb956280bc904e9bc7d92741101cd1054599..c495412dea3577535ef144ab3b2db0bb8a7b7932 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -1915,8 +1912,8 @@ asp_putnext(gref, mproto)
 
 int ASPputmsg(gref_t *gref, strbuf_t *ctlptr, strbuf_t *datptr, gbuf_t *mreq, int flags, int *errp)
 {
-    int s, i, err, len, offset, remain, size, copy_len;
-    gbuf_t *mioc, *mdata, *mx, *m0;
+    int s, i, err, len;
+    gbuf_t *mioc, *mdata, *mx;
     ioc_t *iocbp;
     strbuf_t ctlbuf;
     strbuf_t datbuf;
@@ -1930,7 +1927,6 @@ int ASPputmsg(gref_t *gref, strbuf_t *ctlptr, strbuf_t *datptr, gbuf_t *mreq, in
     asp_word_t *awp;
     union asp_primitives *primitives;
     unsigned short tid;
-    caddr_t            dataptr;
     
     if ((scb = (asp_scb_t *)gref->info) == 0) {
                dPrintf(D_M_ASP, D_L_ERROR,
@@ -1992,77 +1988,46 @@ int ASPputmsg(gref_t *gref, strbuf_t *ctlptr, strbuf_t *datptr, gbuf_t *mreq, in
                ("ASPputmsg: %s\n", aspCmdStr(Primitive)));
 
     /*
-     * copy in the data content into multiple mbuf clusters if
-     * required.  ATP now expects reply data to be placed in
-     * standard clusters, not the large external clusters that
-     * were used previously.
+     * allocate buffer and copy in the data content
      */
-         
-    /* set offset for use by some commands */
-    offset = (Primitive == ASPFUNC_CmdReply) ? 0 : aspCMDsize;
-       size = 0;
-    if (mreq != NULL) {
-        /* The data from the in-kernel call for use by AFP is passed
-         * in as one large external cluster.  This needs to be copied
-         * to a chain of standard clusters.
-         */
-        remain = gbuf_len(mreq);
-        dataptr = mtod(mreq, caddr_t);
-    } else {
-       /* copyin from user space */
-       remain = datbuf.len; 
-       dataptr = (caddr_t)datbuf.buf;  
-    }  
+    len = (Primitive == ASPFUNC_CmdReply) ? 0 : aspCMDsize;
     
-    /* allocate first buffer */
-    if (!(mdata = gbuf_alloc_wait((remain + offset > MCLBYTES ? MCLBYTES : remain + offset), TRUE))) {
+    if (!(mdata = gbuf_alloc_wait(datbuf.len+len, TRUE))) {
         /* error return should not be possible */
         err = ENOBUFS;
         gbuf_freem(mioc);
         goto l_err;
     }
-    gbuf_wset(mdata, 0);               /* init length to zero */
+    gbuf_wset(mdata, (datbuf.len+len));
     gbuf_cont(mioc) = mdata;
+    
+    if (mreq != NULL) {
+        /* being called from kernel space */
+        gbuf_t *tmp = mreq;
+        unsigned long offset = 0;
+        
+        /* copy afp cmd data from the passed in mbufs to mdata.  I cant
+        chain mreq to mdata since the rest of this code assumes
+        just one big mbuf with space in front for the BDS */
+        offset = len;
+        while (tmp != NULL) {
+            bcopy (gbuf_rptr(tmp), (gbuf_rptr(mdata) + offset), gbuf_len(tmp));
+            offset += gbuf_len(tmp);
+            tmp = gbuf_cont(tmp);           /* on to next mbuf in chain */
+        }
+        
+        /* all data copied out of mreq so free it */
+        gbuf_freem(mreq);
+    } else {
+        /* being called from user space */
+        if ((err = copyin((caddr_t)datbuf.buf,
+                  (caddr_t)(gbuf_rptr(mdata)+len), datbuf.len)) != 0) {
+            gbuf_freem(mioc);
+            goto l_err;
+        }
+    }
 
-       while (remain) {
-               if (remain + offset > MCLBYTES)
-                       copy_len = MCLBYTES - offset;
-               else
-                       copy_len = remain;
-               remain -= copy_len;
-               if (mreq != NULL)
-                       bcopy (dataptr, (gbuf_rptr(mdata) + offset), copy_len);
-               else if ((err = copyin(dataptr, (caddr_t)(gbuf_rptr(mdata) + offset), copy_len)) != 0) {
-                       gbuf_freem(mioc);
-                       goto l_err;
-               }
-               gbuf_wset(mdata, (copy_len + offset));
-               size += copy_len + offset;
-               dataptr += copy_len;
-               offset = 0;
-               if (remain) {
-                       /* allocate the next mbuf */
-                       if ((gbuf_cont(mdata) = m_get((M_WAIT), MSG_DATA)) == 0) {
-                               err = ENOBUFS;
-                               gbuf_freem(mioc);
-                               goto l_err;
-                       }
-                       mdata = gbuf_cont(mdata);
-                       MCLGET(mdata, M_WAIT);
-                       if (!(mdata->m_flags & M_EXT)) {
-                               err = ENOBUFS;
-                               gbuf_freem(mioc);
-                               goto l_err;
-                       }
-               }
-       }
-       mdata = gbuf_cont(mioc);                        /* code further on down expects this to b e set */
-       mdata->m_pkthdr.len = size;                     /* set packet hdr len */
-
-       if (mreq != 0)
-               gbuf_freem(mreq);
-
-       switch (Primitive) {
+    switch (Primitive) {
 
     case ASPFUNC_Command:
     case ASPFUNC_Write:
@@ -2179,20 +2144,16 @@ int ASPputmsg(gref_t *gref, strbuf_t *ctlptr, strbuf_t *datptr, gbuf_t *mreq, in
             atp->xo = 1;
             atp->xo_relt = 1;
         }
-        /* setup the atpBDS struct - only the length field is used,
-         * except for the first one which contains the bds count in
-         * bdsDataSz.
-         */
         atpBDS = (struct atpBDS *)gbuf_wptr(mioc);
         msize = mdata ? gbuf_msgsize(mdata) : 0;
-               for (nbds=0; (nbds < ATP_TRESP_MAX) && (msize > 0); nbds++) {
+       for (nbds=0; (nbds < ATP_TRESP_MAX) && (msize > 0); nbds++) {
             len = msize < ATP_DATA_SIZE ? msize : ATP_DATA_SIZE;
             msize -= ATP_DATA_SIZE;
             *(long *)atpBDS[nbds].bdsUserData = 0;
             UAL_ASSIGN(atpBDS[nbds].bdsBuffAddr, 1);
             UAS_ASSIGN(atpBDS[nbds].bdsBuffSz, len);
         }
-               UAS_ASSIGN(atpBDS[0].bdsDataSz, nbds);
+        UAS_ASSIGN(atpBDS[0].bdsDataSz, nbds);
         *(long *)atpBDS[0].bdsUserData = (long)result;
         *(long *)atp->user_bytes = (long)result;
         gbuf_winc(mioc,atpBDSsize);
index c333d15bcb6643978df5d0828a3cef407cf1aea3..089fd3889f8da0b7000bb169b941e0b45a184513 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3f8bc1754a15978ea9e2d342f762ea855b7b44e5..c7fd5352466bbd1d44c5b10b77ecccfc54e0e377 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0db48f51263e90d5de3cd5ed9907eee5f405e68d..b9f6abef30e02ca4685dfdcaa6940a6f101afdae 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d656851c47410e269b632fa26fdb2155e2a53337..0b40c98930c138a4742d828a598ecf3f953b21ea 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5c4e707d5385f65e11de33b25775a49820fa12c5..107b3857d7df2ba70d9dafc5609acb370c951ba5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index de172f33b9166f6b46f67eaca984e8b5761a242f..7c120650e15a710c7c92a25d33afbdb82427c4ca 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index bc4e32554720ee72be87776c1124ace3baf27867..9a4d4297ab9f4970af798f211ca1a7ef1fb2391b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 016a603e2ae14b14a79ce90b06070e0c24e2ec05..3a8cb6055a7cc696ac5f03d636041423712ed6ae 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index fcfd083cc0b0953bc17ad1ecd44a7b18da75a834..5e4bcb09e3ccd4195ed5bd8a210f0d5278a26d6d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 943ee75dafe6e5bffdbbf9f92aa7a90805fec0c9..40c0fe6960a63d84a0770f79133d93f1785edb07 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 00de460c561f1682384b28d16b3523d7f711540b..6eb0af45784952721d507249494cbed288e406e8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ef41fc92839d1e9d3dd3ced9bee2d31af1b97782..98ebd3d46dacd416e79cbd81417f8b860702e111 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1878d68b2842a979d84580d0ae83826e4c54000b..f8d34a439087453d3af3a4da8bedf0ba23a2afea 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c0fdc869c6cf4978372cbfff2298990da202b065..5271592ab819c53107a382cfb0200d4c644d5cf7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5013d2a3f50c8f4e121f24fe05feffee742a46de..12f93ee1c911f7762c0ef5d24628374a8fe61a4a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1c3e4df3f8ff2cce26a9cfa00ad380af4f2bda85..4fea05d134bcba8f6192362b31623dc70203b0f7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -455,11 +452,11 @@ void atp_send_replies(atp, rcbp)
      register struct atp_rcb   *rcbp;
 {       register gbuf_t *m;
        register int     i, len;
-       int              s_gen, s, cnt, err, offset, space;
+       int              s_gen, s, cnt;
        unsigned char *m0_rptr = NULL, *m0_wptr = NULL;
        register at_atp_t *athp;
        register struct atpBDS *bdsp;
-       register gbuf_t *m2, *m1, *m0, *mhdr;
+       register gbuf_t *m2, *m1, *m0, *m3;
        caddr_t lastPage;
        gbuf_t *mprev, *mlist = 0;
        at_socket src_socket = (at_socket)atp->atp_socket_no;
@@ -497,67 +494,109 @@ void atp_send_replies(atp, rcbp)
 
        m = rcbp->rc_xmt;
        m0 = gbuf_cont(m);
+       if (m0) {
+               m0_rptr = gbuf_rptr(m0);
+               m0_wptr = gbuf_wptr(m0);
+       }
        if (gbuf_len(m) > TOTAL_ATP_HDR_SIZE)
                bdsp = (struct atpBDS *)(AT_ATP_HDR(m)->data);
        else
                bdsp = 0;
-       offset = 0;
-       if (m0)
-               space = gbuf_msgsize(m0);
+
        for (i = 0; i < cnt; i++) {
-               if (rcbp->rc_snd[i] == 0) {
-                       if ((len = UAS_VALUE(bdsp->bdsBuffSz))) {
-                               offset += len;
-                               space -= len;
+         if (rcbp->rc_snd[i] == 0) {
+               if ((len = UAS_VALUE(bdsp->bdsBuffSz)))
+                       gbuf_rinc(m0,len);
+
+         } else {
+               m2 = rc_xmt[i];
+               gbuf_rinc(m2,AT_WR_OFFSET);
+               gbuf_wset(m2,TOTAL_ATP_HDR_SIZE);
+               *(struct ddp_atp *)(gbuf_rptr(m2))= *(struct ddp_atp *)(gbuf_rptr(m));
+               athp = AT_ATP_HDR(m2);
+               ATP_CLEAR_CONTROL(athp);
+               athp->cmd = ATP_CMD_TRESP;
+               athp->bitmap = i;
+               if (i == (cnt - 1))
+                       athp->eom = 1; /* for the last fragment */
+               if (bdsp)
+                       UAL_UAL(athp->user_bytes, bdsp->bdsUserData);
+
+               if (bdsp)
+                 if (len = UAS_VALUE(bdsp->bdsBuffSz)) { /* copy in data */
+                   if (m0 && gbuf_len(m0)) {
+                     if ((m1 = gbuf_dupb(m0)) == NULL) {
+                               for (i = 0; i < cnt; i++)
+                                       if (rc_xmt[i])
+                                               gbuf_freem(rc_xmt[i]);
+                               gbuf_rptr(m0) = m0_rptr;
+                               gbuf_wset(m0,(m0_wptr-m0_rptr));
+                               goto nothing_to_send;
                        }
-               } else {
-                       mhdr = rc_xmt[i];
-                       /* setup header fields */
-                       gbuf_rinc(mhdr,AT_WR_OFFSET);
-                       gbuf_wset(mhdr,TOTAL_ATP_HDR_SIZE);
-                       *(struct ddp_atp *)(gbuf_rptr(mhdr))= *(struct ddp_atp *)(gbuf_rptr(m));
-                       athp = AT_ATP_HDR(mhdr);
-                       ATP_CLEAR_CONTROL(athp);
-                       athp->cmd = ATP_CMD_TRESP;
-                       athp->bitmap = i;
-                       if (i == (cnt - 1))
-                               athp->eom = 1; /* for the last fragment */
-                       if (bdsp) {
-                               UAL_UAL(athp->user_bytes, bdsp->bdsUserData);
-                               if ((len = UAS_VALUE(bdsp->bdsBuffSz)) && m0 != 0 && space > 0) {
-                                       if ((m1 = m_copym(m0, offset, len, M_DONTWAIT)) == 0) {
-                                               for (i = 0; i < cnt; i++)
-                                                       if (rc_xmt[i])
-                                                               gbuf_freem(rc_xmt[i]);
-                                               goto nothing_to_send;
-                                       }
-                                       offset += len;
-                                       space -= len;
-                                       gbuf_cont(mhdr) = m1;
+                       gbuf_wset(m1,len);
+                       gbuf_rinc(m0,len);
+                       if ((len = gbuf_len(m0)) < 0) {
+                               gbuf_rdec(m0,len);
+                               gbuf_wdec(m1,len);
+                               if (!append_copy((struct mbuf *)m1, 
+                                                (struct mbuf *)gbuf_cont(m0), FALSE)) {
+                                 for (i = 0; i < cnt; i++)
+                                       if (rc_xmt[i])
+                                               gbuf_freem(rc_xmt[i]);
+                                 gbuf_rptr(m0) = m0_rptr;
+                                 gbuf_wset(m0,(m0_wptr-m0_rptr));
+                                 goto nothing_to_send;
                                }
-                       }       
+                       } else
+                               gbuf_cont(m1) = 0;
+                       gbuf_cont(m2) = m1;
                                
-                       AT_DDP_HDR(mhdr)->src_socket = src_socket;
-                       dPrintf(D_M_ATP_LOW, D_L_OUTPUT,
-                               ("atp_send_replies: %d, socket=%d, size=%d\n",
-                               i, atp->atp_socket_no, gbuf_msgsize(gbuf_cont(m2))));
-       
-                       if (mlist)
-                               gbuf_next(mprev) = mhdr;
-                       else
-                               mlist = mhdr;
-                       mprev = mhdr;
-       
-                       rcbp->rc_snd[i] = 0;
-                       rcbp->rc_not_sent_bitmap &= ~atp_mask[i];
-                       if (rcbp->rc_not_sent_bitmap == 0)
-                               break;
+                       /* temp fix for page boundary problem  - bug# 2703163 */
+                       lastPage = (caddr_t)((int)(gbuf_wptr(m1) - 1) & ~PAGE_MASK);                    /* 4k page of last byte */
+                       if (lastPage != (caddr_t)((int)(gbuf_rptr(m1)) & ~PAGE_MASK)) {                 /* 1st byte and last on same page ? */
+                               if ((m3 = gbuf_dupb(m1)) == NULL) {
+                                       for (i = 0; i < cnt; i++)
+                                               if (rc_xmt[i])
+                                                       gbuf_freem(rc_xmt[i]);
+                                       (gbuf_rptr(m0)) = m0_rptr;
+                                       gbuf_wset(m0, (m0_wptr - m0_rptr));
+                                       goto nothing_to_send;
+                               }
+                               (gbuf_rptr(m3)) = lastPage;                                             /* new mbuf starts at beginning of page */
+                               gbuf_wset(m3, (gbuf_wptr(m1) - lastPage));              /* len = remaining data crossing over page boundary */
+                               gbuf_wset(m1, (lastPage - (gbuf_rptr(m1))));    /* adjust len of m1 */
+                               (gbuf_cont(m1)) = m3;
+                               (gbuf_cont(m3)) = 0;
+                       }
+                 }
                }
-               /*
-                * on to the next frag
-                */
-               bdsp++;
+
+         AT_DDP_HDR(m2)->src_socket = src_socket;
+         dPrintf(D_M_ATP_LOW, D_L_OUTPUT,
+               ("atp_send_replies: %d, socket=%d, size=%d\n",
+               i, atp->atp_socket_no, gbuf_msgsize(gbuf_cont(m2))));
+
+         if (mlist)
+               gbuf_next(mprev) = m2;
+         else
+               mlist = m2;
+         mprev = m2;
+
+         rcbp->rc_snd[i] = 0;
+         rcbp->rc_not_sent_bitmap &= ~atp_mask[i];
+         if (rcbp->rc_not_sent_bitmap == 0)
+               break;
+         }
+         /*
+          * on to the next frag
+          */
+         bdsp++;
        }
+       if (m0) {
+               gbuf_rptr(m0) = m0_rptr;
+               gbuf_wset(m0,(m0_wptr-m0_rptr));
+       }
+
        if (mlist) {
                ATENABLE(s, atp->atp_lock);
                DDP_OUTPUT(mlist);
@@ -664,11 +703,6 @@ atp_pack_bdsp(trp, bdsp)
 } /* atp_pack_bdsp */
 
 
-/* create an mbuf chain with mbuf packet headers for each ATP response packet
- * to be sent.  m contains the DDP hdr, ATP hdr, and and array of atpBDS structs.  
- * chained to m is an mbuf that contians the actual data pointed to by the atpBDS
- * structs.
- */
 static int
 atp_unpack_bdsp(atp, m, rcbp, cnt, wait)
        struct atp_state *atp;
@@ -677,19 +711,17 @@ atp_unpack_bdsp(atp, m, rcbp, cnt, wait)
     register int    cnt, wait;
 {
        register struct atpBDS *bdsp;
-       register         gbuf_t        *m2, *m1, *m0, *mhdr;
-       caddr_t         lastPage;
-    at_atp_t    *athp;
-       int             i, len, s_gen;
-       at_socket       src_socket;
-       
-       struct ddp_atp {
+       register gbuf_t        *m2, *m1, *m0, *m3;
+       caddr_t lastPage;
+        register at_atp_t        *athp;
+       register int  i, len, s_gen;
+       at_socket src_socket;
+       struct   ddp_atp {
                 char    ddp_atp_hdr[TOTAL_ATP_HDR_SIZE];
        };
-       gbuf_t                  *mprev, *mlist = 0;
-       gbuf_t                  *rc_xmt[ATP_TRESP_MAX];
-       unsigned char   *m0_rptr, *m0_wptr;
-       int                             err, offset, space;
+       gbuf_t *mprev, *mlist = 0;
+       gbuf_t *rc_xmt[ATP_TRESP_MAX];
+       unsigned char *m0_rptr, *m0_wptr;
 
        /*
         * get the user data structure pointer
@@ -755,70 +787,101 @@ atp_unpack_bdsp(atp, m, rcbp, cnt, wait)
                goto l_send;
        }
 
-       /* create an array of mbuf packet headers for the packets to be sent
-        * to contain the atp and ddp headers with room at the front for the
-        * datalink header.
-        */
        for (i = 0; i < cnt; i++) {
                /* all hdrs, packet data and dst addr storage */
                if ((rc_xmt[i] = 
-                    gbuf_alloc_wait(AT_WR_OFFSET+TOTAL_ATP_HDR_SIZE, wait)) == NULL) {
-                               for (cnt = 0; cnt < i; cnt++)
-                                       if (rc_xmt[cnt])
-                                               gbuf_freeb(rc_xmt[cnt]);
-                               return 0;
+                    gbuf_alloc_wait(AT_WR_OFFSET+TOTAL_ATP_HDR_SIZE,
+                                    wait)) == NULL) {
+                       for (cnt = 0; cnt < i; cnt++)
+                               if (rc_xmt[cnt])
+                                       gbuf_freeb(rc_xmt[cnt]);
+                       return 0;
                }
        }
+       if (m0) {
+               m0_rptr = gbuf_rptr(m0);
+               m0_wptr = gbuf_wptr(m0);
+       }
 
-       /* run through the atpBDS structs and create an mbuf for the data
-        * portion of each packet to be sent.  these get chained to the mbufs
-        * containing the ATP and DDP headers.  this code assumes that no ATP
-        * packet is contained in more than 2 mbufs (e.i crosses mbuf boundary
-        * no more than one time).
-        */
-       offset = 0;
-       if (m0)
-               space = gbuf_msgsize(m0);
-       for (i = 0; i < cnt; i++) {                     /* for each hdr mbuf */
-           mhdr = rc_xmt[i];
-           /* setup header fields */
-               gbuf_rinc(mhdr,AT_WR_OFFSET);
-               gbuf_wset(mhdr,TOTAL_ATP_HDR_SIZE);
-               *(struct ddp_atp *)(gbuf_rptr(mhdr))= *(struct ddp_atp *)(gbuf_rptr(m));
-               athp = AT_ATP_HDR(mhdr);
+       for (i = 0; i < cnt; i++) {
+               m2 = rc_xmt[i];
+               gbuf_rinc(m2,AT_WR_OFFSET);
+               gbuf_wset(m2,TOTAL_ATP_HDR_SIZE);
+               *(struct ddp_atp *)(gbuf_rptr(m2))= *(struct ddp_atp *)(gbuf_rptr(m));
+               athp = AT_ATP_HDR(m2);
                ATP_CLEAR_CONTROL(athp);
                athp->cmd = ATP_CMD_TRESP;
                athp->bitmap = i;
                if (i == (cnt - 1))
                        athp->eom = 1; /* for the last fragment */
                UAL_UAL(athp->user_bytes, bdsp->bdsUserData);
-               
-               if ((len = UAS_VALUE(bdsp->bdsBuffSz)) != 0  && m0 != 0 && space > 0) {         
-                       if ((m1 = m_copym(m0, offset, len, wait)) == 0) {
+
+               if ((len = UAS_VALUE(bdsp->bdsBuffSz))) { /* copy in data */
+                 if (m0 && gbuf_len(m0)) {
+                       if ((m1 = gbuf_dupb_wait(m0, wait)) == NULL) {
                                for (i = 0; i < cnt; i++)
                                        if (rc_xmt[i])
                                                gbuf_freem(rc_xmt[i]);
+                               gbuf_rptr(m0) = m0_rptr;
+                               gbuf_wset(m0,(m0_wptr-m0_rptr));
                                return 0;
                        }
-                       gbuf_cont(mhdr) = m1;
-                       space -= len;
-                       offset += len;
+                       gbuf_wset(m1,len); /* *** m1 is first len bytes of m0? *** */
+                       gbuf_rinc(m0,len);
+                       if ((len = gbuf_len(m0)) < 0) {
+                               gbuf_rdec(m0,len);
+                               gbuf_wdec(m1,len);
+                               if (!append_copy((struct mbuf *)m1, 
+                                                (struct mbuf *)gbuf_cont(m0), wait)) {
+                                 for (i = 0; i < cnt; i++)
+                                       if (rc_xmt[i])
+                                               gbuf_freem(rc_xmt[i]);
+                                 gbuf_rptr(m0) = m0_rptr;
+                                 gbuf_wset(m0,(m0_wptr-m0_rptr));
+                                 return 0;
+                               }
+                       } else
+                               gbuf_cont(m1) = 0;
+                       gbuf_cont(m2) = m1;
+                       
+                       /* temp fix for page boundary problem  - bug# 2703163 */
+                       lastPage = (caddr_t)((int)(gbuf_wptr(m1) - 1) & ~PAGE_MASK);                    /* 4k page of last byte */
+                       if (lastPage != (caddr_t)((int)(gbuf_rptr(m1)) & ~PAGE_MASK)) {                 /* 1st byte and last on same page ? */
+                               if ((m3 = gbuf_dupb_wait(m1, wait)) == NULL) {
+                                       for (i = 0; i < cnt; i++)
+                                               if (rc_xmt[i])
+                                                       gbuf_freem(rc_xmt[i]);
+                                       (gbuf_rptr(m0)) = m0_rptr;
+                                       gbuf_wset(m0, (m0_wptr - m0_rptr));
+                                       return 0;
+                               }
+                               (gbuf_rptr(m3)) = lastPage;                                             /* new mbuf starts at beginning of page */
+                               gbuf_wset(m3, (gbuf_wptr(m1) - lastPage));              /* len = remaining data crossing over page boundary */
+                               gbuf_wset(m1, (lastPage - (gbuf_rptr(m1))));            /* adjust len of m1 */
+                               (gbuf_cont(m1)) = m3;
+                               (gbuf_cont(m3)) = 0;
+                       }
+                 }
                }
-                               
-               AT_DDP_HDR(mhdr)->src_socket = src_socket;
+
+               AT_DDP_HDR(m2)->src_socket = src_socket;
                dPrintf(D_M_ATP_LOW,D_L_INFO,
                        ("atp_unpack_bdsp %d, socket=%d, size=%d, cnt=%d\n",
-                       i,atp->atp_socket_no,gbuf_msgsize(gbuf_cont(mhdr)),cnt));
+                       i,atp->atp_socket_no,gbuf_msgsize(gbuf_cont(m2)),cnt));
                if (mlist)
-                       gbuf_next(mprev) = mhdr;
+                       gbuf_next(mprev) = m2;
                else
-                       mlist = mhdr;
-               mprev = mhdr;
+                       mlist = m2;
+               mprev = m2;
                /*
                 * on to the next frag
                 */
                bdsp++;
        }
+       if (m0) {
+               gbuf_rptr(m0) = m0_rptr;
+               gbuf_wset(m0,(m0_wptr-m0_rptr));
+       }
        /*
         * send the message
         */
@@ -835,7 +898,6 @@ l_send:
 
        DDP_OUTPUT(mlist);
        return 0;
-
 } /* atp_unpack_bdsp */
 
 #define ATP_SOCKET_LAST  (DDP_SOCKET_LAST-6)
@@ -1618,14 +1680,6 @@ _ATPsndreq(fd, buf, len, nowait, err, proc)
        return (int)tid;
 } /* _ATPsndreq */
 
-
-/*     entry point for ATP send response.  respbuf contains a DDP hdr,
- *     ATP hdr, and atpBDS array.  The bdsDataSz field of the first atpBDS
- *     struct contains the number of atpBDS structs in the array. resplen
- *     contains the len of the data in respbuf and datalen contains the
- *     len of the data buffer holding the response packets which the atpBDS
- *     struct entries point to.
- */
 int
 _ATPsndrsp(fd, respbuff, resplen, datalen, err, proc)
        int fd;
@@ -1635,18 +1689,15 @@ _ATPsndrsp(fd, respbuff, resplen, datalen, err, proc)
        int *err;
        void *proc;
 {
-       gref_t          *gref;
-       int             s, rc;
-       long            bufaddr;
-       gbuf_t          *m, *mdata;
-       short           space;
-       int             size;
-       struct atp_state *atp;
-       struct atpBDS *bdsp;
-       u_int16_t       *bufsz;
-       char            *buf;
-       int                     bds_cnt, count, len;
-       caddr_t         dataptr;
+       gref_t *gref;
+       int s, rc;
+       long bufaddr;
+       gbuf_t *m, *mdata;
+       register short len;
+       register int size;
+       register struct atp_state *atp;
+       register struct atpBDS *bdsp;
+       register char *buf;
 
        if ((*err = atalk_getref(0, fd, &gref, proc)) != 0)
                return -1;
@@ -1674,68 +1725,33 @@ _ATPsndrsp(fd, respbuff, resplen, datalen, err, proc)
        gbuf_wset(m,resplen);
        ((at_ddp_t *)gbuf_rptr(m))->src_node = 0;
        bdsp = (struct atpBDS *)(gbuf_rptr(m) + TOTAL_ATP_HDR_SIZE);
+       if ((resplen == TOTAL_ATP_HDR_SIZE) || ((len = UAS_VALUE(bdsp->bdsDataSz)) == 1))
+               len = 0;
+       else
+               len = 16 * sizeof(gbuf_t);
 
        /*
-        * allocate buffers and copy in the response data.
-        * note that only the size field of the atpBDS field
-        * is used internally in the kernel.
+        * allocate buffer and copy in the response data
         */
-       bds_cnt = get_bds_entries(m);           /* count of # entries */
-       /* check correctness of parameters */
-       if (bds_cnt > ATP_TRESP_MAX) {
-           gbuf_freem(m);
-               *err = EINVAL;
-               return -1;
-       }
-       
-       for (size = 0, count = 0; count < bds_cnt; count++) {
-               size += UAS_VALUE(bdsp[count].bdsBuffSz);
-       }
-       if (size > datalen) {                           
-           gbuf_freem(m);
-               *err = EINVAL;
-               return -1;
-       }
-       
-       /* get the first mbuf */
-       if ((mdata = gbuf_alloc_wait((space = (size > MCLBYTES ? MCLBYTES : size)), TRUE)) == 0) {
-           gbuf_freem(m);
+       if ((mdata = gbuf_alloc_wait(datalen+len, TRUE)) == 0) {
+               gbuf_freem(m);
                *err = ENOMEM;
                return -1;
        }
        gbuf_cont(m) = mdata;
-       dataptr = mtod(mdata, caddr_t);
-       for (count = 0; count < bds_cnt; bdsp++, count++) {
-               if ((bufaddr = UAL_VALUE(bdsp->bdsBuffAddr)) != 0 && 
-                               (len = UAS_VALUE(bdsp->bdsBuffSz)) != 0) {
-                       if (len > space) {                                                                                      /* enough room ? */
-                               gbuf_wset(mdata, dataptr - mtod(mdata, caddr_t));               /* set len of last mbuf */
-                               /* allocate the next mbuf */
-                               if ((gbuf_cont(mdata) = m_get((M_WAIT), MSG_DATA)) == 0) {
-                                       gbuf_freem(m);
-                                       *err = ENOMEM;
-                                       return -1;
-                               }
-                               mdata = gbuf_cont(mdata);       
-                               MCLGET(mdata, M_WAIT);
-                               if (!(mdata->m_flags & M_EXT)) {
-                                       m_freem(m);
-                                       return(NULL);
-                               }
-                               dataptr = mtod(mdata, caddr_t);
-                               space = MCLBYTES;
-                       }
-                       /* do the copyin */
-                       if ((*err = copyin((caddr_t)bufaddr, dataptr, len)) != 0) {
+       for (size=0; bdsp < (struct atpBDS *)gbuf_wptr(m); bdsp++) {
+               if ((bufaddr = UAL_VALUE(bdsp->bdsBuffAddr)) != 0) {
+                       len = UAS_VALUE(bdsp->bdsBuffSz);
+                       buf = (char *)bufaddr;
+                       if ((*err = copyin((caddr_t)buf,
+                                       (caddr_t)&gbuf_rptr(mdata)[size], len)) != 0) {
                                gbuf_freem(m);
                                return -1;
                        }
-                       dataptr += len;
-                       space -= len;
+                       size += len;
                }
        }
-       gbuf_wset(mdata, dataptr - mtod(mdata, caddr_t));               /* set len of last mbuf */
-       gbuf_cont(m)->m_pkthdr.len = size;                                              /* set packet hdr len */
+       gbuf_wset(mdata,size);
 
        atp_send_rsp(gref, m, TRUE);
        return 0;
index df08f3def56be7026d18ad3985259af86c2db37c..9bc832279f5589da000e2bf7b1bfb7e0d382ec4a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 02a387be2f0c6d97a884a16515a269ac0feb15b9..87040324418e8be30ae24a38610e37b30c5d3145 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3cc415f0ecbfb8846529bb14ac076eb9675f351c..bc7de258791ec2e1e7edd64dd22be9f2d6ab84c8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8a070c4278a175e68851833cf6ef305a4303bd37..fa15fbcf4840aff9ca0e128ebf204e8472dbf685 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 73b38e284307d81043b6022522ee432dc07120c8..662499730e13060b80b86848d4315896483ef917 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4bda301fdf7c009275469cd8e8a929d01f088359..948ccda85d4c3361ddaf8df52b25e772ab0f0fb4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 13a532699f0421b6c3c346e50b67390e30404429..1140a2bf3dd1b3d9f727f699efc8032abeb9c959 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9d64f0a35a87158e046c360891f7d527fd14bbfe..b0a492ca61132fa4d1a454344c7f58937a591185 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0e5405b3d28d9900b3bf9475080da0c6a1a4a396..5d5c43a3aceaa13868a6994d156865ecf2ba5813 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 10d9debf02b1e253e3aa99bfd3a29a3e4fa895b1..ce8772d0fbff908774bce5903a61e4427788d579 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a2e3d64ab2f27e22ea46a1f718dc10b7a73b0291..c6c4ce65887f6e7c59563648d102fe3dcc282861 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cf4aa830a1704282fe8b7da595aa7be7b7771a77..33d051d037b8e1b8ce7d09903492a06b8985e3ba 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d9d66976361b506dff526e49fa530545b4a5aa85..93da77ebf3b7433d2ebb51084ec5902862556143 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d02c3e34f23abcb5a6df4ba407c19b3a490a10dd..ad79d612b05cb6c921b4649661669e29842ceafa 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cbb18fc4d4e22dca226ecfd8fddf050a9ccd86d2..430432ea6b6bd15b79f667d2ea7f3cba0b665818 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 86ec871ecd35b01c8c5f70c6ed0251f0b3d85c12..77e78451e0889632b0996164bdf4fa2d23cdf649 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 961d535e42e9083ceec324582c3f3dfc6db8c72c..22f0d103d48f3d79f2d3d847f2232c78be22845a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8418e61af1e438a185edb67cb54e89db27e5afe4..2cdddeb8d104913e5a3a0071516487aeb387e541 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f1452676de17613fcd26b3ecb06ac2477b1318a9..1bfec9e17282a4e240d9298d4bf644a19300dc31 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7504e4874b74cab91b1aaba51d10dd9a47db5074..7a6298a4d70bdc8e098630ce23ab4019daba28a8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a239df24b17d144e095f3d7e1782a81c3d2a0f95..666a59998230caeaedfdc28221cde23ef02f4e91 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1169c8f4072f3aedb39ba158351def36c42fc512..12d6aee820d040752eb6cdc3d7906669a3c911ec 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 489870e2edc1854c5e2351535b0462899ae2150b..c1b40b63e11f84fe57d1961fd63c09f59b1edb98 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cd1bfd49bd7bddbf3b8f22549032caf5b4c0f521..aaefa9ae87db86722da70484c43818cffd20514e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index bbaf35d937636719bfe9fff1052693f6db69dd42..766eabacebceb296ac44626ebabef4bcfd4dd401 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 215a72510fb5d165cd293f629d513d684e2a508c..7d327ab6008cb05d72c13e12c7df27f99e39f9a8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 84070755d84f22b45a302838a23fcdfad99f7336..34c8517f57ba6c851151731b34744c99abf0a328 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8cb5e1483e575d893bdff5aacc1b1e40c8912de6..64ecd48be6cccf1b489a06dec52389119d4c637c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 47405c959f927d23af73d3186696198c28eaaeea..2f46f707b34240a081b1eb6d8e1a50d1c4e4b8b0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cffc56a02f403946f2cf5ee5aa26ee1cc495f3ff..aec11df288aaaac1c807dca27d64065f642f211f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0996ff0694c24d05f4c8b480146baf956ecfa5b4..8c77bed8bdecefa442dc7486e6ac36537fce0421 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1686a79ea1351c54441c015e2e6ad0ec91009988..6abed58d8b7d1617b7e13841cd385c8639551c36 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 29f2a74b9cb79bde2692a79e2015355e4e05d218..5376ab6a75d031582a88162d646d17d6c1a1149b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a878976ef811b8d6a6422f2f1440ce38e4827474..8f7365b21fa18324264380cf064be4f6d59a3ad1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c522f9ccba8bea5bfbcf7d8e786dc00af39a0bee..a5d17dc846675198ed076981cd880330d25e746d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -324,8 +321,7 @@ struct proc *proc;
               return EBADF;
          }
      }
-     *grefp = (gref_t *)fp->f_data;
-     if (*grefp == 0 || *grefp == (gref_t *)(-1)) {
+     if ((*grefp = (gref_t *)fp->f_data) == 0) {
          thread_funnel_switch(KERNEL_FUNNEL, NETWORK_FUNNEL);
          return EBADF;
      }
index c8a0f11494b54ae3f83b01102009f80d67b10c28..b546b7c2f62052067f38a9159c4536f871e8f9df 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0c7d82bb9ddf426297c4c885f90fd32431129a37..62afbde1f10612f9ec79eab427571abacd9f8cfb 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 80d163657b1b91cd785a12ab5623626c40de0658..457c246cb2407afb9c001d96a0c97c37c213de06 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0dee811ba3229f8060b137028aaaf67bcc3177ec..4de5d87cd60a46d1701e7e8b8edfefc0001a6af1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f9ea9bdbcd3dc27e087be26663993238ac10805b..76b310f4e4e68af69f46a043721b51bfead75dc9 100644 (file)
@@ -8,22 +8,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 47c4c69661e37bdc7a02c626a2eebd1ae6feb905..cbef0e298604f001a1953816c488b76a2177eb95 100644 (file)
@@ -7,22 +7,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 428caa828e4b3a7e5eb8ce2d68abee37c61b96eb..0a3f67a7f9dab5b498360d4ab2c7f73b5deae8dd 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 96a28ce5d8ee283bc08569cab45663f5b9d8b9ce..56005f1ab36f127e1487e1e0c5f4ba359cb2cfe6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5b2a9bfee65ba4454ca7a44318b3abb939b0c431..f4639f632759ff8643b58ce00d1c11c08044284a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 094b306dbe7295d4edfde10a946a69635dabfe45..9c31d421be2395bed642f7efa08ab2dc09d474c8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c5a79397d89b29afec367f5e07dfc1284a70a0b5..07e99d6eb2272393aedc49addc9e2f4b11f52df8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -645,31 +642,9 @@ in_arpinput(m)
                return;
        }
        if (isaddr.s_addr == myaddr.s_addr) {
-               struct kev_msg        ev_msg;
-               struct kev_in_collision *in_collision;
-               u_char  storage[sizeof(struct kev_in_collision) + 6];
-               in_collision = (struct kev_in_collision*)storage;
-               
                log(LOG_ERR,
                        "duplicate IP address %s sent from ethernet address %s\n",
                        inet_ntoa(isaddr), ether_sprintf(buf, ea->arp_sha));
-               
-               /* Send a kernel event so anyone can learn of the conflict */
-               in_collision->link_data.if_family = ac->ac_if.if_family;
-               in_collision->link_data.if_unit = ac->ac_if.if_unit;
-               strncpy(&in_collision->link_data.if_name[0], ac->ac_if.if_name, IFNAMSIZ);
-               in_collision->ia_ipaddr = isaddr;
-               in_collision->hw_len = ETHER_ADDR_LEN;
-               bcopy((caddr_t)ea->arp_sha, (caddr_t)in_collision->hw_addr, sizeof(ea->arp_sha));
-               ev_msg.vendor_code = KEV_VENDOR_APPLE;
-               ev_msg.kev_class = KEV_NETWORK_CLASS;
-               ev_msg.kev_subclass = KEV_INET_SUBCLASS;
-               ev_msg.event_code = KEV_INET_ARPCOLLISION;
-               ev_msg.dv[0].data_ptr = in_collision;
-               ev_msg.dv[0].data_length = sizeof(struct kev_in_collision) + 6;
-               ev_msg.dv[1].data_length = 0;
-               kev_post_msg(&ev_msg);
-               
                itaddr = myaddr;
                goto reply;
        }
@@ -886,18 +861,9 @@ arplookup(addr, create, proxy)
        if (rt == 0)
                return (0);
        rtunref(rt);
-       
-       if (rt->rt_flags & RTF_GATEWAY) {
+
+       if (rt->rt_flags & RTF_GATEWAY)
                why = "host is not on local network";
-               
-               /* If there are no references to this route, purge it */
-               if (rt->rt_refcnt <= 0 && (rt->rt_flags & RTF_WASCLONED) != 0) {
-                       rtrequest(RTM_DELETE,
-                                       (struct sockaddr *)rt_key(rt),
-                                       rt->rt_gateway, rt_mask(rt),
-                                       rt->rt_flags, 0);
-               }
-       }
        else if ((rt->rt_flags & RTF_LLINFO) == 0)
                why = "could not allocate llinfo";
        else if (rt->rt_gateway->sa_family != AF_LINK)
index 2f42b36de4e78e91f912f02990c4c57e30846dd1..0d9799b6b1a6460365150666cae772109969f44e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c250256eb6471ecd003e79fc29191757e0b3bca4..dd33f7311a8cbdc926d16ec9078208a891e2ac8a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index dacb125dd189136ffdd8a8272380d797c20e6706..6ffd6734b894df43f183bfa7956f42548bb55832 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 58abc8d3511278302b55b5879cfab8b5db8bd455..3dd855ca8be1b1025d9347294ea9b3938f970363 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 563a14c783aa5d8cf52f87ca5dcf27452fc65f1e..dc62c7da57cd884c7e304cbb1ae77a9fbb193d35 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e73a9c76ef8ef96280a7448de6ae6c5c4b446d09..8d440ff636b55ed2e3e2e2ca00d8b0bb7fb1dc2a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b26199f21589ffa48aabb6999444c6c0244fd55c..c950c99311e1fa3d30b19d5bd42f1c25e9ebd3e7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1634fe31622fe22278df99c251d95e54091beae3..7fcd675417aeb6e31342f506217d4763e9cf9864 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 041d9e5ca18ea69df81a7c3dc0700f93e3d6bf3a..d203b0e7795a9799c09998ea1e1a9f4eecc5372a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 850273c86516f63b09bfdb28a1aefafa594d788d..9d349d7b5d786f1618c7728e675230237ee57b29 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c1386fc43dc731b2f079dec0f056102577422bb0..1971b49bcc9de1c77047cd398b94fec98eefcfc9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8c0f62b00a66218a280e7a158501f9c877070a5e..e6d09d2938c8d116a3caffbeb39cb5ee3fd4307d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3e1a98d3002ae6d2f572da033766efe53f40e96d..bc9d086db6995d7e0c0fdc0c5621999cb653787b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c01f8d8b65884f03e157c5192c4b8577802c2c5c..38acfdf50f5b01aa62702ad89813b571bf1176d3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c0608d1dc658f087ef116a0f51a7cef187be672f..ad4409a07e05558a8e1530205abe0de5dc041bff 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index bd8e20902f9ed3e4d478e34174827e5fa071d3a6..c307be910cbcb1f20dc27d95adc9699a89b5c135 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a29822d2422306788da2607df82a1215810c6b5f..347a460e3a445ea2657dd41086e784d15806e696 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 16baa2c1564e426b6133db1cd4a4903dad616fbc..0c9d8c82944c4b5c9b846110b4914ba262637c81 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -118,13 +115,6 @@ struct kev_in_data {
        struct  in_addr ia_dstaddr;
 };
 
-struct kev_in_collision {
-       struct  net_event_data  link_data;      /* link colliding arp was received on */
-       struct  in_addr ia_ipaddr;      /* IP address we and another node are using */
-       u_char  hw_len; /* length of hardware address */
-       u_char  hw_addr[0];     /* variable length hardware address */
-};
-
 
 /*
  * Define inet event subclass and specific inet events.
@@ -138,7 +128,6 @@ struct kev_in_collision {
 #define KEV_INET_SIFDSTADDR   4
 #define KEV_INET_SIFBRDADDR   5
 #define KEV_INET_SIFNETMASK   6
-#define KEV_INET_ARPCOLLISION 7        /* use kev_in_collision */
 #endif /* __APPLE__ */
 
 /*
index 29fed9041fe0ff8dec9e0a2e88f00688dadfa146..8f19e94a603b9157328da45108109c4e8af80fae 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 38060eb93a86799905908d3e43dbfd7ad1d1d859..6a3b6578595a295e0ef8c279e7bc39da860de969 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index eac9e37e1f077d9b4efe2c107d07da0e15893dc9..a39802e7f7feecda3cb554b7d6a94462b68f58c3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 512c65ca78c857f068d7f5d7abec49dc3bfa7c19..546df390c0e4cec9cfd8c21520a1e14d9b9bfbd7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c43d86ce7fbe416d003bab9cb704311d542b434f..0979e45d3fb0e94057e7d0b316586a7c6bf07772 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b61f4a8c9a82e6c9a64974aee11b8aed45620fee..9a13ae2391eb4b167e7945cce5c202150c3cc6c5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1599ac4bfff0919cbcc12ff7ccdca0a596fbbec8..2dfc497e870db294050e780bd1efc85f0d1b5e85 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d00a74ec7ebbcf4544c7f4e61d3abf8576345af3..4aa2132c532c2ee7fd81c98caa138455c0d62c0a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5ae39bb903fec12a771d815866a6dedce6ce32ca..e4c9c7c9bb848332a23d2dc2840fda4061975905 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 81c8b7ce0624e2e9243e504844c36a5ce2ce1201..a1c472e22533ecff04a3effc8245fafd64b98e82 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 70233a1d5e0dea103e64977a167bc18f9c1f5e96..8e0ac3cc5b894f95c01d4fda6f1de6e86ee1be12 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 86abb56a13c697981dbdbb8eeea14012ad54cafb..23c25d366b12ab79313d69777c9f60f6794a5e25 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ce42111f885ccdcc0c968328789b80909e9892f1..41eae12e2f94d0ffc6342ec62f49010f58549f08 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index fb94248771ef5e538a0659a028ac11d6c8a51627..461ba6b00f6de765043fabdb0aee0700ec4f3383 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index fec3d5d96c5255c0bec157c77efc570ce3bcb41d..22e119eb15fc3dba36cc525071b542ea6e12d193 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index bd5edb4fba6f4482e1b9e76a2fc008426f4c52ec..ce9949bdd870304242e21957d9c64ca1f745ed59 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6668caa0e398c142deda6456d597f39458271b99..b522d5f95df6771ffdc66a9aeff0f9dd14477ca5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b5cc0f0de3ad6226c6f9fe2e79e281015395aa1e..a667f4ea4e5e89666417df34b929cf672da80d12 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e365ce7f187e1914362a842ec7847599611890d3..eaff4fc2d28b2645902a94ff83a76cd6c46c6de7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 635f33548cbad29ba4d8fa1679088f1fdce3d9cd..ce1742029b3cf7c8be719467eee8c34bc609e788 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f524dd41ac98007055802cfbab299c45237e0b9b..cf4f38aa6680ea9b734a868cf7988a8007b55e4e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 85ea2021a27c9daa5705085cf121da8b0570e6e8..39efb3d79c6a822054596343a5eb0fc92cba38f1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 48608fc8072b6f08bc72dd354740f8a293c41bff..a7043db15d180b031a9b73b27a2a20ef5ae1c00e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5a7e5872e4bbd079c7ccce18ce9cb108e8e62e16..76a05474e80e1de1ff243aa7c1d77da7b1eef124 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7b9b0732d9b499e7150c801782fc235ea68235f7..e4a2e6826ee6fac1957ebbe599b53c4cfcc4e22d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c2925621ee77b65ea20d62c7bba4027ee8444c4f..eb294a6a2a7f16b41e382f91dde0451772af861d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -74,7 +71,6 @@
 #include <kern/cpu_number.h>   /* before tcp_seq.h, for tcp_random18() */
 
 #include <net/if.h>
-#include <net/if_types.h>
 #include <net/route.h>
 
 #include <netinet/in.h>
@@ -162,11 +158,6 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, drop_synfin, CTLFLAG_RW,
     &drop_synfin, 0, "Drop TCP packets with SYN+FIN set");
 #endif
 
-__private_extern__ int slowlink_wsize = 8192;
-SYSCTL_INT(_net_inet_tcp, OID_AUTO, slowlink_wsize, CTLFLAG_RW,
-       &slowlink_wsize, 0, "Maximum advertised window size for slowlink");
-
-
 u_long tcp_now;
 struct inpcbhead tcb;
 #define        tcb6    tcb  /* for KAME src sync over BSD*'s */
@@ -1144,10 +1135,6 @@ findpcb:
        win = sbspace(&so->so_rcv);
        if (win < 0)
                win = 0;
-       else {  /* clip rcv window to 4K for modems */
-               if (tp->t_flags & TF_SLOWLINK && slowlink_wsize > 0)
-                       win = min(win, slowlink_wsize);
-       }
        tp->rcv_wnd = imax(win, (int)(tp->rcv_adv - tp->rcv_nxt));
        }
 
@@ -1330,10 +1317,7 @@ findpcb:
                         * here.  Even if we requested window scaling, it will
                         * become effective only later when our SYN is acked.
                         */
-                       if (tp->t_flags & TF_SLOWLINK && slowlink_wsize > 0) /* clip window size for for slow link */
-                               tp->rcv_adv += min(tp->rcv_wnd, slowlink_wsize);
-                       else 
-                               tp->rcv_adv += min(tp->rcv_wnd, TCP_MAXWIN);
+                       tp->rcv_adv += min(tp->rcv_wnd, TCP_MAXWIN);
                        tcpstat.tcps_connects++;
                        soisconnected(so);
                        tp->t_timer[TCPT_KEEP] = tcp_keepinit;
@@ -2132,10 +2116,10 @@ process_ACK:
                        tp->snd_wnd -= acked;
                        ourfinisacked = 0;
                }
+               sowwakeup(so);
                tp->snd_una = th->th_ack;
                if (SEQ_LT(tp->snd_nxt, tp->snd_una))
                        tp->snd_nxt = tp->snd_una;
-               sowwakeup(so);
 
                switch (tp->t_state) {
 
@@ -2857,16 +2841,6 @@ tcp_mss(tp, offer)
                return;
        }
        ifp = rt->rt_ifp;
-       /*
-        * Slower link window correction:
-        * If a value is specificied for slowlink_wsize use it for PPP links
-        * believed to be on a serial modem (speed <128Kbps). Excludes 9600bps as
-        * it is the default value adversized by pseudo-devices over ppp.
-        */
-       if (ifp->if_type == IFT_PPP && slowlink_wsize > 0 && 
-           ifp->if_baudrate > 9600 && ifp->if_baudrate <= 128000) {
-               tp->t_flags |= TF_SLOWLINK;
-       }
        so = inp->inp_socket;
 
        taop = rmx_taop(rt->rt_rmx);
@@ -3073,16 +3047,6 @@ tcp_mssopt(tp)
                        isipv6 ? tcp_v6mssdflt :
 #endif /* INET6 */
                        tcp_mssdflt;
-       /*
-        * Slower link window correction:
-        * If a value is specificied for slowlink_wsize use it for PPP links
-        * believed to be on a serial modem (speed <128Kbps). Excludes 9600bps as
-        * it is the default value adversized by pseudo-devices over ppp.
-        */
-       if (rt->rt_ifp->if_type == IFT_PPP && slowlink_wsize > 0 && 
-           rt->rt_ifp->if_baudrate > 9600 && rt->rt_ifp->if_baudrate <= 128000) {
-               tp->t_flags |= TF_SLOWLINK;
-       }
 
        return rt->rt_ifp->if_mtu - min_protoh;
 }
index 2bfc95262f584e1f9dd87561cf61558b5db69506..d3e5558d3b0bffd068c7a4320238411df2ddfe1b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -116,7 +113,7 @@ int ss_fltsz = 1;
 SYSCTL_INT(_net_inet_tcp, OID_AUTO, slowstart_flightsize, CTLFLAG_RW,
        &ss_fltsz, 1, "Slow start flight size");
 
-int ss_fltsz_local = 4; /* starts with four segments max */
+int ss_fltsz_local = TCP_MAXWIN;               /* something large */
 SYSCTL_INT(_net_inet_tcp, OID_AUTO, local_slowstart_flightsize, CTLFLAG_RW,
        &ss_fltsz_local, 1, "Slow start flight size for local networks");
 
@@ -132,8 +129,6 @@ struct      mbuf *m_copym_with_hdrs __P((struct mbuf*, int, int, int, struct mbuf**,
 extern int ipsec_bypass;
 #endif
 
-extern int slowlink_wsize;     /* window correction for slow links */
-
 /*
  * Tcp output routine: figure out what should be sent and send it.
  */
@@ -224,8 +219,6 @@ again:
        sendalot = 0;
        off = tp->snd_nxt - tp->snd_una;
        win = min(tp->snd_wnd, tp->snd_cwnd);
-       if (tp->t_flags & TF_SLOWLINK && slowlink_wsize > 0)
-               win = min(win, slowlink_wsize);
 
        flags = tcp_outflags[tp->t_state];
        /*
@@ -332,10 +325,7 @@ again:
        if (SEQ_LT(tp->snd_nxt + len, tp->snd_una + so->so_snd.sb_cc))
                flags &= ~TH_FIN;
 
-       if (tp->t_flags & TF_SLOWLINK && slowlink_wsize > 0 )   /* Clips window size for slow links */
-               win = min(sbspace(&so->so_rcv), slowlink_wsize);
-       else
-               win = sbspace(&so->so_rcv);
+       win = sbspace(&so->so_rcv);
 
        /*
         * Sender silly window avoidance.  If connection is idle
@@ -805,17 +795,9 @@ send:
                win = 0;
        if (win < (long)(tp->rcv_adv - tp->rcv_nxt))
                win = (long)(tp->rcv_adv - tp->rcv_nxt);
-       if (tp->t_flags & TF_SLOWLINK && slowlink_wsize > 0) {
-               if (win > (long)slowlink_wsize) 
-                       win = slowlink_wsize;
-               th->th_win = htons((u_short) (win>>tp->rcv_scale));
-       }
-       else {
-
-               if (win > (long)TCP_MAXWIN << tp->rcv_scale)
+       if (win > (long)TCP_MAXWIN << tp->rcv_scale)
                win = (long)TCP_MAXWIN << tp->rcv_scale;
-               th->th_win = htons((u_short) (win>>tp->rcv_scale));
-       }
+       th->th_win = htons((u_short) (win>>tp->rcv_scale));
        if (SEQ_GT(tp->snd_up, tp->snd_nxt)) {
                th->th_urp = htons((u_short)(tp->snd_up - tp->snd_nxt));
                th->th_flags |= TH_URG;
index f566d4360a9d7067140438744f0fc5bc0f3cc713..57f1c926220e31c1afe8c645a0fdf64bc3bd41d3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cee36d93b35ab39e556cf48f1399032a5c22f569..30377a44993f63ab332b0d8f81020e2b42c20e86 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3d92a0d8203ff8a04d31262e820ab52a182055ab..e0c303b4050a390723f648f8cff6878b5560678e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index dea6ce3c0ee38f02b8fbd16bf9403d277afce4e7..a8f55353c0a7f87602310f08cea55d9b664b02d2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cc9202e54ae23f368e4ffec5f2b6fe3c0c91306c..d68e6f45d5b21048fb9a9a2a6b2b91866e5bdf6b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d48a74f157a41c4bde232b358179cb4a3a019d0f..5c1742366789e8178d0d88f7998d0ed21356462a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -130,7 +127,6 @@ struct tcpcb {
 #define        TF_MORETOCOME   0x10000         /* More data to be appended to sock */
 #define        TF_LQ_OVERFLOW  0x20000         /* listen queue overflow */
 #define        TF_RXWIN0SENT   0x40000         /* sent a receiver win 0 in response */
-#define        TF_SLOWLINK     0x80000         /* route is a on a modem speed link */
 
        int     t_force;                /* 1 if forcing out a byte */
 
index 22bb6b578f4193301e55fa4fe52d0819c2e5c7e6..79410f82d2963960d173bba22de8ac32acda2197 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 18ed8c194616b6359b703e51188785a5aca82383..9fa2bb55e09f91f6fae736601e09ce6d8d6978ef 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5cf04b9609f912e6ad9cb6205bd4598d28a32552..4dde880cef51ad2fb5cddd37526c2f0ecf9c51a1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 31fc99c35e94e2338762654e52520a119e184608..4c2976f31f9f9dd9e40d0d6af644b5b3b4f2427e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index eb41437f491459452e9b1ab169ce0de206e3773b..ea7b3fe75167a611948e4914aea08aaf706f3ef4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5c14febecad3f4dc5a3242fcc0215099fb542165..9991df62f19ef2a298d33c8bd6c4ed203e6c4c81 100644 (file)
@@ -3384,7 +3384,7 @@ ipsec_copypkt(m)
                         */
                        if (
                                n->m_ext.ext_free ||
-                               m_mclhasreference(n)
+                               mclrefcnt[mtocl(n->m_ext.ext_buf)] > 1
                            )
                        {
                                int remain, copied;
index 945154c7f54ec52cead976d376cf81fac9d39106..16fe898a847855c1fd59d3ea638b21b1365d4cc2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f1412b99fa698cca56815d934e2984ec8a09c92c..98a7eee68100d9fe7c80f2dceade7dbf624892d4 100644 (file)
@@ -1,24 +1,21 @@
 /*
- * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -404,40 +401,13 @@ krpc_call(sa, prog, vers, func, data, from_p)
                        if (reply->rp_astatus != 0) {
                                error = ntohl(reply->rp_u.rpu_errno);
                                printf("rpc denied, error=%d\n", error);
-                               /* convert rpc error to errno */
-                               switch (error) {
-                               case RPC_MISMATCH:
-                                       error = ERPCMISMATCH;
-                                       break;
-                               case RPC_AUTHERR:
-                                       error = EAUTH;
-                                       break;
-                               }
-                               goto out;
+                               continue;
                        }
 
                        /* Did the call succeed? */
                        if ((error = ntohl(reply->rp_u.rpu_ok.rp_rstatus)) != 0) {
                                printf("rpc status=%d\n", error);
-                               /* convert rpc error to errno */
-                               switch (error) {
-                               case RPC_PROGUNAVAIL:
-                                       error = EPROGUNAVAIL;
-                                       break;
-                               case RPC_PROGMISMATCH:
-                                       error = EPROGMISMATCH;
-                                       break;
-                               case RPC_PROCUNAVAIL:
-                                       error = EPROCUNAVAIL;
-                                       break;
-                               case RPC_GARBAGE:
-                                       error = EINVAL;
-                                       break;
-                               case RPC_SYSTEM_ERR:
-                                       error = EIO;
-                                       break;
-                               }
-                               goto out;
+                               continue;
                        }
 
                        goto gotreply;  /* break two levels */
index b8d810f1109f625851440796ff87a6f2b688af02..6d596741467bffb4eda199683f68824be596f744 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7f41efe13fb85952defd9b67213fca4b1fa07a98..4b77d663733ddb4c5d212242b39db23281d2b1db 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cec8ac1e866a4b846d537cb004d582fe5ec7d6c1..0590f4c49ae6585f37f6097667524ee957cd19ec 100644 (file)
@@ -1,24 +1,21 @@
 /*
- * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -133,14 +130,6 @@ int nfs_boot_init(nd, procp)
        panic("nfs_boot_init: no ether");
 }
 
-int nfs_boot_getfh(nd, procp, v3)
-       struct nfs_diskless *nd;
-       struct proc *procp;
-       int v3;
-{
-       panic("nfs_boot_getfh: no ether");
-}
-
 #else /* NETHER */
 
 /*
@@ -170,11 +159,11 @@ static int bp_getfile __P((struct sockaddr_in *bpsin, char *key,
        struct sockaddr_in *mdsin, char *servname, char *path));
 
 /* mountd RPC */
-static int md_mount __P((struct sockaddr_in *mdsin, char *path, int v3,
-       u_char *fhp, u_long *fhlenp));
+static int md_mount __P((struct sockaddr_in *mdsin, char *path,
+       u_char *fh));
 
 /* other helpers */
-static int get_file_handle __P((struct nfs_dlmount *ndmntp));
+static int get_file_handle __P((char *pathname, struct nfs_dlmount *ndmntp));
 
 
 #define IP_FORMAT      "%d.%d.%d.%d"
@@ -202,24 +191,25 @@ nfs_boot_init(nd, procp)
        boolean_t               do_bpgetfile = TRUE;
        int                     error = 0;
        struct in_addr          my_ip;
+       char *                  root_path = NULL;
        struct sockaddr_in *    sin_p;
 
        /* by this point, networking must already have been configured */
        if (netboot_iaddr(&my_ip) == FALSE) {
            printf("nfs_boot: networking is not initialized\n");
            error = ENXIO;
-           goto failed_noswitch;
+           goto failed;
        }
 
        /* get the root path information */
-       MALLOC_ZONE(nd->nd_root.ndm_path, char *, MAXPATHLEN, M_NAMEI, M_WAITOK);
+       MALLOC(root_path, char *, MAXPATHLEN, M_TEMP, M_WAITOK);
        sin_p = &nd->nd_root.ndm_saddr;
        bzero((caddr_t)sin_p, sizeof(*sin_p));
        sin_p->sin_len = sizeof(*sin_p);
        sin_p->sin_family = AF_INET;
        if (netboot_rootpath(&sin_p->sin_addr, nd->nd_root.ndm_host, 
                             sizeof(nd->nd_root.ndm_host),
-                            nd->nd_root.ndm_path, MAXPATHLEN) == TRUE) {
+                            root_path, MAXPATHLEN) == TRUE) {
            do_bpgetfile = FALSE;
            do_bpwhoami = FALSE;
        }
@@ -254,90 +244,68 @@ nfs_boot_init(nd, procp)
        }
        if (do_bpgetfile) {
                error = bp_getfile(&bp_sin, "root", &nd->nd_root.ndm_saddr,
-                                  nd->nd_root.ndm_host, nd->nd_root.ndm_path);
+                                  nd->nd_root.ndm_host, root_path);
                if (error) {
                        printf("nfs_boot: bootparam get root: %d\n", error);
                        goto failed;
                }
        }
+       
+       error = get_file_handle(root_path, &nd->nd_root);
+       if (error) {
+               printf("nfs_boot: get_file_handle() root failed, %d\n", error);
+               goto failed;
+       }
 
 #if !defined(NO_MOUNT_PRIVATE) 
        if (do_bpgetfile) { /* get private path */
-               MALLOC_ZONE(nd->nd_private.ndm_path, char *, MAXPATHLEN, M_NAMEI, M_WAITOK);
+               char * private_path = NULL;
+               
+               MALLOC(private_path, char *, MAXPATHLEN, M_TEMP, M_WAITOK);
                error = bp_getfile(&bp_sin, "private", 
                                   &nd->nd_private.ndm_saddr,
-                                  nd->nd_private.ndm_host,
-                                  nd->nd_private.ndm_path);
+                                  nd->nd_private.ndm_host, private_path);
                if (!error) {
                        char * check_path = NULL;
                        
-                       MALLOC_ZONE(check_path, char *, MAXPATHLEN, M_NAMEI, M_WAITOK);
-                       snprintf(check_path, MAXPATHLEN, "%s/private", nd->nd_root.ndm_path);
+                       MALLOC(check_path, char *, MAXPATHLEN, M_TEMP, M_WAITOK);
+                       sprintf(check_path, "%s/private", root_path);
                        if ((nd->nd_root.ndm_saddr.sin_addr.s_addr 
                             == nd->nd_private.ndm_saddr.sin_addr.s_addr)
-                           && (strcmp(check_path, nd->nd_private.ndm_path) == 0)) {
+                           && (strcmp(check_path, private_path) == 0)) {
                                /* private path is prefix of root path, don't mount */
                                nd->nd_private.ndm_saddr.sin_addr.s_addr = 0;
                        }
-                       FREE_ZONE(check_path, MAXPATHLEN, M_NAMEI);
+                       else {
+                               error = get_file_handle(private_path, 
+                                                       &nd->nd_private);
+                               if (error) {
+                                       printf("nfs_boot: get_file_handle() private failed, %d\n", error);
+                                       goto failed;
+                               }
+                       }
+                       _FREE(check_path, M_TEMP);
                }
                else { 
                        /* private key not defined, don't mount */
                        nd->nd_private.ndm_saddr.sin_addr.s_addr = 0;
                }
+               _FREE(private_path, M_TEMP);
        }
        else {
                error = 0;
        }
-#endif NO_MOUNT_PRIVATE
-failed:
-       thread_funnel_switch(NETWORK_FUNNEL, KERNEL_FUNNEL);
-failed_noswitch:
-       return (error);
-}
-
-/*
- * Called with a partially initialized nfs_diskless struct
- * with file handles to be filled in.
- */
-int
-nfs_boot_getfh(nd, procp, v3)
-       struct nfs_diskless *nd;
-       struct proc *procp;
-       int v3;
-{
-       int error = 0;
-
-       thread_funnel_switch(KERNEL_FUNNEL, NETWORK_FUNNEL);
-       
-       nd->nd_root.ndm_nfsv3 = v3;
-       error = get_file_handle(&nd->nd_root);
-       if (error) {
-               printf("nfs_boot: get_file_handle(v%d) root failed, %d\n",
-                       v3 ? 3 : 2, error);
-               goto failed;
-       }
-
-#if !defined(NO_MOUNT_PRIVATE) 
-       if (nd->nd_private.ndm_saddr.sin_addr.s_addr) {
-               /* get private file handle */
-               nd->nd_private.ndm_nfsv3 = v3;
-               error = get_file_handle(&nd->nd_private);
-               if (error) {
-                       printf("nfs_boot: get_file_handle(v%d) private failed, %d\n",
-                               v3 ? 3 : 2, error);
-                       goto failed;
-               }
-       }
 #endif NO_MOUNT_PRIVATE
  failed:
        thread_funnel_switch(NETWORK_FUNNEL, KERNEL_FUNNEL);
+       _FREE(root_path, M_TEMP);
        return (error);
 }
 
 static int
-get_file_handle(ndmntp)
-       struct nfs_dlmount *ndmntp;
+get_file_handle(pathname, ndmntp)
+       char               *pathname;   /* path on server */
+       struct nfs_dlmount *ndmntp;     /* output */
 {
        char *sp, *dp, *endp;
        int error;
@@ -346,8 +314,7 @@ get_file_handle(ndmntp)
         * Get file handle for "key" (root or swap)
         * using RPC to mountd/mount
         */
-       error = md_mount(&ndmntp->ndm_saddr, ndmntp->ndm_path, ndmntp->ndm_nfsv3,
-                       ndmntp->ndm_fh, &ndmntp->ndm_fhlen);
+       error = md_mount(&ndmntp->ndm_saddr, pathname, ndmntp->ndm_fh);
        if (error)
                return (error);
 
@@ -356,7 +323,7 @@ get_file_handle(ndmntp)
        endp = dp + MNAMELEN - 1;
        dp += strlen(dp);
        *dp++ = ':';
-       for (sp = ndmntp->ndm_path; *sp && dp < endp;)
+       for (sp = pathname; *sp && dp < endp;)
                *dp++ = *sp++;
        *dp = '\0';
        return (0);
@@ -680,25 +647,22 @@ out:
  * Also, sets sin->sin_port to the NFS service port.
  */
 static int
-md_mount(mdsin, path, v3, fhp, fhlenp)
+md_mount(mdsin, path, fhp)
        struct sockaddr_in *mdsin;              /* mountd server address */
        char *path;
-       int v3;
        u_char *fhp;
-       u_long *fhlenp;
 {
        /* The RPC structures */
        struct rpc_string *str;
        struct rdata {
                u_long  errno;
-               u_char  data[NFSX_V3FHMAX + sizeof(u_long)];
+               u_char  fh[NFSX_V2FH];
        } *rdata;
        struct mbuf *m;
        int error, mlen, slen;
-       int mntversion = v3 ? RPCMNT_VER3 : RPCMNT_VER1;
 
        /* Get port number for MOUNTD. */
-       error = krpc_portmap(mdsin, RPCPROG_MNT, mntversion,
+       error = krpc_portmap(mdsin, RPCPROG_MNT, RPCMNT_VER1,
                                                 &mdsin->sin_port);
        if (error) return error;
 
@@ -713,43 +677,22 @@ md_mount(mdsin, path, v3, fhp, fhlenp)
        bcopy(path, str->data, slen);
 
        /* Do RPC to mountd. */
-       error = krpc_call(mdsin, RPCPROG_MNT, mntversion,
+       error = krpc_call(mdsin, RPCPROG_MNT, RPCMNT_VER1,
                        RPCMNT_MOUNT, &m, NULL);
        if (error)
                return error;   /* message already freed */
 
-       /*
-        * the reply must be long enough to hold the errno plus either of:
-        * + a v2 filehandle
-        * + a v3 filehandle length + a v3 filehandle
-        */
        mlen = m->m_len;
-       if (mlen < sizeof(u_long))
+       if (mlen < sizeof(*rdata))
                goto bad;
        rdata = mtod(m, struct rdata *);
        error = ntohl(rdata->errno);
        if (error)
-               goto out;
-       if (v3) {
-               u_long fhlen;
-               u_char *fh;
-               if (mlen < sizeof(u_long)*2)
-                       goto bad;
-               fhlen = ntohl(*(u_long*)rdata->data);
-               fh = rdata->data + sizeof(u_long);
-               if (mlen < (sizeof(u_long)*2 + fhlen))
-                       goto bad;
-               bcopy(fh, fhp, fhlen);
-               *fhlenp = fhlen;
-       } else {
-               if (mlen < (sizeof(u_long) + NFSX_V2FH))
-                       goto bad;
-               bcopy(rdata->data, fhp, NFSX_V2FH);
-               *fhlenp = NFSX_V2FH;
-       }
+               goto bad;
+       bcopy(rdata->fh, fhp, NFSX_V2FH);
 
        /* Set port number for NFS use. */
-       error = krpc_portmap(mdsin, NFS_PROG, v3 ? NFS_VER3 : NFS_VER2,
+       error = krpc_portmap(mdsin, NFS_PROG, NFS_VER2,
                                                 &mdsin->sin_port);
        goto out;
 
index 8a9c0835b70db04aea713cd0725a8b8168689bb6..f12696b3616c54819976f82fa8a3cdb3206b5590 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d390c9e9270f5a2a24ee98218df18501acf2b0e7..758242702bf83bdd8d7a997fb065722b9fac05d8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7526e755d104d99d0d4de08bf4adf5068ed31e2b..f03085e4e0b5b43ad3d470403be168eddb174014 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f2ee753a32eb72efe12f722b097a6796662d6e0e..8038b43a62d58d45d924f75fbed8e3b23f10c700 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -996,10 +993,6 @@ nfs_reply(myrep)
                        FSDBG(530, myrep->r_xid, myrep, nmp, error);
                        nfs_rcvunlock(&nmp->nm_flag);
 
-                       /* Bailout asap if nfsmount struct gone (unmounted). */
-                       if (!myrep->r_nmp || !nmp->nm_so)
-                               return (ECONNABORTED);
-
                        /*
                         * Ignore routing errors on connectionless protocols??
                         */
@@ -2003,17 +1996,9 @@ static int
 nfs_rcvlock(rep)
        register struct nfsreq *rep;
 {
-       register int *flagp;
+       register int *flagp = &rep->r_nmp->nm_flag;
        int slpflag, slptimeo = 0;
 
-       /* make sure we still have our mountpoint */
-       if (!rep->r_nmp) {
-               if (rep->r_mrep != NULL)
-                       return (EALREADY);
-               return (ECONNABORTED);
-       }
-
-       flagp = &rep->r_nmp->nm_flag;
        FSDBG_TOP(534, rep->r_xid, rep, rep->r_nmp, *flagp);
        if (*flagp & NFSMNT_INT)
                slpflag = PCATCH;
index c0b926a4c50b0158ea39da81e7ccdeaa3c29feb4..9e7007ddb376ba6c9dbfb7ff2cb2e1560e6c2990 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1e341e73e278632668249f4dbb13970fe677a65a..fbd22ed2ecd53a62b74829301c603db0835d8d04 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f29b5c80e08bc39db4b40e797d4fc2eed6a185c0..852257d439184f97c4e61d62fe10a5618e634853 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cda27c84d51ec9646c05562fc079bb1c6d2042ab..44faf37c5bf354bf1146409e0c3601d4ad3dae25 100644 (file)
@@ -1,24 +1,21 @@
 /*
- * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2001 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -166,6 +163,34 @@ struct vfsops nfs_vfsops = {
 VFS_SET(nfs_vfsops, nfs, MOUNT_NFS, VFCF_NETWORK);
 #endif
 
+/*
+ * This structure must be filled in by a primary bootstrap or bootstrap
+ * server for a diskless/dataless machine. It is initialized below just
+ * to ensure that it is allocated to initialized data (.data not .bss).
+ */
+struct nfs_diskless nfs_diskless = { 0 };
+int nfs_diskless_valid = 0;
+
+/* XXX CSM 11/25/97 Upgrade sysctl.h someday */
+#ifdef notyet
+SYSCTL_INT(_vfs_nfs, OID_AUTO, diskless_valid, CTLFLAG_RD, 
+       &nfs_diskless_valid, 0, "");
+
+SYSCTL_STRING(_vfs_nfs, OID_AUTO, diskless_rootpath, CTLFLAG_RD,
+       nfs_diskless.root_hostnam, 0, "");
+
+SYSCTL_OPAQUE(_vfs_nfs, OID_AUTO, diskless_rootaddr, CTLFLAG_RD,
+       &nfs_diskless.root_saddr, sizeof nfs_diskless.root_saddr,
+       "%Ssockaddr_in", "");
+
+SYSCTL_STRING(_vfs_nfs, OID_AUTO, diskless_swappath, CTLFLAG_RD,
+       nfs_diskless.swap_hostnam, 0, "");
+
+SYSCTL_OPAQUE(_vfs_nfs, OID_AUTO, diskless_swapaddr, CTLFLAG_RD,
+       &nfs_diskless.swap_saddr, sizeof nfs_diskless.swap_saddr, 
+       "%Ssockaddr_in","");
+#endif
+
 
 void nfsargs_ntoh __P((struct nfs_args *));
 static int
@@ -197,7 +222,7 @@ static int nfs_iosize(nmp)
        iosize = max(nmp->nm_rsize, nmp->nm_wsize);
        if (iosize < PAGE_SIZE)
                iosize = PAGE_SIZE;
-       return (trunc_page_32(iosize));
+       return (trunc_page(iosize));
 }
 
 static void nfs_convert_oargs(args,oargs)
@@ -388,7 +413,6 @@ nfs_mountroot()
        struct mount *mppriv;
        struct vnode *vppriv;
 #endif /* NO_MOUNT_PRIVATE */
-       int v3;
 
        procp = current_proc(); /* XXX */
 
@@ -403,20 +427,6 @@ nfs_mountroot()
                panic("nfs_boot_init failed with %d\n", error);
        }
 
-       /* try NFSv3 first, if that fails then try NFSv2 */
-       v3 = 1;
-
-tryagain:
-       error = nfs_boot_getfh(&nd, procp, v3);
-       if (error) {
-               if (v3) {
-                       printf("nfs_boot_getfh(v3) failed with %d, trying v2...\n", error);
-                       v3 = 0;
-                       goto tryagain;
-               }
-               panic("nfs_boot_getfh(v2) failed with %d\n", error);
-       }
-
        /*
         * Create the root mount point.
         */
@@ -425,12 +435,7 @@ tryagain:
 #else
        if (error = nfs_mount_diskless(&nd.nd_root, "/", NULL, &vp, &mp)) {
 #endif /* NO_MOUNT_PRIVATE */
-               if (v3) {
-                       printf("nfs_mount_diskless(v3) failed with %d, trying v2...\n", error);
-                       v3 = 0;
-                       goto tryagain;
-               }
-               panic("nfs_mount_diskless root failed with %d\n", error);
+               panic("nfs_mount_diskless failed with %d\n", error);
        }
        printf("root on %s\n", (char *)&nd.nd_root.ndm_host);
 
@@ -445,7 +450,7 @@ tryagain:
            error = nfs_mount_diskless_private(&nd.nd_private, "/private",
                                               NULL, &vppriv, &mppriv);
            if (error) {
-               panic("nfs_mount_diskless private failed with %d\n", error);
+               panic("nfs_mount_diskless failed with %d\n", error);
            }
            printf("private on %s\n", (char *)&nd.nd_private.ndm_host);
            
@@ -457,11 +462,6 @@ tryagain:
 
 #endif /* NO_MOUNT_PRIVATE */
 
-       if (nd.nd_root.ndm_path)
-               FREE_ZONE(nd.nd_root.ndm_path, MAXPATHLEN, M_NAMEI);
-       if (nd.nd_private.ndm_path)
-               FREE_ZONE(nd.nd_private.ndm_path, MAXPATHLEN, M_NAMEI);
-
        /* Get root attributes (for the time). */
        error = VOP_GETATTR(vp, &attr, procp->p_ucred, procp);
        if (error) panic("nfs_mountroot: getattr for root");
@@ -501,11 +501,9 @@ nfs_mount_diskless(ndmntp, mntname, mntflag, vpp, mpp)
        args.addrlen  = args.addr->sa_len;
        args.sotype   = SOCK_DGRAM;
        args.fh       = ndmntp->ndm_fh;
-       args.fhsize   = ndmntp->ndm_fhlen;
+       args.fhsize   = NFSX_V2FH; /* need to try v3, then v2 */
        args.hostname = ndmntp->ndm_host;
        args.flags    = NFSMNT_RESVPORT;
-       if (ndmntp->ndm_nfsv3)
-               args.flags |= NFSMNT_NFSV3;
 
        MGET(m, M_DONTWAIT, MT_SONAME);
        bcopy((caddr_t)args.addr, mtod(m, caddr_t), 
@@ -633,11 +631,9 @@ nfs_mount_diskless_private(ndmntp, mntname, mntflag, vpp, mpp)
        args.addrlen  = args.addr->sa_len;
        args.sotype   = SOCK_DGRAM;
        args.fh       = ndmntp->ndm_fh;
-       args.fhsize   = ndmntp->ndm_fhlen;
+       args.fhsize   = NFSX_V2FH;
        args.hostname = ndmntp->ndm_host;
        args.flags    = NFSMNT_RESVPORT;
-       if (ndmntp->ndm_nfsv3)
-               args.flags |= NFSMNT_NFSV3;
 
        MGET(m, M_DONTWAIT, MT_SONAME);
        bcopy((caddr_t)args.addr, mtod(m, caddr_t), 
index dcc4d31dcec021702be2f76e91e8d5382100cbdb..e8c78eee83e2f04ce212067c680c982471170cd5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2e1925fe682f48b9cd1cd5fed3b7af9e8bc79539..59f987e222e1b6433843fe7caecf9b0e93910019 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -112,10 +109,7 @@ struct nfsv3_diskless {
 struct nfs_dlmount {
        struct sockaddr_in ndm_saddr;           /* Address of file server */
        char            ndm_host[MNAMELEN];     /* Host name for mount pt */
-       char            *ndm_path;              /* path name for mount pt */
-       u_long          ndm_nfsv3;              /* NFSv3 or NFSv2? */
-       u_long          ndm_fhlen;              /* length of file handle */
-       u_char          ndm_fh[NFSX_V3FHMAX];   /* The file's file handle */
+       u_char          ndm_fh[NFSX_V2FH];              /* The file's file handle */
 };
 
 /*
index 5156591a9d7fe770428ef56fdd43c7b68aeb1302..e9c810e2b0e638632b026533713fa7b9d906a626 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index efa40d2f881501fa901a88eead4dd91370cecb4d..92d69f7a510327819a33a9919acee275d0cb0c99 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cd3a8d080f6eeb4ec7edbaf0fb7eb7fc7e42d828..820c68f79d1caa5c2b8ff70684f43f8aae1baa0b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8b077777df7a1d6bc28769093b7bd7f6a3e0cfb4..cd63a0996cddc8639388bb0f4365b1bacded0ba4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ea332a885d2ffdc5b0b208ee3c605c75fab47c42..1cebaf787baecd35653d1594048059cc78219ea7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cd645ae240252ddd039867753d0ecd825928e9ce..1e7f9776663faf4041882b591bff0b09f14223eb 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 243b7e0ee46c331c30fa572d35014599a437667d..bb432511a69dc50acfd5fe82bc72d24ccd9ae8aa 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a3698081ed2d37728fe06000154fbf9b6f5cbb1f..d8a2618fe7aecc907413f1a31f452947a617e423 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #define        RPC_PROGMISMATCH        2
 #define        RPC_PROCUNAVAIL 3
 #define        RPC_GARBAGE     4               /* I like this one */
-#define        RPC_SYSTEM_ERR  5
 #define        RPC_MISMATCH    0
 #define        RPC_AUTHERR     1
 
index 68a9e9659b6ca35900d9425c39d52095e6e90230..e786cb8c76660af1d4ab57c5e704a13c8c913ad3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a3f7405c53458b192eb80cf55cf14f0a2e60ee49..5aa43232f7a91f88e9840c180f47bf32d68e98e4 100644 (file)
@@ -4,22 +4,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e79f38d9e69bb65ddc7114b8e3779022c7a43ba0..02a84a6042bef073b0cd8cfda4a00b2ac1a2bf04 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5071eba4cf498227e33f52db7588268260b3389b..984cdb58887e6064748bcc8f9a2a0ea01f630627 100644 (file)
@@ -4,22 +4,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 021019a0d7d3163380a8daa8d292d7d2f7401013..339bac2c73280ae5b1db4a6be071b6926039a3c7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 10a60d0e92310b758e1b0385aee81369ede03dc7..d4a45ac7701d760d7f1b79d137f10191b459f899 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ac6477555efbbd6dc08713ffba48c14672d64cc8..96e29404a7e98338dddb70b5e1904c9ea443aaf5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b8bba099e8ac1375a19f89c248f9d111cb4a8fce..a7263bd42bbbb33c23ff04ab4e6c1880bdd8d542 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 647db5225f40b2f507afdd764cddf5a67120475d..7e081d88235e32cbac5596384f5c344183a9643b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0641cc9b09e99eb36f0babefa630a91f4e4a86a0..769354c3f6d77e285287506ba5793f10f477d6e9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 90a5fc2f0404e33fe5378baa9cd172a9984f2c75..0a47e6a49acb5508a9b8966704f0b6eeaa8bd8b8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5f1a7381f251504ca2f436aa4602ca4e9f53b49d..58f1be653235fa5bfd423217c42ebf8e94f225b1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 417a2d6ae1c9cb3e3d0c5556b31f77645238a79f..f7b318d9289d6c2518b143687209dbb79cca3b82 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4605ff84442185b022f9c7490772404dcdd87ccc..ef4138630a5530b85e8e7b6633ab62905733b7aa 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8731f1e743401adcbb3c034a38354da96a3bbff5..01d0c0b21110da69e291a1684eabb95876ce3306 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 34fdb9460f8efa621b9fb5546df8eac7bc2a2518..ff4d1dc341f2779260c4f193538cc2d260dbac43 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b3c08099b89049252027c1035135e0e97f24ce42..f370e9bf1b0caa88f3ebee370c8de64c397a2513 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index fb311c5b67091e0308f2dffcf227e6510218e390..c2d9d31fb4f2c4c36fb60a1088f16b34d4074011 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -40,14 +37,4 @@ struct mcontext {
 
 typedef struct mcontext  * mcontext_t;
 
-struct mcontext64 {
-       ppc_exception_state_t   es;
-       ppc_thread_state64_t    ss;
-       ppc_float_state_t       fs;
-       ppc_vector_state_t      vs;
-};
-#define PPC_MCONTEXT64_SIZE    (PPC_THREAD_STATE64_COUNT + PPC_FLOAT_STATE_COUNT + PPC_EXCEPTION_STATE_COUNT + PPC_VECTOR_STATE_COUNT) * sizeof(int)
-
-typedef struct mcontext64  * mcontext64_t;
-
 #endif /* _PPC_UCONTEXT_H_ */
index 5d27318eb3d277ccb71caf7f11a439857406cdf1..5914cf757c9baee918c22812859408911154f87b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 790696cfe9156da2d324b531f5ee83d287f4c13a..90db43abafb40d6c3a60016cf0de8cd534ed0361 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4d1e97a9adfbf166fb7155b1391695b12bdac2b8..01aa44369b1fb8e30fbee715c00dd1f5267dd427 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3a40f59ca4bbc2f86dfca3c7228ebd6fa4e6ad04..2ecde9dee8dbd5e5b9fe35b438c9ca997c87ece5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a4b0b3dae0bd9049fbbab3fbb337d23d21e04de5..732410ea685af70e79ce71c6adf4aabab5d9feda 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9fb7de80a5880ca6f8b42fb80a9ef8878937470b..d051d11f0b1c26bd873a7b0d999eee4ab0f347a6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 30976532876a76a207e841e26b4c8f1bd65dad5b..61c4dee0ba62d89ad50c68d5e8d3ed870a7a37df 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index af22212563c356c67ae6c5f73379ec78185783da..7f5bb8b9948bc201786363af52b3f74c3063d6f0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a29bef8fdcd734156b5fd7fd0138e304812c5277..64cb2eaead31218cb3bd08b49475af18dc67304c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0f23059362df43a6ade6da2e4253e254ca7f9625..d3b213bf044afae0a7e062541c41c522ee631719 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f484ab10006a4c1505c4b1a36a6ba82599c14c8f..112b8526c5b61c17a27beb6bdc78172192fde2bf 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 61877ae36d863495d5394d4478669e57abb1fda5..8dc0359ccfe26765ce77239edaaaba6a9ff0b52b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8edb0f368c1cd8bae8f6cabad5ab4cc8f220de83..65a4bffdd6837f9ecb10ded48027c78a782ee750 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 27ffecdefcc3b8c0f2a5d850a0d406d31352a374..4fa09f2269cbc3339080737a071955f72c5bd8ca 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 890cb5893a43f9a7fd9a5d462e989992dd599668..4df1f84f7d5457237ed8e64c18a40d2e0a79c422 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 992dc2744c9ca4f79d267a22ffcd2448f6daeceb..b0b256936d0a237223f43d2e597611efa8705774 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 249d7b3037754366b0163cca8d1312cc0e3e242d..3234c4d5dedcbd6b5106609db9b9c98f138696f9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a622b61d58a77ad91ccfbb7f599367da3ad8ff0d..e6a75966c100e4c01b6a3a25dd9f65dbeda08c33 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4318fc90a2b921f18fd9b32a6d71d2e2e05cffb5..c82770b591ff74b099aa1c06560e7a932961b1cc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 30ee688f40e5933a50209f7f37a32ae98268e94a..16757b77fef6eb76a0a8f6caddde85c087b6aa56 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a0dd04095ab56e6b29e597d9065e625c6298021f..5d4fb571edd5a7ab0560e1bc773a233319dd46a8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ba9033ac17132ba12446f2074c306c950431521e..6e274f663ab3f26c4e5cd99ef7163eddde4efca3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8a29f42f6140eb7caaaef1f50ee1404b7f4dac07..711ba77c5ae4d563da0cd4ba9a958c10311482d4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 63a2543660353caef2e7715818b0c979426b67f4..2353a06e2701dcef9ac8e277779e1202dc8119dc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 16fb12a5c654e0fd13f9ac936ad8644edc1fc8e1..10465cc8e73231a2b38ed4fe094919f3f5a8447b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2e09af2edf49b1b8f21ba0611a2202436ff22dc9..63198c7ec57ba9f657bfa52c5b73cc80e9ca0384 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d4671a6ec3a588064a5bb071e02e87ec6b06b534..b368a1fd2ce1123d3a0bf145d2a73877b2e0df93 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 03968274ab847642b7aa462c913f7a98174956d4..00e87d9aa3a6159d3a3014e2a648a70cdab1c22d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7d398a29163276915b95efb4d3d3a88fb10ec6a6..a9dfad6b3705430afd71136dfcfda08c0e93631f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ae5422533ba370a31bc18dcbda35b07f95f56d88..9ff3a2bc1c2b7295f0552a7334e2d8d9e91d8fd5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 78632ace0129a5352fc3071bcad0e60ebb3748b2..5c642955ec77217a721cefb3842b31aea031250b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1cc5d2979c68b362483f0baa2a0e859b2fe84441..305ac531df2852df488f6999c560f3e45be20dc0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -91,7 +88,6 @@ __BEGIN_DECLS
 #define        DBG_MACH_EXCP_DECI      0x09    /* Decrementer Interrupt */
 #define        DBG_MACH_EXCP_SC        0x0C    /* System Calls */
 #define        DBG_MACH_EXCP_TRACE     0x0D    /* Trace exception */
-#define        DBG_MACH_EXCP_EMUL      0x0E    /* Instruction emulated */
 #define        DBG_MACH_IHDLR          0x10    /* Interrupt Handlers */
 #define        DBG_MACH_IPC            0x20    /* Inter Process Comm */
 #define        DBG_MACH_VM             0x30    /* Virtual Memory */
index ea9091fec7a428f5eecbd12982e88583367fc31d..04b37c06ae5593c93ed1bb0b489ce484d20737f0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 84a496f1db9aeb5eac570bd3ceb1139cb4f07c48..5a232c02a3e09762573cf62119dc81b558d94169 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2c37bce7deadcd2a5425af10c0c9b61749d3fc96..420f56e2dae62b7d13a42ae9ace746ecd22e9095 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c280945a4c5f37183171467c53a110bbf723bcdb..ce39adb2d3832855dc07ad7bd07bbd77ea83bd19 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 807a982e79ebf048b8a1c944be319b018fc9ff5d..25776d91a4207f10e377ecc882d90e6bd3b3f79e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index eef7692bdbc86ab4bb1ab1f57d63bdb100aab2c9..1d198c74dd2a7d4059d19f51333155ed3eb62487 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c08bdc006f4363af53334a76bc5cb9a58bc9a123..de18dd2d19f9df3c6d852c0eff810544f986487d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 226b91abaaa76bb37a965168d7e6f0f5db332ccf..0c3339c7805b3592b6948f92c74d3d149176cd33 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 18fccd5f1fdaf9066ef77221504ca688fb08075e..fcba2d61bb627b49029f7244ab93aeeb595b9ce3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 781ce11a0159fb8edc9b6dccaf651d923f142fbc..b4fb2b2ee6aa908600da0a62c3ea001070f378ab 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8de8184893bc02bc74d9daa1e33a6484d70b2264..360b80d91e1848666f6fc85b9b2d2674a2d03798 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 255f6bab3cc5849a936a9108bee04c4cb08facfc..57faf029930c1347947696c60d2fe8c7b2a8955e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index dbb687214b50b74cc01c6ba25de7aa88b690ad4e..2b8e1e05c0001936675b2491ba61b570fa0ee578 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7621a0966bba299c7e270647ef764c758cd6295d..76e3f1c270923fb755903832692649de49f5bf27 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2465b7ecbb334c6ef35d194fbc0f687ec4be2ebd..15e2dcb860059531fb99455d2d634e6d17fad175 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 36636f58ef1919d72e1127cbc9bdcd7a70722898..ab2f39e6510790b2fde65f0d1a9713591d1e7077 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 40faa46e9f9182cc79e3c7921067a348b78220da..552dc822bbd4a4f727daf3c540fbfd065350c1bc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2734fd7d2546af6e41ddeab14c86fbdaa8aa4717..177eeb37a9e8d0ec332b94a951a0ed843f23e383 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index af0d5d0433256808e9b3605ed978abe0f9624750..f8ee80b4611dd77445d3e76532b3c8a017ca675c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 83b56cc8dc546940247212111cb770e63c424a8d..6078c7d7c32a975083d8f18cb324fd3ca7661646 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 281cac737eb2a8cf22ce922e8e1dc45e636bb2bd..443469915f44d26faeec3a9cf0a2d0654cd081f7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 28a52f1e8afff8ab1460de5f78c154f48c7860e1..de6dcb887a03d95f2efff07bfcc6b0daebf4bb1a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5d9c54bedb4e3145fcab1e2e8d31eb98f532e7dd..80c1a31207ce375ef6b670f6f5042d2b420c0156 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 134b2e48cfeb33f65a5662e09af06858bc6b591b..3ae7cdadbe929be11a88674e19a03b2b8ca94600 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d326aed3dddf4675e8d9f48ff1b614d1ae86c3e1..bd4b21341d9353a9f1206ce9945243a9ac514a7d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 765ba3ac3db61b272091ba1053418f28c0b1424f..2e9aa080419a8cf242c978c5a14a9e7513a29cac 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6b1dbe8c97beb9cb2d6b21157c9b226ecd16f497..c8976a5521e9fac81dd94f70f83b9663e2ef65bb 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index de402586ec2b8eae7c8a2b7d756c442dfb49d60c..a312ed6359ef6624fa29a5cd3c2adbe05672c263 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index df6c749271a5babd7b7945cbfdb587738ba65da2..e2f12be0f8dc6c060372a4b42e0150a637b0a405 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 33f1e2210cd68eab910df6007e28b200ccacaf37..77b30d6fd86bcbcee285e5ecac9ad152d82ee8c5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 775c58d1caa0545557b3a8d3c8cdb81903ad8937..8c67dc5c5ca00fd01d7209b44f8e642487a5a963 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9aa6bd8efcf02f439a053e056ebb1546673ded4a..ebcb139556bb248282150515fd52e9005ae2ad90 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 75ca1c01d80cba7b61834f6962b5b733d03aaa41..16e0dfc5c5a560263c8fff50370fee7cf1d55399 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f6f43f5f8e8618dec5fba29e3c15ae9d9aa916a1..af9c1f1cc42457cae945e85350b65521cc80e2dc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c2af5f2d7f5056c0aea573a3d7656c1795d8d4bf..36d5872eb4afbeeaac8a62e2d48f09f7ee8ce00f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #endif
 
 #ifndef _ANSI_SOURCE
-#include <sys/types.h>
-
 typedef unsigned int sigset_t;
 
 union sigval {
@@ -160,7 +155,7 @@ typedef struct __siginfo {
        void    *si_addr;               /* faulting instruction */
        union sigval si_value;          /* signal value */
        long    si_band;                /* band event for SIGPOLL */
-       unsigned int    pad[7];         /* Reserved for Future Use */
+       int     pad[7];                 /* RFU */
 } siginfo_t;
 
 /* 
@@ -246,8 +241,6 @@ struct      sigaction {
 #define        SA_NOCLDWAIT    0x0020  /* don't keep zombies around */
 #define        SA_SIGINFO      0x0040  /* signal handler with SA_SIGINFO args */
 #define        SA_USERTRAMP    0x0100  /* do not bounce off kernel's sigtramp */
-/* This will provide 64bit register set in a 32bit user address space */
-#define        SA_64REGSET     0x0200  /* signal handler with SA_SIGINFO args with 64bit regs information */
 #endif
 #define SA_NOCLDSTOP   0x0008  /* do not generate SIGCHLD on child stop */
 
index beb83e25568b82894485d4df29a23270d246b5a5..68199f53e6a0f35b521d9a4289c485a8d79ead77 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -89,7 +86,6 @@ struct        sigacts {
        int     ps_code;                /* for core dump/debugger XXX */
        int     ps_addr;                /* for core dump/debugger XXX */
        sigset_t ps_usertramp;          /* SunOS compat; libc sigtramp XXX */
-       sigset_t ps_64regset;           /* signals that want SA_EXSIGINFO args */
 };
 
 /* signal flags */
index 2a0db28347b0ab0c36ae246e1731015a6fed6394..3790d7305336b5eed9d66b9f153f68b073176439 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e60037bba632df760b8fc3e68a95e4397b02746e..bf767c24936e61f6c093b8388645cdc38b1e93ae 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 723e3e75b13c0312fa43501457ead6ecb52ebc5f..5be3a2c0318294613df45401454b28935a31d705 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b92ffb7175e137c6b5d191bf2f8fb80bd8aae56e..22c79a223b93265ab10555d906ac05dfbdaabd86 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 81296de75cd296cbf26318e361c0c5058fe30f0a..830ea6a7447c439ba3299f568cf1dc2d960378d9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 521e961ffbf699fa8e42e4d926b93e29914b752e..b9582eca387494530081c564ae57fdb8d00224d1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f8aa3cce0f2e2dd71c31cd36f54a23a6d7543f04..ade503bb6408f1bd9e5f529edd6417deb24f875f 100644 (file)
@@ -1,24 +1,21 @@
 /*
- * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #define        SYS_getpriority 100
                                /* 101 is old send */
                                /* 102 is old recv */
-#ifndef __ppc__
 #define        SYS_sigreturn   103
-#endif
 #define        SYS_bind        104
 #define        SYS_setsockopt  105
 #define        SYS_listen      106
 #define        SYS_setgid      181
 #define        SYS_setegid     182
 #define        SYS_seteuid     183
-#ifdef __ppc__
-#define        SYS_sigreturn   184
-#endif
+                               /* 184 is unused */
                                /* 185 is unused */
                                /* 186 is unused */
                                /* 187 is unused */
index 8af90d6ed9a7e835f3954fa1fa334a45714e501b..300072522c90c36b9c6f1285765d56f6cf271546 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -114,9 +111,6 @@ struct ctlname {
 #define CTLFLAG_NOLOCK 0x20000000      /* XXX Don't Lock */
 #define CTLFLAG_ANYBODY        0x10000000      /* All users can set this var */
 #define CTLFLAG_SECURE 0x08000000      /* Permit set only if securelevel<=0 */
-#define CTLFLAG_MASKED 0x04000000      /* deprecated variable, do not display */
-#define CTLFLAG_NOAUTO 0x02000000      /* do not auto-register */
-#define CTLFLAG_KERN   0x01000000      /* valid inside the kernel */
 
 /*
  * USE THIS instead of a hardwired number from the categories below
@@ -172,9 +166,7 @@ struct sysctl_oid {
 
 int sysctl_handle_int SYSCTL_HANDLER_ARGS;
 int sysctl_handle_long SYSCTL_HANDLER_ARGS;
-int sysctl_handle_quad SYSCTL_HANDLER_ARGS;
-int sysctl_handle_int2quad SYSCTL_HANDLER_ARGS;
-/*int sysctl_handle_intptr SYSCTL_HANDLER_ARGS; XXX not implemented */
+int sysctl_handle_intptr SYSCTL_HANDLER_ARGS;
 int sysctl_handle_string SYSCTL_HANDLER_ARGS;
 int sysctl_handle_opaque SYSCTL_HANDLER_ARGS;
 
@@ -217,16 +209,6 @@ void sysctl_unregister_oid(struct sysctl_oid *oidp);
        SYSCTL_OID(parent, nbr, name, CTLTYPE_INT|access, \
                ptr, 0, sysctl_handle_long, "L", descr)
 
-/* Oid for a quad.  The pointer must be non NULL. */
-#define SYSCTL_QUAD(parent, nbr, name, access, ptr, descr) \
-       SYSCTL_OID(parent, nbr, name, CTLTYPE_QUAD|access, \
-               ptr, 0, sysctl_handle_quad, "Q", descr)
-
-/* Oid for a int returned as quad.  The pointer must be non NULL. */
-#define SYSCTL_INT2QUAD(parent, nbr, name, access, ptr, descr) \
-       SYSCTL_OID(parent, nbr, name, CTLTYPE_QUAD|access, \
-               ptr, 0, sysctl_handle_int2quad, "Q", descr)
-
 /* Oid for an opaque object.  Specified by a pointer and a length. */
 #define SYSCTL_OPAQUE(parent, nbr, name, access, ptr, len, fmt, descr) \
        SYSCTL_OID(parent, nbr, name, CTLTYPE_OPAQUE|access, \
@@ -513,10 +495,7 @@ struct kinfo_proc {
 #define HW_L2CACHESIZE 20              /* int: L2 Cache Size in Bytes */
 #define HW_L3SETTINGS  21              /* int: L3 Cache Settings */
 #define HW_L3CACHESIZE 22              /* int: L3 Cache Size in Bytes */
-#define HW_TB_FREQ     23              /* int: Bus Frequency */
-#define HW_MEMSIZE     24              /* uint64_t: physical ram size */
-#define HW_AVAILCPU    25              /* int: number of available CPUs */
-#define        HW_MAXID        26              /* number of valid hw ids */
+#define        HW_MAXID        23              /* number of valid hw ids */
 
 #define CTL_HW_NAMES { \
        { 0, 0 }, \
@@ -541,73 +520,9 @@ struct kinfo_proc {
        { "l2settings", CTLTYPE_INT }, \
        { "l2cachesize", CTLTYPE_INT }, \
        { "l3settings", CTLTYPE_INT }, \
-       { "l3cachesize", CTLTYPE_INT }, \
-       { "tbfrequency", CTLTYPE_INT }, \
-       { "memsize", CTLTYPE_QUAD }, \
-       { "availcpu", CTLTYPE_INT } \
+       { "l3cachesize", CTLTYPE_INT } \
 }
 
-/*
- * These are the support HW selectors for sysctlbyname.  Parameters that are byte count or frequencies are 64 bit numbers.
- * All other parameters are 32 bit numbers.
- *
- *   hw.memsize                - The number of bytes of physical memory in the system.
- *
- *   hw.ncpu                   - The number maximum number of processor that could be available this boot.
- *                               Use this value for sizing of static per processor arrays; i.e. processor load statistics.
- *
- *   hw.activecpu              - The number of cpus currently available for executing threads.
- *                               Use this number to determine the number threads to create in SMP aware applications.
- *                               This number can change when power management modes are changed.
- *   
- *   hw.tbfrequency            - This gives the time base frequency used by the OS and is the basis of all timing services.
- *                               In general is is better to use mach's or higher level timing services, but this value
- *                               is needed to convert the PPC Time Base registers to real time.
- *
- *   hw.cpufrequency           - These values provide the current, min and max cpu frequency.  The min and max are for
- *   hw.cpufrequency_max       - all power management modes.  The current frequency is the max frequency in the current mode.
- *   hw.cpufrequency_min       - All frequencies are in Hz.
- *
- *   hw.busfrequency           - These values provide the current, min and max bus frequency.  The min and max are for
- *   hw.busfrequency_max       - all power management modes.  The current frequency is the max frequency in the current mode.
- *   hw.busfrequency_min       - All frequencies are in Hz.
- *
- *   hw.cputype                - These values provide the mach-o cpu type and subtype.  A complete list is in <mach/machine.h>
- *   hw.cpusubtype             - These values should be used to determine what processor family the running cpu is from so that
- *                               the best binary can be chosen, or the best dynamic code generated.  They should not be used
- *                               to determine if a given processor feature is available.
- *
- *   hw.byteorder              - Gives the byte order of the processor.  4321 for big endian, 1234 for little.
- *
- *   hw.pagesize               - Gives the size in bytes of the pages used by the processor and VM system.
- *
- *   hw.cachelinesize          - Gives the size in bytes of the processor's cache lines.
- *                               This value should be use to control the strides of loops that use cache control instructions
- *                               like dcbz, dcbt or dcbst.
- *
- *   hw.l1dcachesize           - These values provide the size in bytes of the L1, L2 and L3 caches.  If a cache is not present
- *   hw.l1icachesize           - then the selector will return and error.
- *   hw.l2cachesize            -
- *   hw.l3cachesize            -
- *
- *
- * These are the selectors for optional processor features.  Selectors that return errors are not support on the system.
- * Supported features will return 1 if they are recommended or 0 if they are supported but are not expected to help performance.
- * Future versions of these selectors may return larger values as necessary so it is best to test for non zero.
- *
- *   hw.optional.floatingpoint - Floating Point Instructions
- *   hw.optional.altivec       - AltiVec Instructions
- *   hw.optional.graphicsops   - Graphics Operations
- *   hw.optional.64bitops      - 64-bit Instructions
- *   hw.optional.fsqrt         - HW Floating Point Square Root Instruction
- *   hw.optional.stfiwx        - Store Floating Point as Integer Word Indexed Instructions
- *   hw.optional.dcba          - Data Cache Block Allocate Instruction
- *   hw.optional.datastreams   - Data Streams Instructions
- *   hw.optional.dcbtstreams   - Data Cache Block Touch Steams Instruction Form
- *
- */
-
-
 /*
  * CTL_USER definitions
  */
@@ -715,21 +630,12 @@ struct linker_set;
 
 void   sysctl_register_set(struct linker_set *lsp);
 void   sysctl_unregister_set(struct linker_set *lsp);
-void   sysctl_mib_init(void);
 int    kernel_sysctl(struct proc *p, int *name, u_int namelen, void *old,
-                     size_t *oldlenp, void *newp, size_t newlen);
+                     size_t *oldlenp, void *new, size_t newlen,
+                     size_t *retval);
 int    userland_sysctl(struct proc *p, int *name, u_int namelen, void *old,
-                       size_t *oldlenp, int inkernel, void *newp, size_t newlen,
+                       size_t *oldlenp, int inkernel, void *new, size_t newlen,
                        size_t *retval);
-
-/*
- * Sysctl handling within the kernel.
- *
- * May be called with either or no funnel held; will take and
- * switch funnels as required.
- */
-int    sysctlbyname __P((const char *, void *, size_t *, void *, size_t));
-
 /*
  * Internal sysctl function calling convention:
  *
index 54f538e54fcb262d64afadd733e2d3eb96b70ccb..a43c854a1a5c1cf133aa1100ccf646b49e75c8e2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1f8032e3a899ea653e53e426a4edd0d8985e9244..eae10fa0e95c98f7a2c07dd236e2027f3d1f65f1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ea1c0642c4183c68f6d73fc4958a49f6fb9c0ad5..3110e26792c129aadc905b6831cb9be83ae86fa0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7095a65197d584133b8beabaa9368762560597c6..a59713b4e8fafeee33482f653afcda54b9eeaff7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1d9e959c16a1feee4b5a060d42d72c9818c13d6f..71afa660628e46ba7156d5ea964d85c95e5f0072 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cc790bf2386813a4ec5ba79a760111fbaa1f45e2..65b5c52dbb52001c7d9a2c67d52c9857caf83424 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6ccac07696b65c9849671d3669d7e6df02d91d4a..9277d37d75dfe8b4eba98a2778a4f9bdf1cced99 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 744582da37f7bd99302fe3a0e50a9911f84c1c14..01d0a3734356fce77cfb188df170ee50aab16744 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index df5509fecd0534a0a80e8ce9100d0ca76fa9c6a7..8eaa9374825b37b8fe8ffae7c50433196b657420 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6ae28ba2c155bf608cbbf45122614c2e7e717264..c77ef1ca876c1022fda727b0fc6aea5ed9ff32b0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 379e0a1bb728d1fda25405afb5475fbd56766ad4..c24e3083ba0fe6416b001561571c0a4e59b40a87 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 55aeabafc0956b89f73d348e32b3661f2751ae02..15a12df1a79ff23de542c04ce20d879f455f3307 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c9c6172c599dac1ac848eccab237bb27338771cc..5baac4b809403adb3e70b05c677631dff2e7c93a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 05ceaecb5af1db6e07419b7b10681d34e6778380..b11fbb6d379cac0c0a175f2bccd3fbaeadee5fd2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 220fa2eff406d3430205cb5c4cabce52b42fb8f5..82a1ef4b9f65f21bd5105e26dc2239e9f6cc01e8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 44328bf2ba2469a62c269ef5106e1663d217f5d1..8ff840d654abb5f50492a7a47d54a0b5bfb7c373 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 24058f37afd8bb27f7c2b8905b1b9f4bdd65fb0f..e6a2a189d0bb99cd0789589446aaf88364600207 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -112,7 +109,7 @@ int ubc_release_named __P((struct vnode *));
 int    ubc_invalidate __P((struct vnode *, off_t, size_t));
 int    ubc_isinuse __P((struct vnode *, int));
 
-int    ubc_page_op __P((struct vnode *, off_t, int, ppnum_t *, int *));
+int    ubc_page_op __P((struct vnode *, off_t, int, vm_offset_t *, int *));
 
 /* cluster IO routines */
 int    cluster_read __P((struct vnode *, struct uio *, off_t, int, int));
@@ -164,7 +161,6 @@ __END_DECLS
 /* Flags for ubc_getobject() */
 #define UBC_FLAGS_NONE         0x0000
 #define UBC_HOLDOBJECT         0x0001
-#define UBC_FOR_PAGEOUT         0x0002
 
 #endif /* __APPLE_API_EVOLVING */
 
index 993d224876de7a9b5677333d920550aee9c7b808..e66df1e4c41b974dd520bf070f5ab0da4fda6782 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -37,18 +34,6 @@ struct ucontext {
        mcontext_t      uc_mcontext;    /* machine specific context */
 };
 
-
 typedef struct ucontext ucontext_t;
 
-struct ucontext64 {
-       int             uc_onstack;
-       sigset_t        uc_sigmask;     /* signal mask used by this context */
-       stack_t         uc_stack;       /* stack used by this context */
-       struct ucontext *uc_link;       /* pointer to resuming context */
-       size_t          uc_mcsize;      /* size of the machine context passed in */
-       mcontext64_t    uc_mcontext64;  /* machine specific context */
-};
-
-typedef struct ucontext64 ucontext64_t;
-
 #endif /* _SYS_UCONTEXT_H_ */
index 23e739a7fde2f4c65dddef19a4fecde271b7455e..0c503211677fec68a756323e142251ea1cb670f3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f6e3b0bc1de0af08afd0a3f43fb58f891837c0a5..c9bd96de6b35df7108d8233760e491eb84ede946 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -98,7 +95,6 @@ struct uio {
 #define UIO_SMALLIOV   8               /* 8 on stack, else malloc */
 
 extern int uiomove __P((caddr_t cp, int n, struct uio *uio));
-extern int uiomove64 __P((unsigned long long cp, int n, struct uio *uio));
 extern int ureadc __P((int c, struct uio *uio));
 extern int uwritec __P((struct uio *uio));
 
index 8a7ec3130e4a65b1d09e1c0a8e1894d93ac0470a..e3e4cdb5c1639ea80a680de4423f4b92919bfbb1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 00199aa57d8516fc27d95feb8194089f6df9bbaa..252212434371fe3bc1138740d72a89dd6dea28f4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 91a92b79a714493c29b4091abfa2c66bd82424f8..408cc93d1d467feb75b9db71520908171947a762 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0990800401ae48754a33d283524013fdd487c300..a9c3a236cd635f30d1d52591f1c28f997a26d3b6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9c0a4af89d5d0a497fc6b3032f23384b2cb61888..0af9b52f4cf6d9b04b10b756055e5337dab228ea 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index dd5e94c4a24aa49fa2bef3055d114d98d8dd837d..35779be0d966bc41d8ee96d456aa08170db575e0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 106553691ecf602bcd23a95681f523b538c911b7..2b55b6cb5fda48fd689c02a957dfdc299999a3fc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 69b1a261b11dae6aa6c38804c0b6dcea88bdf456..09ee127ca2ff16572b09f74c6643d4380379b8ec 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 36e6c062f22f54b70797116d0fccdbb2047e4ab8..9e5b596cdb65d186c56b5c5af8d134baf2bc1af5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ab489356ac01daa239a0ad3544bd2e0aa28197f6..308e5f5f4e5ecb0c9787638aca395c30581d6563 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e140df777d5982179a26fd99e371eb912b03f0cb..5c0f0b617f91d5f84d139d4ceb2bb69ab70177a5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 72eab024a1caaa63420f2f44cc6f7df7581e8187..1718e1369e70c711b3343b4b62adfecbf1867019 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 021dbfbbed293d7701e992aa45b454b4bb77f74b..0564670bcf6e1099e7dc12228f02da84f5537084 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e0ac04c78e2e22baa23c9660295fe31a32405781..d3ada1c8d9ac960f7c890c9c9f95d781e60b3835 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0ddf130b7b9d37b39e85141a29770ddcd9da5882..5023c875c177cbbcf7c8f359183ef686e049c924 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4231e640ac8c734925c9e98c01ee47788f1d2a5f..5c7ae1a39eb2726ad359da4c9491caa73263b6d8 100644 (file)
@@ -4,22 +4,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cff3f73cb36a0045626afe1de480708d6230c888..83b87ed23dd848f13422ea8a2fa77553e09537d7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ae0aee701ee9a1c557b69e8650cf2e22069b77d7..76bf41a3b9e619b61cf71f5be2295215fc79e2c2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7671afb01fa66de3eb466d0256ecd91773fc65fb..f14ac29f97feb478df9938d8bcae1d5f0861a0e9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index bfd05cd9e1f8b502685d4f103d35b6bd78dde4e9..38cf2b72ac88f2c6ec71decaae85ea6c5963e557 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8ac5276f5066835a1e80bba76869b4d91fb42f4b..635f8cb3210a5ccb0bd11f4cd29be3aa962378c5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0ffc112e234b1618a333d238510df76c1b56f686..d4f2c7bde2b771bbd974db89d604e6d4cbc015cd 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9c466e0b600f433aa47dea18edab068516a989c3..c023a273d2665d38e9be100263f35ec264cc4435 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b69512673f0844a29a557464234af43c46787658..b0bec64c94b9316c97de3d1571fc1b93cf3838f6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6e58add473a5ff8cd33639a48db7b15ec0cf9c3b..e91a041f756e30767217f5d0448b1b57c04a8d74 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b095c6dd2dc4ca06fe27b4ae7aa4d9143ff85fa6..9e94eb2bd8c0af7b2dd0c66f94244fdc4b3b558f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cffa4fad4bf8d1fc2d3125173c3bdec0d38574eb..6af9664504d303c410da013ed46be1be3b346a43 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 88fbd483bda88ba4eb324d80e6a141cc19dcb73b..5d402c2b5609eb4d710bbbd73dbe600a91a94ece 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 71ae15bad8e8a34219155d605e7cda1f6cf2cc46..73c989e87af8afced364aeff0e507063f91ee0e8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 81e4dad8a6f6374e8c8adc67d3a94457388e2ccb..e1e11248ae8503c9d8f62c3511f58bc7cc51a556 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2f18cb18d05216c0b543ad3015ff37320a87eaa0..de9788fa46e8b4e2211560998d38d783d92924a5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a95554a9f4ba6d278a943e665a217c39f8adb95b..d1e5e9f913fddf684e6c13a5cb013758f0823815 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index edce2e444cf8fcd22e33a91c958a75a1606b5997..09ff1dfc9402398fddbb1a520c154c1782562653 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e61d32d01867bacd090564992bd833182fef22ef..9a86ec824b34fdc81111959b1e70bfa53054f5cf 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b35cf294fc02f85de818951f7a6dedc657624fea..f81ae2b19a6f33413b740a3ff22c96bd28915b2a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 692e66c6cdcab81817f3b04b82c08d57929708fc..92121a1f5c5265625bacc4d62f493097ec1c1877 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7012452e57bc519ddb42c0cb7214a38ce952917d..13de74d26d5e95abcbc7d3dca6d8f120fe19ca0d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e4bace9f0b03a50d28acce712f3eeb15cc4c716f..86cf8a596a8ad88c8cf2eea4ff6a3c769ec8d99b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d39a6e61056a5e45ff580f6dcdec2d611a3e17db..0dc96b14116f6c2a4d11d0e21abeea1c557928a7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e3cf36ef18a93e296ec6eae2c5e528f4de666c3f..12dd0badc8dd72da6f2ec689b010d6f7c4184f00 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 33b9c783fea2b3a4e375415987ccbd60a4a6f039..7e7488fd5ab5e9e87d98c20369ba2b2e87318562 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4bb6c9b8f0bd5300cb9c0934eebb0176221870e6..a3da69ee58a641b65d726fe500a759940a997a66 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d53a319e56667b0ca6b0506a1f331d12c5dff5fc..90e6d8f93fb1763d5c1adc945710afce58ddf53d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 887ca3b8a343c6b9bb729eb943b408412bb959b0..4f4a7193369d65290bf461793c6ef62d652038de 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 302cb32de91dbaf3cfabed4d9f352e21623728a7..1b7fc0cd037a8a774bef53dbe0e7a7df34bbe99e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5048b1725a4f5f1341dbe596e4f6037eabfc5836..e17245068c725e2b1c4d44c05ae1d09f11c38f96 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f1b21eda6625216ebcbbfff925388fdf4b99da59..0953dc8cee0696925cc0b28bd13b353272904284 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -668,11 +665,11 @@ ffs_pageout(ap)
        }
         
 
-       error = cluster_pageout(vp, pl, pl_offset, f_offset, round_page_32(xfer_size), ip->i_size, devBlockSize, flags);
+       error = cluster_pageout(vp, pl, pl_offset, f_offset, round_page(xfer_size), ip->i_size, devBlockSize, flags);
 
        if(save_error) {
                lupl_offset = size - save_size;
-               resid = round_page_32(save_size);
+               resid = round_page(save_size);
                if (!nocommit)
                        ubc_upl_abort_range(pl, lupl_offset, resid,
                                UPL_ABORT_FREE_ON_EMPTY);
index b4b60ec2feaea4653c4cf450f18a586ddcbed233..daebf5e5a8cb6e2138572e187bb5eb3b472bdab5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 903e31fe587c1ee598e59449607438676a851aa1..1d1e6ec0e1ddb5e815a4031a0b73db2a12ce5f67 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index dc14f0631619edbbb7a04822df9d158779f2df6d..a547463100072d87d39248c99eecb9790ffbbf30 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6dcad81dc6edb9c89c59ccf04ba48e3dd8782d86..2b6a4750d12b3bffa6121d18164197ad7e136ddc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8dd451fae93f25060ed7a45380fe170788045c44..57c206760d1eb5aa2c5cac31e2cea63915a52fdd 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -2033,7 +2030,7 @@ free_io_buf(bp)
 
 typedef long long blsize_t;
 
-blsize_t MAXNBUF; /* initialize to (sane_size / PAGE_SIZE) */
+blsize_t MAXNBUF; /* initialize to (mem_size / PAGE_SIZE) */
 /* Global tunable limits */
 blsize_t nbufh;                        /* number of buffer headers */
 blsize_t nbuflow;              /* minimum number of buffer headers required */
@@ -2129,11 +2126,11 @@ bufq_balance_thread_init()
        if (bufqscanwait++ == 0) {
 
                /* Initalize globals */
-               MAXNBUF = (sane_size / PAGE_SIZE);
+               MAXNBUF = (mem_size / PAGE_SIZE);
                nbufh = nbuf;
                nbuflow = min(nbufh, 100);
                nbufhigh = min(MAXNBUF, max(nbufh, 2048));
-               nbuftarget = (sane_size >> 5) / PAGE_SIZE;
+               nbuftarget = (mem_size >> 5) / PAGE_SIZE;
                nbuftarget = max(nbuflow, nbuftarget);
                nbuftarget = min(nbufhigh, nbuftarget);
 
index e4b72f55480481d909138b1c6941f6947c0c8e36..f0d8f2618a01bfaf6c6b35687232d277bf1206a8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ec2eaf7f499bbbb8bfa39d58c86f861c4ef77711..080cd55b199f460366361538478b9db493d78977 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -109,7 +106,7 @@ static int cluster_phys_read(struct vnode *vp, struct uio *uio,
 static int cluster_phys_write(struct vnode *vp, struct uio *uio,
                off_t newEOF, int devblocksize, int flags);
 static int cluster_align_phys_io(struct vnode *vp, struct uio *uio,
-                addr64_t usr_paddr, int xsize, int devblocksize, int flags);
+                vm_offset_t usr_paddr, int xsize, int devblocksize, int flags);
 static int cluster_push_x(struct vnode *vp, off_t EOF, daddr_t first, daddr_t last, int can_delay);
 static int cluster_try_push(struct vnode *vp, off_t newEOF, int can_delay, int push_all);
 
@@ -174,6 +171,9 @@ cluster_iodone(bp)
        iostate    = (struct clios *)cbp->b_iostate;
 
        while (cbp) {
+               if (cbp->b_vectorcount > 1)
+                       _FREE(cbp->b_vectorlist, M_SEGMENT);
+
                if ((cbp->b_flags & B_ERROR) && error == 0)
                        error = cbp->b_error;
 
@@ -320,6 +320,7 @@ cluster_io(vp, upl, upl_offset, f_offset, non_rounded_size, devblocksize, flags,
        struct clios *iostate;
 {
        struct buf   *cbp;
+       struct iovec *iovp;
        u_int         size;
        u_int         io_size;
        int           io_flags;
@@ -381,7 +382,8 @@ cluster_io(vp, upl, upl_offset, f_offset, non_rounded_size, devblocksize, flags,
                zero_offset = upl_offset + non_rounded_size;
        }
        while (size) {
-               int i; 
+               int vsize;
+               int i;
                int pl_index;
                int pg_resid;
                int num_contig;
@@ -525,14 +527,31 @@ cluster_io(vp, upl, upl_offset, f_offset, non_rounded_size, devblocksize, flags,
                        real_bp->b_blkno = blkno;
                }
 
-               if (pg_count > max_vectors) {
-                       io_size -= (pg_count - max_vectors) * PAGE_SIZE;
+               if (pg_count > 1) {
+                       if (pg_count > max_vectors) {
+                               io_size -= (pg_count - max_vectors) * PAGE_SIZE;
 
-                       if (io_size < 0) {
-                               io_size = PAGE_SIZE - pg_offset;
-                               pg_count = 1;
-                       } else
-                               pg_count = max_vectors;
+                               if (io_size < 0) {
+                                       io_size = PAGE_SIZE - pg_offset;
+                                       pg_count = 1;
+                               } else
+                                       pg_count = max_vectors;
+                       }
+                       /* 
+                        * we need to allocate space for the vector list
+                        */
+                       if (pg_count > 1) {
+                               iovp = (struct iovec *)_MALLOC(sizeof(struct iovec) * pg_count,
+                                                              M_SEGMENT, M_NOWAIT);
+                       
+                               if (iovp == (struct iovec *) 0) {
+                                       /*
+                                        * if the allocation fails, then throttle down to a single page
+                                        */
+                                       io_size = PAGE_SIZE - pg_offset;
+                                       pg_count = 1;
+                               }
+                       }
                }
 
                /* Throttle the speculative IO */
@@ -543,9 +562,53 @@ cluster_io(vp, upl, upl_offset, f_offset, non_rounded_size, devblocksize, flags,
 
                cbp = alloc_io_buf(vp, priv);
 
+               if (pg_count == 1)
+                       /*
+                        * we use the io vector that's reserved in the buffer header
+                        * this insures we can always issue an I/O even in a low memory
+                        * condition that prevents the _MALLOC from succeeding... this
+                        * is necessary to prevent deadlocks with the pager
+                        */
+                       iovp = (struct iovec *)(&cbp->b_vects[0]);
+
+               cbp->b_vectorlist  = (void *)iovp;
+               cbp->b_vectorcount = pg_count;
 
-               if (flags & CL_PAGEOUT) {
-                       for (i = 0; i < pg_count; i++) {
+               if (flags & CL_DEV_MEMORY) {
+
+                       iovp->iov_len  = io_size;
+                       iovp->iov_base = (caddr_t)upl_phys_page(pl, 0);
+
+                       if (iovp->iov_base == (caddr_t) 0) {
+                               free_io_buf(cbp);
+                               error = EINVAL;
+                       } else
+                               iovp->iov_base += upl_offset;
+               } else {
+
+                 for (i = 0, vsize = io_size; i < pg_count; i++, iovp++) {
+                       int     psize;
+
+                       psize = PAGE_SIZE - pg_offset;
+
+                       if (psize > vsize)
+                               psize = vsize;
+
+                       iovp->iov_len  = psize;
+                       iovp->iov_base = (caddr_t)upl_phys_page(pl, pl_index + i);
+
+                       if (iovp->iov_base == (caddr_t) 0) {
+                               if (pg_count > 1)
+                                       _FREE(cbp->b_vectorlist, M_SEGMENT);
+                               free_io_buf(cbp);
+
+                               error = EINVAL;
+                               break;
+                       }
+                       iovp->iov_base += pg_offset;
+                       pg_offset = 0;
+
+                       if (flags & CL_PAGEOUT) {
                                int         s;
                                struct buf *bp;
 
@@ -561,7 +624,12 @@ cluster_io(vp, upl, upl_offset, f_offset, non_rounded_size, devblocksize, flags,
                                }
                                splx(s);
                        }
+                       vsize -= psize;
+                   }
                }
+               if (error)
+                       break;
+
                if (flags & CL_ASYNC) {
                        cbp->b_flags |= (B_CALL | B_ASYNC);
                        cbp->b_iodone = (void *)cluster_iodone;
@@ -669,6 +737,8 @@ start_io:
                for (cbp = cbp_head; cbp;) {
                        struct buf * cbp_next;
  
+                       if (cbp->b_vectorcount > 1)
+                               _FREE(cbp->b_vectorlist, M_SEGMENT);
                        upl_offset -= cbp->b_bcount;
                        size       += cbp->b_bcount;
                        io_size    += cbp->b_bcount;
@@ -1396,7 +1466,7 @@ cluster_phys_write(vp, uio, newEOF, devblocksize, flags)
        int          flags;
 {
        upl_page_info_t *pl;
-       addr64_t             src_paddr;
+       vm_offset_t      src_paddr;
        upl_t            upl;
        vm_offset_t      upl_offset;
        int              tail_size;
@@ -1447,7 +1517,7 @@ cluster_phys_write(vp, uio, newEOF, devblocksize, flags)
        }
        pl = ubc_upl_pageinfo(upl);
 
-       src_paddr = (((addr64_t)(int)upl_phys_page(pl, 0)) << 12) + ((addr64_t)iov->iov_base & PAGE_MASK);
+       src_paddr = (vm_offset_t)upl_phys_page(pl, 0) + ((vm_offset_t)iov->iov_base & PAGE_MASK);
 
        while (((uio->uio_offset & (devblocksize - 1)) || io_size < devblocksize) && io_size) {
                int   head_size;
@@ -2237,8 +2307,8 @@ cluster_read_x(vp, uio, filesize, devblocksize, flags)
                                     (int)uio->uio_offset, io_size, uio->uio_resid, 0, 0);
 
                        while (io_size && retval == 0) {
-                           int         xsize;
-                               ppnum_t paddr;
+                               int         xsize;
+                               vm_offset_t paddr;
 
                                if (ubc_page_op(vp,
                                                upl_f_offset,
@@ -2251,7 +2321,7 @@ cluster_read_x(vp, uio, filesize, devblocksize, flags)
                                if (xsize > io_size)
                                        xsize = io_size;
 
-                               retval = uiomove64((addr64_t)(((addr64_t)paddr << 12) + start_offset), xsize, uio);
+                               retval = uiomove((caddr_t)(paddr + start_offset), xsize, uio);
 
                                ubc_page_op(vp, upl_f_offset,
                                            UPL_POP_CLR | UPL_POP_BUSY, 0, 0);
@@ -2412,14 +2482,14 @@ cluster_read_x(vp, uio, filesize, devblocksize, flags)
                                while (val_size && retval == 0) {
                                        int       csize;
                                        int       i;
-                                       addr64_t        paddr;
+                                       caddr_t   paddr;
 
                                        i = offset / PAGE_SIZE;
                                        csize = min(PAGE_SIZE - start_offset, val_size);
 
-                                       paddr = ((addr64_t)upl_phys_page(pl, i) << 12) + start_offset;
+                                       paddr = (caddr_t)upl_phys_page(pl, i) + start_offset;
 
-                                       retval = uiomove64(paddr, csize, uio);
+                                       retval = uiomove(paddr, csize, uio);
 
                                        val_size    -= csize;
                                        offset      += csize;
@@ -2561,7 +2631,7 @@ cluster_nocopy_read(vp, uio, filesize, devblocksize, flags)
        int              upl_size;
        int              upl_needed_size;
        int              pages_in_pl;
-       ppnum_t              paddr;
+       vm_offset_t      paddr;
        int              upl_flags;
        kern_return_t    kret;
        int              segflg;
@@ -2621,7 +2691,7 @@ cluster_nocopy_read(vp, uio, filesize, devblocksize, flags)
                                        UPL_POP_SET | UPL_POP_BUSY, &paddr, 0) != KERN_SUCCESS)
                                break;
 
-                       retval = uiomove64((addr64_t)paddr << 12, PAGE_SIZE, uio);
+                       retval = uiomove((caddr_t)(paddr), PAGE_SIZE, uio);
                                
                        ubc_page_op(vp, upl_f_offset, 
                                    UPL_POP_CLR | UPL_POP_BUSY, 0, 0);
@@ -2820,7 +2890,7 @@ cluster_phys_read(vp, uio, filesize, devblocksize, flags)
        upl_page_info_t *pl;
        upl_t            upl;
        vm_offset_t      upl_offset;
-       addr64_t             dst_paddr;
+       vm_offset_t      dst_paddr;
        off_t            max_size;
        int              io_size;
        int              tail_size;
@@ -2876,7 +2946,7 @@ cluster_phys_read(vp, uio, filesize, devblocksize, flags)
        }
        pl = ubc_upl_pageinfo(upl);
 
-       dst_paddr = (((addr64_t)(int)upl_phys_page(pl, 0)) << 12) + ((addr64_t)iov->iov_base & PAGE_MASK);
+       dst_paddr = (vm_offset_t)upl_phys_page(pl, 0) + ((vm_offset_t)iov->iov_base & PAGE_MASK);
 
        while (((uio->uio_offset & (devblocksize - 1)) || io_size < devblocksize) && io_size) {
                int   head_size;
@@ -3396,12 +3466,12 @@ cluster_push_x(vp, EOF, first, last, can_delay)
 
 
 static int
-cluster_align_phys_io(struct vnode *vp, struct uio *uio, addr64_t usr_paddr, int xsize, int devblocksize, int flags)
+cluster_align_phys_io(struct vnode *vp, struct uio *uio, vm_offset_t usr_paddr, int xsize, int devblocksize, int flags)
 {
         struct iovec     *iov;
         upl_page_info_t  *pl;
         upl_t            upl;
-        addr64_t            ubc_paddr;
+        vm_offset_t      ubc_paddr;
         kern_return_t    kret;
         int              error = 0;
 
@@ -3429,35 +3499,27 @@ cluster_align_phys_io(struct vnode *vp, struct uio *uio, addr64_t usr_paddr, int
                           return(error);
                 }
         }
-        ubc_paddr = ((addr64_t)upl_phys_page(pl, 0) << 12) + (addr64_t)(uio->uio_offset & PAGE_MASK_64);
+        ubc_paddr = (vm_offset_t)upl_phys_page(pl, 0) + (int)(uio->uio_offset & PAGE_MASK_64);
 
-/*
- *             NOTE:  There is no prototype for the following in BSD. It, and the definitions
- *             of the defines for cppvPsrc, cppvPsnk, cppvFsnk, and cppvFsrc will be found in
- *             osfmk/ppc/mappings.h.  They are not included here because there appears to be no
- *             way to do so without exporting them to kexts as well.
- */
-               if (flags & CL_READ)
-//                     copypv(ubc_paddr, usr_paddr, xsize, cppvPsrc | cppvPsnk | cppvFsnk);    /* Copy physical to physical and flush the destination */
-                       copypv(ubc_paddr, usr_paddr, xsize,        2 |        1 |        4);    /* Copy physical to physical and flush the destination */
-               else
-//                     copypv(ubc_paddr, usr_paddr, xsize, cppvPsrc | cppvPsnk | cppvFsrc);    /* Copy physical to physical and flush the source */
-                       copypv(ubc_paddr, usr_paddr, xsize,        2 |        1 |        8);    /* Copy physical to physical and flush the source */
-       
-               if ( !(flags & CL_READ) || upl_dirty_page(pl, 0)) {
-                       /*
-                       * issue a synchronous write to cluster_io
-                       */
-                       error = cluster_io(vp, upl, 0, uio->uio_offset & ~PAGE_MASK_64, PAGE_SIZE, devblocksize,
-                               0, (struct buf *)0, (struct clios *)0);
-               }
-               if (error == 0) {
-                       uio->uio_offset += xsize;
-                       iov->iov_base   += xsize;
-                       iov->iov_len    -= xsize;
-                       uio->uio_resid  -= xsize;
-               }
-               ubc_upl_abort_range(upl, 0, PAGE_SIZE, UPL_ABORT_DUMP_PAGES | UPL_ABORT_FREE_ON_EMPTY);
-       
-               return (error);
+       if (flags & CL_READ)
+               copyp2p(ubc_paddr, usr_paddr, xsize, 2);
+       else
+               copyp2p(usr_paddr, ubc_paddr, xsize, 1);
+
+       if ( !(flags & CL_READ) || upl_dirty_page(pl, 0)) {
+                /*
+                 * issue a synchronous write to cluster_io
+                 */
+                error = cluster_io(vp, upl, 0, uio->uio_offset & ~PAGE_MASK_64, PAGE_SIZE, devblocksize,
+                                  0, (struct buf *)0, (struct clios *)0);
+       }
+       if (error == 0) {
+               uio->uio_offset += xsize;
+               iov->iov_base   += xsize;
+               iov->iov_len    -= xsize;
+               uio->uio_resid  -= xsize;
+       }
+       ubc_upl_abort_range(upl, 0, PAGE_SIZE, UPL_ABORT_DUMP_PAGES | UPL_ABORT_FREE_ON_EMPTY);
+
+        return (error);
 }
index 3b83965b03407872035bb81247b3e229e5854d80..c306b1aa5740150fb0066832ca99d5cfdd7ffb3e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6d84b356ae96d505ba4b9f10b1a61a0fc8a36247..536623adcee202dd3ed95ed5a36921c5ebc9c4c4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c6a73d7a71b3365234e58c238e7662e5689b8f81..b519a672d0c985438d2ce7299086786cedf7786b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -1139,8 +1136,6 @@ check_free_space(journal *jnl, int desired_size)
 //        desired_size, free_space(jnl));
     
     while (1) {
-               int old_start_empty;
-
                if (counter++ == 5000) {
                        dump_journal(jnl);
                        panic("jnl: check_free_space: buffer flushing isn't working "
@@ -1161,7 +1156,6 @@ check_free_space(journal *jnl, int desired_size)
                // here's where we lazily bump up jnl->jhdr->start.  we'll consume
                // entries until there is enough space for the next transaction.
                //
-               old_start_empty = 1;
                simple_lock(&jnl->old_start_lock);
                for(i=0; i < sizeof(jnl->old_start)/sizeof(jnl->old_start[0]); i++) {
                        int   counter;
@@ -1185,7 +1179,6 @@ check_free_space(journal *jnl, int desired_size)
                                continue;
                        }
 
-                       old_start_empty   = 0;
                        jnl->jhdr->start  = jnl->old_start[i];
                        jnl->old_start[i] = 0;
                        if (free_space(jnl) > desired_size) {
@@ -1198,19 +1191,6 @@ check_free_space(journal *jnl, int desired_size)
                // if we bumped the start, loop and try again
                if (i < sizeof(jnl->old_start)/sizeof(jnl->old_start[0])) {
                        continue;
-               } else if (old_start_empty) {
-                       //
-                       // if there is nothing in old_start anymore then we can
-                       // bump the jhdr->start to be the same as active_start
-                       // since it is possible there was only one very large
-                       // transaction in the old_start array.  if we didn't do
-                       // this then jhdr->start would never get updated and we
-                       // would wind up looping until we hit the panic at the
-                       // start of the loop.
-                       //
-                       jnl->jhdr->start = jnl->active_start;
-                       write_journal_header(jnl);
-                       continue;
                }
 
 
index 9551218a075b62c48d592d94b1cea47bc64e0d41..523ba7d52971db94c958815e42448fb10d5a37da 100644 (file)
@@ -4,22 +4,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 189de5062490168e24f05cb74e26b4718700274f..9d8aea2993fc0352bfcb48c90d87b7ecdc32d5b2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c60bb78ed3aa53f11302014e4bf5b78e5cc61c53..51bd854f86f1d187afe1b325dcad8602b36e1295 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 742af69fd44626bc2368ebc33679018898f2ff49..ce79f9d4ddc573857d629d3fe8cb910d97ffa207 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c74bde6fa27e2895f1cf569877b506aff820af64..3eeabf3efbffef6c04eb74e8e28a1b9cbc2ebaf3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 19e2e42eb50aad6208ccb0dd88a2807f76f2ccd4..7eac9f21e730978aa75297828be6b43cc54ecc1f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e8f562103e2e0eb8f2b6b9a05509fbc828b92ec0..b76cdabb212099241e7d7ed2c9300d9d6742c140 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -146,28 +143,24 @@ mount(p, uap, retval)
                        return (EINVAL);
                }
                mp = vp->v_mount;
-
-               if (vfs_busy(mp, LK_NOWAIT, 0, p)) {
-                       vput(vp);
-                       return (EBUSY);
-               }
+               flag = mp->mnt_flag;
                /*
                 * We only allow the filesystem to be reloaded if it
                 * is currently mounted read-only.
                 */
                if ((uap->flags & MNT_RELOAD) &&
                    ((mp->mnt_flag & MNT_RDONLY) == 0)) {
-                       vfs_unbusy(mp, p);
                        vput(vp);
                        return (EOPNOTSUPP);    /* Needs translation */
                }
+               mp->mnt_flag |=
+                   uap->flags & (MNT_RELOAD | MNT_FORCE | MNT_UPDATE);
                /*
                 * Only root, or the user that did the original mount is
                 * permitted to update it.
                 */
                if (mp->mnt_stat.f_owner != p->p_ucred->cr_uid &&
                    (error = suser(p->p_ucred, &p->p_acflag))) {
-                       vfs_unbusy(mp, p);
                        vput(vp);
                        return (error);
                }
@@ -178,21 +171,18 @@ mount(p, uap, retval)
                 */
                if (p->p_ucred->cr_uid != 0) {
                        if (uap->flags & MNT_EXPORTED) {
-                               vfs_unbusy(mp, p);
                                vput(vp);
                                return (EPERM);
                        }
                        uap->flags |= MNT_NOSUID | MNT_NODEV;
-                       if (mp->mnt_flag & MNT_NOEXEC)
+                       if (flag & MNT_NOEXEC)
                                uap->flags |= MNT_NOEXEC;
                }
-               flag = mp->mnt_flag;
-
-               mp->mnt_flag |=
-                   uap->flags & (MNT_RELOAD | MNT_FORCE | MNT_UPDATE);
-
+               if (vfs_busy(mp, LK_NOWAIT, 0, p)) {
+                       vput(vp);
+                       return (EBUSY);
+               }
                VOP_UNLOCK(vp, 0, p);
-
                goto update;
        }
        /*
@@ -306,8 +296,7 @@ update:
         * Mount the filesystem.
         */
        error = VFS_MOUNT(mp, uap->path, uap->data, &nd, p);
-
-       if (uap->flags & MNT_UPDATE) {
+       if (mp->mnt_flag & MNT_UPDATE) {
                vrele(vp);
                if (mp->mnt_kern_flag & MNTK_WANTRDWR)
                        mp->mnt_flag &= ~MNT_RDONLY;
@@ -335,7 +324,6 @@ update:
                vp->v_mountedhere =mp;
                simple_unlock(&vp->v_interlock);
                simple_lock(&mountlist_slock);
-
                CIRCLEQ_INSERT_TAIL(&mountlist, mp, mnt_list);
                simple_unlock(&mountlist_slock);
                checkdirs(vp);
@@ -556,7 +544,6 @@ dounmount(mp, flags, p)
        /* increment the operations count */
        if (!error)
                vfs_nummntops++;
-
        CIRCLEQ_REMOVE(&mountlist, mp, mnt_list);
        if ((coveredvp = mp->mnt_vnodecovered) != NULLVP) {
                coveredvp->v_mountedhere = (struct mount *)0;
@@ -954,7 +941,7 @@ chroot(p, uap, retval)
                shared_regions_active = TRUE;
        }
 
-       if(error = clone_system_shared_regions(shared_regions_active, nd.ni_vp)) {
+       if(error = clone_system_shared_regions(shared_regions_active)) {
                vrele(nd.ni_vp);
                return (error);
        }
index 7d2e88396d9c7142363d790f656a2bc86c902d43..d2623589b8fa2ea5bb06602d854d069938f1f6f2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9d82343d063f4c64daf8e101de41bc9f29b799dc..bc0c675fe414bb322f1856c7b4c73383a707ee2d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 40177b401cd36e39de8a8a6566c68cf032e18e7e..e186fb48408a751e122d7e59d833bc97b3bd8e89 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3a5438e57fbdf467fd472723c22235b8b9319800..cfaf2ed72e6b75c7266cf389fe426c3340fa2693 100644 (file)
@@ -4,22 +4,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f6823f6fe2fa1c1b316e5b0048d0f9d370303ca8..e1ff49d7b048c1ae664a27813c59573a25b95d36 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3fb32bcb87e6b6ea229c1d2e7f52610fcfd927c0..4a473fd46689dca94b1c7d28e65f8cbb3aeeb59b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2c4246a44b75bc66381f1c936157667d9ab37e88..6a12dde49c7a3cded76f2f2da4254934aad5d6e4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index be634ec2bdc0f6283bf5d14fa9fb5058e7aa8381..77909659c6e1ca612c8422d3a0b44e01edf9db88 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -69,6 +66,7 @@
 #include <vm/vm_shared_memory_server.h>
 
 
+extern shared_region_mapping_t system_shared_region;
 extern zone_t lsf_zone;
 
 useracc(addr, len, prot)
@@ -78,7 +76,7 @@ useracc(addr, len, prot)
 {
        return (vm_map_check_protection(
                        current_map(),
-                       trunc_page_32((unsigned int)addr), round_page_32((unsigned int)(addr+len)),
+                       trunc_page(addr), round_page(addr+len),
                        prot == B_READ ? VM_PROT_READ : VM_PROT_WRITE));
 }
 
@@ -87,8 +85,8 @@ vslock(addr, len)
        int     len;
 {
 kern_return_t kret;
-       kret = vm_map_wire(current_map(), trunc_page_32((unsigned int)addr),
-                       round_page_32((unsigned int)(addr+len)), 
+       kret = vm_map_wire(current_map(), trunc_page(addr),
+                       round_page(addr+len), 
                        VM_PROT_READ | VM_PROT_WRITE ,FALSE);
 
        switch (kret) {
@@ -119,7 +117,7 @@ vsunlock(addr, len, dirtied)
 #if FIXME  /* [ */
        if (dirtied) {
                pmap = get_task_pmap(current_task());
-               for (vaddr = trunc_page((unsigned int)(addr)); vaddr < round_page((unsigned int)(addr+len));
+               for (vaddr = trunc_page(addr); vaddr < round_page(addr+len);
                                vaddr += PAGE_SIZE) {
                        paddr = pmap_extract(pmap, vaddr);
                        pg = PHYS_TO_VM_PAGE(paddr);
@@ -130,8 +128,8 @@ vsunlock(addr, len, dirtied)
 #ifdef lint
        dirtied++;
 #endif /* lint */
-       kret = vm_map_unwire(current_map(), trunc_page_32((unsigned int)(addr)),
-                               round_page_32((unsigned int)(addr+len)), FALSE);
+       kret = vm_map_unwire(current_map(), trunc_page(addr),
+                               round_page(addr+len), FALSE);
        switch (kret) {
        case KERN_SUCCESS:
                return (0);
@@ -391,33 +389,12 @@ load_shared_file(
         }
 
        if(local_flags & QUERY_IS_SYSTEM_REGION) {
-                       shared_region_mapping_t default_shared_region;
                        vm_get_shared_region(current_task(), &shared_region);
-                       task_mapping_info.self = (vm_offset_t)shared_region;
-
-                       shared_region_mapping_info(shared_region, 
-                                       &(task_mapping_info.text_region), 
-                                       &(task_mapping_info.text_size),
-                                       &(task_mapping_info.data_region), 
-                                       &(task_mapping_info.data_size), 
-                                       &(task_mapping_info.region_mappings),
-                                       &(task_mapping_info.client_base), 
-                                       &(task_mapping_info.alternate_base),
-                                       &(task_mapping_info.alternate_next), 
-                                       &(task_mapping_info.fs_base),
-                                       &(task_mapping_info.system),
-                                       &(task_mapping_info.flags), &next);
-
-                       default_shared_region =
-                               lookup_default_shared_region(
-                                       ENV_DEFAULT_ROOT, 
-                                       task_mapping_info.system);
-                       if (shared_region == default_shared_region) {
+                       if (shared_region == system_shared_region) {
                                local_flags = SYSTEM_REGION_BACKED;
                        } else {
                                local_flags = 0;
                        }
-                       shared_region_mapping_dealloc(default_shared_region);
                        error = 0;
                        error = copyout(&local_flags, flags, sizeof (int));
                        goto lsf_bailout;
@@ -478,6 +455,28 @@ load_shared_file(
                goto lsf_bailout_free_vput;
        }
 
+       vm_get_shared_region(current_task(), &shared_region);
+       if(shared_region == system_shared_region) {
+               default_regions = 1;
+       }
+       if(((vp->v_mount != rootvnode->v_mount)
+                       && (shared_region == system_shared_region)) 
+               && (lsf_mapping_pool_gauge() < 75)) {
+                               /* We don't want to run out of shared memory */
+                               /* map entries by starting too many private versions */
+                               /* of the shared library structures */
+               int     error;
+                       if(p->p_flag & P_NOSHLIB) {
+                               error = clone_system_shared_regions(FALSE);
+                       } else {
+                               error = clone_system_shared_regions(TRUE);
+                       }
+               if (error) {
+                       goto lsf_bailout_free_vput;
+               }
+               local_flags = local_flags & ~NEW_LOCAL_SHARED_REGIONS;
+               vm_get_shared_region(current_task(), &shared_region);
+       }
 #ifdef notdef
        if(vattr.va_size != mapped_file_size) {
                error = EINVAL;
@@ -491,13 +490,13 @@ load_shared_file(
        /* load alternate regions if the caller has requested.  */
        /* Note: the new regions are "clean slates" */
        if (local_flags & NEW_LOCAL_SHARED_REGIONS) {
-               error = clone_system_shared_regions(FALSE, ENV_DEFAULT_ROOT);
+               error = clone_system_shared_regions(FALSE);
                if (error) {
                        goto lsf_bailout_free_vput;
                }
+               vm_get_shared_region(current_task(), &shared_region);
        }
 
-       vm_get_shared_region(current_task(), &shared_region);
        task_mapping_info.self = (vm_offset_t)shared_region;
 
        shared_region_mapping_info(shared_region, 
@@ -509,54 +508,8 @@ load_shared_file(
                        &(task_mapping_info.client_base), 
                        &(task_mapping_info.alternate_base),
                        &(task_mapping_info.alternate_next), 
-                       &(task_mapping_info.fs_base),
-                       &(task_mapping_info.system),
                        &(task_mapping_info.flags), &next);
 
-       {
-               shared_region_mapping_t default_shared_region;
-               default_shared_region =
-                       lookup_default_shared_region(
-                               ENV_DEFAULT_ROOT, 
-                               task_mapping_info.system);
-               if(shared_region == default_shared_region) {
-                       default_regions = 1;
-               }
-               shared_region_mapping_dealloc(default_shared_region);
-       }
-       /* If we are running on a removable file system we must not */
-       /* be in a set of shared regions or the file system will not */
-       /* be removable. */
-       if(((vp->v_mount != rootvnode->v_mount) && (default_regions)) 
-               && (lsf_mapping_pool_gauge() < 75)) {
-                               /* We don't want to run out of shared memory */
-                               /* map entries by starting too many private versions */
-                               /* of the shared library structures */
-               int     error;
-                       if(p->p_flag & P_NOSHLIB) {
-                               error = clone_system_shared_regions(FALSE, ENV_DEFAULT_ROOT);
-                       } else {
-                               error = clone_system_shared_regions(TRUE, ENV_DEFAULT_ROOT);
-                       }
-               if (error) {
-                       goto lsf_bailout_free_vput;
-               }
-               local_flags = local_flags & ~NEW_LOCAL_SHARED_REGIONS;
-               vm_get_shared_region(current_task(), &shared_region);
-               shared_region_mapping_info(shared_region, 
-                       &(task_mapping_info.text_region), 
-                       &(task_mapping_info.text_size),
-                       &(task_mapping_info.data_region), 
-                       &(task_mapping_info.data_size), 
-                       &(task_mapping_info.region_mappings),
-                       &(task_mapping_info.client_base), 
-                       &(task_mapping_info.alternate_base),
-                       &(task_mapping_info.alternate_next), 
-                       &(task_mapping_info.fs_base),
-                       &(task_mapping_info.system),
-                       &(task_mapping_info.flags), &next);
-       }
-
        /*  This is a work-around to allow executables which have been */
        /*  built without knowledge of the proper shared segment to    */
        /*  load.  This code has been architected as a shared region   */
@@ -736,8 +689,24 @@ new_system_shared_regions(
                return EINVAL;
        }
 
-       /* clear all of our existing defaults */
-       remove_all_shared_regions();
+       /* get current shared region info for  */
+       /* restoration after new system shared */
+       /* regions are in place */
+       vm_get_shared_region(current_task(), &regions);
+
+       /* usually only called at boot time    */
+       /* shared_file_boot_time_init creates  */
+       /* a new set of system shared regions  */
+       /* and places them as the system       */
+       /* shared regions.                     */
+       shared_file_boot_time_init();
+
+       /* set current task back to its        */
+       /* original regions.                   */
+       vm_get_shared_region(current_task(), &new_regions);
+       shared_region_mapping_dealloc(new_regions);
+
+       vm_set_shared_region(current_task(), regions);
 
        *retval = 0;
        return 0;
@@ -746,7 +715,7 @@ new_system_shared_regions(
 
 
 int
-clone_system_shared_regions(shared_regions_active, base_vnode)
+clone_system_shared_regions(shared_regions_active)
 {
        shared_region_mapping_t new_shared_region;
        shared_region_mapping_t next;
@@ -756,6 +725,8 @@ clone_system_shared_regions(shared_regions_active, base_vnode)
 
        struct proc     *p;
 
+       if (shared_file_create_system_region(&new_shared_region))
+               return (ENOMEM);
        vm_get_shared_region(current_task(), &old_shared_region);
        old_info.self = (vm_offset_t)old_shared_region;
        shared_region_mapping_info(old_shared_region,
@@ -767,27 +738,7 @@ clone_system_shared_regions(shared_regions_active, base_vnode)
                &(old_info.client_base),
                &(old_info.alternate_base),
                &(old_info.alternate_next), 
-               &(old_info.fs_base),
-               &(old_info.system),
                &(old_info.flags), &next);
-       if ((shared_regions_active) ||
-               (base_vnode == ENV_DEFAULT_ROOT)) {
-          if (shared_file_create_system_region(&new_shared_region))
-               return (ENOMEM);
-       } else {
-          new_shared_region = 
-               lookup_default_shared_region(
-                       base_vnode, old_info.system);
-          if(new_shared_region == NULL) {
-               shared_file_boot_time_init(
-                       base_vnode, old_info.system);
-               vm_get_shared_region(current_task(), &new_shared_region);
-          } else {
-               vm_set_shared_region(current_task(), new_shared_region);
-          }
-          if(old_shared_region)
-               shared_region_mapping_dealloc(old_shared_region);
-       }
        new_info.self = (vm_offset_t)new_shared_region;
        shared_region_mapping_info(new_shared_region,
                &(new_info.text_region),   
@@ -798,8 +749,6 @@ clone_system_shared_regions(shared_regions_active, base_vnode)
                &(new_info.client_base),
                &(new_info.alternate_base),
                &(new_info.alternate_next), 
-               &(new_info.fs_base),
-               &(new_info.system),
                &(new_info.flags), &next);
        if(shared_regions_active) {
           if(vm_region_clone(old_info.text_region, new_info.text_region)) {
index 8b1be28436be2b6a042ede8aa7cca4a1dc781234..387b0995f899b9b256b2a4bc92f5a36a27e69013 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -137,7 +134,7 @@ vnode_pageout(struct vnode *vp,
 
                goto out;
        }
-       ubc_create_upl(vp, f_offset, isize, &vpupl, &pl, UPL_FOR_PAGEOUT | UPL_COPYOUT_FROM);
+       ubc_create_upl(vp, f_offset, isize, &vpupl, &pl, UPL_COPYOUT_FROM);
 
        if (vpupl == (upl_t) 0) {
                result = error = PAGER_ABSENT;
index 18621f8530b5b445e7b54d6f17120d8f65043015..45b21e9fb2f2c71242531156d8d11008060095e4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 30291cdf5fe9f6e610a7271c83db365ef0e03f86..cd407ca2789816e2270e80897355ed7e39801c26 100644 (file)
@@ -5,7 +5,7 @@
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
        <key>CFBundleGetInfoString</key>
-       <string>System Resource Pseudoextension, Apple Computer Inc, 6.8.5</string>
+       <string>System Resource Pseudoextension, Apple Computer Inc, 6.3</string>
        <key>CFBundleIdentifier</key>
        <string>com.apple.kernel</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <key>CFBundlePackageType</key>
        <string>KEXT</string>
        <key>CFBundleShortVersionString</key>
-       <string>6.8.5</string>
+       <string>6.3</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>6.8.5</string>
+       <string>6.3</string>
        <key>OSBundleCompatibleVersion</key>
-       <string>6.8.5</string>
+       <string>6.3</string>
        <key>OSBundleRequired</key>
        <string>Root</string>
        <key>OSKernelResource</key>
index 71b641b1c24cd23c595bc7db1151b783248fea03..ce1ba7c85be0b4a1653b7382b0bb7f94ea3ec3ed 100644 (file)
@@ -5,7 +5,7 @@
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
        <key>CFBundleGetInfoString</key>
-       <string>AppleNMI Pseudoextension, Apple Computer Inc, 6.8.5</string>
+       <string>AppleNMI Pseudoextension, Apple Computer Inc, 6.3</string>
        <key>CFBundleIdentifier</key>
        <string>com.apple.driver.AppleNMI</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <key>CFBundlePackageType</key>
        <string>KEXT</string>
        <key>CFBundleShortVersionString</key>
-       <string>6.8.5</string>
+       <string>6.3</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>6.8.5</string>
+       <string>6.3</string>
        <key>OSBundleRequired</key>
        <string>Root</string>
        <key>OSKernelResource</key>
index d3211438031c81d2c62b1a077803d7f60bbf03c7..521aaca3f21eea01416fda642166540e981b3242 100644 (file)
@@ -5,7 +5,7 @@
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
        <key>CFBundleGetInfoString</key>
-       <string>Apple Platform Family Pseudoextension, Apple Computer Inc, 6.8.5</string>
+       <string>Apple Platform Family Pseudoextension, Apple Computer Inc, 6.3</string>
        <key>CFBundleIdentifier</key>
        <string>com.apple.iokit.ApplePlatformFamily</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <key>CFBundlePackageType</key>
        <string>KEXT</string>
        <key>CFBundleShortVersionString</key>
-       <string>6.8.5</string>
+       <string>6.3</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>6.8.5</string>
+       <string>6.3</string>
        <key>OSBundleCompatibleVersion</key>
        <string>1.0</string>
        <key>OSBundleRequired</key>
index e806c88fbe94c3fb335b71f3dcd75298bcf63a0a..8c07bcd49402963172fb30edf477a76e9efb8c47 100644 (file)
@@ -5,7 +5,7 @@
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
        <key>CFBundleGetInfoString</key>
-       <string>BSD Kernel Pseudoextension, Apple Computer Inc, 6.8.5</string>
+       <string>BSD Kernel Pseudoextension, Apple Computer Inc, 6.3</string>
        <key>CFBundleIdentifier</key>
        <string>com.apple.kernel.bsd</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <key>CFBundlePackageType</key>
        <string>KEXT</string>
        <key>CFBundleShortVersionString</key>
-       <string>6.8.5</string>
+       <string>6.3</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>6.8.5</string>
+       <string>6.3</string>
        <key>OSBundleCompatibleVersion</key>
        <string>1.1</string>
        <key>OSBundleRequired</key>
index 0178d8d1e8935514fae2ac62110cc2ee8ab44ce1..b22bf9e63fb24cb9ed998aa246bcaaef0bfef44c 100644 (file)
@@ -5,7 +5,7 @@
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
        <key>CFBundleGetInfoString</key>
-       <string>ADB Family Pseudoextension, Apple Computer Inc, 6.8.5</string>
+       <string>ADB Family Pseudoextension, Apple Computer Inc, 6.3</string>
        <key>CFBundleIdentifier</key>
        <string>com.apple.iokit.IOADBFamily</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <key>CFBundlePackageType</key>
        <string>KEXT</string>
        <key>CFBundleShortVersionString</key>
-       <string>6.8.5</string>
+       <string>6.3</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>6.8.5</string>
+       <string>6.3</string>
        <key>OSBundleCompatibleVersion</key>
        <string>1.0.0b1</string>
        <key>OSBundleRequired</key>
index 1ffc7a7b6795d3dc9b1d7801dbc1c40db58c8460..eeaa1ed636479fc305b34917dae763ed03223216 100644 (file)
@@ -5,7 +5,7 @@
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
        <key>CFBundleGetInfoString</key>
-       <string>I/O Kit Pseudoextension, Apple Computer Inc, 6.8.5</string>
+       <string>I/O Kit Pseudoextension, Apple Computer Inc, 6.3</string>
        <key>CFBundleIdentifier</key>
        <string>com.apple.kernel.iokit</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <key>CFBundlePackageType</key>
        <string>KEXT</string>
        <key>CFBundleShortVersionString</key>
-       <string>6.8.5</string>
+       <string>6.3</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>6.8.5</string>
+       <string>6.3</string>
        <key>OSBundleCompatibleVersion</key>
        <string>1.0.0b1</string>
        <key>OSBundleRequired</key>
index 30325acf1f47f3248367cfb442967327c3db4433..3fa274ee1da9fc7d6d8dfe3fc12adcc73d3e2324 100644 (file)
@@ -5,7 +5,7 @@
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
        <key>CFBundleGetInfoString</key>
-       <string>AppleNMI Pseudoextension, Apple Computer Inc, 6.8.5</string>
+       <string>AppleNMI Pseudoextension, Apple Computer Inc, 6.3</string>
        <key>CFBundleIdentifier</key>
        <string>com.apple.iokit.IONVRAMFamily</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <key>CFBundlePackageType</key>
        <string>KEXT</string>
        <key>CFBundleShortVersionString</key>
-       <string>6.8.5</string>
+       <string>6.3</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>6.8.5</string>
+       <string>6.3</string>
        <key>OSBundleCompatibleVersion</key>
        <string>1.1</string>
        <key>OSBundleRequired</key>
index 18d5ee76152082e3c475dbc042a05926fc676f6d..0e09af808b21d09a74e833a80e69e14b6a30a5ed 100644 (file)
@@ -5,7 +5,7 @@
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
        <key>CFBundleGetInfoString</key>
-       <string>System Management Pseudoextension, Apple Computer Inc, 6.8.5</string>
+       <string>System Management Pseudoextension, Apple Computer Inc, 6.3</string>
        <key>CFBundleIdentifier</key>
        <string>com.apple.iokit.IOSystemManagementFamily</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <key>CFBundlePackageType</key>
        <string>KEXT</string>
        <key>CFBundleShortVersionString</key>
-       <string>6.8.5</string>
+       <string>6.3</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>6.8.5</string>
+       <string>6.3</string>
        <key>OSBundleCompatibleVersion</key>
        <string>1.0.0b1</string>
        <key>OSBundleRequired</key>
index 0f8ed7672dac59eac6dc33746df4e6ca4ba5281a..5bc3c3affd8ebd7f82177e904666d45a0685f500 100644 (file)
@@ -5,7 +5,7 @@
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
        <key>CFBundleGetInfoString</key>
-       <string>Libkern Pseudoextension, Apple Computer Inc, 6.8.5</string>
+       <string>Libkern Pseudoextension, Apple Computer Inc, 6.3</string>
        <key>CFBundleIdentifier</key>
        <string>com.apple.kernel.libkern</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <key>CFBundlePackageType</key>
        <string>KEXT</string>
        <key>CFBundleShortVersionString</key>
-       <string>6.8.5</string>
+       <string>6.3</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>6.8.5</string>
+       <string>6.3</string>
        <key>OSBundleCompatibleVersion</key>
        <string>1.0.0b1</string>
        <key>OSBundleRequired</key>
index 233af64bc1a118264ab191de6223ddabc84907ae..66d7a0f4975696f0d3682c5d239d54a567f317ea 100644 (file)
@@ -5,7 +5,7 @@
        <key>CFBundleDevelopmentRegion</key>
        <string>English</string>
        <key>CFBundleGetInfoString</key>
-       <string>Mach Kernel Pseudoextension, Apple Computer Inc, 6.8.5</string>
+       <string>Mach Kernel Pseudoextension, Apple Computer Inc, 6.3</string>
        <key>CFBundleIdentifier</key>
        <string>com.apple.kernel.mach</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <key>CFBundlePackageType</key>
        <string>KEXT</string>
        <key>CFBundleShortVersionString</key>
-       <string>6.8.5</string>
+       <string>6.3</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>6.8.5</string>
+       <string>6.3</string>
        <key>OSBundleCompatibleVersion</key>
        <string>1.0.0b1</string>
        <key>OSBundleRequired</key>
index 72ada3cc2c4fed04d66591e3121fec71f5cdb2dc..5c68f58cbf79b8ff8737f3555309a78e999872dc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2fbf2413db6ec477724b9fe78bce3c00639c97e3..9595ec031ca077fba2c021e04fb28756a9c0d303 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b0f943b7c7c61c58c92d94a93cf1ca542d2cd4ce..0eeb0a275e06c72ecf43c0599d296eb57002af46 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8749216003de2027bcabd122939d557df307188f..8abc03e8db7a89991470e8e3fed4765be9b3cdd1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3eacd086d1e764a47a7bdc53369c38eca48d1dc8..b032e4dfe71a7fecf9860d31813ac25d8544545c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index bc080d0e98b496799aa696d8444cfaadd64a68b1..c6eaaea348730d4e1ced11bd8d4c0acfeec7bb63 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c2e84c0b8cb9ecaebdc394625ca9e382cc0b8965..30a0ba5f612fda080f1d98fa43442eceaa1da1e7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 413f90e692e9bb977937c9f2d9880bb2ee54d228..3de76178eff0e16adb342b5cda51a096ac5f3749 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c145435f0cd05e6110b171383db0e995283a3f24..062a140d08627758821a05d6f94798f3b4ef52bc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -269,28 +266,17 @@ OSMetaClassDefineReservedUnused(AppleMacIODevice,  3);
 bool AppleMacIODevice::compareName( OSString * name,
                                        OSString ** matched = 0 ) const
 {
-  return (IODTCompareNubName(this, name, matched) ||
-         IORegistryEntry::compareName(name, matched));
+    return( ((AppleMacIO *)getProvider())->
+               compareNubName( this, name, matched ));
 }
 
 IOService * AppleMacIODevice::matchLocation( IOService * /* client */ )
 {
-  return this;
+      return( this );
 }
 
 IOReturn AppleMacIODevice::getResources( void )
 {
-  IOService *macIO = this;
-  
-  if (getDeviceMemory() != 0) return kIOReturnSuccess;
-  
-  while (macIO && ((macIO = macIO->getProvider()) != 0))
-    if (strcmp("mac-io", macIO->getName()) == 0) break;
-  
-  if (macIO == 0) return kIOReturnError;
-  
-  IODTResolveAddressing(this, "reg", macIO->getDeviceMemoryWithIndex(0));
-  
-  return kIOReturnSuccess;
+    return( ((AppleMacIO *)getProvider())->getNubResources( this ));
 }
 
index 74ceaaa95d525f6fa83d6efb0f5748efef0f7a79..00deddd4ff89e5b7d24fb8844e1da1e83f202caf 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -136,12 +133,12 @@ IOReturn AppleNMI::powerStateWillChangeTo ( IOPMPowerFlags theFlags, unsigned lo
 
             // Mask NMI and change from edge to level whilst sleeping (copied directly from OS9 code)
             nmiIntSourceAddr = (volatile unsigned long *)kExtInt9_NMIIntSource;
-            nmiIntSource = ml_phys_read(nmiIntSourceAddr);
+            nmiIntSource = *nmiIntSourceAddr;
             nmiIntSource |= kNMIIntLevelMask;
-            ml_phys_write(nmiIntSourceAddr, nmiIntSource);
+            *nmiIntSourceAddr = nmiIntSource;
             eieio();
             nmiIntSource |= kNMIIntMask;
-            ml_phys_write(nmiIntSourceAddr, nmiIntSource);
+            *nmiIntSourceAddr = nmiIntSource;
             eieio();
         }
         else
@@ -150,12 +147,12 @@ IOReturn AppleNMI::powerStateWillChangeTo ( IOPMPowerFlags theFlags, unsigned lo
 
             // Unmask NMI and change back to edge (copied directly from OS9 code)
             nmiIntSourceAddr = (volatile unsigned long *)kExtInt9_NMIIntSource;
-            nmiIntSource = ml_phys_read(nmiIntSourceAddr);
+            nmiIntSource = *nmiIntSourceAddr;
             nmiIntSource &= ~kNMIIntLevelMask;
-            ml_phys_write(nmiIntSourceAddr, nmiIntSource);
+            *nmiIntSourceAddr = nmiIntSource;
             eieio();
             nmiIntSource &= ~kNMIIntMask;
-            ml_phys_write(nmiIntSourceAddr, nmiIntSource);
+            *nmiIntSourceAddr = nmiIntSource;
             eieio();
         }
     }
index b7855b79eb422e0dec5765cd249273cab38fcf71..27b69da0e4bcb7e75fc7e206a1bc434cc74c1592 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 37c8282466312df09f53cf9bf6a174e94c234a89..63ee60261ce57a75038f5943e1a53e94248c5e1e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f71f313daf85160c09324e22d2a74f6f447fd3bb..978cedac413604c0d86ac02677fa74ef794e6661 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 90fc0b6d98f80a66e72236e33bb25c12525664f7..697967eff44da66d6f6f4c7aaa2e24172a7b706b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1b825dd192efc215481f09a08eb2aa47da2ba538..274cafce81731e281fb733ccb864b8547e719250 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 76803c1c728888720cde0f548bdbc824fb9852ac..7338ade5bf9b85cd1d4044d7bab1ef07a728c8cc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8df491dc5ae4930d2488c3d08003f687b67cc90a..f14b821bbe3aaea90a42b0eab8fac6f3969c1143 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -62,7 +59,7 @@ bool ApplePlatformExpert::start( IOService * provider )
     setBootROMType(kBootROMTypeOldWorld);
     
     // Get the Rom Minor Version from the 68k ROM.
-    romVersion = ml_phys_read_64(0xffc00010ULL) & 0x0000ffff;
+    romVersion = ml_phys_read(0xffc00010) & 0x0000ffff;
     provider->setProperty("rom-version", &romVersion, sizeof(romVersion));
   }
   
index b97de6a8f3e7c26e65437f07dd7d2152c848b1b5..4378b4ee7edfedc2a19719d2b6d061a48a66d5f7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e49d3b2932754cf161604969328db7eca432fed7..35fd5aa28e62566d065a4758edc78ba04ed669a6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 98e0b132868f67b1825dd106637ba5fa6eeac35e..28bf6c7077d67c378867616d01c19e1900a94641 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2aa0ce05155853b0740ac924f95fc47b4e783e35..2f2271ca407e8671283f59f428f42d8fe0fd8d64 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f2e2efe7a9c9a63818415c27df9b5882114450f4..7b9fce561ffa1695b900c36083b1afbeb991e49d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0d506b9f4d7d198580e3fda8d7a3bd888b75b31e..5baf7ae9f87c2728ad4d585cd16c7f5ef8a90a7f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 50efd8276b780d0eeda83a4c5126c2c5abb37706..c3fff4024d798b857237a40c75586a4471570a46 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 306b18db3f90b935b6b014dc5e22b8d5dd62e38a..76ff4cdf4b5e604736c22ba2fb086d04a869625a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2fbaac9dd6bbf7610d6fae2eea72db7f82560598..4d1502e913bafa51aea9da94f51c4bbe226b56c3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7ed5863a7991a98ebab62ce2e89cdfb326bd0b82..9035f3befd787a1084dfddf4820645c681b73ab7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6a5855e1550fdb57c8f1d97ae72c45fbb124f112..999517b5a148861f837badc28367e8bd5b980bf9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f5552c3488e0e0481a80923044d776e8ff696f0c..78d7ff9f1a485d7cab993cb1293d7de165755019 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f6f864ac52a305881d68fb6a83435036d6a697b3..a7ea145a12e8e8c44bf8d6ee443706b328e03aac 100644 (file)
@@ -2,24 +2,21 @@
  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ *
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ *
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ *
  * @APPLE_LICENSE_HEADER_END@
  */
 
index d84f511086f516f14ba0c6e747716ef00be94418..005faf0c357c05e52cc544410c80f826adc7d8f1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 810c087a778093097bb0eb7544d1b712b0430fa6..4e40b5a8bb8b28c8f9cc52bb6b53aeced992dfad 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -28,6 +25,7 @@
 #include <IOKit/IOMemoryDescriptor.h>
 
 enum {
+    kIOMemoryDirectionMask             = 0x0000000f,
     kIOMemoryPhysicallyContiguous      = 0x00000010,
     kIOMemoryPageable                  = 0x00000020,
     kIOMemorySharingTypeMask           = 0x000f0000,
@@ -239,6 +237,15 @@ public:
      * will not copy past the end of the memory descriptor's current capacity.
      */
     virtual bool appendBytes(const void *bytes, vm_size_t withLength);
+
+    /*
+     * getPhysicalSegment:
+     *
+     * Get the physical address of the buffer, relative to the current position.
+     * If the current position is at the end of the buffer, a zero is returned.
+     */
+    virtual IOPhysicalAddress getPhysicalSegment(IOByteCount offset,
+                                                IOByteCount * length);    
 };
 
 #endif /* !_IOBUFFERMEMORYDESCRIPTOR_H */
index 2b13e0b0f2211901ad57fc602c87181b25a5e095..c78ea6ac0dfdb647553932acd4eb863ca8f04b73 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7905d86db15ffd7935d6856a3d6ec41bf90af549..9cfa1bf6bb2ce38ad8c1de03ccb5e1f3be5a9791 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4f42779ce2ef95d2152e5fe3b9524c706c66acfa..f6e58d2e052695afaa152590f88bc7511d66f644 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8d6677c4c91e9b60ae0bbca8c50c96b8b1881c31..1bb549d8cf95976647727d1f477b34be661ab088 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2b6f44f3ba02d10d13ced26c90051285467ec45b..7703d3d6a65e3441dfa06530b305e716fefde638 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8e9cbff52fb281b9a7e18ccb73fbecc7d58a5856..8b7f3dfdfcea7f610aa0da2fae6725e21a129f50 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e16142d7ec833e7091d71f1055d72358f9d69c36..2bfef6f1885edcf5dc00eac08965b3d9c9ef30a6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 25b560a3b51207f59970e92a63f14d505eaf7a31..6445ba5e8f458b39e77ce600945ea63ae83a6646 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 80aa499b49b963b079762b37230742ca13929209..6e853785e3a002d946b9928c8c14a013e7f61502 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1bc1174cb4ee880fc65f0b023ce3398db342438b..7c72d0524d5080d5db51f5e6325a0e308cf8a352 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index fb89c51337b63a9fe745cf72c6ea4ead06a14039..7287f9e22994ef7e29bb1723f74f0d347c6743d4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 347ed40d9ac3558eba735e6a9d4be8165361de00..6136c93ae893f3e35417ea04d4ad779496cac285 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6886c459e388128e304209b79bc70944860eaf64..0c554524c1a641c18d7c848f59b110aae90df80b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9653330eb28f01c78332cddd6b0f4d02f7da04a0..4b4216b9bbb00f436bf1a8934543617de5e75d88 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 22d9930bf6414667ba482eca1abe7759f3de0190..9fff5fecb0a36424f1a672d1ccd7cb91e82a6490 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 45c8f6795a052a09ae0af1db88060c37818cc347..547f190ad5e88432d5a20a6e08a384d4b7929d84 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 082bd8ba6f60e6b6d3df2598f4e3840c39395b80..5211cb95f314d959e4389240c3a5403117f4c62d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -54,7 +51,11 @@ private:
                        UInt32 value, const char * name );
 };
 
-#endif __cplusplus
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 enum {
 // loggage
@@ -75,17 +76,12 @@ enum {
     kIOLogMemory       = 0x00004000ULL,
 
 // debug aids - change behaviour
-    kIONoFreeObjects   = 0x00100000ULL,
-    kIOLogSynchronous   = 0x00200000ULL,       // IOLog completes synchrounsly
+    kIONoFreeObjects   = 0x00100000ULL
 };
 
 extern SInt64  gIOKitDebug;
 extern char    iokit_version[];
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 struct IORegistryPlane;
 extern void    IOPrintPlane( const struct IORegistryPlane * plane );
 extern void    OSPrintMemory( void );
index 2825c1b97f8b5d4a45605cab399433efd930c29f..65fe7197d0014472bf9fa1d423a01dbb0845184b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9a2e9c2fe77c81009aa15e920e520c480998a9d5..08fc0dc2ac2e3aedaa8a81a530e57a9df3cd315f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3c42748a7d724319031c2be8579d7f2454282058..962443ddc11febfab737dae3d4a38b64acdc0f1e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -36,8 +33,6 @@
 #error IOLib.h is for kernel use only
 #endif
 
-#include <sys/cdefs.h>
-
 #include <sys/appleapiopts.h>
 
 #include <IOKit/system.h>
@@ -48,7 +43,9 @@
 
 #include <libkern/OSAtomic.h>
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 #include <kern/thread_call.h>
 #include <kern/clock.h>
@@ -146,78 +143,6 @@ void IOFreePageable(void * address, vm_size_t size);
 #define IONew(type,number)        (type*)IOMalloc(sizeof(type) * (number) )
 #define IODelete(ptr,type,number) IOFree( (ptr) , sizeof(type) * (number) )
 
-/////////////////////////////////////////////////////////////////////////////
-//
-//
-//     These functions are now implemented in IOMapper.cpp
-//
-//
-/////////////////////////////////////////////////////////////////////////////
-
-/*! @function IOMappedRead8
-    @abstract Read one byte from the desired "Physical" IOSpace address.
-    @discussion Read one byte from the desired "Physical" IOSpace address.  This function allows the developer to read an address returned from any memory descriptor's getPhysicalSegment routine.  It can then be used by segmenting a physical page slightly to tag the physical page with its kernel space virtual address.  
-    @param address The desired address, as returned by IOMemoryDescriptor::getPhysicalSegment.
-    @result Data contained at that location */
-
-UInt8 IOMappedRead8(IOPhysicalAddress address);
-
-/*! @function IOMappedRead16
-    @abstract Read two bytes from the desired "Physical" IOSpace address.
-    @discussion Read two bytes from the desired "Physical" IOSpace address.  This function allows the developer to read an address returned from any memory descriptor's getPhysicalSegment routine.  It can then be used by segmenting a physical page slightly to tag the physical page with its kernel space virtual address.  
-    @param address The desired address, as returned by IOMemoryDescriptor::getPhysicalSegment.
-    @result Data contained at that location */
-
-UInt16 IOMappedRead16(IOPhysicalAddress address);
-
-/*! @function IOMappedRead32
-    @abstract Read four bytes from the desired "Physical" IOSpace address.
-    @discussion Read four bytes from the desired "Physical" IOSpace address.  This function allows the developer to read an address returned from any memory descriptor's getPhysicalSegment routine.  It can then be used by segmenting a physical page slightly to tag the physical page with its kernel space virtual address.  
-    @param address The desired address, as returned by IOMemoryDescriptor::getPhysicalSegment.
-    @result Data contained at that location */
-
-UInt32 IOMappedRead32(IOPhysicalAddress address);
-
-/*! @function IOMappedRead64
-    @abstract Read eight bytes from the desired "Physical" IOSpace address.
-    @discussion Read eight bytes from the desired "Physical" IOSpace address.  This function allows the developer to read an address returned from any memory descriptor's getPhysicalSegment routine.  It can then be used by segmenting a physical page slightly to tag the physical page with its kernel space virtual address.  
-    @param address The desired address, as returned by IOMemoryDescriptor::getPhysicalSegment.
-    @result Data contained at that location */
-
-UInt64 IOMappedRead64(IOPhysicalAddress address);
-
-/*! @function IOMappedWrite8
-    @abstract Write one byte to the desired "Physical" IOSpace address.
-    @discussion Write one byte to the desired "Physical" IOSpace address.  This function allows the developer to write to an address returned from any memory descriptor's getPhysicalSegment routine.
-    @param address The desired address, as returned by IOMemoryDescriptor::getPhysicalSegment.
-    @param value Data to be writen to the desired location */
-
-void IOMappedWrite8(IOPhysicalAddress address, UInt8 value);
-
-/*! @function IOMappedWrite16
-    @abstract Write two bytes to the desired "Physical" IOSpace address.
-    @discussion Write two bytes to the desired "Physical" IOSpace address.  This function allows the developer to write to an address returned from any memory descriptor's getPhysicalSegment routine.
-    @param address The desired address, as returned by IOMemoryDescriptor::getPhysicalSegment.
-    @param value Data to be writen to the desired location */
-
-void IOMappedWrite16(IOPhysicalAddress address, UInt16 value);
-
-/*! @function IOMappedWrite32
-    @abstract Write four bytes to the desired "Physical" IOSpace address.
-    @discussion Write four bytes to the desired "Physical" IOSpace address.  This function allows the developer to write to an address returned from any memory descriptor's getPhysicalSegment routine.
-    @param address The desired address, as returned by IOMemoryDescriptor::getPhysicalSegment.
-    @param value Data to be writen to the desired location */
-
-void IOMappedWrite32(IOPhysicalAddress address, UInt32 value);
-
-/*! @function IOMappedWrite64
-    @abstract Write eight bytes to the desired "Physical" IOSpace address.
-    @discussion Write eight bytes to the desired "Physical" IOSpace address.  This function allows the developer to write to an address returned from any memory descriptor's getPhysicalSegment routine.
-    @param address The desired address, as returned by IOMemoryDescriptor::getPhysicalSegment.
-    @param value Data to be writen to the desired location */
-
-void IOMappedWrite64(IOPhysicalAddress address, UInt64 value);
-
 /*! @function IOSetProcessorCacheMode
     @abstract Sets the processor cache mode for mapped memory.
     @discussion This function sets the cache mode of an already mapped & wired memory range. Note this may not be supported on I/O mappings or shared memory - it is far preferable to set the cache mode as mappings are created with the IOMemoryDescriptor::map method.
@@ -364,6 +289,8 @@ extern mach_timespec_t IOZeroTvalspec;
 
 #endif /* __APPLE_API_OBSOLETE */
 
-__END_DECLS
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
 
 #endif /* !__IOKIT_IOLIB_H */
index cc8bde3ae99af957aa570d39b34b640422b03924..c966aba8c3288ad9a3f93ffdd064420f4e9106ac 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
diff --git a/iokit/IOKit/IOMapper.h b/iokit/IOKit/IOMapper.h
deleted file mode 100644 (file)
index 14b9d3d..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (c) 1998-2003 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-
-#ifndef __IOKIT_IOMAPPER_H
-#define __IOKIT_IOMAPPER_H
-
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-#include <IOKit/IOTypes.h>
-#include <mach/vm_types.h>
-
-// These are C accessors to the system mapper for non-IOKit clients
-ppnum_t IOMapperIOVMAlloc(unsigned pages);
-void IOMapperIOVMFree(ppnum_t addr, unsigned pages);
-
-ppnum_t IOMapperInsertPage(ppnum_t addr, unsigned offset, ppnum_t page);
-void IOMapperInsertPPNPages(ppnum_t addr, unsigned offset,
-                            ppnum_t *pageList, unsigned pageCount);
-void IOMapperInsertUPLPages(ppnum_t addr, unsigned offset,
-                            upl_page_info_t *pageList, unsigned pageCount);
-__END_DECLS
-
-#if __cplusplus
-
-#include <IOKit/IOService.h>
-#include <IOKit/IOMemoryDescriptor.h>
-
-class OSData;
-
-class IOMapper : public IOService
-{
-    OSDeclareAbstractStructors(IOMapper);
-
-    // Give the platform expert access to setMapperRequired();
-    friend class IOPlatformExpert;
-
-private:
-    enum SystemMapperState {
-        kNoMapper  = 0,
-        kUnknown   = 1,
-        kHasMapper = 2,        // Any other value is pointer to a live mapper
-        kWaitMask  = 3,
-    };
-protected:
-    void *fTable;
-    ppnum_t fTablePhys;
-    IOItemCount fTableSize;
-    OSData *fTableHandle;
-    bool fIsSystem;
-
-    virtual bool start(IOService *provider);
-    virtual void free();
-
-    static void setMapperRequired(bool hasMapper);
-    static void waitForSystemMapper();
-
-    virtual bool initHardware(IOService *provider) = 0;
-
-    virtual bool allocTable(IOByteCount size);
-
-public:
-    // Static routines capable of allocating tables that are physically
-    // contiguous in real memory space.
-    static OSData * NewARTTable(IOByteCount size,
-                                void ** virtAddrP, ppnum_t *physAddrP);
-    static void FreeARTTable(OSData *handle, IOByteCount size);
-
-
-    // To get access to the system mapper IOMapper::gSystem 
-    static IOMapper *gSystem;
-
-    virtual ppnum_t iovmAlloc(IOItemCount pages) = 0;
-    virtual void iovmFree(ppnum_t addr, IOItemCount pages) = 0;
-
-    virtual void iovmInsert(ppnum_t addr, IOItemCount offset, ppnum_t page) = 0;
-    virtual void iovmInsert(ppnum_t addr, IOItemCount offset,
-                            ppnum_t *pageList, IOItemCount pageCount);
-    virtual void iovmInsert(ppnum_t addr, IOItemCount offset,
-                            upl_page_info_t *pageList, IOItemCount pageCount);
-    static void checkForSystemMapper()
-        { if ((vm_address_t) gSystem & kWaitMask) waitForSystemMapper(); };
-
-    // Function will panic if the given address is not found in a valid
-    // iovm mapping.
-    virtual addr64_t mapAddr(IOPhysicalAddress addr) = 0;
-
-private:
-    OSMetaClassDeclareReservedUnused(IOMapper, 0);
-    OSMetaClassDeclareReservedUnused(IOMapper, 1);
-    OSMetaClassDeclareReservedUnused(IOMapper, 2);
-    OSMetaClassDeclareReservedUnused(IOMapper, 3);
-    OSMetaClassDeclareReservedUnused(IOMapper, 4);
-    OSMetaClassDeclareReservedUnused(IOMapper, 5);
-    OSMetaClassDeclareReservedUnused(IOMapper, 6);
-    OSMetaClassDeclareReservedUnused(IOMapper, 7);
-    OSMetaClassDeclareReservedUnused(IOMapper, 8);
-    OSMetaClassDeclareReservedUnused(IOMapper, 9);
-    OSMetaClassDeclareReservedUnused(IOMapper, 10);
-    OSMetaClassDeclareReservedUnused(IOMapper, 11);
-    OSMetaClassDeclareReservedUnused(IOMapper, 12);
-    OSMetaClassDeclareReservedUnused(IOMapper, 13);
-    OSMetaClassDeclareReservedUnused(IOMapper, 14);
-    OSMetaClassDeclareReservedUnused(IOMapper, 15);
-};
-
-#endif /* __cplusplus */
-
-#endif /* !__IOKIT_IOMAPPER_H */
index dc255b38c2eaed276de1293fdfff15775bd79602..9f866e1b4d5482062bbcf758344bc5a77d9e29a0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index eb138fc03c335b6eef97dd38397592de12d2d10d..0212d39477ca19ecfd488c43f0ebb9c28ce03d7b 100644 (file)
@@ -3,37 +3,28 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #ifndef _IOMEMORYDESCRIPTOR_H
 #define _IOMEMORYDESCRIPTOR_H
 
-#include <sys/cdefs.h>
-
 #include <IOKit/IOTypes.h>
 #include <libkern/c++/OSContainers.h>
 
-__BEGIN_DECLS
-#include <mach/memory_object_types.h>
-__END_DECLS
-
 struct IOPhysicalRange
 {
     IOPhysicalAddress  address;
@@ -41,7 +32,6 @@ struct IOPhysicalRange
 };
 
 class IOMemoryMap;
-class IOMapper;
 
 /*
  * Direction of transfer, with respect to the described memory.
@@ -51,30 +41,9 @@ enum IODirection
     kIODirectionNone  = 0x0,   //                    same as VM_PROT_NONE
     kIODirectionIn    = 0x1,   // User land 'read',  same as VM_PROT_READ
     kIODirectionOut   = 0x2,   // User land 'write', same as VM_PROT_WRITE
-    kIODirectionOutIn = kIODirectionOut | kIODirectionIn,
-    kIODirectionInOut = kIODirectionIn  | kIODirectionOut
-};
-
-/*
- * IOOptionBits used in the second withRanges variant
- */
-enum {
-    kIOMemoryDirectionMask     = 0x00000007,
-    kIOMemoryAutoPrepare       = 0x00000008,   // Shared with Buffer MD
-    
-    kIOMemoryTypeVirtual       = 0x00000010,
-    kIOMemoryTypePhysical      = 0x00000020,
-    kIOMemoryTypeUPL           = 0x00000030,
-    kIOMemoryTypeMask          = 0x000000f0,
-
-    kIOMemoryAsReference       = 0x00000100,
-    kIOMemoryBufferPageable    = 0x00000400,
-    kIOMemoryDontMap           = 0x00000800,
+    kIODirectionOutIn = kIODirectionIn | kIODirectionOut,
 };
 
-#define kIOMapperNone  ((IOMapper *) -1)
-#define kIOMapperSystem        ((IOMapper *) 0)
-
 /*! @class IOMemoryDescriptor : public OSObject
     @abstract An abstract base class defining common methods for describing physical or virtual memory.
     @discussion The IOMemoryDescriptor object represents a buffer or range of memory, specified as one or more physical or virtual address ranges. It contains methods to return the memory's physically contiguous segments (fragments), for use with the IOMemoryCursor, and methods to map the memory into any address space with caching and placed mapping options. */
@@ -106,7 +75,7 @@ protected:
     IOOptionBits       _flags;
     void *             _memEntry;
 
-    IODirection         _direction;        /* DEPRECATED: use _flags instead. direction of transfer */
+    IODirection         _direction;        /* direction of transfer */
     IOByteCount         _length;           /* length of all ranges */
     IOOptionBits       _tag;
 
@@ -114,26 +83,11 @@ public:
 
     virtual IOPhysicalAddress getSourceSegment( IOByteCount offset,
                                                IOByteCount * length );
-    OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 0);
-
-/*! @function initWithOptions
-    @abstract Master initialiser for all variants of memory descriptors.  For a more complete description see IOMemoryDescriptor::withOptions.
-    @discussion Note this function can be used to re-init a previously created memory descriptor.
-    @result true on success, false on failure. */
-    virtual bool initWithOptions(void *                buffers,
-                                 UInt32                count,
-                                 UInt32                offset,
-                                 task_t                task,
-                                 IOOptionBits  options,
-                                 IOMapper *    mapper = 0);
-    OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 1);
-
-    virtual addr64_t IOMemoryDescriptor::getPhysicalSegment64( IOByteCount offset,
-                                                               IOByteCount * length );
-    OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 2);
 
 private:
-
+    OSMetaClassDeclareReservedUsed(IOMemoryDescriptor, 0);
+    OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 1);
+    OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 2);
     OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 3);
     OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 4);
     OSMetaClassDeclareReservedUnused(IOMemoryDescriptor, 5);
@@ -203,42 +157,11 @@ public:
     @param asReference If false, the IOMemoryDescriptor object will make a copy of the ranges array, otherwise, the array will be used in situ, avoiding an extra allocation.
     @result The created IOMemoryDescriptor on success, to be released by the caller, or zero on failure. */
 
-     static IOMemoryDescriptor * withRanges(IOVirtualRange * ranges,
-                                            UInt32           withCount,
-                                            IODirection      withDirection,
-                                            task_t           withTask,
-                                            bool             asReference = false);
-
-/*! @function withOptions
-    @abstract Master initialiser for all variants of memory descriptors.
-    @discussion This method creates and initializes an IOMemoryDescriptor for memory it has three main variants: Virtual, Physical & mach UPL.  These variants are selected with the options parameter, see below.  This memory descriptor needs to be prepared before it can be used to extract data from the memory described.  However we temporarily have setup a mechanism that automatically prepares kernel_task memory descriptors at creation time.
-
-
-    @param buffers A pointer to an array of IOVirtualRanges or IOPhysicalRanges if the options:type is Virtual or Physical.  For type UPL it is a upl_t returned by the mach/memory_object_types.h apis, primarily used internally by the UBC.
-
-    @param count options:type = Virtual or Physical count contains a count of the number of entires in the buffers array.  For options:type = UPL this field contains a total length.
-
-    @param offset Only used when options:type = UPL, in which case this field contains an offset for the memory within the buffers upl.
-
-    @param task Only used options:type = Virtual, The task each of the virtual ranges are mapped into.
-
-    @param options
-        kIOMemoryDirectionMask (options:direction)     This nibble indicates the I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures. 
-        kIOMemoryTypeMask (options:type)       kIOMemoryTypeVirtual, kIOMemoryTypePhysical, kIOMemoryTypeUPL Indicates that what type of memory basic memory descriptor to use.  This sub-field also controls the interpretation of the buffers, count, offset & task parameters.
-        kIOMemoryAsReference   For options:type = Virtual or Physical this indicate that the memory descriptor need not copy the ranges array into local memory.  This is an optimisation to try to minimise unnecessary allocations.
-        kIOMemoryBufferPageable        Only used by the IOBufferMemoryDescriptor as an indication that the kernel virtual memory is in fact pageable and we need to use the kernel pageable submap rather than the default map.
-        kIOMemoryNoAutoPrepare Indicates that the temporary AutoPrepare of kernel_task memory should not be performed.
-    
-    @param mapper Which IOMapper should be used to map the in-memory physical addresses into I/O space addresses.  Defaults to 0 which indicates that the system mapper is to be used, if present.  
-
-    @result The created IOMemoryDescriptor on success, to be released by the caller, or zero on failure. */
-
-    static IOMemoryDescriptor *withOptions(void *      buffers,
-                                           UInt32      count,
-                                           UInt32      offset,
-                                           task_t      task,
-                                           IOOptionBits        options,
-                                           IOMapper *  mapper = 0);
+     static IOMemoryDescriptor * withRanges(IOVirtualRange *   ranges,
+                                            UInt32             withCount,
+                                            IODirection                withDirection,
+                                            task_t            withTask,
+                                            bool               asReference = false);
 
 /*! @function withPhysicalRanges
     @abstract Create an IOMemoryDescriptor to describe one or more physical ranges.
@@ -252,7 +175,7 @@ public:
     static IOMemoryDescriptor * withPhysicalRanges(
                                             IOPhysicalRange *  ranges,
                                             UInt32             withCount,
-                                            IODirection        withDirection,
+                                            IODirection                withDirection,
                                             bool               asReference = false);
 
 /*! @function withSubRange
@@ -264,10 +187,10 @@ public:
     @param withDirection An I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures. This is used over the direction of the parent descriptor.
     @result The created IOMemoryDescriptor on success, to be released by the caller, or zero on failure. */
 
-    static IOMemoryDescriptor *        withSubRange(IOMemoryDescriptor *of,
-                                            IOByteCount offset,
-                                            IOByteCount length,
-                                             IODirection withDirection);
+    static IOMemoryDescriptor *        withSubRange(IOMemoryDescriptor *       of,
+                                            IOByteCount                offset,
+                                            IOByteCount                length,
+                                             IODirection               withDirection);
 
 /*! @function initWithAddress
     @abstract Initialize or reinitialize an IOMemoryDescriptor to describe one virtual range of the kernel task.
@@ -318,11 +241,11 @@ public:
     @param asReference If false, the IOMemoryDescriptor object will make a copy of the ranges array, otherwise, the array will be used in situ, avoiding an extra allocation.
     @result true on success, false on failure. */
 
-    virtual bool initWithRanges(IOVirtualRange * ranges,
-                                UInt32           withCount,
-                                IODirection      withDirection,
-                                task_t           withTask,
-                                bool             asReference = false) = 0;
+    virtual bool initWithRanges(        IOVirtualRange * ranges,
+                                        UInt32           withCount,
+                                        IODirection      withDirection,
+                                        task_t           withTask,
+                                        bool             asReference = false) = 0;
 
 /*! @function initWithPhysicalRanges
     @abstract Initialize or reinitialize an IOMemoryDescriptor to describe one or more physical ranges.
@@ -413,7 +336,7 @@ public:
 
 /*! @function prepare
     @abstract Prepare the memory for an I/O transfer.
-    @discussion This involves paging in the memory, if necessary, and wiring it down for the duration of the transfer.  The complete() method completes the processing of the memory after the I/O transfer finishes.  Note that the prepare call is not thread safe and it is expected that the client will more easily be able to guarantee single threading a particular memory descriptor.
+    @discussion This involves paging in the memory, if necessary, and wiring it down for the duration of the transfer.  The complete() method completes the processing of the memory after the I/O transfer finishes.  This method needn't called for non-pageable memory.
     @param forDirection The direction of the I/O just completed, or kIODirectionNone for the direction specified by the memory descriptor.
     @result An IOReturn code. */
 
@@ -421,8 +344,8 @@ public:
 
 /*! @function complete
     @abstract Complete processing of the memory after an I/O transfer finishes.
-    @discussion This method should not be called unless a prepare was previously issued; the prepare() and complete() must occur in pairs, before and after an I/O transfer involving pageable memory.  In 10.3 or greater systems the direction argument to complete is not longer respected.  The direction is totally determined at prepare() time.
-    @param forDirection DEPRECATED The direction of the I/O just completed, or kIODirectionNone for the direction specified by the memory descriptor.
+    @discussion This method should not be called unless a prepare was previously issued; the prepare() and complete() must occur in pairs, before and after an I/O transfer involving pageable memory.
+    @param forDirection The direction of the I/O just completed, or kIODirectionNone for the direction specified by the memory descriptor.
     @result An IOReturn code. */
 
     virtual IOReturn complete(IODirection forDirection = kIODirectionNone) = 0;
@@ -587,7 +510,7 @@ public:
 
     virtual IOReturn           unmap() = 0;
 
-    virtual void               taskDied() = 0;
+    virtual void                       taskDied() = 0;
 };
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -598,11 +521,8 @@ public:
 // might be created by IOMemoryDescriptor::withAddress(), but there should be 
 // no need to reference as anything but a generic IOMemoryDescriptor *.
 
-// Also these flags should not overlap with the options to
-//     IOMemoryDescriptor::initWithRanges(... IOOptionsBits options);
-
 enum {
-    kIOMemoryPreparedReadOnly  = 0x00008000,
+    kIOMemoryRequiresWire      = 0x00000001
 };
 
 class IOGeneralMemoryDescriptor : public IOMemoryDescriptor
@@ -611,8 +531,8 @@ class IOGeneralMemoryDescriptor : public IOMemoryDescriptor
 
 protected:
     union {
-        IOVirtualRange *  v;
-        IOPhysicalRange * p;
+    IOVirtualRange *   v;
+    IOPhysicalRange *  p;
     }                  _ranges;            /* list of address ranges */
     unsigned           _rangesCount;       /* number of address ranges in list */
     bool               _rangesIsAllocated; /* is list allocated by us? */
@@ -620,70 +540,48 @@ protected:
     task_t             _task;               /* task where all ranges are mapped to */
 
     union {
-        IOVirtualRange v;
-        IOPhysicalRange        p;
+    IOVirtualRange     v;
+    IOPhysicalRange    p;
     }                  _singleRange;      /* storage space for a single range */
 
     unsigned           _wireCount;        /* number of outstanding wires */
 
-    /* DEPRECATED */ vm_address_t _cachedVirtualAddress;  /* a cached virtual-to-physical */
-
-    /* DEPRECATED */ IOPhysicalAddress _cachedPhysicalAddress;
+    vm_address_t       _cachedVirtualAddress;  /* a cached virtual-to-physical */
+    IOPhysicalAddress  _cachedPhysicalAddress; /*    mapping, for optimization */
 
     bool               _initialized;      /* has superclass been initialized? */
 
     virtual void free();
 
-
-private:
-    // Internal API may be made virtual at some time in the future.
-    IOReturn wireVirtual(IODirection forDirection);
-
+protected:
     /* DEPRECATED */ IOByteCount _position; /* absolute position over all ranges */
     /* DEPRECATED */ virtual void setPosition(IOByteCount position);
 
-/*
- * DEPRECATED IOByteCount _positionAtIndex; // relative position within range #n
- *
- * Re-use the _positionAtIndex as a count of the number of pages in
- * this memory descriptor.  Convieniently vm_address_t is an unsigned integer
- * type so I can get away without having to change the type.
- */
-    unsigned int               _pages;
-
-/* DEPRECATED */ unsigned    _positionAtOffset;  //range #n in which position is now
-
+private:
+    /* DEPRECATED */ unsigned    _positionAtIndex;  /* range #n in which position is now */
+    /* DEPRECATED */ IOByteCount _positionAtOffset; /* relative position within range #n */
     OSData *_memoryEntries;
 
     /* DEPRECATED */ vm_offset_t _kernPtrAligned;
     /* DEPRECATED */ unsigned    _kernPtrAtIndex;
     /* DEPRECATED */ IOByteCount  _kernSize;
-
     /* DEPRECATED */ virtual void mapIntoKernel(unsigned rangeIndex);
     /* DEPRECATED */ virtual void unmapFromKernel();
+    inline vm_map_t getMapForTask( task_t task, vm_address_t address );
 
 public:
     /*
      * IOMemoryDescriptor required methods
      */
 
-    // Master initaliser
-    virtual bool initWithOptions(void *                buffers,
-                                 UInt32                count,
-                                 UInt32                offset,
-                                 task_t                task,
-                                 IOOptionBits  options,
-                                 IOMapper *    mapper = 0);
-
-    // Secondary initialisers
-    virtual bool initWithAddress(void *                address,
-                                 IOByteCount   withLength,
-                                 IODirection   withDirection);
+    virtual bool initWithAddress(void *       address,
+                                 IOByteCount    withLength,
+                                 IODirection  withDirection);
 
-    virtual bool initWithAddress(vm_address_t  address,
+    virtual bool initWithAddress(vm_address_t address,
                                  IOByteCount    withLength,
-                                 IODirection   withDirection,
-                                 task_t                withTask);
+                                 IODirection  withDirection,
+                                 task_t       withTask);
 
     virtual bool initWithPhysicalAddress(
                                 IOPhysicalAddress      address,
@@ -742,6 +640,10 @@ protected:
 
     virtual void free();
 
+    virtual bool initSubRange( IOMemoryDescriptor * parent,
+                               IOByteCount offset, IOByteCount length,
+                               IODirection withDirection );
+
     virtual bool initWithAddress(void *       address,
                                  IOByteCount    withLength,
                                  IODirection  withDirection);
@@ -774,18 +676,6 @@ protected:
     IOMemoryDescriptor::withSubRange;
 
 public:
-    /*
-     * Initialize or reinitialize an IOSubMemoryDescriptor to describe
-     * a subrange of an existing descriptor.
-     *
-     * An IOSubMemoryDescriptor can be re-used by calling initSubRange
-     * again on an existing instance -- note that this behavior is not
-     * commonly supported in other IOKit classes, although it is here.
-     */
-    virtual bool initSubRange( IOMemoryDescriptor * parent,
-                               IOByteCount offset, IOByteCount length,
-                               IODirection withDirection );
-
     /*
      * IOMemoryDescriptor required methods
      */
index 5df7bffe23f2534c3b34a7d958f6b54ab66ce2fe..d5bd33e9eee2ff371481c768af6c786f119aabbb 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7fdafe43da483c16bba62bad5f4942f34f31545a..1032842a6f856e638cf3e8bc836cb04636eb9ef8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e3e1772488d14528c5e46217b1e449582be43340..1e09641a7b97c37c3652842a6facc6e735a865b1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5487dc1b48c88cc5b895831d7ace052a38172cae..24e3d2560cbf658b224aadd73b639413cb339e5b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e5ad2a89e2124bdc6d2bad500d783d0cfe0d2e9c..fadb9eea53706a7893321fd79b3444ad35e9ab30 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -63,8 +60,6 @@ extern void PESetGMTTimeOfDay( long secs );
 #ifdef __cplusplus
 } /* extern "C" */
 
-#define kIOPlatformMapperPresentKey "IOPlatformMapperPresent"
-
 extern OSSymbol * gPlatformInterruptControllerName;
 
 class IORangeAllocator;
index a0f2aeaa6b1aa40826c2c0f48c5d97b286930bf4..761084e84d566bac857691baf89d4398ee4a8e5b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index daa978ddffce446ee82cc649705ffbb1f2f29e09..315945052671c5d9531b1733fdb6220a29a83b0f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ae96524e455082c80f681ebf6f8ffb5f2d8f633a..6664ca43709f9c8b377969f84d18a481c0242e09 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e9f15a5c5f475ed944a4a16b440f00baf370b0d0..4e7111324176a5c91cb6ba3c0628f26ffacd7ee5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -1838,7 +1835,6 @@ private:
     bool responseValid ( unsigned long x );
     IOReturn allowCancelCommon ( void );
     void computeDesiredState ( void );
-    void rebuildChildClampBits ( void );
 };
 
 #endif /* ! _IOKIT_IOSERVICE_H */
index 29a6039b8dca0bfa8b6469f50a2527e0c07b8c5c..965201f2abcf2d0c9de4fcc908ce230f65b073b0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 803ec162cbd881dacb59e644a95f648898626ce1..0f9e7bf33c39e1aef33d8e5047cb45688b9dc861 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1db552785c3c58f1086325a855c1a9c69c0098c4..3bb2df5ac6cb1da171288a5698ab5cb583d1dde1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0821db9477ff7ca02252772fca9371c3d6618c4a..cf07474f8b58c1767d7c5912e1fefa3e3af3c03f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a55753bc895112c9deff23d5ed648f50d3995dfb..fd73358217760ab2a9e9d24e47247d32a2216573 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c7f5e05e8655286d8c39e9de1bae63fe83420c33..6a5f344f22146954a9fa20862b3c67ea3d147115 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -171,21 +168,19 @@ enum {
     kIODefaultCache            = 0,
     kIOInhibitCache            = 1,
     kIOWriteThruCache          = 2,
-    kIOCopybackCache           = 3,
-    kIOWriteCombineCache       = 4
+    kIOCopybackCache           = 3
 };
 
 // IOMemory mapping options
 enum {
     kIOMapAnywhere             = 0x00000001,
 
-    kIOMapCacheMask            = 0x00000700,
+    kIOMapCacheMask            = 0x00000300,
     kIOMapCacheShift           = 8,
-    kIOMapDefaultCache         = kIODefaultCache      << kIOMapCacheShift,
-    kIOMapInhibitCache         = kIOInhibitCache      << kIOMapCacheShift,
-    kIOMapWriteThruCache       = kIOWriteThruCache    << kIOMapCacheShift,
-    kIOMapCopybackCache                = kIOCopybackCache     << kIOMapCacheShift,
-    kIOMapWriteCombineCache    = kIOWriteCombineCache << kIOMapCacheShift,
+    kIOMapDefaultCache         = kIODefaultCache   << kIOMapCacheShift,
+    kIOMapInhibitCache         = kIOInhibitCache   << kIOMapCacheShift,
+    kIOMapWriteThruCache       = kIOWriteThruCache << kIOMapCacheShift,
+    kIOMapCopybackCache                = kIOCopybackCache  << kIOMapCacheShift,
 
     kIOMapUserOptionsMask      = 0x00000fff,
 
index 117db52591059ca320df7e5af79765b7c7f08201..df0686394af3d0ff257e32c7e477845943404208 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 21bfe7abcd909e980dfb9ad9560a9093435ff2a7..f3c6e1a1e001b676042b5c5175a93f366e4f48f8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2ae91e0c7cf748a9a6675c78776f0e9664fd0bdc..9368f3eff6bb19df5a86c7dc66887415f2b7bff4 100644 (file)
@@ -13,6 +13,7 @@ include $(MakeInc_def)
 INSTINC_SUBDIRS = \
         adb \
        nvram \
+        pci \
        platform \
        power \
        pwr_mgt \
index a6cfe200362947346525c9fdd41aa5aeae740916..74bcb1f64e1f6a99bda964842d828ac271c9b3af 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4f8c3fb48319d4999ea81d6be5a40f8feccaee29..e7cf3317d4ca951fedb692019655ceff8191629f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 886fb3fdaab34c875179f9c590e89a6fd188ae57..886f9529f48bd7853ce7cf76778beea649c65f6e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 71c6971311650291e0c317470204b9f79b6b3246..c8c1d7c13baecec8d04b9d5d3d5f8f39a043ab6f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1e50fb6fbef1ef946be73380af3f558b13e91a97..b5b519f64867ea03a710d2d03a334ab47acb6b4c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1c923e9ace4a725e07312d20bd0be9d33b64daa3..e296be5577dc9523a1d96d30f2adcaf1707e345f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 475b60acac2e0c3f30f2225e91fae15f9ddb542a..575395cc1f6e0522b161e5c554b62d43d830711a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0478bc429482438269765c2adbefd267389c91a1..00eb2dfdba779eac37b1b27f8c347f90a546a340 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e20600024e7e89af9f228cbe0a7f0fef93c0c490..543a83ed449ee17220e169ea6af0c55d09e39085 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a1f605bf3462d3664da278978fdd70c85f3c3c8a..eccee0bc4b4b1e6b24cdc093b8b8705833e0d721 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
diff --git a/iokit/IOKit/pci/IOAGPDevice.h b/iokit/IOKit/pci/IOAGPDevice.h
new file mode 100644 (file)
index 0000000..06c58dd
--- /dev/null
@@ -0,0 +1,192 @@
+/*
+ * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*
+ * Copyright (c) 1999 Apple Computer, Inc.  All rights reserved. 
+ *
+ * HISTORY
+ *
+ */
+
+
+#ifndef _IOKIT_IOAGPDEVICE_H
+#define _IOKIT_IOAGPDEVICE_H
+
+#include <IOKit/IORangeAllocator.h>
+#include <IOKit/pci/IOPCIDevice.h>
+
+/* Definitions of AGP config registers */
+enum {
+    kIOPCIConfigAGPStatusOffset         = 4,
+    kIOPCIConfigAGPCommandOffset = 8
+};
+
+/* Definitions of AGP Command & Status registers */
+enum {
+    kIOAGPRequestQueueMask     = 0xff000000,
+    kIOAGPSideBandAddresssing  = 0x00000200,
+    kIOAGPEnable               = 0x00000100,
+    kIOAGP4GbAddressing                = 0x00000020,
+    kIOAGPFastWrite            = 0x00000010,
+    kIOAGP4xDataRate           = 0x00000004,
+    kIOAGP2xDataRate           = 0x00000002,
+    kIOAGP1xDataRate           = 0x00000001
+};
+
+enum {
+    kIOAGPGartInvalidate       = 0x00000001
+};
+
+// getAGPStatus() defines
+enum {
+    kIOAGPDefaultStatus                = 0
+};
+enum {
+    kIOAGPIdle                 = 0x00000001,
+    kIOAGPInvalidGARTEntry     = 0x00000002,
+    kIOAGPAccessOutOfRange     = 0x00000004
+};
+
+#define kIOAGPBusFlagsKey      "IOAGPFlags"
+enum {
+    kIOAGPGartIdleInvalidate   = 0x00000001
+};
+
+// masterState
+enum {
+    kIOAGPStateEnabled         = 0x00000001,
+    kIOAGPStateEnablePending   = 0x00010000
+};
+
+
+/*! @class IOAGPDevice : public IOPCIDevice
+    @abstract An IOService class representing an AGP master device.
+    @discussion The discovery of an AGP master device by the PCI bus family results in an instance of the IOAGPDevice being created and published. It provides services specific to AGP, in addition to the PCI services supplied by its superclass IOPCIDevice. */
+
+class IOAGPDevice : public IOPCIDevice
+{
+    OSDeclareDefaultStructors(IOAGPDevice)
+
+protected:
+
+/*! @struct ExpansionData
+    @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future.
+    */    
+    struct ExpansionData { };
+
+/*! @var reserved
+    Reserved for future use.  (Internal use only)  */
+    ExpansionData *reserved;
+
+public:
+    UInt32     masterState;
+    UInt8      masterAGPRegisters;
+
+/*! @function createAGPSpace
+    @abstract Allocates the AGP space, and enables AGP transactions on the master and slave.
+    @discussion This method should be called by the driver for the AGP master device  to set the size of the space and enable AGP transactions. It will destroy any AGP space currently allocated.
+    @param options No options are currently defined, pass zero.
+    @param address The physical range allocated for the AGP space is passed back to the caller.
+    @param length An in/out parameter - the caller sets the devices maximum AGP addressing and the actual size created is passed back.
+    @result An IOReturn code indicating success or failure. */
+
+    virtual IOReturn createAGPSpace( IOOptionBits options,
+                                   IOPhysicalAddress * address, 
+                                   IOPhysicalLength * length );
+
+/*! @function destroyAGPSpace
+    @abstract Destroys the AGP space, and disables AGP transactions on the master and slave.
+    @discussion This method should be called by the driver to shutdown AGP transactions and release resources. */
+
+    virtual IOReturn destroyAGPSpace( void );
+
+/*! @function getAGPRangeAllocator
+    @abstract Accessor to obtain the AGP range allocator.
+    @discussion To allocate ranges in AGP space, obtain a range allocator for the space with this method. It is retained while the space is created (until destroyAGPSpace is called) and should not be released by the caller.
+    @result A pointer to the range allocator for the AGP space. */
+
+    virtual IORangeAllocator * getAGPRangeAllocator( void );
+
+/*! @function getAGPStatus
+    @abstract Returns the current state of the AGP bus.
+    @discussion Returns state bits for the AGP bus. Only one type of status is currently defined. 
+    @param which Type of status - only kIOAGPDefaultStatus is currently valid.
+    @result Mask of status bits for the AGP bus. */
+
+    virtual IOOptionBits getAGPStatus( IOOptionBits which = kIOAGPDefaultStatus );
+
+/*! @function commitAGPMemory
+    @abstract Makes memory addressable by AGP transactions.
+    @discussion Makes the memory described by the IOMemoryDescriptor object addressable by AGP by entering its pages into the GART array, given an offset into AGP space supplied by the caller (usually allocated by the AGP range allocator). It  is the callers responsibility to prepare non-kernel pageable memory before calling this method, with IOMemoryDescriptor::prepare.
+    @param memory A IOMemoryDescriptor object describing the memory to add to the GART.
+    @param agpOffset An offset into AGP space that the caller has allocated - usually allocated by the AGP range allocator.
+    @param options Pass kIOAGPGartInvalidate if the AGP target should invalidate any GART TLB.
+    @result An IOReturn code indicating success or failure. */
+
+    virtual IOReturn commitAGPMemory( IOMemoryDescriptor * memory,
+                                       IOByteCount agpOffset,
+                                       IOOptionBits options = 0 );
+
+/*! @function releaseAGPMemory
+    @abstract Releases memory addressable by AGP transactions.
+    @discussion Makes the memory described by the IOMemoryDescriptor object unaddressable by AGP by removing its pages from the GART array, given an offset into AGP space supplied by the caller (usually allocated by the AGP range allocator). It  is the callers responsibility to complete non-kernel pageable memory before calling this method, with IOMemoryDescriptor::complete.
+    @param memory A IOMemoryDescriptor object describing the memory to remove from the GART.
+    @param agpOffset An offset into AGP space that the caller has allocated - usually allocated by the AGP range allocator.
+    @param options Pass kIOAGPGartInvalidate if the AGP target should invalidate any GART TLB.
+    @result An IOReturn code indicating success or failure. */
+
+    virtual IOReturn releaseAGPMemory( IOMemoryDescriptor * memory, 
+                                       IOByteCount agpOffset,
+                                       IOOptionBits options = 0 );
+
+    virtual IOReturn resetAGP( IOOptionBits options = 0 );
+
+/*! @function getAGPSpace
+    @abstract Returns the allocated AGP space.
+    @discussion This method can be called by the driver for the AGP master device to retrieve the physical address and size of the space created with createAGPSpace.
+    @param address The physical range allocated for the AGP space is passed back to the caller. Zero may be pased if the address is not needed by the caller.
+    @param length The size of the the AGP space created is passed back. Zero may be pased if the length is not needed by the caller.
+    @result An IOReturn code indicating success or failure. */
+
+    virtual IOReturn getAGPSpace( IOPhysicalAddress * address, 
+                                   IOPhysicalLength * length );
+
+    // Unused Padding
+    OSMetaClassDeclareReservedUnused(IOAGPDevice,  0);
+    OSMetaClassDeclareReservedUnused(IOAGPDevice,  1);
+    OSMetaClassDeclareReservedUnused(IOAGPDevice,  2);
+    OSMetaClassDeclareReservedUnused(IOAGPDevice,  3);
+    OSMetaClassDeclareReservedUnused(IOAGPDevice,  4);
+    OSMetaClassDeclareReservedUnused(IOAGPDevice,  5);
+    OSMetaClassDeclareReservedUnused(IOAGPDevice,  6);
+    OSMetaClassDeclareReservedUnused(IOAGPDevice,  7);
+    OSMetaClassDeclareReservedUnused(IOAGPDevice,  8);
+    OSMetaClassDeclareReservedUnused(IOAGPDevice,  9);
+    OSMetaClassDeclareReservedUnused(IOAGPDevice, 10);
+    OSMetaClassDeclareReservedUnused(IOAGPDevice, 11);
+    OSMetaClassDeclareReservedUnused(IOAGPDevice, 12);
+    OSMetaClassDeclareReservedUnused(IOAGPDevice, 13);
+    OSMetaClassDeclareReservedUnused(IOAGPDevice, 14);
+    OSMetaClassDeclareReservedUnused(IOAGPDevice, 15);
+    OSMetaClassDeclareReservedUnused(IOAGPDevice, 16);
+};
+
+#endif /* ! _IOKIT_IOAGPDEVICE_H */
diff --git a/iokit/IOKit/pci/IOPCIBridge.h b/iokit/IOKit/pci/IOPCIBridge.h
new file mode 100644 (file)
index 0000000..9cfe7a8
--- /dev/null
@@ -0,0 +1,271 @@
+/*
+ * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*
+ * Copyright (c) 1998-2000 Apple Computer, Inc.  All rights reserved. 
+ *
+ * HISTORY
+ *
+ */
+
+
+#ifndef _IOKIT_IOPCIBRIDGE_H
+#define _IOKIT_IOPCIBRIDGE_H
+
+#include <IOKit/IOService.h>
+#include <IOKit/IODeviceMemory.h>
+#include <IOKit/pci/IOAGPDevice.h>
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+class IOPCIBridge : public IOService
+{
+    friend class IOPCIDevice;
+
+    OSDeclareAbstractStructors(IOPCIBridge)
+
+private:
+    IORegistryEntry * findMatching( OSIterator * in, IOPCIAddressSpace space );
+    void publishNubs( OSIterator * kids, UInt32 index );
+    virtual bool isDTNub( IOPCIDevice * nub );
+    static void nvLocation( IORegistryEntry * entry,
+       UInt8 * busNum, UInt8 * deviceNum, UInt8 * functionNum );
+
+protected:
+    IORangeAllocator * bridgeMemoryRanges;
+    IORangeAllocator * bridgeIORanges;
+
+/*! @struct ExpansionData
+    @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future.
+    */    
+    struct ExpansionData { };
+
+/*! @var reserved
+    Reserved for future use.  (Internal use only)  */
+    ExpansionData *reserved;
+
+protected:
+    virtual void probeBus( IOService * provider, UInt8 busNum );
+
+    virtual UInt8 firstBusNum( void );
+    virtual UInt8 lastBusNum( void );
+
+    virtual void spaceFromProperties( OSDictionary * propTable,
+                                       IOPCIAddressSpace * space );
+    virtual OSDictionary * constructProperties( IOPCIAddressSpace space );
+
+    virtual IOPCIDevice * createNub( OSDictionary * from );
+
+    virtual bool initializeNub( IOPCIDevice * nub, OSDictionary * from );
+
+    virtual bool publishNub( IOPCIDevice * nub, UInt32 index );
+
+    virtual bool addBridgeMemoryRange( IOPhysicalAddress start,
+                                       IOPhysicalLength length, bool host );
+
+    virtual bool addBridgeIORange( IOByteCount start, IOByteCount length );
+
+    virtual bool constructRange( IOPCIAddressSpace * flags,
+                                 IOPhysicalAddress phys, IOPhysicalLength len,
+                                 OSArray * array );
+
+    virtual bool matchNubWithPropertyTable( IOService * nub,
+                                           OSDictionary * propertyTable,
+                                            SInt32 * score );
+
+    virtual bool compareNubName( const IOService * nub, OSString * name,
+                                OSString ** matched = 0 ) const;
+
+    virtual bool pciMatchNub( IOPCIDevice * nub,
+                                OSDictionary * table, SInt32 * score);
+
+    virtual bool matchKeys( IOPCIDevice * nub, const char * keys,
+                               UInt32 defaultMask, UInt8 regNum );
+
+    virtual IOReturn getNubResources( IOService * nub );
+
+    virtual IOReturn getNubAddressing( IOPCIDevice * nub );
+
+    virtual IOReturn getDTNubAddressing( IOPCIDevice * nub );
+
+public:
+
+    virtual bool start( IOService * provider );
+
+    virtual bool configure( IOService * provider );
+
+    /* * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+    virtual IODeviceMemory * ioDeviceMemory( void ) = 0;
+
+    virtual UInt32 configRead32( IOPCIAddressSpace space, UInt8 offset ) = 0;
+    virtual void configWrite32( IOPCIAddressSpace space,
+                                       UInt8 offset, UInt32 data ) = 0;
+    virtual UInt16 configRead16( IOPCIAddressSpace space, UInt8 offset ) = 0;
+    virtual void configWrite16( IOPCIAddressSpace space,
+                                       UInt8 offset, UInt16 data ) = 0;
+    virtual UInt8 configRead8( IOPCIAddressSpace space, UInt8 offset ) = 0;
+    virtual void configWrite8( IOPCIAddressSpace space,
+                                       UInt8 offset, UInt8 data ) = 0;
+
+    virtual IOPCIAddressSpace getBridgeSpace( void ) = 0;
+
+    virtual UInt32 findPCICapability( IOPCIAddressSpace space,
+                                      UInt8 capabilityID, UInt8 * offset = 0 );
+
+    virtual IOReturn setDevicePowerState( IOPCIDevice * device,
+                                          unsigned long whatToDo );
+    virtual IOReturn saveDeviceState( IOPCIDevice * device,
+                                      IOOptionBits options = 0 );
+    virtual IOReturn restoreDeviceState( IOPCIDevice * device,
+                                         IOOptionBits options = 0 );
+
+    /* * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+    virtual IOReturn createAGPSpace( IOAGPDevice * master,
+                                    IOOptionBits options,
+                                    IOPhysicalAddress * address, 
+                                    IOPhysicalLength * length );
+
+    virtual IOReturn destroyAGPSpace( IOAGPDevice * master );
+
+    virtual IORangeAllocator * getAGPRangeAllocator( IOAGPDevice * master );
+
+    virtual IOOptionBits getAGPStatus( IOAGPDevice * master,
+                                      IOOptionBits options = 0 );
+    virtual IOReturn resetAGPDevice( IOAGPDevice * master,
+                                     IOOptionBits options = 0 );
+
+    virtual IOReturn getAGPSpace( IOAGPDevice * master,
+                                  IOPhysicalAddress * address, 
+                                 IOPhysicalLength * length );
+
+    virtual IOReturn commitAGPMemory( IOAGPDevice * master, 
+                                     IOMemoryDescriptor * memory,
+                                     IOByteCount agpOffset,
+                                     IOOptionBits options );
+
+    virtual IOReturn releaseAGPMemory(  IOAGPDevice * master, 
+                                       IOMemoryDescriptor * memory, 
+                                       IOByteCount agpOffset,
+                                       IOOptionBits options );
+
+    // Unused Padding
+    OSMetaClassDeclareReservedUnused(IOPCIBridge,  0);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge,  1);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge,  2);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge,  3);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge,  4);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge,  5);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge,  6);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge,  7);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge,  8);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge,  9);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge, 10);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge, 11);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge, 12);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge, 13);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge, 14);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge, 15);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge, 16);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge, 17);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge, 18);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge, 19);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge, 20);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge, 21);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge, 22);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge, 23);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge, 24);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge, 25);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge, 26);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge, 27);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge, 28);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge, 29);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge, 30);
+    OSMetaClassDeclareReservedUnused(IOPCIBridge, 31);
+};
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#define kIOPCIBridgeRegs (32)
+
+class IOPCI2PCIBridge : public IOPCIBridge
+{
+    OSDeclareDefaultStructors(IOPCI2PCIBridge)
+
+private:
+
+    IOPCIDevice * bridgeDevice;
+    UInt32        bridgeState[kIOPCIBridgeRegs];
+
+protected:
+/*! @struct ExpansionData
+    @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future.
+    */    
+    struct ExpansionData { };
+
+/*! @var reserved
+    Reserved for future use.  (Internal use only)  */
+    ExpansionData *reserved;
+
+    virtual UInt8 firstBusNum( void );
+    virtual UInt8 lastBusNum( void );
+
+public:
+    virtual IOService * probe( IOService *     provider,
+                                SInt32 *       score );
+
+    virtual bool configure( IOService * provider );
+
+    virtual void saveBridgeState( void );
+
+    virtual void restoreBridgeState( void );
+
+    virtual bool publishNub( IOPCIDevice * nub, UInt32 index );
+
+    virtual IODeviceMemory * ioDeviceMemory( void );
+
+    virtual IOPCIAddressSpace getBridgeSpace( void );
+
+    virtual UInt32 configRead32( IOPCIAddressSpace space, UInt8 offset );
+    virtual void configWrite32( IOPCIAddressSpace space,
+                                       UInt8 offset, UInt32 data );
+    virtual UInt16 configRead16( IOPCIAddressSpace space, UInt8 offset );
+    virtual void configWrite16( IOPCIAddressSpace space,
+                                       UInt8 offset, UInt16 data );
+    virtual UInt8 configRead8( IOPCIAddressSpace space, UInt8 offset );
+    virtual void configWrite8( IOPCIAddressSpace space,
+                                       UInt8 offset, UInt8 data );
+
+    // Unused Padding
+    OSMetaClassDeclareReservedUnused(IOPCI2PCIBridge,  0);
+    OSMetaClassDeclareReservedUnused(IOPCI2PCIBridge,  1);
+    OSMetaClassDeclareReservedUnused(IOPCI2PCIBridge,  2);
+    OSMetaClassDeclareReservedUnused(IOPCI2PCIBridge,  3);
+    OSMetaClassDeclareReservedUnused(IOPCI2PCIBridge,  4);
+    OSMetaClassDeclareReservedUnused(IOPCI2PCIBridge,  5);
+    OSMetaClassDeclareReservedUnused(IOPCI2PCIBridge,  6);
+    OSMetaClassDeclareReservedUnused(IOPCI2PCIBridge,  7);
+    OSMetaClassDeclareReservedUnused(IOPCI2PCIBridge,  8);
+};
+
+#endif /* ! _IOKIT_IOPCIBRIDGE_H */
index 0d340006ea9a838a121e75ac6a110aebe6092142..158e85a2a7689cf4a793f30caf4e76ab3d5ae126 100644 (file)
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
+/*
+ * Copyright (c) 1998 Apple Computer, Inc.  All rights reserved. 
+ *
+ * HISTORY
+ *
+ */
+
 
 #ifndef _IOKIT_IOPCIDEVICE_H
 #define _IOKIT_IOPCIDEVICE_H
 
-#warning IOPCIDevice.h moved to IOPCIFamily project
-#warning IOPCIDevice.h will be removed from xnu; do not edit or add new usage
-
 #include <IOKit/IOService.h>
 
+/* Definitions of PCI Config Registers */
+enum {
+    kIOPCIConfigVendorID               = 0x00,
+    kIOPCIConfigDeviceID               = 0x02,
+    kIOPCIConfigCommand                        = 0x04,
+    kIOPCIConfigStatus                 = 0x06,
+    kIOPCIConfigRevisionID             = 0x08,
+    kIOPCIConfigClassCode              = 0x09,
+    kIOPCIConfigCacheLineSize          = 0x0C,
+    kIOPCIConfigLatencyTimer           = 0x0D,
+    kIOPCIConfigHeaderType             = 0x0E,
+    kIOPCIConfigBIST                   = 0x0F,
+    kIOPCIConfigBaseAddress0           = 0x10,
+    kIOPCIConfigBaseAddress1           = 0x14,
+    kIOPCIConfigBaseAddress2           = 0x18,
+    kIOPCIConfigBaseAddress3           = 0x1C,
+    kIOPCIConfigBaseAddress4           = 0x20,
+    kIOPCIConfigBaseAddress5           = 0x24,
+    kIOPCIConfigCardBusCISPtr          = 0x28,
+    kIOPCIConfigSubSystemVendorID      = 0x2C,
+    kIOPCIConfigSubSystemID            = 0x2E,
+    kIOPCIConfigExpansionROMBase       = 0x30,
+    kIOPCIConfigCapabilitiesPtr                = 0x34,
+    kIOPCIConfigInterruptLine          = 0x3C,
+    kIOPCIConfigInterruptPin           = 0x3D,
+    kIOPCIConfigMinimumGrant           = 0x3E,
+    kIOPCIConfigMaximumLatency         = 0x3F
+};
+
+/* Definitions of Capabilities PCI Config Register */
+enum {
+    kIOPCICapabilityIDOffset           = 0x00,
+    kIOPCINextCapabilityOffset         = 0x01,
+    kIOPCIPowerManagementCapability    = 0x01,
+    kIOPCIAGPCapability                        = 0x02
+};
+
+/* Space definitions */
+enum {
+    kIOPCIConfigSpace          = 0,
+    kIOPCIIOSpace              = 1,
+    kIOPCI32BitMemorySpace     = 2,
+    kIOPCI64BitMemorySpace     = 3
+};
+
+/* Command register definitions */
+enum {
+    kIOPCICommandIOSpace               = 0x0001,
+    kIOPCICommandMemorySpace           = 0x0002,
+    kIOPCICommandBusMaster             = 0x0004,
+    kIOPCICommandSpecialCycles         = 0x0008,
+    kIOPCICommandMemWrInvalidate       = 0x0010,
+    kIOPCICommandPaletteSnoop          = 0x0020,
+    kIOPCICommandParityError           = 0x0040,
+    kIOPCICommandAddressStepping       = 0x0080,
+    kIOPCICommandSERR                  = 0x0100,
+    kIOPCICommandFastBack2Back         = 0x0200
+};
+
+/* Status register definitions */
+enum {
+    kIOPCIStatusCapabilities           = 0x0010,
+    kIOPCIStatusPCI66                  = 0x0020,
+    kIOPCIStatusUDF                    = 0x0040,
+    kIOPCIStatusFastBack2Back          = 0x0080,
+    kIOPCIStatusDevSel0                        = 0x0000,
+    kIOPCIStatusDevSel1                        = 0x0200,
+    kIOPCIStatusDevSel2                        = 0x0400,
+    kIOPCIStatusDevSel3                        = 0x0600,
+    kIOPCIStatusTargetAbortCapable     = 0x0800,
+    kIOPCIStatusTargetAbortActive      = 0x1000,
+    kIOPCIStatusMasterAbortActive      = 0x2000,
+    kIOPCIStatusSERRActive             = 0x4000,
+    kIOPCIStatusParityErrActive                = 0x8000
+};
+
 union IOPCIAddressSpace {
     UInt32             bits;
     struct {
@@ -58,6 +135,91 @@ union IOPCIAddressSpace {
     } s;
 };
 
+struct IOPCIPhysicalAddress {
+    IOPCIAddressSpace  physHi;
+    UInt32             physMid;
+    UInt32             physLo;
+    UInt32             lengthHi;
+    UInt32             lengthLo;
+};
+
+// IOPCIDevice matching property names
+#define kIOPCIMatchKey                 "IOPCIMatch"
+#define kIOPCIPrimaryMatchKey          "IOPCIPrimaryMatch"
+#define kIOPCISecondaryMatchKey                "IOPCISecondaryMatch"
+#define kIOPCIClassMatchKey            "IOPCIClassMatch"
+
+// property to control PCI default config space save on sleep
+#define kIOPMPCIConfigSpaceVolatileKey "IOPMPCIConfigSpaceVolatile"
+
+enum {
+    kIOPCIDevicePowerStateCount = 3,
+    kIOPCIDeviceOffState       = 0,
+    kIOPCIDeviceOnState                = 2
+};
+
+/*! @class IOPCIDevice : public IOService
+    @abstract An IOService class representing a PCI device.
+    @discussion The discovery of an PCI device by the PCI bus family results in an instance of the IOPCIDevice being created and published. It provides services for looking up and mapping memory mapped hardware, and access to the PCI configuration and I/O spaces. 
+
+<br><br>Matching Supported by IOPCIDevice<br><br>
+
+Two types of matching are available, OpenFirmware name matching and PCI register matching. Currently, only one of these two matching schemes can be used in the same property table.
+
+<br><br>OpenFirmware Name Matching<br><br>
+
+IOService performs matching based on the IONameMatch property (see IOService). IOPCIDevices created with OpenFirmware device tree entries will name match based on the standard OpenFirmware name matching properties.
+
+<br><br>PCI Register Matching<br><br>
+
+A PCI device driver can also match on the values of certain config space registers.
+
+In each case, several matching values can be specified, and an optional mask for the value of the config space register may follow the value, preceded by an '&' character.
+<br>
+<br>
+       kIOPCIMatchKey, "IOPCIMatch"
+<br>
+The kIOPCIMatchKey property matches the vendor and device ID (0x00) register, or the subsystem register (0x2c).
+<br>
+<br>
+       kIOPCIPrimaryMatchKey, "IOPCIPrimaryMatch"
+<br>
+The kIOPCIPrimaryMatchKey property matches the vendor and device ID (0x00) register.
+<br>
+<br>
+       kIOPCISecondaryMatchKey, "IOPCISecondaryMatch"
+<br>
+The kIOPCISecondaryMatchKey property matches the subsystem register (0x2c).
+<br>
+<br>
+       kIOPCIClassMatchKey, "IOPCIClassMatch"
+<br>
+The kIOPCIClassMatchKey property matches the class code register (0x08). The default mask for this register is 0xffffff00.
+<br>
+<br>
+Examples:
+<br>
+<br>
+      &ltkey&gtIOPCIMatch&lt/key&gt            <br>
+       &ltstring&gt0x00261011&lt/string&gt
+<br>
+Matches a device whose vendor ID is 0x1011, and device ID is 0x0026, including subsystem IDs.
+<br>
+<br>
+      &ltkey&gtIOPCIMatch&lt/key&gt            <br>
+       &ltstring&gt0x00789004&0x00ffffff 0x78009004&0x0xff00ffff&lt/string&gt
+<br>
+Matches with any device with a vendor ID of 0x9004, and a device ID of 0xzz78 or 0x78zz, where 'z' is don't care.
+<br>
+<br>
+      &ltkey&gtIOPCIClassMatch&lt/key&gt       <br>
+       &ltstring&gt0x02000000&0xffff0000&lt/string&gt
+<br>
+<br>
+Matches a device whose class code is 0x0200zz, an ethernet device.
+
+*/
+
 class IOPCIDevice : public IOService
 {
     OSDeclareDefaultStructors(IOPCIDevice)
@@ -70,15 +232,21 @@ protected:
     IOMemoryMap *      ioMap;
     OSObject *          slotNameProperty;
 
+/*! @struct ExpansionData
+    @discussion This structure will be used to expand the capablilties of the IOWorkLoop in the future.
+    */    
     struct ExpansionData { };
 
+/*! @var reserved
+    Reserved for future use.  (Internal use only)  */
     ExpansionData *reserved;
 
 public:
-    IOPCIAddressSpace   space;
+    IOPCIAddressSpace  space;
     UInt32     *       savedConfig;
 
 public:
+    /* IOService/IORegistryEntry methods */
 
     virtual bool attach( IOService * provider );
     virtual void detach( IOService * provider );
@@ -101,36 +269,206 @@ public:
     virtual void configWrite8( IOPCIAddressSpace space,
                                        UInt8 offset, UInt8 data );
 
+/*! @function configRead32
+    @abstract Reads a 32-bit value from the PCI device's configuration space.
+    @discussion This method reads a 32-bit configuration space register on the device and returns its value.
+    @param offset An 8-bit offset into configuration space, of which bits 0-1 are ignored.
+    @result An 32-bit value in host byte order (big endian on PPC). */
+
     virtual UInt32 configRead32( UInt8 offset );
+
+/*! @function configRead16
+    @abstract Reads a 16-bit value from the PCI device's configuration space.
+    @discussion This method reads a 16-bit configuration space register on the device and returns its value.
+    @param offset An 8-bit offset into configuration space, of which bit 0 is ignored.
+    @result An 16-bit value in host byte order (big endian on PPC). */
+
     virtual UInt16 configRead16( UInt8 offset );
+
+/*! @function configRead8
+    @abstract Reads a 8-bit value from the PCI device's configuration space.
+    @discussion This method reads a 8-bit configuration space register on the device and returns its value.
+    @param offset An 8-bit offset into configuration space.
+    @result An 8-bit value. */
+
     virtual UInt8 configRead8( UInt8 offset );
+
+/*! @function configWrite32
+    @abstract Writes a 32-bit value to the PCI device's configuration space.
+    @discussion This method write a 32-bit value to a configuration space register on the device.
+    @param offset An 8-bit offset into configuration space, of which bits 0-1 are ignored.
+    @param data An 32-bit value to be written in host byte order (big endian on PPC). */
+
     virtual void configWrite32( UInt8 offset, UInt32 data );
+
+/*! @function configWrite16
+    @abstract Writes a 16-bit value to the PCI device's configuration space.
+    @discussion This method write a 16-bit value to a configuration space register on the device.
+    @param offset An 8-bit offset into configuration space, of which bit 0 is ignored.
+    @param data An 16-bit value to be written in host byte order (big endian on PPC). */
+
     virtual void configWrite16( UInt8 offset, UInt16 data );
+
+/*! @function configWrite8
+    @abstract Writes a 8-bit value to the PCI device's configuration space.
+    @discussion This method write a 8-bit value to a configuration space register on the device.
+    @param offset An 8-bit offset into configuration space.
+    @param data An 8-bit value to be written. */
+
     virtual void configWrite8( UInt8 offset, UInt8 data );
 
     virtual IOReturn saveDeviceState( IOOptionBits options = 0 );
     virtual IOReturn restoreDeviceState( IOOptionBits options = 0 );
+
+/*! @function setConfigBits
+    @abstract Sets masked bits in a configuration space register.
+    @discussion This method sets masked bits in a configuration space register on the device by reading and writing the register. The value of the masked bits before the write is returned.
+    @param offset An 8-bit offset into configuration space, of which bits 0-1 are ignored.
+    @param mask An 32-bit mask indicating which bits in the value parameter are valid.
+    @param data An 32-bit value to be written in host byte order (big endian on PPC).
+    @result The value of the register masked with the mask before the write. */
+    
     virtual UInt32 setConfigBits( UInt8 offset, UInt32 mask, UInt32 value );
 
+/*! @function setMemoryEnable
+    @abstract Sets the device's memory space response.
+    @discussion This method sets the memory space response bit in the device's command config space register to the passed value, and returns the previous state of the enable.
+    @param enable True or false to enable or disable the memory space response.
+    @result True if the memory space response was previously enabled, false otherwise. */
+
     virtual bool setMemoryEnable( bool enable );
+
+/*! @function setIOEnable
+    @abstract Sets the device's I/O space response.
+    @discussion This method sets the I/O space response bit in the device's command config space register to the passed value, and returns the previous state of the enable. The exclusive option allows only one exclusive device on the bus to be enabled concurrently, this should be only for temporary access.
+    @param enable True or false to enable or disable the I/O space response.
+    @param exclusive If true, only one setIOEnable with the exclusive flag set will be allowed at a time on the bus, this should be only for temporary access.
+    @result True if the I/O space response was previously enabled, false otherwise. */
+
     virtual bool setIOEnable( bool enable, bool exclusive = false );
+
+/*! @function setBusMasterEnable
+    @abstract Sets the device's bus master enable.
+    @discussion This method sets the bus master enable bit in the device's command config space register to the passed value, and returns the previous state of the enable.
+    @param enable True or false to enable or disable bus mastering.
+    @result True if bus mastering was previously enabled, false otherwise. */
+
     virtual bool setBusMasterEnable( bool enable );
+
+/*! @function findPCICapability
+    @abstract Search configuration space for a PCI capability register.
+    @discussion This method searchs the device's config space for a PCI capability register matching the passed capability ID, if the device supports PCI capabilities.
+    @param capabilityID An 8-bit PCI capability ID.
+    @param offset An optional pointer to return the offset into config space where the capability was found.
+    @result The 32-bit value of the capability register if one was found, zero otherwise. */
+
     virtual UInt32 findPCICapability( UInt8 capabilityID, UInt8 * offset = 0 );
+
+/*! @function getBusNumber
+    @abstract Accessor to return the PCI device's assigned bus number.
+    @discussion This method is an accessor to return the PCI device's assigned bus number.
+    @result The 8-bit value of device's PCI bus number. */
+
     virtual UInt8 getBusNumber( void );
+
+/*! @function getDeviceNumber
+    @abstract Accessor to return the PCI device's device number.
+    @discussion This method is an accessor to return the PCI device's device number.
+    @result The 5-bit value of device's device number. */
+
     virtual UInt8 getDeviceNumber( void );
+
+/*! @function getFunctionNumber
+    @abstract Accessor to return the PCI device's function number.
+    @discussion This method is an accessor to return the PCI device's function number.
+    @result The 3-bit value of device's function number. */
+
     virtual UInt8 getFunctionNumber( void );
+
+    /* Device memory accessors */
+
+/*! @function getDeviceMemoryWithRegister
+    @abstract Returns an instance of IODeviceMemory representing one of the device's memory mapped ranges.
+    @discussion This method will return a pointer to an instance of IODeviceMemory for the physical memory range that was assigned to the configuration space base address register passed in. It is analogous to IOService::getDeviceMemoryWithIndex.
+    @param reg The 8-bit configuration space register that is the base address register for the desired range.
+    @result A pointer to an instance of IODeviceMemory, or zero no such range was found. The IODeviceMemory is retained by the provider, so is valid while attached, or while any mappings to it exist. It should not be released by the caller. */
+
     virtual IODeviceMemory * getDeviceMemoryWithRegister( UInt8 reg );
+
+/*! @function mapDeviceMemoryWithRegister
+    @abstract Maps a physical range of the device.
+    @discussion This method will create a mapping for the IODeviceMemory for the physical memory range that was assigned to the configuration space base address register passed in, with IODeviceMemory::map(options). The mapping is represented by the returned instance of IOMemoryMap, which should not be released until the mapping is no longer required. This method is analogous to IOService::mapDeviceMemoryWithIndex.
+    @param reg The 8-bit configuration space register that is the base address register for the desired range.
+    @param options Options to be passed to the IOMemoryDescriptor::map() method.
+    @result An instance of IOMemoryMap, or zero if the index is beyond the count available. The mapping should be released only when access to it is no longer required. */
+
     virtual IOMemoryMap * mapDeviceMemoryWithRegister( UInt8 reg,
                                                IOOptionBits options = 0 );
+
+/*! @function ioDeviceMemory
+    @abstract Accessor to the I/O space aperture for the bus.
+    @discussion This method will return a reference to the IODeviceMemory for the I/O aperture of the bus the device is on.
+    @result A pointer to an IODeviceMemory object for the I/O aperture. The IODeviceMemory is retained by the provider, so is valid while attached, or while any mappings to it exist. It should not be released by the caller. */
+
     virtual IODeviceMemory * ioDeviceMemory( void );
+
+    /* I/O space accessors */
+
+/*! @function ioWrite32
+    @abstract Writes a 32-bit value to an I/O space aperture.
+    @discussion This method will write a 32-bit value to a 4 byte aligned offset in an I/O space aperture. If a map object is passed in, the value is written relative to it, otherwise to the value is written relative to the I/O space aperture for the bus. This function encapsulates the differences between architectures in generating I/O space operations. An eieio instruction is included on PPC.
+    @param offset An offset into a bus or device's I/O space aperture.
+    @param value The value to be written in host byte order (big endian on PPC).
+    @param map If the offset is relative to the beginning of a device's aperture, an IOMemoryMap object for that object should be passed in. Otherwise, passing zero will write the value relative to the beginning of the bus' I/O space. */
+
     virtual void ioWrite32( UInt16 offset, UInt32 value,
                                IOMemoryMap * map = 0 );
+
+/*! @function ioWrite16
+    @abstract Writes a 16-bit value to an I/O space aperture.
+    @discussion This method will write a 16-bit value to a 2 byte aligned offset in an I/O space aperture. If a map object is passed in, the value is written relative to it, otherwise to the value is written relative to the I/O space aperture for the bus. This function encapsulates the differences between architectures in generating I/O space operations. An eieio instruction is included on PPC.
+    @param offset An offset into a bus or device's I/O space aperture.
+    @param value The value to be written in host byte order (big endian on PPC).
+    @param map If the offset is relative to the beginning of a device's aperture, an IOMemoryMap object for that object should be passed in. Otherwise, passing zero will write the value relative to the beginning of the bus' I/O space. */
+
     virtual void ioWrite16( UInt16 offset, UInt16 value,
                                IOMemoryMap * map = 0 );
+
+/*! @function ioWrite8
+    @abstract Writes a 8-bit value to an I/O space aperture.
+    @discussion This method will write a 8-bit value to an offset in an I/O space aperture. If a map object is passed in, the value is written relative to it, otherwise to the value is written relative to the I/O space aperture for the bus. This function encapsulates the differences between architectures in generating I/O space operations. An eieio instruction is included on PPC.
+    @param offset An offset into a bus or device's I/O space aperture.
+    @param value The value to be written in host byte order (big endian on PPC).
+    @param map If the offset is relative to the beginning of a device's aperture, an IOMemoryMap object for that object should be passed in. Otherwise, passing zero will write the value relative to the beginning of the bus' I/O space. */
+
     virtual void ioWrite8( UInt16 offset, UInt8 value,
                                IOMemoryMap * map = 0 );
+
+/*! @function ioRead32
+    @abstract Reads a 32-bit value from an I/O space aperture.
+    @discussion This method will read a 32-bit value from a 4 byte aligned offset in an I/O space aperture. If a map object is passed in, the value is read relative to it, otherwise to the value is read relative to the I/O space aperture for the bus. This function encapsulates the differences between architectures in generating I/O space operations. An eieio instruction is included on PPC.
+    @param offset An offset into a bus or device's I/O space aperture.
+    @param map If the offset is relative to the beginning of a device's aperture, an IOMemoryMap object for that object should be passed in. Otherwise, passing zero will write the value relative to the beginning of the bus' I/O space.
+    @result The value read in host byte order (big endian on PPC). */
+
     virtual UInt32 ioRead32( UInt16 offset, IOMemoryMap * map = 0 );
+
+/*! @function ioRead16
+    @abstract Reads a 16-bit value from an I/O space aperture.
+    @discussion This method will read a 16-bit value from a 2 byte aligned offset in an I/O space aperture. If a map object is passed in, the value is read relative to it, otherwise to the value is read relative to the I/O space aperture for the bus. This function encapsulates the differences between architectures in generating I/O space operations. An eieio instruction is included on PPC.
+    @param offset An offset into a bus or device's I/O space aperture.
+    @param map If the offset is relative to the beginning of a device's aperture, an IOMemoryMap object for that object should be passed in. Otherwise, passing zero will write the value relative to the beginning of the bus' I/O space.
+    @result The value read in host byte order (big endian on PPC). */
+
     virtual UInt16 ioRead16( UInt16 offset, IOMemoryMap * map = 0 );
+
+/*! @function ioRead8
+    @abstract Reads a 8-bit value from an I/O space aperture.
+    @discussion This method will read a 8-bit value from an offset in an I/O space aperture. If a map object is passed in, the value is read relative to it, otherwise to the value is read relative to the I/O space aperture for the bus. This function encapsulates the differences between architectures in generating I/O space operations. An eieio instruction is included on PPC.
+    @param offset An offset into a bus or device's I/O space aperture.
+    @param map If the offset is relative to the beginning of a device's aperture, an IOMemoryMap object for that object should be passed in. Otherwise, passing zero will write the value relative to the beginning of the bus' I/O space.
+    @result The value read. */
+
     virtual UInt8 ioRead8( UInt16 offset, IOMemoryMap * map = 0 );
 
     // Unused Padding
@@ -153,3 +491,4 @@ public:
 };
 
 #endif /* ! _IOKIT_IOPCIDEVICE_H */
+
diff --git a/iokit/IOKit/pci/Makefile b/iokit/IOKit/pci/Makefile
new file mode 100644 (file)
index 0000000..ba1f3c6
--- /dev/null
@@ -0,0 +1,34 @@
+export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd
+export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def
+export MakeInc_rule=${SRCROOT}/makedefs/MakeInc.rule
+export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir
+
+IOKIT_FRAMEDIR = $(FRAMEDIR)/IOKit.framework/Versions/A
+export INCDIR = $(IOKIT_FRAMEDIR)/Headers
+export LCLDIR = $(IOKIT_FRAMEDIR)/PrivateHeaders
+
+include $(MakeInc_cmd)
+include $(MakeInc_def)
+
+MI_DIR = pci
+NOT_EXPORT_HEADERS = 
+
+INSTINC_SUBDIRS =
+INSTINC_SUBDIRS_PPC =
+INSTINC_SUBDIRS_I386 =
+
+EXPINC_SUBDIRS = ${INSTINC_SUBDIRS}
+EXPINC_SUBDIRS_PPC = ${INSTINC_SUBDIRS_PPC}
+EXPINC_SUBDIRS_I386 = ${INSTINC_SUBDIRS_I386}
+
+ALL_HEADERS = $(shell (cd $(SOURCE); echo *.h))
+
+INSTALL_MI_LIST        = 
+INSTALL_MI_LCL_LIST = ""
+INSTALL_MI_DIR = $(MI_DIR)
+
+EXPORT_MI_LIST = $(filter-out $(NOT_EXPORT_HEADERS), $(ALL_HEADERS))
+EXPORT_MI_DIR = IOKit/$(MI_DIR)
+
+include $(MakeInc_rule)
+include $(MakeInc_dir)
index 0024154ae194cbc7e8ebf39beb1560e05a30e7ba..553246eabfbdd2fb11651b95ec86aeb766ba6b6c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b3b487a8a5938c01742d36eae2e3d5c36357aee5..51f9abd39325f6cc1116b207a3ee2c969219dba7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9f0be7f6e205a7d7d39120672d7e7ea0222f5d19..713259f6a0e0e186a376f3c05cdd90bf55833298 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0a6cc5061ed35da9064d75f9800084283a618c0b..a684a5b73c8fa7476b92cb44b0fe6f62a158e4e2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2edf8063e97f9416206d2aba7aa2ffe71d3b4937..82eb90e1e2331615779464db67294b7cb9cd58de 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4c12490f612feb2ddc1f3b75e21ef22bb8583f0c..496efe3631a1866fbc774d7ed77499e205d52899 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c6c062fd57f58ac1db51ad3d438abab8a48ec33b..01bb64e76219fb2c7d35cd43a0d4c53d9145c2ad 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 
 #ifndef KERNEL
 LEAF(_ev_lock)
-
-               li              a6,1                    // lock value
-               
-8:             lwz             a7,0(a0)                // Get lock word
-               mr.             a7,a7                   // Is it held?
-               bne--   8b                              // Yup...
-
-9:             lwarx   a7,0,a0                 // read the lock
-               mr.             a7,a7                   // Is it held?
-               bne--   7f                              // yes, kill reservation
-               stwcx.  a6,0,a0                 // try to get the lock
-               bne--   9b                              // failed, try again
-               isync
-               blr                                             // got it, return
-               
-7:             li              a7,-4                   // Point to a spot in the red zone
-               stwcx.  a7,a7,r1                // Kill reservation
-               b               8b                              // Go wait some more...
-               
-               
+       li      a6,1                    // lock value
+       lwarx   a7,0,a0                 // CEMV10
+9:
+       sync
+       lwarx   a7,0,a0                 // read the lock
+       cmpwi   cr0,a7,0                // is it busy?
+       bne-    9b                      // yes, spin
+       sync
+       stwcx.  a6,0,a0                 // try to get the lock
+       bne-    9b                      // failed, try again
+       isync
+       blr                             // got it, return
 END(_ev_lock)
 
 LEAF(_IOSpinLock)
-
-               li              a6,1                    // lock value
-               
-8:             lwz             a7,0(a0)                // Get lock word
-               mr.             a7,a7                   // Is it held?
-               bne--   8b                              // Yup...
-
-9:             lwarx   a7,0,a0                 // read the lock
-               mr.             a7,a7                   // Is it held?
-               bne--   7f                              // yes, kill reservation
-               stwcx.  a6,0,a0                 // try to get the lock
-               bne--   9b                              // failed, try again
-               isync
-               blr                                             // got it, return
-               
-7:             li              a7,-4                   // Point to a spot in the red zone
-               stwcx.  a7,a7,r1                // Kill reservation
-               b               8b                              // Go wait some more...
+       li      a6,1                    // lock value
+       lwarx   a7,0,a0                 // CEMV10
+9:
+       sync
+       lwarx   a7,0,a0                 // read the lock
+       cmpwi   cr0,a7,0                // is it busy?
+       bne-    9b                      // yes, spin
+       sync
+       stwcx.  a6,0,a0                 // try to get the lock
+       bne-    9b                      // failed, try again
+       isync
+       blr                             // got it, return
 END(_IOSpinLock)
 #endif
 
@@ -173,61 +156,45 @@ END(_IOSpinUnlock)
  */
 
 LEAF(_ev_try_lock)
-       
-               DISABLE_PREEMPTION()
-
-               li              a6,1                    // lock value
-               
-               lwz             a7,0(a0)                // Get lock word
-               mr.             a7,a7                   // Is it held?
-               bne--   6f                              // Yup...
-
-9:             lwarx   a7,0,a0                 // read the lock
-               mr.             a7,a7                   // Is it held?
-               bne--   7f                              // yes, kill reservation
-               stwcx.  a6,0,a0                 // try to get the lock
-               bne--   9b                              // failed, try again
-               li              a0,1                    // return TRUE
-               isync
-               blr                                             // got it, return
-               
-7:             li              a7,-4                   // Point to a spot in the red zone
-               stwcx.  a7,a7,r1                // Kill reservation
-
-6:
-               ENABLE_PREEMPTION()
-               li      a0,0                            // return FALSE
-               blr
-               
+       li      a6,1                    // lock value
+        DISABLE_PREEMPTION()
+       lwarx   a7,0,a0                 // CEMV10
+8:
+       sync
+       lwarx   a7,0,a0                 // read the lock
+       cmpwi   cr0,a7,0                // is it busy?
+       bne-    9f                      // yes, give up
+       sync
+       stwcx.  a6,0,a0                 // try to get the lock
+       bne-    8b                      // failed, try again
+       li      a0,1                    // return TRUE
+       isync
+       blr
+9:
+       ENABLE_PREEMPTION()
+       li      a0,0                    // return FALSE
+       blr
 END(_ev_try_lock)
 
 LEAF(_IOTrySpinLock)
-       
-               DISABLE_PREEMPTION()
-
-               li              a6,1                    // lock value
-               
-               lwz             a7,0(a0)                // Get lock word
-               mr.             a7,a7                   // Is it held?
-               bne--   6f                              // Yup...
-
-9:             lwarx   a7,0,a0                 // read the lock
-               mr.             a7,a7                   // Is it held?
-               bne--   7f                              // yes, kill reservation
-               stwcx.  a6,0,a0                 // try to get the lock
-               bne--   9b                              // failed, try again
-               li              a0,1                    // return TRUE
-               isync
-               blr                                             // got it, return
-               
-7:             li              a7,-4                   // Point to a spot in the red zone
-               stwcx.  a7,a7,r1                // Kill reservation
-
-6:
-               ENABLE_PREEMPTION()
-               li      a0,0                            // return FALSE
-               blr
-               
+       li      a6,1                    // lock value
+        DISABLE_PREEMPTION()
+       lwarx   a7,0,a0                 // CEMV10
+8:
+       sync
+       lwarx   a7,0,a0                 // read the lock
+       cmpwi   cr0,a7,0                // is it busy?
+       bne-    9f                      // yes, give up
+       sync
+       stwcx.  a6,0,a0                 // try to get the lock
+       bne-    8b                      // failed, try again
+       li      a0,1                    // return TRUE
+       isync
+       blr
+9:
+       ENABLE_PREEMPTION()
+       li      a0,0                    // return FALSE
+       blr
 END(_IOTrySpinLock)
 
 #endif /* ! _IOKIT_IOSHAREDLOCKIMP_H */
index d873fa8156afab227a83ea2d8e63ea9de7e69902..9f113545a910defb39de303f8e24d0ab441a5580 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index aa88aea5d87e2ddddc7ec38dd1ff604c7695b040..a1546528ca5f4d1e23c085750ba101810b98f7aa 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f1f4e75f847ac2c921f957e3d7476bb68e93b91d..0840c4c3aabf35595c3b299501e4fad968a3edb4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4deaf8ad70b1830fc0bb5686b4720482b88ddcec..db54beff394152832a00b443c486504d13008ae8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b2082d2861d0f027c7526d71f77b18e48eb0ae28..e46736196cf95d3fa9be278f4add38875b708cca 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ede7da358a854ec84db1655e3d13feb68337ecff..00007068630d17871ac9a3ecdb50be439bdb73a1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d213b7b432603074c380fe4bd0daa11d504e1d0c..ce8b9090e10ee282c7678c7293e59b8cbe824a5a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c56a373b2d7896ab0ce422ee043a856b08111ebe..bab21e8a303b40176b77a807be905acf1fc824eb 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d014d1c2e8fdbd9279a07322575c8cf2b00d41a4..608a93d4a1c01bc53e46f735a9465e68fef1e532 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index afcfccb862512cb9d8dfa1161d282c3b48c02441..401197aeb076c1bc339a04ec661c45ce2c36561c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3f1dc568bca45c43e16b55f519e6651353dfe743..6df79af9b3486961551505609f31dfcd187e00f2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d3405b111f4ae87b6315b84aeb52c34abf3202b8..ff0c89e9756a064b647b6685d2927cce6d4d380d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 215343b3068ad6a2d6620030dfd99e445848c697..c244699710cbb52c3e6b9b7a78c81c7615c8d1b3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 880d63bd9cf34e58556c5ea163eaa2d634d9ea9d..acbb27fc5f4990a0ca24195bc55f5adda076ed2e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5ef8ee3530a64398470bfb37945c2719d5903bee..6cbf02ef95ee7989030b022c304e560863a3a2b2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c7524f6b1f63aad880666a6a6c0da91e8bdfb09b..ce7ba115491b9e484f799343b75309f738285a37 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -86,8 +83,6 @@ void panic(const char * msg, ...);
  */
 extern void invalidate_icache(vm_offset_t addr, unsigned cnt, int phys);
 extern void flush_dcache(vm_offset_t addr, unsigned count, int phys);
-extern void invalidate_icache64(addr64_t addr, unsigned cnt, int phys);
-extern void flush_dcache64(addr64_t addr, unsigned count, int phys);
 
 __END_DECLS
 
index 2da29d6a3fca28bd3d07db85738b60f3f9e46c63..9fc09fe981adcb306b3681227119479650fac405 100644 (file)
@@ -2,24 +2,21 @@
  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ *
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ *
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ *
  * @APPLE_LICENSE_HEADER_END@
  */
 
index c7a521d10f0894eebacb991386348b1c1630f583..d09defb1e1f5dc1f68b652541d2e2dcdc77a75db 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 __BEGIN_DECLS
 void ipc_port_release_send(ipc_port_t port);
 #include <vm/pmap.h>
-
-vm_map_t IOPageableMapForAddress( vm_address_t address );
 __END_DECLS
 
+extern "C" vm_map_t IOPageableMapForAddress( vm_address_t address );
+
 #define super IOGeneralMemoryDescriptor
 OSDefineMetaClassAndStructors(IOBufferMemoryDescriptor,
                                IOGeneralMemoryDescriptor);
@@ -90,7 +87,6 @@ bool IOBufferMemoryDescriptor::initWithOptions(
                               task_t       inTask)
 {
     vm_map_t map = 0;
-    IOOptionBits iomdOptions = kIOMemoryAsReference | kIOMemoryTypeVirtual;
 
     if (!capacity)
         return false;
@@ -101,9 +97,6 @@ bool IOBufferMemoryDescriptor::initWithOptions(
     _physSegCount = 0;
     _buffer      = 0;
 
-    // Grab the direction and the Auto Prepare bits from the Buffer MD options
-    iomdOptions  |= options & (kIOMemoryDirectionMask | kIOMemoryAutoPrepare);
-
     if ((options & kIOMemorySharingTypeMask) && (alignment < page_size))
         alignment = page_size;
 
@@ -113,7 +106,6 @@ bool IOBufferMemoryDescriptor::initWithOptions(
     _alignment = alignment;
     if (options & kIOMemoryPageable)
     {
-        iomdOptions |= kIOMemoryBufferPageable;
        if (inTask == kernel_task)
        {
            /* Allocate some kernel address space. */
@@ -133,24 +125,19 @@ bool IOBufferMemoryDescriptor::initWithOptions(
            map = get_task_map(inTask);
            vm_map_reference(map);
            reserved->map = map;
-           kr = vm_allocate( map, (vm_address_t *) &_buffer, round_page_32(capacity),
+           kr = vm_allocate( map, (vm_address_t *) &_buffer, round_page(capacity),
                                VM_FLAGS_ANYWHERE | VM_MAKE_TAG(VM_MEMORY_IOKIT) );
            if( KERN_SUCCESS != kr)
                return( false );
 
            // we have to make sure that these pages don't get copied on fork.
-           kr = vm_inherit( map, (vm_address_t) _buffer, round_page_32(capacity), VM_INHERIT_NONE);
+           kr = vm_inherit( map, (vm_address_t) _buffer, round_page(capacity), VM_INHERIT_NONE);
            if( KERN_SUCCESS != kr)
                return( false );
        }
     }
     else 
     {
-        // @@@ gvdl: Need to remove this
-        // Buffer should never auto prepare they should be prepared explicitly
-        // But it never was enforced so what are you going to do?
-        iomdOptions |= kIOMemoryAutoPrepare;
-
        /* Allocate a wired-down buffer inside kernel space. */
        if (options & kIOMemoryPhysicallyContiguous)
            _buffer = IOMallocContiguous(capacity, alignment, 0);
@@ -166,50 +153,26 @@ bool IOBufferMemoryDescriptor::initWithOptions(
     _singleRange.v.address = (vm_address_t) _buffer;
     _singleRange.v.length  = capacity;
 
-    if (!super::initWithOptions(&_singleRange.v, 1, 0,
-                               inTask, iomdOptions, /* System mapper */ 0))
+    if (!super::initWithRanges(&_singleRange.v,        1,
+                                (IODirection) (options & kIOMemoryDirectionMask),
+                                inTask, true))
        return false;
 
-    if (options & kIOMemoryPageable) {
+    if (options & kIOMemoryPageable)
+    {
+        _flags |= kIOMemoryRequiresWire;
+
         kern_return_t kr;
         ipc_port_t sharedMem = (ipc_port_t) _memEntry;
-        vm_size_t size = round_page_32(_ranges.v[0].length);
+        vm_size_t size = round_page(_ranges.v[0].length);
 
         // must create the entry before any pages are allocated
         if( 0 == sharedMem) {
-
-            // set memory entry cache
-            vm_prot_t memEntryCacheMode = VM_PROT_READ | VM_PROT_WRITE;
-            switch (options & kIOMapCacheMask)
-            {
-               case kIOMapInhibitCache:
-                    SET_MAP_MEM(MAP_MEM_IO, memEntryCacheMode);
-                    break;
-       
-               case kIOMapWriteThruCache:
-                    SET_MAP_MEM(MAP_MEM_WTHRU, memEntryCacheMode);
-                    break;
-
-               case kIOMapWriteCombineCache:
-                    SET_MAP_MEM(MAP_MEM_WCOMB, memEntryCacheMode);
-                    break;
-
-               case kIOMapCopybackCache:
-                    SET_MAP_MEM(MAP_MEM_COPYBACK, memEntryCacheMode);
-                    break;
-
-               case kIOMapDefaultCache:
-               default:
-                    SET_MAP_MEM(MAP_MEM_NOOP, memEntryCacheMode);
-                    break;
-            }
-
             kr = mach_make_memory_entry( map,
                         &size, _ranges.v[0].address,
-                        memEntryCacheMode, &sharedMem,
+                        VM_PROT_READ | VM_PROT_WRITE, &sharedMem,
                         NULL );
-
-            if( (KERN_SUCCESS == kr) && (size != round_page_32(_ranges.v[0].length))) {
+            if( (KERN_SUCCESS == kr) && (size != round_page(_ranges.v[0].length))) {
                 ipc_port_release_send( sharedMem );
                 kr = kIOReturnVMError;
             }
@@ -218,6 +181,23 @@ bool IOBufferMemoryDescriptor::initWithOptions(
             _memEntry = (void *) sharedMem;
         }
     }
+    else
+    {
+        /* Precompute virtual-to-physical page mappings. */
+        vm_address_t inBuffer = (vm_address_t) _buffer;
+        _physSegCount = atop(trunc_page(inBuffer + capacity - 1) -
+                            trunc_page(inBuffer)) + 1;
+        _physAddrs = IONew(IOPhysicalAddress, _physSegCount);
+        if (!_physAddrs)
+            return false;
+    
+        inBuffer = trunc_page(inBuffer);
+        for (unsigned i = 0; i < _physSegCount; i++) {
+            _physAddrs[i] = pmap_extract(get_task_pmap(kernel_task), inBuffer);
+            assert(_physAddrs[i]); /* supposed to be wired */
+            inBuffer += page_size;
+        }
+    }
 
     setLength(capacity);
     
@@ -228,7 +208,7 @@ IOBufferMemoryDescriptor * IOBufferMemoryDescriptor::inTaskWithOptions(
                                            task_t       inTask,
                                             IOOptionBits options,
                                             vm_size_t    capacity,
-                                            vm_offset_t  alignment)
+                                            vm_offset_t  alignment = 1)
 {
     IOBufferMemoryDescriptor *me = new IOBufferMemoryDescriptor;
     
@@ -250,7 +230,7 @@ bool IOBufferMemoryDescriptor::initWithOptions(
 IOBufferMemoryDescriptor * IOBufferMemoryDescriptor::withOptions(
                                             IOOptionBits options,
                                             vm_size_t    capacity,
-                                            vm_offset_t  alignment)
+                                            vm_offset_t  alignment = 1)
 {
     IOBufferMemoryDescriptor *me = new IOBufferMemoryDescriptor;
     
@@ -333,14 +313,15 @@ IOBufferMemoryDescriptor::withBytes(const void * inBytes,
  */
 void IOBufferMemoryDescriptor::free()
 {
-    // Cache all of the relevant information on the stack for use
-    // after we call super::free()!
     IOOptionBits options   = _options;
     vm_size_t    size     = _capacity;
     void *       buffer           = _buffer;
     vm_map_t    map       = 0;
     vm_offset_t  alignment = _alignment;
 
+    if (_physAddrs)
+        IODelete(_physAddrs, IOPhysicalAddress, _physSegCount);
+
     if (reserved)
     {
        map = reserved->map;
@@ -355,7 +336,7 @@ void IOBufferMemoryDescriptor::free()
         if (options & kIOMemoryPageable)
        {
            if (map)
-               vm_deallocate(map, (vm_address_t) buffer, round_page_32(size));
+               vm_deallocate(map, (vm_address_t) buffer, round_page(size));
            else
               IOFreePageable(buffer, size);
        }
@@ -457,6 +438,55 @@ IOBufferMemoryDescriptor::getBytesNoCopy(vm_size_t start, vm_size_t withLength)
     return 0;
 }
 
+/*
+ * getPhysicalSegment:
+ *
+ * Get the physical address of the buffer, relative to the current position.
+ * If the current position is at the end of the buffer, a zero is returned.
+ */
+IOPhysicalAddress
+IOBufferMemoryDescriptor::getPhysicalSegment(IOByteCount offset,
+                                       IOByteCount * lengthOfSegment)
+{
+    IOPhysicalAddress physAddr;
+
+    if( offset != _position)
+       setPosition( offset );
+
+    assert(_position <= _length);
+
+    /* Fail gracefully if the position is at (or past) the end-of-buffer. */
+    if (_position >= _length) {
+        *lengthOfSegment = 0;
+        return 0;
+    }
+
+    if (_options & kIOMemoryPageable) {
+        physAddr = super::getPhysicalSegment(offset, lengthOfSegment);
+
+    } else {
+        /* Compute the largest contiguous physical length possible. */
+        vm_address_t actualPos  = _singleRange.v.address + _position;
+        vm_address_t actualPage = trunc_page(actualPos);
+        unsigned     physInd    = atop(actualPage-trunc_page(_singleRange.v.address));
+    
+        vm_size_t physicalLength = actualPage + page_size - actualPos;
+        for (unsigned index = physInd + 1; index < _physSegCount &&
+            _physAddrs[index] == _physAddrs[index-1] + page_size; index++) {
+            physicalLength += page_size;
+        }
+    
+        /* Clip contiguous physical length at the end-of-buffer. */
+        if (physicalLength > _length - _position)
+            physicalLength = _length - _position;
+    
+        *lengthOfSegment = physicalLength;
+        physAddr = _physAddrs[physInd] + (actualPos - actualPage);
+    }
+
+    return physAddr;
+}
+
 OSMetaClassDefineReservedUsed(IOBufferMemoryDescriptor, 0);
 OSMetaClassDefineReservedUnused(IOBufferMemoryDescriptor, 1);
 OSMetaClassDefineReservedUnused(IOBufferMemoryDescriptor, 2);
index 57017a8198cf4b0891210ecb15ff09f4374cfbde..750bc5fbd3280ea95a0d1e3ba3d831c84f407594 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -145,7 +142,7 @@ void IOCPU::initCPUs(void)
 
 bool IOCPU::start(IOService *provider)
 {
-  OSData *busFrequency, *cpuFrequency, *timebaseFrequency;
+  OSData *busFrequency, *cpuFrequency, *decFrequency;
   
   if (!super::start(provider)) return false;
   
@@ -156,24 +153,16 @@ bool IOCPU::start(IOService *provider)
   
   gIOCPUs->setObject(this);
   
-  // Correct the bus, cpu and timebase frequencies in the device tree.
-  if (gPEClockFrequencyInfo.bus_frequency_hz < 0x100000000ULL) 
-    busFrequency = OSData::withBytesNoCopy((void *)((char *)&gPEClockFrequencyInfo.bus_frequency_hz + 4), 4);
-  else
-    busFrequency = OSData::withBytesNoCopy((void *)&gPEClockFrequencyInfo.bus_clock_rate_hz, 8);
+  // Correct the bus, cpu and dec frequencies in the device tree.
+  busFrequency = OSData::withBytesNoCopy((void *)&gPEClockFrequencyInfo.bus_clock_rate_hz, 4);
+  cpuFrequency = OSData::withBytesNoCopy((void *)&gPEClockFrequencyInfo.cpu_clock_rate_hz, 4);
+  decFrequency = OSData::withBytesNoCopy((void *)&gPEClockFrequencyInfo.dec_clock_rate_hz, 4);
   provider->setProperty("bus-frequency", busFrequency);
-  busFrequency->release();
-    
-  if (gPEClockFrequencyInfo.cpu_frequency_hz < 0x100000000ULL) 
-    cpuFrequency = OSData::withBytesNoCopy((void *)((char *)&gPEClockFrequencyInfo.cpu_frequency_hz + 4), 4);
-  else
-    cpuFrequency = OSData::withBytesNoCopy((void *)&gPEClockFrequencyInfo.cpu_clock_rate_hz, 8);
   provider->setProperty("clock-frequency", cpuFrequency);
+  provider->setProperty("timebase-frequency", decFrequency);
+  busFrequency->release();
   cpuFrequency->release();
-  
-  timebaseFrequency = OSData::withBytesNoCopy((void *)&gPEClockFrequencyInfo.timebase_frequency_hz, 4);
-  provider->setProperty("timebase-frequency", timebaseFrequency);
-  timebaseFrequency->release();
+  decFrequency->release();
   
   setProperty("IOCPUID", (UInt32)this, 32);
   
@@ -312,8 +301,6 @@ IOReturn IOCPUInterruptController::initCPUInterruptController(int sources)
     }
   }
   
-  ml_init_max_cpus(numCPUs);
-  
   return kIOReturnSuccess;
 }
 
index 4c8e3b1b563b2b63c504106dc32be060ae4bc767..14dabbd65021c07d917c237f6bb76e022ebdfb6f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 76c8a06a74223e27fc06c4edf580b8ec8a460c1b..f9dbc1d33e3a6915790e95f4d9ecc1f27dc6306c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 73a7cc98e5f2aa651e2f05a7e234228291a15316..53a99baa9e2929cf8bbd53730d732cb16cc22de6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5b927cc3035a9cbb5eb6f59ee5feb1c572ebdc24..c50a61636f90dd942e0c1486d1005dde5ff17489 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index fe1a10eecfa2b1cdaa58163a282908f82ffa4322..e5439a5427bb0c095a44153b4aaf49456fc1cfed 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 680f0a6af22f78d9155487360708095d8c675f16..f8fec3768c6f5a4c94e268b5d1024e607316902c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3c7c3df103b008bbe9a2d882612676c2a691eca6..f2461d512ade9c0eabe095ece16ff3539b2a874e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -74,7 +71,7 @@ Boolean IODataQueue::initWithCapacity(UInt32 size)
         return false;
     }
 
-    dataQueue = (IODataQueueMemory *)IOMallocAligned(round_page_32(size + DATA_QUEUE_MEMORY_HEADER_SIZE), PAGE_SIZE);
+    dataQueue = (IODataQueueMemory *)IOMallocAligned(round_page(size + DATA_QUEUE_MEMORY_HEADER_SIZE), PAGE_SIZE);
     if (dataQueue == 0) {
         return false;
     }
@@ -94,7 +91,7 @@ Boolean IODataQueue::initWithEntries(UInt32 numEntries, UInt32 entrySize)
 void IODataQueue::free()
 {
     if (dataQueue) {
-        IOFreeAligned(dataQueue, round_page_32(dataQueue->queueSize + DATA_QUEUE_MEMORY_HEADER_SIZE));
+        IOFreeAligned(dataQueue, round_page(dataQueue->queueSize + DATA_QUEUE_MEMORY_HEADER_SIZE));
     }
 
     super::free();
index dbd731921c251a98f48a574f1c1a04b729d78df4..d33ccf99a5b55d4ad7c8ceeede9242eabf565ccd 100644 (file)
@@ -3,25 +3,29 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
+/*
+ * Copyright (c) 1998 Apple Computer, Inc.  All rights reserved. 
+ *
+ * HISTORY
+ * 23 Nov 98 sdouglas created.
+ * 30 Sep 99 sdouglas, merged IODeviceMemory into IOMemoryDescriptor.
+ */
 
 #include <IOKit/IODeviceMemory.h>
 
index 9aa3b9457ed5732b36702f9f0720a2cd7bde3772..6d9eb7f61404961bfea72c241ad97490ab1be543 100644 (file)
@@ -3,27 +3,29 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 /*
  * Copyright (c) 1998 Apple Computer, Inc.  All rights reserved. 
+ *
+ * HISTORY
+ * 23 Nov 98 sdouglas, created from IODeviceTreeBus.m, & MacOS exp mgr.
+ * 05 Apr 99 sdouglas, add interrupt mapping.
+ *
  */
 
 #include <IOKit/IODeviceTreeSupport.h>
@@ -191,7 +193,7 @@ IODeviceTreeAlloc( void * dtTop )
         // free original device tree
         DTInit(0);
         IODTFreeLoaderInfo( "DeviceTree",
-                       (void *)dtMap[0], round_page_32(dtMap[1]) );
+                       (void *)dtMap[0], round_page(dtMap[1]) );
     }
 
     // adjust tree
index 6ddbac3021be5a366c1fcea58040d5e427808bf3..44bdcf52eabc0730f9c78cefdba31a6a5ff00e75 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 708b9c90c679f7eccd5aeb3fefef5b57609307b6..0869ec7decb5797825f60bf87aba92cd96598459 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1bef319c7cc11aa1c0d61027427a4245e6b3fa45..bd3baa04db7b7bee1065f6d56543537177d2aa28 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -99,10 +96,10 @@ IOReturn IOInterruptController::registerInterrupt(IOService *nub, int source,
       originalNub = vector->nub;
       originalSource = vector->source;
       
-      // Physically disable the interrupt, but mark it as being enables in the hardware.
-      // The interruptDisabledSoft now indicates the driver's request for enablement.
-      disableVectorHard(vectorNumber, vector);
-      vector->interruptDisabledHard = 0;
+      // Save the dis/enable state for the original consumer's interrupt.
+      // Then disable the source
+      wasDisabledSoft = vector->interruptDisabledSoft;
+      disableInterrupt(originalNub, originalSource);
       
       // Initialize the new shared interrupt controller.
       error = vector->sharedController->initInterruptController(this,
@@ -128,17 +125,7 @@ IOReturn IOInterruptController::registerInterrupt(IOService *nub, int source,
       // put the original consumor's interrupt back to normal and
       // get rid of whats left of the shared controller.
       if (error != kIOReturnSuccess) {
-       // Save the driver's interrupt enablement state.
-       wasDisabledSoft = vector->interruptDisabledSoft;
-       
-       // Make the interrupt really hard disabled.
-       vector->interruptDisabledSoft = 1;
-       vector->interruptDisabledHard = 1;
-       
-       // Enable the original consumer's interrupt if needed.
-       if (!wasDisabledSoft) originalNub->enableInterrupt(originalSource);
         enableInterrupt(originalNub, originalSource);
-       
         vector->sharedController->release();
         vector->sharedController = 0;
         IOUnlock(vector->interruptLock);
@@ -152,13 +139,6 @@ IOReturn IOInterruptController::registerInterrupt(IOService *nub, int source,
       vector->target  = vector->sharedController;
       vector->refCon  = 0;
       
-      // Save the driver's interrupt enablement state.
-      wasDisabledSoft = vector->interruptDisabledSoft;
-      
-      // Make the interrupt really hard disabled.
-      vector->interruptDisabledSoft = 1;
-      vector->interruptDisabledHard = 1;
-      
       // Enable the original consumer's interrupt if needed.
       if (!wasDisabledSoft) originalNub->enableInterrupt(originalSource);
     }
@@ -419,7 +399,7 @@ IOReturn IOSharedInterruptController::initInterruptController(IOInterruptControl
   }
   
   // Allocate the memory for the vectors
-  numVectors = 32; // For now a constant number.
+  numVectors = 8; // For now a constant number.
   vectors = (IOInterruptVector *)IOMalloc(numVectors * sizeof(IOInterruptVector));
   if (vectors == NULL) {
     IOFree(_interruptSources, sizeof(IOInterruptSource));
index cbdd0aa6a2af71823444b1d67f889db55ad88a0c..a6b0034f4b1aac01f21f6cd10f3862866520865c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 970a4bd2a768ba4ed20f5c3dba9566494db6e8c7..b694bcbb3a53a31e0878c2c3a0b004e145d1df66 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -84,61 +81,6 @@ void IOPrintPlane( const IORegistryPlane * plane )
     iter->release();
 }
 
-void dbugprintf(char *fmt, ...);
-void db_dumpiojunk( const IORegistryPlane * plane );
-
-void db_piokjunk(void) {
-
-       dbugprintf("\nDT plane:\n");
-       db_dumpiojunk( gIODTPlane );
-       dbugprintf("\n\nService plane:\n");
-       db_dumpiojunk( gIOServicePlane );
-    dbugprintf("\n\n"
-           "ivar kalloc()       0x%08x\n"
-           "malloc()            0x%08x\n"
-            "containers kalloc() 0x%08x\n"
-           "IOMalloc()          0x%08x\n"
-            "----------------------------------------\n",
-           debug_ivars_size,
-            debug_malloc_size,
-            debug_container_malloc_size,
-            debug_iomalloc_size
-            );
-
-}
-
-
-void db_dumpiojunk( const IORegistryPlane * plane )
-{
-    IORegistryEntry *          next;
-    IORegistryIterator *       iter;
-    OSOrderedSet *             all;
-    char                       format[] = "%xxxs";
-    IOService *                        service;
-
-    iter = IORegistryIterator::iterateOver( plane );
-
-    all = iter->iterateAll();
-    if( all) {
-        dbugprintf("Count %d\n", all->getCount() );
-        all->release();
-    } else dbugprintf("Empty\n");
-
-    iter->reset();
-    while( (next = iter->getNextObjectRecursive())) {
-               sprintf( format + 1, "%ds", 2 * next->getDepth( plane ));
-               dbugprintf( format, "");
-               dbugprintf( "%s", next->getName( plane ));
-               if( (next->getLocation( plane )))
-                               dbugprintf("@%s", next->getLocation( plane ));
-               dbugprintf(" <class %s", next->getMetaClass()->getClassName());
-                       if( (service = OSDynamicCast(IOService, next)))
-                               dbugprintf(", busy %ld", service->getBusyState());
-               dbugprintf( ">\n");
-    }
-    iter->release();
-}
-
 void IOPrintMemory( void )
 {
 
index f89aa4fbbe8e679bf34e1810252bce15240f545c..4eb08077e34ad4a574680771a89e147bad81b2ef 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 
 #include <IOKit/IOReturn.h>
 #include <IOKit/IOLib.h> 
-#include <IOKit/IOMapper.h>
 #include <IOKit/IOKitDebug.h> 
 
 mach_timespec_t IOZeroTvalspec = { 0, 0 };
 
-extern ppnum_t pmap_find_phys(pmap_t pmap, addr64_t va);
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 /*
  * Global variables for use by iLogger
@@ -65,11 +58,9 @@ void *_giDebugReserved2              = NULL;
  */
 
 static IOThreadFunc threadArgFcn;
-static void *       threadArgArg;
-static lock_t *     threadArgLock;
+static void * threadArgArg;
+static lock_t * threadArgLock;
 
-static queue_head_t gIOMallocContiguousEntries;
-static mutex_t *    gIOMallocContiguousEntriesLock;
 
 enum { kIOMaxPageableMaps = 16 };
 enum { kIOPageableMapSize = 16 * 1024 * 1024 };
@@ -88,7 +79,6 @@ static struct {
     mutex_t *  lock;
 } gIOKitPageableSpace;
 
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 void IOLibInit(void)
 {
@@ -116,9 +106,6 @@ void IOLibInit(void)
     gIOKitPageableSpace.hint           = 0;
     gIOKitPageableSpace.count          = 1;
 
-    gIOMallocContiguousEntriesLock     = mutex_alloc( 0 );
-    queue_init( &gIOMallocContiguousEntries );
-
     libInitialized = true;
 }
 
@@ -285,14 +272,6 @@ void IOFreeAligned(void * address, vm_size_t size)
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-struct _IOMallocContiguousEntry
-{
-    void *             virtual;
-    ppnum_t            ioBase;
-    queue_chain_t      link;
-};
-typedef struct _IOMallocContiguousEntry _IOMallocContiguousEntry;
-
 void * IOMallocContiguous(vm_size_t size, vm_size_t alignment,
                           IOPhysicalAddress * physicalAddress)
 {
@@ -301,7 +280,6 @@ void * IOMallocContiguous(vm_size_t size, vm_size_t alignment,
     vm_address_t       allocationAddress;
     vm_size_t          adjustedSize;
     vm_offset_t                alignMask;
-    ppnum_t            pagenum;
 
     if (size == 0)
         return 0;
@@ -311,24 +289,15 @@ void * IOMallocContiguous(vm_size_t size, vm_size_t alignment,
     alignMask = alignment - 1;
     adjustedSize = (2 * size) + sizeof(vm_size_t) + sizeof(vm_address_t);
 
-    if (adjustedSize >= page_size)
-    {
-       adjustedSize = size;
-       if (adjustedSize > page_size)
-       {
-           kr = kmem_alloc_contig(kernel_map, &address, size,
-                                   alignMask, 0);
-       }
-       else
-       {
-           kr = kernel_memory_allocate(kernel_map, &address,
-                                       size, alignMask, 0);
-       }
+    if (adjustedSize >= page_size) {
+
+        kr = kmem_alloc_contig(kernel_map, &address, size,
+                               alignMask, 0);
        if (KERN_SUCCESS != kr)
            address = 0;
-    }
-    else
-    {
+
+    } else {
+
        adjustedSize += alignMask;
         allocationAddress = (vm_address_t) kalloc(adjustedSize);
 
@@ -338,8 +307,8 @@ void * IOMallocContiguous(vm_size_t size, vm_size_t alignment,
                     + (sizeof(vm_size_t) + sizeof(vm_address_t)))
                     & (~alignMask);
 
-            if (atop_32(address) != atop_32(address + size - 1))
-                address = round_page_32(address);
+            if (atop(address) != atop(address + size - 1))
+                address = round_page(address);
 
             *((vm_size_t *)(address - sizeof(vm_size_t)
                             - sizeof(vm_address_t))) = adjustedSize;
@@ -349,49 +318,9 @@ void * IOMallocContiguous(vm_size_t size, vm_size_t alignment,
            address = 0;
     }
 
-    /* Do we want a physical address? */
-    if (address && physicalAddress)
-    {
-       do
-       {
-           /* Get the physical page */
-           pagenum = pmap_find_phys(kernel_pmap, (addr64_t) address);
-           if(pagenum)
-           {
-               IOByteCount offset;
-               ppnum_t base;
-    
-               base = IOMapperIOVMAlloc((size + PAGE_MASK) >> PAGE_SHIFT);
-               if (base)
-               {
-                   _IOMallocContiguousEntry *
-                   entry = IONew(_IOMallocContiguousEntry, 1);
-                   if (!entry)
-                   {
-                       IOFreeContiguous((void *) address, size);
-                       address = 0;
-                       break;
-                   }
-                   entry->virtual = (void *) address;
-                   entry->ioBase  = base;
-                   mutex_lock(gIOMallocContiguousEntriesLock);
-                   queue_enter( &gIOMallocContiguousEntries, entry, 
-                               _IOMallocContiguousEntry *, link );
-                   mutex_unlock(gIOMallocContiguousEntriesLock);
-    
-                   *physicalAddress = (IOPhysicalAddress)((base << PAGE_SHIFT) | (address & PAGE_MASK));
-                   for (offset = 0; offset < ((size + PAGE_MASK) >> PAGE_SHIFT); offset++, pagenum++)
-                       IOMapperInsertPage( base, offset, pagenum );
-               }
-               else
-                   *physicalAddress = (IOPhysicalAddress)((pagenum << PAGE_SHIFT) | (address & PAGE_MASK));
-           } 
-           else
-               /* Did not find, return 0 */
-               *physicalAddress = (IOPhysicalAddress) 0;
-       }
-       while (false);
-    }
+    if( address && physicalAddress)
+       *physicalAddress = (IOPhysicalAddress) pmap_extract( kernel_pmap,
+                                                                address );
 
     assert(0 == (address & alignMask));
 
@@ -405,35 +334,14 @@ void * IOMallocContiguous(vm_size_t size, vm_size_t alignment,
 
 void IOFreeContiguous(void * address, vm_size_t size)
 {
-    vm_address_t              allocationAddress;
-    vm_size_t                 adjustedSize;
-    _IOMallocContiguousEntry * entry;
-    ppnum_t                   base = 0;
+    vm_address_t       allocationAddress;
+    vm_size_t          adjustedSize;
 
     if( !address)
        return;
 
     assert(size);
 
-    mutex_lock(gIOMallocContiguousEntriesLock);
-    queue_iterate( &gIOMallocContiguousEntries, entry,
-                   _IOMallocContiguousEntry *, link )
-    {
-       if( entry->virtual == address ) {
-           base = entry->ioBase;
-           queue_remove( &gIOMallocContiguousEntries, entry,
-                           _IOMallocContiguousEntry *, link );
-           break;
-       }
-    }
-    mutex_unlock(gIOMallocContiguousEntriesLock);
-
-    if (base)
-    {
-       IOMapperIOVMFree(base, (size + PAGE_MASK) >> PAGE_SHIFT);
-       IODelete(entry, _IOMallocContiguousEntry, 1);
-    }
-
     adjustedSize = (2 * size) + sizeof(vm_size_t) + sizeof(vm_address_t);
     if (adjustedSize >= page_size) {
 
@@ -558,7 +466,7 @@ void * IOMallocPageable(vm_size_t size, vm_size_t alignment)
 
 #if IOALLOCDEBUG
     if( ref.address)
-       debug_iomalloc_size += round_page_32(size);
+       debug_iomalloc_size += round_page(size);
 #endif
 
     return( (void *) ref.address );
@@ -591,7 +499,7 @@ void IOFreePageable(void * address, vm_size_t size)
         kmem_free( map, (vm_offset_t) address, size);
 
 #if IOALLOCDEBUG
-    debug_iomalloc_size -= round_page_32(size);
+    debug_iomalloc_size -= round_page(size);
 #endif
 }
 
@@ -599,34 +507,30 @@ void IOFreePageable(void * address, vm_size_t size)
 
 extern kern_return_t IOMapPages(vm_map_t map, vm_offset_t va, vm_offset_t pa,
                        vm_size_t length, unsigned int options);
-extern kern_return_t IOUnmapPages(vm_map_t map, vm_offset_t va, vm_size_t length);
 
 IOReturn IOSetProcessorCacheMode( task_t task, IOVirtualAddress address,
                                  IOByteCount length, IOOptionBits cacheMode )
 {
     IOReturn   ret = kIOReturnSuccess;
-    ppnum_t    pagenum;
+    vm_offset_t        physAddr;
 
     if( task != kernel_task)
        return( kIOReturnUnsupported );
 
-    length = round_page_32(address + length) - trunc_page_32( address );
-    address = trunc_page_32( address );
+    length = round_page(address + length) - trunc_page( address );
+    address = trunc_page( address );
 
     // make map mode
     cacheMode = (cacheMode << kIOMapCacheShift) & kIOMapCacheMask;
 
     while( (kIOReturnSuccess == ret) && (length > 0) ) {
 
-       // Get the physical page number
-       pagenum = pmap_find_phys(kernel_pmap, (addr64_t)address);
-       if( pagenum) {
-            ret = IOUnmapPages( get_task_map(task), address, page_size );
-           ret = IOMapPages( get_task_map(task), address, pagenum << PAGE_SHIFT, page_size, cacheMode );
-       } else
+       physAddr = pmap_extract( kernel_pmap, address );
+       if( physAddr)
+            ret = IOMapPages( get_task_map(task), address, physAddr, page_size, cacheMode );
+       else
            ret = kIOReturnVMError;
 
-       address += page_size;
        length -= page_size;
     }
 
@@ -641,7 +545,7 @@ IOReturn IOFlushProcessorCache( task_t task, IOVirtualAddress address,
        return( kIOReturnUnsupported );
 
 #if __ppc__
-    flush_dcache64( (addr64_t) address, (unsigned) length, false );
+    flush_dcache( (vm_offset_t) address, (unsigned) length, false );
 #endif
 
     return( kIOReturnSuccess );
index 56ea0e40abb03b5ee304ee4a555b91723c7c35d0..43884bfb3f69f094ac400a68303315c14b5cb177 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
diff --git a/iokit/Kernel/IOMapper.cpp b/iokit/Kernel/IOMapper.cpp
deleted file mode 100644 (file)
index c1795da..0000000
+++ /dev/null
@@ -1,389 +0,0 @@
-/*
- * Copyright (c) 1998-2003 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-#include <IOKit/IOLib.h>
-#include <IOKit/IOMapper.h>
-#include <libkern/c++/OSData.h>
-
-#define super IOService
-OSDefineMetaClassAndAbstractStructors(IOMapper, IOService);
-
-OSMetaClassDefineReservedUnused(IOMapper, 0);
-OSMetaClassDefineReservedUnused(IOMapper, 1);
-OSMetaClassDefineReservedUnused(IOMapper, 2);
-OSMetaClassDefineReservedUnused(IOMapper, 3);
-OSMetaClassDefineReservedUnused(IOMapper, 4);
-OSMetaClassDefineReservedUnused(IOMapper, 5);
-OSMetaClassDefineReservedUnused(IOMapper, 6);
-OSMetaClassDefineReservedUnused(IOMapper, 7);
-OSMetaClassDefineReservedUnused(IOMapper, 8);
-OSMetaClassDefineReservedUnused(IOMapper, 9);
-OSMetaClassDefineReservedUnused(IOMapper, 10);
-OSMetaClassDefineReservedUnused(IOMapper, 11);
-OSMetaClassDefineReservedUnused(IOMapper, 12);
-OSMetaClassDefineReservedUnused(IOMapper, 13);
-OSMetaClassDefineReservedUnused(IOMapper, 14);
-OSMetaClassDefineReservedUnused(IOMapper, 15);
-
-IOMapper * IOMapper::gSystem = (IOMapper *) IOMapper::kUnknown;
-
-class IOMapperLock {
-    IOLock *fWaitLock;
-public:
-    IOMapperLock() { fWaitLock = IOLockAlloc(); };
-    ~IOMapperLock() { IOLockFree(fWaitLock); };
-
-    void lock()   { IOLockLock(fWaitLock); };
-    void unlock() { IOLockUnlock(fWaitLock); };
-    void sleep(void *event)  { IOLockSleep(fWaitLock, event, THREAD_UNINT); };
-    void wakeup(void *event) { IOLockWakeup(fWaitLock, event, false); };
-};
-
-static IOMapperLock sMapperLock;
-
-bool IOMapper::start(IOService *provider)
-{
-    if (!super::start(provider))
-        return false;
-
-    if (!initHardware(provider))
-        return false;
-
-    if (fIsSystem) { 
-        sMapperLock.lock();
-        IOMapper::gSystem = this;
-        sMapperLock.wakeup(&IOMapper::gSystem);
-        sMapperLock.unlock();
-    }
-
-    return true;
-}
-
-bool IOMapper::allocTable(IOByteCount size)
-{
-    assert(!fTable);
-
-    fTableSize = size;
-    fTableHandle = NewARTTable(size, &fTable, &fTablePhys);
-    return fTableHandle != 0;
-}
-
-void IOMapper::free()
-{
-    if (fTableHandle) {
-        FreeARTTable(fTableHandle, fTableSize);
-        fTableHandle = 0;
-    }
-
-    super::free();
-}
-
-void IOMapper::setMapperRequired(bool hasMapper)
-{
-    if (hasMapper)
-        IOMapper::gSystem = (IOMapper *) kHasMapper;
-    else {
-        sMapperLock.lock();
-        IOMapper::gSystem = (IOMapper *) kNoMapper;
-        sMapperLock.unlock();
-        sMapperLock.wakeup(&IOMapper::gSystem);
-    }
-}
-
-void IOMapper::waitForSystemMapper()
-{
-    sMapperLock.lock();
-    while ((vm_address_t) IOMapper::gSystem & kWaitMask)
-        sMapperLock.sleep(&IOMapper::gSystem);
-    sMapperLock.unlock();
-}
-
-void IOMapper::iovmInsert(ppnum_t addr, IOItemCount offset,
-                            ppnum_t *pageList, IOItemCount pageCount)
-{
-    while (pageCount--)
-        iovmInsert(addr, offset++, *pageList++);
-}
-
-void IOMapper::iovmInsert(ppnum_t addr, IOItemCount offset,
-                            upl_page_info_t *pageList, IOItemCount pageCount)
-{
-    for (IOItemCount i = 0; i < pageCount; i++)
-        iovmInsert(addr, offset + i, pageList[i].phys_addr);
-}
-
-struct ARTTableData {
-    void *v;
-    upl_t u[0];
-};
-#define getARTDataP(data) ((ARTTableData *) (data)->getBytesNoCopy())
-
-OSData *
-IOMapper::NewARTTable(IOByteCount size,
-                      void ** virtAddrP, ppnum_t *physAddrP)
-{
-    OSData *ret;
-    kern_return_t kr;
-    vm_address_t startUpl;
-    ARTTableData *dataP;
-    unsigned int dataSize;
-    upl_page_info_t *pl = 0;
-
-    // Each UPL can deal with about one meg at the moment
-    size = round_page_32(size);
-    dataSize = sizeof(ARTTableData) + sizeof(upl_t) * size / (1024 * 1024);
-    ret = OSData::withCapacity(dataSize);
-    if (!ret)
-        return 0;
-
-    // Append 0's to the buffer, in-other-words reset to nulls.
-    ret->appendBytes(NULL, sizeof(ARTTableData));
-    dataP = getARTDataP(ret);
-
-    kr = kmem_alloc_contig(kernel_map, &startUpl, size, PAGE_MASK, 0);
-    if (kr)
-        return 0;
-
-    dataP->v = (void *) startUpl;
-
-    do {
-        upl_t iopl;
-        int upl_flags = UPL_SET_INTERNAL | UPL_SET_LITE
-                      | UPL_SET_IO_WIRE | UPL_COPYOUT_FROM;
-        vm_size_t iopl_size = size;
-
-        kr = vm_map_get_upl(kernel_map,
-                            startUpl,
-                            &iopl_size,
-                            &iopl,
-                            0,
-                            0,
-                            &upl_flags,
-                            0);
-        if (kr) {
-            panic("IOMapper:vm_map_get_upl returned 0x%x\n");
-            goto bail;
-        }
-
-        if (!ret->appendBytes(&iopl, sizeof(upl_t)))
-            goto bail;
-            
-        startUpl += iopl_size;
-        size -= iopl_size;
-    } while(size);
-
-    // Need to re-establish the dataP as the OSData may have grown.
-    dataP = getARTDataP(ret);
-
-    // Now grab the page entry of the first page and get its phys addr
-    pl = UPL_GET_INTERNAL_PAGE_LIST(dataP->u[0]);
-    *physAddrP = pl->phys_addr;
-    *virtAddrP = dataP->v;
-
-    return ret;
-
-bail:
-    FreeARTTable(ret, size);
-    return 0;
-}
-
-void IOMapper::FreeARTTable(OSData *artHandle, IOByteCount size)
-{
-    assert(artHandle);
-
-    ARTTableData *dataP = getARTDataP(artHandle);
-
-    int numupls = ((artHandle->getLength() - sizeof(*dataP)) / sizeof(upl_t));
-    for (int i = 0; i < numupls; i++)
-        kernel_upl_abort(dataP->u[i], 0);
-
-    if (dataP->v) {
-        size = round_page_32(size);
-        kmem_free(kernel_map, (vm_address_t) dataP->v, size);
-    }
-    artHandle->release();
-}
-
-__BEGIN_DECLS
-
-// These are C accessors to the system mapper for non-IOKit clients
-ppnum_t IOMapperIOVMAlloc(unsigned pages)
-{
-    IOMapper::checkForSystemMapper();
-
-    if (IOMapper::gSystem)
-        return IOMapper::gSystem->iovmAlloc((IOItemCount) pages);
-    else
-        return 0;
-}
-
-void IOMapperIOVMFree(ppnum_t addr, unsigned pages)
-{
-    if (IOMapper::gSystem)
-        IOMapper::gSystem->iovmFree(addr, (IOItemCount) pages);
-}
-
-ppnum_t IOMapperInsertPage(ppnum_t addr, unsigned offset, ppnum_t page)
-{
-    if (IOMapper::gSystem) {
-        IOMapper::gSystem->iovmInsert(addr, (IOItemCount) offset, page);
-        return addr + offset;
-    }
-    else
-        return page;
-}
-
-void IOMapperInsertPPNPages(ppnum_t addr, unsigned offset,
-                            ppnum_t *pageList, unsigned pageCount)
-{
-    if (!IOMapper::gSystem)
-        panic("IOMapperInsertPPNPages no system mapper");
-    else
-        assert(!((vm_address_t) IOMapper::gSystem & 3));
-
-    IOMapper::gSystem->
-        iovmInsert(addr, (IOItemCount) offset, pageList, pageCount);
-}
-
-void IOMapperInsertUPLPages(ppnum_t addr, unsigned offset,
-                            upl_page_info_t *pageList, unsigned pageCount)
-{
-    if (!IOMapper::gSystem)
-        panic("IOMapperInsertUPLPages no system mapper");
-    else
-        assert(!((vm_address_t) IOMapper::gSystem & 3));
-
-    IOMapper::gSystem->iovmInsert(addr,
-                                 (IOItemCount) offset,
-                                  pageList,
-                                  (IOItemCount) pageCount);
-}
-
-/////////////////////////////////////////////////////////////////////////////
-//
-//
-//     IOLib.h APIs
-//
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#include <machine/machine_routines.h>
-
-UInt8 IOMappedRead8(IOPhysicalAddress address)
-{
-    IOMapper::checkForSystemMapper();
-
-    if (IOMapper::gSystem) {
-        addr64_t addr = IOMapper::gSystem->mapAddr(address);
-        return (UInt8) ml_phys_read_byte_64(addr);
-    }
-    else
-        return (UInt8) ml_phys_read_byte((vm_offset_t) address);
-}
-
-UInt16 IOMappedRead16(IOPhysicalAddress address)
-{
-    IOMapper::checkForSystemMapper();
-
-    if (IOMapper::gSystem) {
-        addr64_t addr = IOMapper::gSystem->mapAddr(address);
-        return (UInt16) ml_phys_read_half_64(addr);
-    }
-    else
-        return (UInt16) ml_phys_read_half((vm_offset_t) address);
-}
-
-UInt32 IOMappedRead32(IOPhysicalAddress address)
-{
-    IOMapper::checkForSystemMapper();
-
-    if (IOMapper::gSystem) {
-        addr64_t addr = IOMapper::gSystem->mapAddr(address);
-       return (UInt32) ml_phys_read_word_64(addr);
-    }
-    else
-        return (UInt32) ml_phys_read_word((vm_offset_t) address);
-}
-
-UInt64 IOMappedRead64(IOPhysicalAddress address)
-{
-    IOMapper::checkForSystemMapper();
-
-    if (IOMapper::gSystem) {
-        addr64_t addr = IOMapper::gSystem->mapAddr(address);
-        return (UInt64) ml_phys_read_double_64(addr);
-    }
-    else
-        return (UInt64) ml_phys_read_double((vm_offset_t) address);
-}
-
-void IOMappedWrite8(IOPhysicalAddress address, UInt8 value)
-{
-    IOMapper::checkForSystemMapper();
-
-    if (IOMapper::gSystem) {
-        addr64_t addr = IOMapper::gSystem->mapAddr(address);
-        ml_phys_write_byte_64(addr, value);
-    }
-    else
-        ml_phys_write_byte((vm_offset_t) address, value);
-}
-
-void IOMappedWrite16(IOPhysicalAddress address, UInt16 value)
-{
-    IOMapper::checkForSystemMapper();
-
-    if (IOMapper::gSystem) {
-        addr64_t addr = IOMapper::gSystem->mapAddr(address);
-        ml_phys_write_half_64(addr, value);
-    }
-    else
-        ml_phys_write_half((vm_offset_t) address, value);
-}
-
-void IOMappedWrite32(IOPhysicalAddress address, UInt32 value)
-{
-    IOMapper::checkForSystemMapper();
-
-    if (IOMapper::gSystem) {
-        addr64_t addr = IOMapper::gSystem->mapAddr(address);
-        ml_phys_write_word_64(addr, value);
-    }
-    else
-        ml_phys_write_word((vm_offset_t) address, value);
-}
-
-void IOMappedWrite64(IOPhysicalAddress address, UInt64 value)
-{
-    IOMapper::checkForSystemMapper();
-
-    if (IOMapper::gSystem) {
-        addr64_t addr = IOMapper::gSystem->mapAddr(address);
-        ml_phys_write_double_64(addr, value);
-    }
-    else
-        ml_phys_write_double((vm_offset_t) address, value);
-}
-
-__END_DECLS
index 2125a5f675422f1c3036e4e6f08b70223a752427..b0da5f75ada455062576941394b161572416d540 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -64,18 +61,6 @@ IOMemoryCursor::initWithSpecification(SegmentFunction  inSegFunc,
                                       IOPhysicalLength inMaxTransferSize,
                                       IOPhysicalLength inAlignment)
 {
-// @@@ gvdl: Remove me
-#if 1
-static UInt sMaxDBDMASegment;
-if (!sMaxDBDMASegment) {
-    sMaxDBDMASegment = (UInt) -1;
-    if (PE_parse_boot_arg("mseg", &sMaxDBDMASegment))
-        IOLog("Setting MaxDBDMASegment to %d\n", sMaxDBDMASegment);
-}
-
-if (inMaxSegmentSize > sMaxDBDMASegment) inMaxSegmentSize = sMaxDBDMASegment;
-#endif
-
     if (!super::init())
         return false;
 
index 12ace713b3c89a412ccffac8e0b7bd6c8e80ba71..20b05f3e1166a226d481510efb85166bd1d65be6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
  * HISTORY
  *
  */
-// 45678901234567890123456789012345678901234567890123456789012345678901234567890
-#include <sys/cdefs.h>
 
 #include <IOKit/assert.h>
 #include <IOKit/system.h>
 #include <IOKit/IOLib.h>
 #include <IOKit/IOMemoryDescriptor.h>
-#include <IOKit/IOMapper.h>
 
 #include <IOKit/IOKitDebug.h>
 
 
 __BEGIN_DECLS
 #include <vm/pmap.h>
-#include <mach/memory_object_types.h>
 #include <device/device_port.h>
-
+void bcopy_phys(char *from, char *to, int size);
+void pmap_enter(pmap_t pmap, vm_offset_t va, vm_offset_t pa,
+                vm_prot_t prot, unsigned int flags, boolean_t wired);
 #ifndef i386
-struct phys_entry      *pmap_find_physentry(ppnum_t pa);
+struct phys_entry      *pmap_find_physentry(vm_offset_t pa);
 #endif
 void ipc_port_release_send(ipc_port_t port);
-
-/* Copy between a physical page and a virtual address in the given vm_map */
-kern_return_t copypv(addr64_t source, addr64_t sink, unsigned int size, int which);
+vm_offset_t vm_map_get_phys_page(vm_map_t map, vm_offset_t offset);
 
 memory_object_t
 device_pager_setup(
@@ -72,7 +65,7 @@ kern_return_t
 device_pager_populate_object(
        memory_object_t         pager,
        vm_object_offset_t      offset,
-       ppnum_t                 phys_addr,
+       vm_offset_t             phys_addr,
        vm_size_t               size);
 
 /*
@@ -87,18 +80,8 @@ extern kern_return_t vm_fault(
                pmap_t          caller_pmap,
                vm_offset_t     caller_pmap_addr);
 
-unsigned int  IOTranslateCacheBits(struct phys_entry *pp);
-
-vm_map_t IOPageableMapForAddress( vm_address_t address );
-
-typedef kern_return_t (*IOIteratePageableMapsCallback)(vm_map_t map, void * ref);
-
-kern_return_t IOIteratePageableMaps(vm_size_t size,
-                    IOIteratePageableMapsCallback callback, void * ref);
 __END_DECLS
 
-static IOMapper * gIOSystemMapper;
-
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 OSDefineMetaClassAndAbstractStructors( IOMemoryDescriptor, OSObject )
@@ -107,6 +90,17 @@ OSDefineMetaClassAndAbstractStructors( IOMemoryDescriptor, OSObject )
 
 OSDefineMetaClassAndStructors(IOGeneralMemoryDescriptor, IOMemoryDescriptor)
 
+extern "C" {
+
+vm_map_t IOPageableMapForAddress( vm_address_t address );
+
+typedef kern_return_t (*IOIteratePageableMapsCallback)(vm_map_t map, void * ref);
+
+kern_return_t IOIteratePageableMaps(vm_size_t size,
+                    IOIteratePageableMapsCallback callback, void * ref);
+
+}
+
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 static IORecursiveLock * gIOMemoryLock;
@@ -119,7 +113,37 @@ static IORecursiveLock * gIOMemoryLock;
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-#define next_page(a) ( trunc_page_32(a) + PAGE_SIZE )
+inline vm_map_t IOGeneralMemoryDescriptor::getMapForTask( task_t task, vm_address_t address )
+{
+    if( (task == kernel_task) && (kIOMemoryRequiresWire & _flags))
+        return( IOPageableMapForAddress( address ) );
+    else
+        return( get_task_map( task ));
+}
+
+inline vm_offset_t pmap_extract_safe(task_t task, vm_offset_t va)
+{
+    vm_offset_t pa = pmap_extract(get_task_pmap(task), va);
+
+    if ( pa == 0 )
+    {
+        pa = vm_map_get_phys_page(get_task_map(task), trunc_page(va));
+        if ( pa )  pa += va - trunc_page(va);
+    }
+
+    return pa;
+}
+
+inline void bcopy_phys_safe(char * from, char * to, int size)
+{
+    boolean_t enabled = ml_set_interrupts_enabled(FALSE);
+
+    bcopy_phys(from, to, size);
+
+    ml_set_interrupts_enabled(enabled);
+}
+
+#define next_page(a) ( trunc_page(a) + page_size )
 
 
 extern "C" {
@@ -182,23 +206,13 @@ kern_return_t device_close(
  */
 IOMemoryDescriptor *
 IOMemoryDescriptor::withAddress(void *      address,
-                                IOByteCount   length,
-                                IODirection direction)
-{
-    return IOMemoryDescriptor::
-        withAddress((vm_address_t) address, length, direction, kernel_task);
-}
-
-IOMemoryDescriptor *
-IOMemoryDescriptor::withAddress(vm_address_t address,
-                                IOByteCount  length,
-                                IODirection  direction,
-                                task_t       task)
+                                IOByteCount   withLength,
+                                IODirection withDirection)
 {
     IOGeneralMemoryDescriptor * that = new IOGeneralMemoryDescriptor;
     if (that)
     {
-       if (that->initWithAddress(address, length, direction, task))
+       if (that->initWithAddress(address, withLength, withDirection))
            return that;
 
         that->release();
@@ -207,32 +221,15 @@ IOMemoryDescriptor::withAddress(vm_address_t address,
 }
 
 IOMemoryDescriptor *
-IOMemoryDescriptor::withPhysicalAddress(
-                               IOPhysicalAddress       address,
-                               IOByteCount             length,
-                               IODirection             direction )
-{
-    IOGeneralMemoryDescriptor *self = new IOGeneralMemoryDescriptor;
-    if (self
-    && !self->initWithPhysicalAddress(address, length, direction)) {
-        self->release();
-        return 0;
-    }
-
-    return self;
-}
-
-IOMemoryDescriptor *
-IOMemoryDescriptor::withRanges(        IOVirtualRange * ranges,
-                               UInt32           withCount,
-                               IODirection      direction,
-                               task_t           task,
-                               bool             asReference)
+IOMemoryDescriptor::withAddress(vm_address_t address,
+                                IOByteCount  withLength,
+                                IODirection  withDirection,
+                                task_t       withTask)
 {
     IOGeneralMemoryDescriptor * that = new IOGeneralMemoryDescriptor;
     if (that)
     {
-       if (that->initWithRanges(ranges, withCount, direction, task, asReference))
+       if (that->initWithAddress(address, withLength, withDirection, withTask))
            return that;
 
         that->release();
@@ -240,6 +237,16 @@ IOMemoryDescriptor::withRanges(    IOVirtualRange * ranges,
     return 0;
 }
 
+IOMemoryDescriptor *
+IOMemoryDescriptor::withPhysicalAddress(
+                               IOPhysicalAddress       address,
+                               IOByteCount             withLength,
+                               IODirection             withDirection )
+{
+    return( IOMemoryDescriptor::withAddress( address, withLength,
+                                       withDirection, (task_t) 0  ));
+}
+
 
 /*
  * withRanges:
@@ -250,48 +257,33 @@ IOMemoryDescriptor::withRanges(   IOVirtualRange * ranges,
  * Passing the ranges as a reference will avoid an extra allocation.
  */
 IOMemoryDescriptor *
-IOMemoryDescriptor::withOptions(void *         buffers,
-                                UInt32         count,
-                                UInt32         offset,
-                                task_t         task,
-                                IOOptionBits   opts,
-                                IOMapper *     mapper)
+IOMemoryDescriptor::withRanges(        IOVirtualRange * ranges,
+                               UInt32           withCount,
+                               IODirection      withDirection,
+                               task_t           withTask,
+                               bool             asReference = false)
 {
-    IOGeneralMemoryDescriptor *self = new IOGeneralMemoryDescriptor;
-
-    if (self
-    && !self->initWithOptions(buffers, count, offset, task, opts, mapper))
+    IOGeneralMemoryDescriptor * that = new IOGeneralMemoryDescriptor;
+    if (that)
     {
-        self->release();
-        return 0;
-    }
-
-    return self;
-}
+       if (that->initWithRanges(ranges, withCount, withDirection, withTask, asReference))
+           return that;
 
-// Can't leave abstract but this should never be used directly,
-bool IOMemoryDescriptor::initWithOptions(void *                buffers,
-                                         UInt32                count,
-                                         UInt32                offset,
-                                         task_t                task,
-                                         IOOptionBits  options,
-                                         IOMapper *    mapper)
-{
-    // @@@ gvdl: Should I panic?
-    panic("IOMD::initWithOptions called\n");
+        that->release();
+    }
     return 0;
 }
 
 IOMemoryDescriptor *
 IOMemoryDescriptor::withPhysicalRanges(        IOPhysicalRange * ranges,
                                         UInt32          withCount,
-                                        IODirection     direction,
-                                        bool            asReference)
+                                        IODirection     withDirection,
+                                        bool            asReference = false)
 {
     IOGeneralMemoryDescriptor * that = new IOGeneralMemoryDescriptor;
     if (that)
     {
-       if (that->initWithPhysicalRanges(ranges, withCount, direction, asReference))
+       if (that->initWithPhysicalRanges(ranges, withCount, withDirection, asReference))
            return that;
 
         that->release();
@@ -303,15 +295,15 @@ IOMemoryDescriptor *
 IOMemoryDescriptor::withSubRange(IOMemoryDescriptor *  of,
                                IOByteCount             offset,
                                IOByteCount             length,
-                               IODirection             direction)
+                               IODirection             withDirection)
 {
-    IOSubMemoryDescriptor *self = new IOSubMemoryDescriptor;
+    IOSubMemoryDescriptor * that = new IOSubMemoryDescriptor;
 
-    if (self && !self->initSubRange(of, offset, length, direction)) {
-        self->release();
-       self = 0;
+    if (that && !that->initSubRange(of, offset, length, withDirection)) {
+        that->release();
+       that = 0;
     }
-    return self;
+    return that;
 }
 
 /*
@@ -361,123 +353,29 @@ IOGeneralMemoryDescriptor::initWithPhysicalAddress(
     return initWithPhysicalRanges( &_singleRange.p, 1, withDirection, true);
 }
 
-bool
-IOGeneralMemoryDescriptor::initWithPhysicalRanges(
-                                IOPhysicalRange * ranges,
-                                UInt32            count,
-                                IODirection       direction,
-                                bool              reference)
-{
-    IOOptionBits mdOpts = direction | kIOMemoryTypePhysical;
-
-    if (reference)
-        mdOpts |= kIOMemoryAsReference;
-
-    return initWithOptions(ranges, count, 0, 0, mdOpts, /* mapper */ 0);
-}
-
-bool
-IOGeneralMemoryDescriptor::initWithRanges(
-                                   IOVirtualRange * ranges,
-                                   UInt32           count,
-                                   IODirection      direction,
-                                   task_t           task,
-                                   bool             reference)
-{
-    IOOptionBits mdOpts = direction;
-
-    if (reference)
-        mdOpts |= kIOMemoryAsReference;
-
-    if (task) {
-        mdOpts |= kIOMemoryTypeVirtual;
-        if (task == kernel_task)
-            mdOpts |= kIOMemoryAutoPrepare;
-    }
-    else
-        mdOpts |= kIOMemoryTypePhysical;
-
-    // @@@ gvdl: Need to remove this
-    // Auto-prepare if this is a kernel memory descriptor as very few
-    // clients bother to prepare() kernel memory.
-    // But it has been enforced so what are you going to do?
-    
-    return initWithOptions(ranges, count, 0, task, mdOpts, /* mapper */ 0);
-}
-
 /*
- * initWithOptions:
+ * initWithRanges:
  *
- *  IOMemoryDescriptor. The buffer is made up of several virtual address ranges,
- * from a given task or several physical ranges or finally an UPL from the ubc
- * system.
+ * Initialize an IOMemoryDescriptor. The buffer is made up of several
+ * virtual address ranges, from a given task
  *
  * Passing the ranges as a reference will avoid an extra allocation.
  *
- * An IOMemoryDescriptor can be re-used by calling initWithOptions again on an
- * existing instance -- note this behavior is not commonly supported in other
- * I/O Kit classes, although it is supported here.
+ * An IOMemoryDescriptor can be re-used by calling initWithAddress or
+ * initWithRanges again on an existing instance -- note this behavior
+ * is not commonly supported in other I/O Kit classes, although it is
+ * supported here.
  */
-
-enum ioPLBlockFlags {
-    kIOPLOnDevice  = 0x00000001,
-    kIOPLExternUPL = 0x00000002,
-};
-
-struct ioPLBlock {
-    upl_t fIOPL;
-    vm_address_t fIOMDOffset;  // The offset of this iopl in descriptor
-    vm_offset_t fPageInfo;     // Pointer to page list or index into it
-    ppnum_t fMappedBase;       // Page number of first page in this iopl
-    unsigned int fPageOffset;  // Offset within first page of iopl
-    unsigned int fFlags;       // Flags
-};
-
-struct ioGMDData {
-    IOMapper *fMapper;
-    unsigned int fPageCnt;
-    upl_page_info_t fPageList[0];      // @@@ gvdl need to get rid of this
-                                        //  should be able to use upl directly
-    ioPLBlock fBlocks[0];
-};
-
-#define getDataP(osd)  ((ioGMDData *) (osd)->getBytesNoCopy())
-#define getIOPLList(d) ((ioPLBlock *) &(d->fPageList[d->fPageCnt]))
-#define getNumIOPL(d,len)      \
-    ((len - ((char *) getIOPLList(d) - (char *) d)) / sizeof(ioPLBlock))
-#define getPageList(d) (&(d->fPageList[0]))
-#define computeDataSize(p, u) \
-    (sizeof(ioGMDData) + p * sizeof(upl_page_info_t) + u * sizeof(ioPLBlock))
-
 bool
-IOGeneralMemoryDescriptor::initWithOptions(void *      buffers,
-                                           UInt32      count,
-                                           UInt32      offset,
-                                           task_t      task,
-                                           IOOptionBits        options,
-                                           IOMapper *  mapper)
-{
-
-    switch (options & kIOMemoryTypeMask) {
-    case kIOMemoryTypeVirtual:
-        assert(task);
-        if (!task)
-            return false;
-        else
-            break;
-
-    case kIOMemoryTypePhysical:                // Neither Physical nor UPL should have a task
-       mapper = kIOMapperNone;
-    case kIOMemoryTypeUPL:
-        assert(!task);
-        break;
-    default:
-panic("IOGMD::iWO(): bad type");       // @@@ gvdl: for testing
-        return false;  /* bad argument */
-    }
-
-    assert(buffers);
-    assert(count);
+IOGeneralMemoryDescriptor::initWithRanges(
+                                   IOVirtualRange * ranges,
+                                   UInt32           withCount,
+                                   IODirection      withDirection,
+                                   task_t           withTask,
+                                   bool             asReference = false)
+{
+    assert(ranges);
+    assert(withCount);
 
     /*
      * We can check the _initialized  instance variable before having ever set
@@ -485,12 +383,20 @@ panic("IOGMD::iWO(): bad type");  // @@@ gvdl: for testing
      * variables are zeroed on an object's allocation.
      */
 
-    if (_initialized) {
+    if (_initialized == false)
+    {
+        if (super::init() == false)  return false;
+        _initialized = true;
+    }
+    else
+    {
         /*
          * An existing memory descriptor is being retargeted to point to
          * somewhere else.  Clean up our present state.
          */
 
+        assert(_wireCount == 0);
+
         while (_wireCount)
             complete();
         if (_kernPtrAligned)
@@ -498,142 +404,56 @@ panic("IOGMD::iWO(): bad type"); // @@@ gvdl: for testing
         if (_ranges.v && _rangesIsAllocated)
             IODelete(_ranges.v, IOVirtualRange, _rangesCount);
     }
-    else {
-        if (!super::init())
-            return false;
-        _initialized = true;
-    }
-
-    // Grab the appropriate mapper
-    if (mapper == kIOMapperNone)
-        mapper = 0;    // No Mapper
-    else if (!mapper) {
-        IOMapper::checkForSystemMapper();
-        gIOSystemMapper = mapper = IOMapper::gSystem;
-    }
 
-    _flags                = options;
-    _task                  = task;
+    /*
+     * Initialize the memory descriptor.
+     */
 
-    // DEPRECATED variable initialisation
-    _direction             = (IODirection) (_flags & kIOMemoryDirectionMask);
+    _ranges.v              = 0;
+    _rangesCount           = withCount;
+    _rangesIsAllocated     = asReference ? false : true;
+    _direction             = withDirection;
+    _length                = 0;
+    _task                  = withTask;
     _position              = 0;
+    _positionAtIndex       = 0;
+    _positionAtOffset      = 0;
     _kernPtrAligned        = 0;
     _cachedPhysicalAddress = 0;
     _cachedVirtualAddress  = 0;
+    _flags                = 0;
 
-    if ( (options & kIOMemoryTypeMask) == kIOMemoryTypeUPL) {
-
-        ioGMDData *dataP;
-        unsigned int dataSize = computeDataSize(/* pages */ 0, /* upls */ 1);
+    if (withTask && (withTask != kernel_task))
+        _flags |= kIOMemoryRequiresWire;
 
-        if (!_memoryEntries) {
-            _memoryEntries = OSData::withCapacity(dataSize);
-            if (!_memoryEntries)
-                return false;
-        }
-        else if (!_memoryEntries->initWithCapacity(dataSize))
-            return false;
-
-        _memoryEntries->appendBytes(0, sizeof(ioGMDData));
-        dataP = getDataP(_memoryEntries);
-        dataP->fMapper = mapper;
-        dataP->fPageCnt = 0;
-
-        _wireCount++;  // UPLs start out life wired
-
-        _length    = count;
-        _pages    += atop_32(offset + count + PAGE_MASK) - atop_32(offset);
-
-        ioPLBlock iopl;
-        upl_page_info_t *pageList = UPL_GET_INTERNAL_PAGE_LIST((upl_t) buffers);
-
-        iopl.fIOPL = (upl_t) buffers;
-        // Set the flag kIOPLOnDevice convieniently equal to 1
-        iopl.fFlags  = pageList->device | kIOPLExternUPL;
-        iopl.fIOMDOffset = 0;
-        if (!pageList->device) {
-            // @@@ gvdl: Ask JoeS are the pages contiguious with the list?
-            // or there a chance that we may be inserting 0 phys_addrs?
-            // Pre-compute the offset into the UPL's page list
-            pageList = &pageList[atop_32(offset)];
-            offset &= PAGE_MASK;
-            if (mapper) {
-                iopl.fMappedBase = mapper->iovmAlloc(_pages);
-                mapper->iovmInsert(iopl.fMappedBase, 0, pageList, _pages);
-            }
-           else
-               iopl.fMappedBase = 0;
-        }
-       else
-           iopl.fMappedBase = 0;
-        iopl.fPageInfo = (vm_address_t) pageList;
-        iopl.fPageOffset = offset;
-
-        _memoryEntries->appendBytes(&iopl, sizeof(iopl));
-    }
-    else {     /* kIOMemoryTypeVirtual | kIOMemoryTypePhysical */
-        IOVirtualRange *ranges = (IOVirtualRange *) buffers;
-
-        /*
-         * Initialize the memory descriptor.
-         */
-
-        _length                        = 0;
-        _pages                 = 0;
-        for (unsigned ind = 0; ind < count; ind++) {
-            IOVirtualRange cur = ranges[ind];
-    
-            _length += cur.length;
-            _pages += atop_32(cur.address + cur.length + PAGE_MASK)
-                   -  atop_32(cur.address);
-        }
-
-        _ranges.v              = 0;
-        _rangesIsAllocated     = !(options & kIOMemoryAsReference);
-        _rangesCount           = count;
+    if (asReference)
+        _ranges.v = ranges;
+    else
+    {
+        _ranges.v = IONew(IOVirtualRange, withCount);
+        if (_ranges.v == 0)  return false;
+        bcopy(/* from */ ranges, _ranges.v, withCount * sizeof(IOVirtualRange));
+    } 
 
-        if (options & kIOMemoryAsReference)
-            _ranges.v = ranges;
-        else {
-            _ranges.v = IONew(IOVirtualRange, count);
-            if (!_ranges.v)
-                return false;
-            bcopy(/* from */ ranges, _ranges.v,
-                  count * sizeof(IOVirtualRange));
-        } 
-
-        // Auto-prepare memory at creation time.
-        // Implied completion when descriptor is free-ed
-        if ( (options & kIOMemoryTypeMask) == kIOMemoryTypePhysical)
-            _wireCount++;      // Physical MDs are start out wired
-        else { /* kIOMemoryTypeVirtual */
-            ioGMDData *dataP;
-            unsigned int dataSize =
-                computeDataSize(_pages, /* upls */ _rangesCount * 2);
-
-            if (!_memoryEntries) {
-                _memoryEntries = OSData::withCapacity(dataSize);
-                if (!_memoryEntries)
-                    return false;
-            }
-            else if (!_memoryEntries->initWithCapacity(dataSize))
-                return false;
-    
-            _memoryEntries->appendBytes(0, sizeof(ioGMDData));
-            dataP = getDataP(_memoryEntries);
-            dataP->fMapper = mapper;
-            dataP->fPageCnt = _pages;
-
-            if ((_flags & kIOMemoryAutoPrepare)
-             && prepare() != kIOReturnSuccess)
-                return false;
-        }
+    for (unsigned index = 0; index < _rangesCount; index++)
+    {
+        _length += _ranges.v[index].length;
     }
 
     return true;
 }
 
+bool
+IOGeneralMemoryDescriptor::initWithPhysicalRanges(     IOPhysicalRange * ranges,
+                                               UInt32           withCount,
+                                               IODirection      withDirection,
+                                               bool             asReference = false)
+{
+#warning assuming virtual, physical addresses same size
+    return( initWithRanges( (IOVirtualRange *) ranges,
+                       withCount, withDirection, (task_t) 0, asReference ));
+}
+
 /*
  * free
  *
@@ -648,33 +468,101 @@ void IOGeneralMemoryDescriptor::free()
 
     while (_wireCount)
         complete();
-    if (_memoryEntries)
-        _memoryEntries->release();
-
     if (_kernPtrAligned)
         unmapFromKernel();
     if (_ranges.v && _rangesIsAllocated)
         IODelete(_ranges.v, IOVirtualRange, _rangesCount);
 
-    if (reserved && reserved->devicePager)
-       device_pager_deallocate( (memory_object_t) reserved->devicePager );
+    ifreserved && reserved->devicePager)
+       device_pager_deallocate( reserved->devicePager );
 
-    // memEntry holds a ref on the device pager which owns reserved
-    // (ExpansionData) so no reserved access after this point
-    if (_memEntry)
+    // memEntry holds a ref on the device pager which owns reserved (ExpansionData)
+    // so no reserved access after this point
+    if_memEntry)
         ipc_port_release_send( (ipc_port_t) _memEntry );
-
     super::free();
 }
 
 /* DEPRECATED */ void IOGeneralMemoryDescriptor::unmapFromKernel()
 /* DEPRECATED */ {
-                    panic("IOGMD::unmapFromKernel deprecated");
+/* DEPRECATED */     kern_return_t krtn;
+/* DEPRECATED */     vm_offset_t off;
+/* DEPRECATED */     // Pull the shared pages out of the task map
+/* DEPRECATED */     // Do we need to unwire it first?
+/* DEPRECATED */     for ( off = 0; off < _kernSize; off += page_size )
+/* DEPRECATED */     {
+/* DEPRECATED */       pmap_change_wiring(
+/* DEPRECATED */                       kernel_pmap,
+/* DEPRECATED */                       _kernPtrAligned + off,
+/* DEPRECATED */                       FALSE);
+/* DEPRECATED */ 
+/* DEPRECATED */       pmap_remove(
+/* DEPRECATED */                       kernel_pmap,
+/* DEPRECATED */                       _kernPtrAligned + off,
+/* DEPRECATED */                       _kernPtrAligned + off + page_size);
+/* DEPRECATED */     }
+/* DEPRECATED */     // Free the former shmem area in the task
+/* DEPRECATED */     krtn = vm_deallocate(kernel_map,
+/* DEPRECATED */                       _kernPtrAligned,
+/* DEPRECATED */                       _kernSize );
+/* DEPRECATED */     assert(krtn == KERN_SUCCESS);
+/* DEPRECATED */     _kernPtrAligned = 0;
 /* DEPRECATED */ }
 /* DEPRECATED */ 
 /* DEPRECATED */ void IOGeneralMemoryDescriptor::mapIntoKernel(unsigned rangeIndex)
 /* DEPRECATED */ {
-                    panic("IOGMD::mapIntoKernel deprecated");
+/* DEPRECATED */     kern_return_t krtn;
+/* DEPRECATED */     vm_offset_t off;
+/* DEPRECATED */ 
+/* DEPRECATED */     if (_kernPtrAligned)
+/* DEPRECATED */     {
+/* DEPRECATED */         if (_kernPtrAtIndex == rangeIndex)  return;
+/* DEPRECATED */         unmapFromKernel();
+/* DEPRECATED */         assert(_kernPtrAligned == 0);
+/* DEPRECATED */     }
+/* DEPRECATED */  
+/* DEPRECATED */     vm_offset_t srcAlign = trunc_page(_ranges.v[rangeIndex].address);
+/* DEPRECATED */ 
+/* DEPRECATED */     _kernSize = trunc_page(_ranges.v[rangeIndex].address +
+/* DEPRECATED */                            _ranges.v[rangeIndex].length  +
+/* DEPRECATED */                            page_size - 1) - srcAlign;
+/* DEPRECATED */ 
+/* DEPRECATED */     /* Find some memory of the same size in kernel task.  We use vm_allocate() */
+/* DEPRECATED */     /* to do this. vm_allocate inserts the found memory object in the */
+/* DEPRECATED */     /* target task's map as a side effect. */
+/* DEPRECATED */     krtn = vm_allocate( kernel_map,
+/* DEPRECATED */           &_kernPtrAligned,
+/* DEPRECATED */           _kernSize,
+/* DEPRECATED */           VM_FLAGS_ANYWHERE|VM_MAKE_TAG(VM_MEMORY_IOKIT) );  // Find first fit
+/* DEPRECATED */     assert(krtn == KERN_SUCCESS);
+/* DEPRECATED */     if(krtn)  return;
+/* DEPRECATED */ 
+/* DEPRECATED */     /* For each page in the area allocated from the kernel map, */
+/* DEPRECATED */        /* find the physical address of the page. */
+/* DEPRECATED */        /* Enter the page in the target task's pmap, at the */
+/* DEPRECATED */        /* appropriate target task virtual address. */
+/* DEPRECATED */     for ( off = 0; off < _kernSize; off += page_size )
+/* DEPRECATED */     {
+/* DEPRECATED */       vm_offset_t kern_phys_addr, phys_addr;
+/* DEPRECATED */       if( _task)
+/* DEPRECATED */           phys_addr = pmap_extract( get_task_pmap(_task), srcAlign + off );
+/* DEPRECATED */       else
+/* DEPRECATED */           phys_addr = srcAlign + off;
+/* DEPRECATED */         assert(phys_addr);
+/* DEPRECATED */       if(phys_addr == 0)  return;
+/* DEPRECATED */ 
+/* DEPRECATED */       // Check original state.
+/* DEPRECATED */       kern_phys_addr = pmap_extract( kernel_pmap, _kernPtrAligned + off );
+/* DEPRECATED */       // Set virtual page to point to the right physical one
+/* DEPRECATED */       pmap_enter(
+/* DEPRECATED */           kernel_pmap,
+/* DEPRECATED */           _kernPtrAligned + off,
+/* DEPRECATED */           phys_addr,
+/* DEPRECATED */           VM_PROT_READ|VM_PROT_WRITE,
+/* DEPRECATED */           VM_WIMG_USE_DEFAULT,
+/* DEPRECATED */           TRUE);
+/* DEPRECATED */     }
+/* DEPRECATED */     _kernPtrAtIndex = rangeIndex;
 /* DEPRECATED */ }
 
 /*
@@ -697,7 +585,8 @@ IOByteCount IOMemoryDescriptor::getLength() const
     return _length;
 }
 
-void IOMemoryDescriptor::setTag( IOOptionBits tag )
+void IOMemoryDescriptor::setTag(
+       IOOptionBits            tag )
 {
     _tag = tag;    
 }
@@ -707,7 +596,6 @@ IOOptionBits IOMemoryDescriptor::getTag( void )
     return( _tag);
 }
 
-// @@@ gvdl: who is using this API?  Seems like a wierd thing to implement.
 IOPhysicalAddress IOMemoryDescriptor::getSourceSegment( IOByteCount   offset,
                                                         IOByteCount * length )
 {
@@ -721,282 +609,263 @@ IOPhysicalAddress IOMemoryDescriptor::getSourceSegment( IOByteCount   offset,
     return( physAddr );
 }
 
-IOByteCount IOMemoryDescriptor::readBytes
-                (IOByteCount offset, void *bytes, IOByteCount length)
+IOByteCount IOMemoryDescriptor::readBytes( IOByteCount offset,
+                                                  void *      bytes,
+                                                  IOByteCount withLength )
 {
-    addr64_t dstAddr = (addr64_t) (UInt32) bytes;
-    IOByteCount remaining;
+    IOByteCount bytesCopied = 0;
 
-    // Assert that this entire I/O is withing the available range
-    assert(offset < _length);
-    assert(offset + length <= _length);
-    if (offset >= _length) {
-IOLog("IOGMD(%p): rB = o%lx, l%lx\n", this, offset, length);   // @@@ gvdl
-        return 0;
-    }
+    assert(offset <= _length);
+    assert(offset <= _length - withLength);
 
-    remaining = length = min(length, _length - offset);
-    while (remaining) {        // (process another target segment?)
-        addr64_t       srcAddr64;
-        IOByteCount    srcLen;
+    if ( offset < _length )
+    {
+        withLength = min(withLength, _length - offset);
 
-        srcAddr64 = getPhysicalSegment64(offset, &srcLen);
-        if (!srcAddr64)
-            break;
+        while ( withLength ) // (process another source segment?)
+        {
+            IOPhysicalAddress sourceSegment;
+            IOByteCount       sourceSegmentLength;
 
-        // Clip segment length to remaining
-        if (srcLen > remaining)
-            srcLen = remaining;
+            sourceSegment = getPhysicalSegment(offset, &sourceSegmentLength);
+            if ( sourceSegment == 0 )  goto readBytesErr;
 
-        copypv(srcAddr64, dstAddr, srcLen,
-                            cppvPsrc | cppvFsnk | cppvKmap);
+            sourceSegmentLength = min(sourceSegmentLength, withLength);
 
-        dstAddr   += srcLen;
-        offset    += srcLen;
-        remaining -= srcLen;
-    }
+            while ( sourceSegmentLength ) // (process another target segment?)
+            {
+                IOPhysicalAddress targetSegment;
+                IOByteCount       targetSegmentLength;
 
-    assert(!remaining);
+                targetSegment = pmap_extract_safe(kernel_task, (vm_offset_t) bytes);
+                if ( targetSegment == 0 )  goto readBytesErr;
 
-    return length - remaining;
-}
+                targetSegmentLength = min(next_page(targetSegment) - targetSegment, sourceSegmentLength);
 
-IOByteCount IOMemoryDescriptor::writeBytes
-                (IOByteCount offset, const void *bytes, IOByteCount length)
-{
-    addr64_t srcAddr = (addr64_t) (UInt32) bytes;
-    IOByteCount remaining;
+                if ( sourceSegment + targetSegmentLength > next_page(sourceSegment) )
+                {
+                    IOByteCount pageLength;
 
-    // Assert that this entire I/O is withing the available range
-    assert(offset < _length);
-    assert(offset + length <= _length);
+                    pageLength = next_page(sourceSegment) - sourceSegment;
 
-    assert( !(kIOMemoryPreparedReadOnly & _flags) );
+                    bcopy_phys_safe( /* from */ (char *) sourceSegment, 
+                                     /* to   */ (char *) targetSegment,
+                                     /* size */ (int   ) pageLength );
 
-    if ( (kIOMemoryPreparedReadOnly & _flags) || offset >= _length) {
-IOLog("IOGMD(%p): wB = o%lx, l%lx\n", this, offset, length);   // @@@ gvdl
-        return 0;
-    }
+                    ((UInt8 *) bytes)   += pageLength;
+                    bytesCopied         += pageLength;
+                    offset              += pageLength;
+                    sourceSegment       += pageLength;
+                    sourceSegmentLength -= pageLength;
+                    targetSegment       += pageLength;
+                    targetSegmentLength -= pageLength;
+                    withLength          -= pageLength;
+                }
 
-    remaining = length = min(length, _length - offset);
-    while (remaining) {        // (process another target segment?)
-        addr64_t    dstAddr64;
-        IOByteCount dstLen;
+                bcopy_phys_safe( /* from */ (char *) sourceSegment, 
+                                 /* to   */ (char *) targetSegment,
+                                 /* size */ (int   ) targetSegmentLength );
 
-        dstAddr64 = getPhysicalSegment64(offset, &dstLen);
-        if (!dstAddr64)
-            break;
+                ((UInt8 *) bytes)   += targetSegmentLength;
+                bytesCopied         += targetSegmentLength;
+                offset              += targetSegmentLength;
+                sourceSegment       += targetSegmentLength;
+                sourceSegmentLength -= targetSegmentLength;
+                withLength          -= targetSegmentLength;
+            }
+        }
+    }
 
-        // Clip segment length to remaining
-        if (dstLen > remaining)
-            dstLen = remaining;
+readBytesErr:
 
-        copypv(srcAddr, (addr64_t) dstAddr64, dstLen,
-                            cppvPsnk | cppvFsnk | cppvNoModSnk | cppvKmap);
+    if ( bytesCopied )
+    {
+        // We mark the destination pages as modified, just
+        // in case they are made pageable later on in life.
 
-        srcAddr   += dstLen;
-        offset    += dstLen;
-        remaining -= dstLen;
+        pmap_modify_pages( /* pmap  */ kernel_pmap,       
+                           /* start */ trunc_page(((vm_offset_t) bytes) - bytesCopied),
+                           /* end   */ round_page(((vm_offset_t) bytes)) );
     }
 
-    assert(!remaining);
-
-    return length - remaining;
+    return bytesCopied;
 }
 
-// osfmk/device/iokit_rpc.c
-extern "C" unsigned int IODefaultCacheBits(addr64_t pa);
-
-/* DEPRECATED */ void IOGeneralMemoryDescriptor::setPosition(IOByteCount position)
-/* DEPRECATED */ {
-                    panic("IOGMD::setPosition deprecated");
-/* DEPRECATED */ }
-
-IOPhysicalAddress IOGeneralMemoryDescriptor::getPhysicalSegment
-                        (IOByteCount offset, IOByteCount *lengthOfSegment)
+IOByteCount IOMemoryDescriptor::writeBytes( IOByteCount  offset,
+                                                   const void * bytes,
+                                                   IOByteCount  withLength )
 {
-    IOPhysicalAddress address = 0;
-    IOPhysicalLength  length  = 0;
+    IOByteCount bytesCopied = 0;
 
-//  assert(offset <= _length);
-    if (offset < _length) // (within bounds?)
+    assert(offset <= _length);
+    assert(offset <= _length - withLength);
+
+    if ( offset < _length )
     {
-        if ( (_flags & kIOMemoryTypeMask) == kIOMemoryTypePhysical) {
-            unsigned int ind;
+        withLength = min(withLength, _length - offset);
 
-            // Physical address based memory descriptor
+        while ( withLength ) // (process another target segment?)
+        {
+            IOPhysicalAddress targetSegment;
+            IOByteCount       targetSegmentLength;
 
-            // Find offset within descriptor and make it relative
-            // to the current _range.
-            for (ind = 0 ; offset >= _ranges.p[ind].length; ind++ )
-                offset -= _ranges.p[ind].length;
-    
-            IOPhysicalRange cur = _ranges.p[ind];
-            address = cur.address + offset;
-            length  = cur.length  - offset;
-
-            // see how far we can coalesce ranges
-            for (++ind; ind < _rangesCount; ind++) {
-                cur =  _ranges.p[ind];
-        
-                if (address + length != cur.address)
-                    break;
-    
-                length += cur.length;
-            }
+            targetSegment = getPhysicalSegment(offset, &targetSegmentLength);
+            if ( targetSegment == 0 )  goto writeBytesErr;
 
-            // @@@ gvdl: should assert(address);
-            // but can't as NVidia GeForce creates a bogus physical mem
-            {
-                assert(address || /*nvidia*/(!_ranges.p[0].address && 1 == _rangesCount));
-            }
-            assert(length);
-        }
-        else do {
-            // We need wiring & we are wired.
-            assert(_wireCount);
+            targetSegmentLength = min(targetSegmentLength, withLength);
 
-            if (!_wireCount)
-           {
-               panic("IOGMD: not wired for getPhysicalSegment()");
-                continue;
-           }
+            while ( targetSegmentLength ) // (process another source segment?)
+            {
+                IOPhysicalAddress sourceSegment;
+                IOByteCount       sourceSegmentLength;
 
-            assert(_memoryEntries);
+                sourceSegment = pmap_extract_safe(kernel_task, (vm_offset_t) bytes);
+                if ( sourceSegment == 0 )  goto writeBytesErr;
 
-            ioGMDData * dataP = getDataP(_memoryEntries);
-            const ioPLBlock *ioplList = getIOPLList(dataP);
-            UInt ind, numIOPLs = getNumIOPL(dataP, _memoryEntries->getLength());
-            upl_page_info_t *pageList = getPageList(dataP);
+                sourceSegmentLength = min(next_page(sourceSegment) - sourceSegment, targetSegmentLength);
 
-            assert(numIOPLs > 0);
+                if ( targetSegment + sourceSegmentLength > next_page(targetSegment) )
+                {
+                    IOByteCount pageLength;
 
-            // Scan through iopl info blocks looking for block containing offset
-            for (ind = 1; ind < numIOPLs; ind++) {
-                if (offset < ioplList[ind].fIOMDOffset)
-                    break;
-            }
+                    pageLength = next_page(targetSegment) - targetSegment;
 
-            // Go back to actual range as search goes past it
-            ioPLBlock ioplInfo = ioplList[ind - 1];
+                    bcopy_phys_safe( /* from */ (char *) sourceSegment, 
+                                     /* to   */ (char *) targetSegment,
+                                     /* size */ (int   ) pageLength );
 
-            if (ind < numIOPLs)
-                length = ioplList[ind].fIOMDOffset;
-            else
-                length = _length;
-            length -= offset;                  // Remainder within iopl
+                    // We flush the data cache in case it is code we've copied,
+                    // such that the instruction cache is in the know about it.
 
-            // Subtract offset till this iopl in total list
-            offset -= ioplInfo.fIOMDOffset;
+                    flush_dcache(targetSegment, pageLength, true);
 
-            // This is a mapped IOPL so we just need to compute an offset
-            // relative to the mapped base.
-            if (ioplInfo.fMappedBase) {
-                offset += (ioplInfo.fPageOffset & PAGE_MASK);
-                address = ptoa_32(ioplInfo.fMappedBase) + offset;
-                continue;
-            }
+                    ((UInt8 *) bytes)   += pageLength;
+                    bytesCopied         += pageLength;
+                    offset              += pageLength;
+                    sourceSegment       += pageLength;
+                    sourceSegmentLength -= pageLength;
+                    targetSegment       += pageLength;
+                    targetSegmentLength -= pageLength;
+                    withLength          -= pageLength;
+                }
 
-            // Currently the offset is rebased into the current iopl.
-            // Now add the iopl 1st page offset.
-            offset += ioplInfo.fPageOffset;
+                bcopy_phys_safe( /* from */ (char *) sourceSegment, 
+                                 /* to   */ (char *) targetSegment,
+                                 /* size */ (int   ) sourceSegmentLength );
 
-            // For external UPLs the fPageInfo field points directly to
-            // the upl's upl_page_info_t array.
-            if (ioplInfo.fFlags & kIOPLExternUPL)
-                pageList = (upl_page_info_t *) ioplInfo.fPageInfo;
-            else
-                pageList = &pageList[ioplInfo.fPageInfo];
+                // We flush the data cache in case it is code we've copied,
+                // such that the instruction cache is in the know about it.
 
-            // Check for direct device non-paged memory
-            if ( ioplInfo.fFlags & kIOPLOnDevice ) {
-                address = ptoa_32(pageList->phys_addr) + offset;
-                continue;
-            }
+                flush_dcache(targetSegment, sourceSegmentLength, true);
 
-            // Now we need compute the index into the pageList
-            ind = atop_32(offset);
-            offset &= PAGE_MASK;
-
-            IOPhysicalAddress pageAddr = pageList[ind].phys_addr;
-            address = ptoa_32(pageAddr) + offset;
-
-            // Check for the remaining data in this upl being longer than the
-            // remainder on the current page.  This should be checked for
-            // contiguous pages
-            if (length > PAGE_SIZE - offset) {
-                // See if the next page is contiguous.  Stop looking when we hit
-                // the end of this upl, which is indicated by the
-                // contigLength >= length.
-                IOByteCount contigLength = PAGE_SIZE - offset;
-
-                // Look for contiguous segment
-                while (contigLength < length
-                &&     ++pageAddr == pageList[++ind].phys_addr) {
-                    contigLength += PAGE_SIZE;
-                }
-                if (length > contigLength)
-                    length = contigLength;
+                ((UInt8 *) bytes)   += sourceSegmentLength;
+                bytesCopied         += sourceSegmentLength;
+                offset              += sourceSegmentLength;
+                targetSegment       += sourceSegmentLength;
+                targetSegmentLength -= sourceSegmentLength;
+                withLength          -= sourceSegmentLength;
             }
-    
-            assert(address);
-            assert(length);
-
-        } while (0);
-
-        if (!address)
-            length = 0;
+        }
     }
 
-    if (lengthOfSegment)
-        *lengthOfSegment = length;
+writeBytesErr:
 
-    return address;
+    return bytesCopied;
 }
 
-addr64_t IOMemoryDescriptor::getPhysicalSegment64
-                        (IOByteCount offset, IOByteCount *lengthOfSegment)
+extern "C" {
+// osfmk/device/iokit_rpc.c
+extern unsigned int  IOTranslateCacheBits(struct phys_entry *pp);
+};
+
+/* DEPRECATED */ void IOGeneralMemoryDescriptor::setPosition(IOByteCount position)
+/* DEPRECATED */ {
+/* DEPRECATED */     assert(position <= _length);
+/* DEPRECATED */ 
+/* DEPRECATED */     if (position >= _length)
+/* DEPRECATED */     {
+/* DEPRECATED */         _position         = _length;
+/* DEPRECATED */         _positionAtIndex  = _rangesCount; /* careful: out-of-bounds */
+/* DEPRECATED */         _positionAtOffset = 0;
+/* DEPRECATED */         return;
+/* DEPRECATED */     }
+/* DEPRECATED */ 
+/* DEPRECATED */     if (position < _position)
+/* DEPRECATED */     {
+/* DEPRECATED */       _positionAtOffset = position;
+/* DEPRECATED */       _positionAtIndex  = 0;
+/* DEPRECATED */     }
+/* DEPRECATED */     else
+/* DEPRECATED */     {
+/* DEPRECATED */       _positionAtOffset += (position - _position);
+/* DEPRECATED */     }
+/* DEPRECATED */     _position = position;
+/* DEPRECATED */ 
+/* DEPRECATED */     while (_positionAtOffset >= _ranges.v[_positionAtIndex].length)
+/* DEPRECATED */     {
+/* DEPRECATED */         _positionAtOffset -= _ranges.v[_positionAtIndex].length;
+/* DEPRECATED */         _positionAtIndex++;
+/* DEPRECATED */     }
+/* DEPRECATED */ }
+
+IOPhysicalAddress IOGeneralMemoryDescriptor::getPhysicalSegment( IOByteCount   offset,
+                                                                 IOByteCount * lengthOfSegment )
 {
-    IOPhysicalAddress phys32;
-    IOByteCount              length;
-    addr64_t         phys64;
+    IOPhysicalAddress address = 0;
+    IOPhysicalLength  length  = 0;
+
 
-    phys32 = getPhysicalSegment(offset, lengthOfSegment);
-    if (!phys32)
-       return 0;
+//    assert(offset <= _length);
 
-    if (gIOSystemMapper)
+    if ( offset < _length ) // (within bounds?)
     {
-       IOByteCount origLen;
-
-       phys64 = gIOSystemMapper->mapAddr(phys32);
-       origLen = *lengthOfSegment;
-       length = page_size - (phys64 & (page_size - 1));
-       while ((length < origLen)
-           && ((phys64 + length) == gIOSystemMapper->mapAddr(phys32 + length)))
-           length += page_size;
-       if (length > origLen)
-           length = origLen;
-
-       *lengthOfSegment = length;
+        unsigned rangesIndex = 0;
+
+        for ( ; offset >= _ranges.v[rangesIndex].length; rangesIndex++ )
+        {
+            offset -= _ranges.v[rangesIndex].length; // (make offset relative)
+        }
+
+        if ( _task == 0 ) // (physical memory?)
+        {
+            address = _ranges.v[rangesIndex].address + offset;
+            length  = _ranges.v[rangesIndex].length  - offset;
+
+            for ( ++rangesIndex; rangesIndex < _rangesCount; rangesIndex++ )
+            {
+                if ( address + length != _ranges.v[rangesIndex].address )  break;
+
+                length += _ranges.v[rangesIndex].length; // (coalesce ranges)
+            }
+        }
+        else // (virtual memory?)
+        {
+            vm_address_t addressVirtual = _ranges.v[rangesIndex].address + offset;
+
+            assert((0 == (kIOMemoryRequiresWire & _flags)) || _wireCount);
+
+            address = pmap_extract_safe(_task, addressVirtual);
+            length  = next_page(addressVirtual) - addressVirtual;
+            length  = min(_ranges.v[rangesIndex].length - offset, length);
+        }
+
+        assert(address);
+        if ( address == 0 )  length = 0;
     }
-    else
-       phys64 = (addr64_t) phys32;
 
-    return phys64;
+    if ( lengthOfSegment )  *lengthOfSegment = length;
+
+    return address;
 }
 
-IOPhysicalAddress IOGeneralMemoryDescriptor::getSourceSegment
-                            (IOByteCount offset, IOByteCount *lengthOfSegment)
+IOPhysicalAddress IOGeneralMemoryDescriptor::getSourceSegment( IOByteCount   offset,
+                                                               IOByteCount * lengthOfSegment )
 {
     IOPhysicalAddress address = 0;
     IOPhysicalLength  length  = 0;
 
     assert(offset <= _length);
 
-    if ( (_flags & kIOMemoryTypeMask) == kIOMemoryTypeUPL)
-       return super::getSourceSegment( offset, lengthOfSegment );
-
     if ( offset < _length ) // (within bounds?)
     {
         unsigned rangesIndex = 0;
@@ -1029,197 +898,193 @@ IOPhysicalAddress IOGeneralMemoryDescriptor::getSourceSegment
 /* DEPRECATED */ void * IOGeneralMemoryDescriptor::getVirtualSegment(IOByteCount offset,
 /* DEPRECATED */                                                       IOByteCount * lengthOfSegment)
 /* DEPRECATED */ {
-                    if (_task == kernel_task)
-                        return (void *) getSourceSegment(offset, lengthOfSegment);
-                    else
-                        panic("IOGMD::getVirtualSegment deprecated");
-
-                    return 0;
+/* DEPRECATED */     if( offset != _position)
+/* DEPRECATED */       setPosition( offset );
+/* DEPRECATED */ 
+/* DEPRECATED */     assert(_position <= _length);
+/* DEPRECATED */ 
+/* DEPRECATED */     /* Fail gracefully if the position is at (or past) the end-of-buffer. */
+/* DEPRECATED */     if (_position >= _length)
+/* DEPRECATED */     {
+/* DEPRECATED */         *lengthOfSegment = 0;
+/* DEPRECATED */         return 0;
+/* DEPRECATED */     }
+/* DEPRECATED */ 
+/* DEPRECATED */     /* Compute the relative length to the end of this virtual segment. */
+/* DEPRECATED */     *lengthOfSegment = _ranges.v[_positionAtIndex].length - _positionAtOffset;
+/* DEPRECATED */ 
+/* DEPRECATED */     /* Compute the relative address of this virtual segment. */
+/* DEPRECATED */     if (_task == kernel_task)
+/* DEPRECATED */         return (void *)(_ranges.v[_positionAtIndex].address + _positionAtOffset);
+/* DEPRECATED */     else
+/* DEPRECATED */     {
+/* DEPRECATED */       vm_offset_t off;
+/* DEPRECATED */ 
+/* DEPRECATED */         mapIntoKernel(_positionAtIndex);
+/* DEPRECATED */ 
+/* DEPRECATED */       off  = _ranges.v[_kernPtrAtIndex].address;
+/* DEPRECATED */       off -= trunc_page(off);
+/* DEPRECATED */ 
+/* DEPRECATED */       return (void *) (_kernPtrAligned + off + _positionAtOffset);
+/* DEPRECATED */     }
 /* DEPRECATED */ }
 /* DEPRECATED */ /* USE INSTEAD: map(), readBytes(), writeBytes() */
 
-IOReturn IOGeneralMemoryDescriptor::wireVirtual(IODirection forDirection)
+/*
+ * prepare
+ *
+ * Prepare the memory for an I/O transfer.  This involves paging in
+ * the memory, if necessary, and wiring it down for the duration of
+ * the transfer.  The complete() method completes the processing of
+ * the memory after the I/O transfer finishes.  This method needn't
+ * called for non-pageable memory.
+ */
+IOReturn IOGeneralMemoryDescriptor::prepare(
+               IODirection forDirection = kIODirectionNone)
 {
-    IOReturn error = kIOReturnNoMemory;
-    ioGMDData *dataP;
-    ppnum_t mapBase = 0;
-    IOMapper *mapper;
+    UInt rangeIndex = 0;
 
-    assert(!_wireCount);
+    if((_wireCount == 0) && (kIOMemoryRequiresWire & _flags)) {
+        kern_return_t rc;
 
-    dataP = getDataP(_memoryEntries);
-    mapper = dataP->fMapper;
-    if (mapper && _pages)
-        mapBase = mapper->iovmAlloc(_pages);
+        if(forDirection == kIODirectionNone)
+            forDirection = _direction;
 
-    // Note that appendBytes(NULL) zeros the data up to the
-    // desired length.
-    _memoryEntries->appendBytes(0, dataP->fPageCnt * sizeof(upl_page_info_t));
-    dataP = 0; // May no longer be valid so lets not get tempted.
+        vm_prot_t access;
 
-    if (forDirection == kIODirectionNone)
-        forDirection = _direction;
+        switch (forDirection)
+        {
+            case kIODirectionIn:
+                access = VM_PROT_WRITE;
+                break;
 
-    int uplFlags;    // This Mem Desc's default flags for upl creation
-    switch (forDirection)
-    {
-    case kIODirectionOut:
-        // Pages do not need to be marked as dirty on commit
-        uplFlags = UPL_COPYOUT_FROM;
-        _flags |= kIOMemoryPreparedReadOnly;
-        break;
-
-    case kIODirectionIn:
-    default:
-        uplFlags = 0;  // i.e. ~UPL_COPYOUT_FROM
-        break;
-    }
-    uplFlags |= UPL_SET_IO_WIRE | UPL_SET_LITE;
-
-    //
-    // Check user read/write access to the data buffer.
-    //
-    unsigned int pageIndex = 0;
-    IOByteCount mdOffset = 0;
-    vm_map_t curMap;
-    if (_task == kernel_task && (kIOMemoryBufferPageable & _flags))
-        curMap = 0;
-    else
-        { curMap = get_task_map(_task); }
-
-    for (UInt range = 0; range < _rangesCount; range++) {
-        ioPLBlock iopl;
-        IOVirtualRange curRange = _ranges.v[range];
-        vm_address_t startPage;
-        IOByteCount numBytes;
-
-        startPage = trunc_page_32(curRange.address);
-        iopl.fPageOffset = (short) curRange.address & PAGE_MASK;
-       if (mapper)
-           iopl.fMappedBase = mapBase + pageIndex;
-       else
-           iopl.fMappedBase = 0;
-        numBytes = iopl.fPageOffset + curRange.length;
-
-        while (numBytes) {
-            dataP = getDataP(_memoryEntries);
-            vm_map_t theMap =
-                (curMap)? curMap 
-                        : IOPageableMapForAddress(startPage);
-            upl_page_info_array_t pageInfo = getPageList(dataP);
-            int ioplFlags = uplFlags;
-            upl_page_list_ptr_t baseInfo = &pageInfo[pageIndex];
-
-            vm_size_t ioplSize = round_page_32(numBytes);
-            unsigned int numPageInfo = atop_32(ioplSize);
-            error = vm_map_get_upl(theMap, 
-                                   startPage,
-                                   &ioplSize,
-                                   &iopl.fIOPL,
-                                   baseInfo,
-                                   &numPageInfo,
-                                   &ioplFlags,
-                                   false);
-            assert(ioplSize);
-            if (error != KERN_SUCCESS)
-                goto abortExit;
-
-            error = kIOReturnNoMemory;
-
-            if (baseInfo->device) {
-                numPageInfo = 1;
-                iopl.fFlags  = kIOPLOnDevice;
-                // Don't translate device memory at all 
-               if (mapper && mapBase) {
-                   mapper->iovmFree(mapBase, _pages);
-                   mapBase = 0;
-                   iopl.fMappedBase = 0;
-               }
-            }
-            else {
-                iopl.fFlags = 0;
-                if (mapper)
-                    mapper->iovmInsert(mapBase, pageIndex,
-                                       baseInfo, numPageInfo);
-            }
+            case kIODirectionOut:
+                access = VM_PROT_READ;
+                break;
 
-            iopl.fIOMDOffset = mdOffset;
-            iopl.fPageInfo = pageIndex;
+            default:
+                access = VM_PROT_READ | VM_PROT_WRITE;
+                break;
+        }
 
-           if (_flags & kIOMemoryAutoPrepare)
-           {
-               kernel_upl_commit(iopl.fIOPL, 0, 0);
-               iopl.fIOPL = 0;
-           }
+        //
+        // Check user read/write access to the data buffer.
+        //
 
-            if (!_memoryEntries->appendBytes(&iopl, sizeof(iopl))) {
-                // Clean up partial created and unsaved iopl
-               if (iopl.fIOPL)
-                   kernel_upl_abort(iopl.fIOPL, 0);
-                goto abortExit;
-            }
+        for (rangeIndex = 0; rangeIndex < _rangesCount; rangeIndex++)
+        {
+            vm_offset_t checkBase = trunc_page(_ranges.v[rangeIndex].address);
+            vm_size_t   checkSize = round_page(_ranges.v[rangeIndex].length );
 
-            // Check for a multiple iopl's in one virtual range
-            pageIndex += numPageInfo;
-            mdOffset -= iopl.fPageOffset;
-            if (ioplSize < numBytes) {
-                numBytes -= ioplSize;
-                startPage += ioplSize;
-                mdOffset += ioplSize;
-                iopl.fPageOffset = 0;
-               if (mapper)
-                   iopl.fMappedBase = mapBase + pageIndex;
-            }
-            else {
-                mdOffset += numBytes;
-                break;
-            }
+            while (checkSize)
+            {
+                vm_region_basic_info_data_t regionInfo;
+                mach_msg_type_number_t      regionInfoSize = sizeof(regionInfo);
+                vm_size_t                   regionSize;
+
+                if ( (vm_region(
+                          /* map         */ getMapForTask(_task, checkBase),
+                          /* address     */ &checkBase,
+                          /* size        */ &regionSize,
+                          /* flavor      */ VM_REGION_BASIC_INFO,
+                          /* info        */ (vm_region_info_t) &regionInfo,
+                          /* info size   */ &regionInfoSize,
+                          /* object name */ 0 ) != KERN_SUCCESS             ) ||
+                     ( (forDirection & kIODirectionIn ) &&
+                                   !(regionInfo.protection & VM_PROT_WRITE) ) ||
+                     ( (forDirection & kIODirectionOut) && 
+                                   !(regionInfo.protection & VM_PROT_READ ) ) )
+                {
+                    return kIOReturnVMError;
+                }
+
+                assert((regionSize & PAGE_MASK) == 0);
+
+                regionSize = min(regionSize, checkSize);
+                checkSize -= regionSize;
+                checkBase += regionSize;
+            } // (for each vm region)
+        } // (for each io range)
+
+        for (rangeIndex = 0; rangeIndex < _rangesCount; rangeIndex++) {
+
+            vm_offset_t srcAlign = trunc_page(_ranges.v[rangeIndex].address);
+            IOByteCount srcAlignEnd = trunc_page(_ranges.v[rangeIndex].address +
+                                _ranges.v[rangeIndex].length  +
+                                page_size - 1);
+
+           vm_map_t taskVMMap = getMapForTask(_task, srcAlign);
+
+           // If this I/O is for a user land task then protect ourselves
+           // against COW and other vm_shenanigans
+           if (_task && _task != kernel_task) {
+               // setup a data object to hold the 'named' memory regions
+               // @@@ gvdl: If we fail to allocate an OSData we will just
+               // hope for the best for the time being.  Lets not fail a
+               // prepare at this late stage in product release.
+               if (!_memoryEntries)
+                   _memoryEntries = OSData::withCapacity(16);
+               if (_memoryEntries) {
+                   vm_object_offset_t desiredSize = srcAlignEnd - srcAlign;
+                   vm_object_offset_t entryStart = srcAlign;
+                   ipc_port_t memHandle;
+
+                   do {
+                       vm_object_offset_t actualSize = desiredSize;
+
+                       rc = mach_make_memory_entry_64
+                           (taskVMMap, &actualSize, entryStart,
+                           forDirection, &memHandle, NULL);
+                       if (KERN_SUCCESS != rc) {
+                           IOLog("IOMemoryDescriptor::prepare mach_make_memory_entry_64 failed: %d\n", rc);
+                           goto abortExit;
+                       }
+
+                       _memoryEntries->
+                           appendBytes(&memHandle, sizeof(memHandle));
+                       desiredSize -= actualSize;
+                       entryStart += actualSize;
+                   } while (desiredSize);
+               }
+           }
+
+            rc = vm_map_wire(taskVMMap, srcAlign, srcAlignEnd, access, FALSE);
+           if (KERN_SUCCESS != rc) {
+               IOLog("IOMemoryDescriptor::prepare vm_map_wire failed: %d\n", rc);
+               goto abortExit;
+           }
         }
     }
-
+    _wireCount++;
     return kIOReturnSuccess;
 
 abortExit:
-    {
-        dataP = getDataP(_memoryEntries);
-        UInt done = getNumIOPL(dataP, _memoryEntries->getLength());
-        ioPLBlock *ioplList = getIOPLList(dataP);
-    
-        for (UInt range = 0; range < done; range++)
-       {
-           if (ioplList[range].fIOPL)
-               kernel_upl_abort(ioplList[range].fIOPL, 0);
-       }
+    UInt doneIndex;
 
-        if (mapper && mapBase)
-            mapper->iovmFree(mapBase, _pages);
-    }
-
-    return error;
-}
 
-/*
- * prepare
- *
- * Prepare the memory for an I/O transfer.  This involves paging in
- * the memory, if necessary, and wiring it down for the duration of
- * the transfer.  The complete() method completes the processing of
- * the memory after the I/O transfer finishes.  This method needn't
- * called for non-pageable memory.
- */
-IOReturn IOGeneralMemoryDescriptor::prepare(IODirection forDirection)
-{
-    IOReturn error = kIOReturnSuccess;
+    for(doneIndex = 0; doneIndex < rangeIndex; doneIndex++) {
+       vm_offset_t srcAlign = trunc_page(_ranges.v[doneIndex].address);
+       IOByteCount srcAlignEnd = trunc_page(_ranges.v[doneIndex].address +
+                           _ranges.v[doneIndex].length  +
+                           page_size - 1);
 
-    if (!_wireCount && (_flags & kIOMemoryTypeMask) == kIOMemoryTypeVirtual) {
-        error = wireVirtual(forDirection);
-        if (error)
-            return error;
+       vm_map_unwire(getMapForTask(_task, srcAlign), srcAlign,
+                           srcAlignEnd, FALSE);
     }
 
-    _wireCount++;
+    if (_memoryEntries) {
+       ipc_port_t *handles, *handlesEnd;
 
-    return kIOReturnSuccess;
+       handles = (ipc_port_t *) _memoryEntries->getBytesNoCopy();
+       handlesEnd = (ipc_port_t *)
+           ((vm_address_t) handles + _memoryEntries->getLength());
+       while (handles < handlesEnd)
+           ipc_port_release_send(*handles++);
+       _memoryEntries->release();
+       _memoryEntries = 0;
+    }
+
+    return kIOReturnVMError;
 }
 
 /*
@@ -1231,36 +1096,50 @@ IOReturn IOGeneralMemoryDescriptor::prepare(IODirection forDirection)
  * before and after an I/O transfer involving pageable memory.
  */
  
-IOReturn IOGeneralMemoryDescriptor::complete(IODirection /* forDirection */)
+IOReturn IOGeneralMemoryDescriptor::complete(
+               IODirection forDirection = kIODirectionNone)
 {
     assert(_wireCount);
 
-    if (!_wireCount)
+    if(0 == _wireCount)
         return kIOReturnSuccess;
 
     _wireCount--;
-    if (!_wireCount) {
-        if ((_flags & kIOMemoryTypeMask) == kIOMemoryTypePhysical) {
-            /* kIOMemoryTypePhysical */
-            // DO NOTHING
-        }
-        else {
-            ioGMDData * dataP = getDataP(_memoryEntries);
-            ioPLBlock *ioplList = getIOPLList(dataP);
-           UInt count = getNumIOPL(dataP, _memoryEntries->getLength());
-
-            if (dataP->fMapper && _pages && ioplList[0].fMappedBase)
-                dataP->fMapper->iovmFree(ioplList[0].fMappedBase, _pages);
-
-            // Only complete iopls that we created which are for TypeVirtual
-            if ( (_flags & kIOMemoryTypeMask) == kIOMemoryTypeVirtual) {
-                for (UInt ind = 0; ind < count; ind++)
-                   if (ioplList[ind].fIOPL)
-                       kernel_upl_commit(ioplList[ind].fIOPL, 0, 0);
-            }
+    if((_wireCount == 0) && (kIOMemoryRequiresWire & _flags)) {
+        UInt rangeIndex;
+        kern_return_t rc;
+
+        if(forDirection == kIODirectionNone)
+            forDirection = _direction;
+
+        for(rangeIndex = 0; rangeIndex < _rangesCount; rangeIndex++) {
+
+            vm_offset_t srcAlign = trunc_page(_ranges.v[rangeIndex].address);
+            IOByteCount srcAlignEnd = trunc_page(_ranges.v[rangeIndex].address +
+                                _ranges.v[rangeIndex].length  +
+                                page_size - 1);
 
-            (void) _memoryEntries->initWithBytes(dataP, sizeof(ioGMDData)); // == setLength()
+            if(forDirection == kIODirectionIn)
+                pmap_modify_pages(get_task_pmap(_task), srcAlign, srcAlignEnd);
+
+            rc = vm_map_unwire(getMapForTask(_task, srcAlign), srcAlign,
+                                  srcAlignEnd, FALSE);
+            if(rc != KERN_SUCCESS)
+                IOLog("IOMemoryDescriptor::complete: vm_map_unwire failed: %d\n", rc);
         }
+
+       if (_memoryEntries) {
+           ipc_port_t *handles, *handlesEnd;
+
+           handles = (ipc_port_t *) _memoryEntries->getBytesNoCopy();
+           handlesEnd = (ipc_port_t *)
+                       ((vm_address_t) handles + _memoryEntries->getLength());
+           while (handles < handlesEnd)
+               ipc_port_release_send(*handles++);
+
+           _memoryEntries->release();
+           _memoryEntries = 0;
+       }
     }
     return kIOReturnSuccess;
 }
@@ -1269,8 +1148,8 @@ IOReturn IOGeneralMemoryDescriptor::doMap(
        vm_map_t                addressMap,
        IOVirtualAddress *      atAddress,
        IOOptionBits            options,
-       IOByteCount             sourceOffset,
-       IOByteCount             length )
+       IOByteCount             sourceOffset = 0,
+       IOByteCount             length = 0 )
 {
     kern_return_t kr;
     ipc_port_t sharedMem = (ipc_port_t) _memEntry;
@@ -1285,7 +1164,11 @@ IOReturn IOGeneralMemoryDescriptor::doMap(
 
     if( 0 == sharedMem) {
 
-        vm_size_t size = _pages << PAGE_SHIFT;
+        vm_size_t size = 0;
+
+        for (unsigned index = 0; index < _rangesCount; index++)
+            size += round_page(_ranges.v[index].address + _ranges.v[index].length)
+                  - trunc_page(_ranges.v[index].address);
 
         if( _task) {
 #ifndef i386
@@ -1295,9 +1178,9 @@ IOReturn IOGeneralMemoryDescriptor::doMap(
                         VM_PROT_READ | VM_PROT_WRITE, &sharedMem,
                         NULL );
 
-            if( (KERN_SUCCESS == kr) && (actualSize != round_page_32(size))) {
+            if( (KERN_SUCCESS == kr) && (actualSize != round_page(size))) {
 #if IOASSERT
-                IOLog("mach_make_memory_entry_64 (%08x) size (%08lx:%08x)\n",
+                IOLog("mach_make_memory_entry_64 (%08lx) size (%08lx:%08lx)\n",
                             _ranges.v[0].address, (UInt32)actualSize, size);
 #endif
                 kr = kIOReturnVMError;
@@ -1310,12 +1193,13 @@ IOReturn IOGeneralMemoryDescriptor::doMap(
 
         } else do {
 
-            memory_object_t    pager;
-           unsigned int        flags = 0;
-           addr64_t            pa;
+            memory_object_t pager;
+           unsigned int    flags=0;
+           struct      phys_entry      *pp;
+           IOPhysicalAddress   pa;
            IOPhysicalLength    segLen;
 
-           pa = getPhysicalSegment64( sourceOffset, &segLen );
+           pa = getPhysicalSegment( sourceOffset, &segLen );
 
             if( !reserved) {
                 reserved = IONew( ExpansionData, 1 );
@@ -1325,35 +1209,41 @@ IOReturn IOGeneralMemoryDescriptor::doMap(
             reserved->pagerContig = (1 == _rangesCount);
            reserved->memory = this;
 
-           /*What cache mode do we need*/
-            switch(options & kIOMapCacheMask ) {
+#ifndef i386
+            switch(options & kIOMapCacheMask ) { /*What cache mode do we need*/
 
                case kIOMapDefaultCache:
                default:
-                   flags = IODefaultCacheBits(pa);
-                   break;
+                       if((pp = pmap_find_physentry(pa))) {/* Find physical address */
+                               /* Use physical attributes as default */
+                               flags = IOTranslateCacheBits(pp);
+
+                       }
+                       else {  /* If no physical, just hard code attributes */
+                               flags = DEVICE_PAGER_CACHE_INHIB | 
+                                       DEVICE_PAGER_COHERENT | DEVICE_PAGER_GUARDED;
+                       }
+                       break;
        
                case kIOMapInhibitCache:
-                   flags = DEVICE_PAGER_CACHE_INHIB | 
-                                   DEVICE_PAGER_COHERENT | DEVICE_PAGER_GUARDED;
-                   break;
+                       flags = DEVICE_PAGER_CACHE_INHIB | 
+                                       DEVICE_PAGER_COHERENT | DEVICE_PAGER_GUARDED;
+                       break;
        
                case kIOMapWriteThruCache:
-                   flags = DEVICE_PAGER_WRITE_THROUGH |
-                                   DEVICE_PAGER_COHERENT | DEVICE_PAGER_GUARDED;
-                   break;
+                       flags = DEVICE_PAGER_WRITE_THROUGH |
+                                       DEVICE_PAGER_COHERENT | DEVICE_PAGER_GUARDED;
+                       break;
 
                case kIOMapCopybackCache:
-                   flags = DEVICE_PAGER_COHERENT;
-                   break;
-
-               case kIOMapWriteCombineCache:
-                   flags = DEVICE_PAGER_CACHE_INHIB |
-                                   DEVICE_PAGER_COHERENT;
-                   break;
+                       flags = DEVICE_PAGER_COHERENT;
+                       break;
             }
 
            flags |= reserved->pagerContig ? DEVICE_PAGER_CONTIGUOUS : 0;
+#else
+           flags = reserved->pagerContig ? DEVICE_PAGER_CONTIGUOUS : 0;
+#endif
 
             pager = device_pager_setup( (memory_object_t) 0, (int) reserved, 
                                                                size, flags);
@@ -1399,7 +1289,7 @@ IOReturn IOGeneralMemoryDescriptor::doUnmap(
        IOByteCount             length )
 {
     // could be much better
-    if( _task && (addressMap == get_task_map(_task)) && (1 == _rangesCount)
+    if( _task && (addressMap == getMapForTask(_task, _ranges.v[0].address)) && (1 == _rangesCount)
         && (logical == _ranges.v[0].address)
         && (length <= _ranges.v[0].length) )
            return( kIOReturnSuccess );
@@ -1591,40 +1481,7 @@ static kern_return_t IOMemoryDescriptorMapAlloc(vm_map_t map, void * _ref)
         if( ref->sharedMem) {
             vm_prot_t prot = VM_PROT_READ
                             | ((ref->options & kIOMapReadOnly) ? 0 : VM_PROT_WRITE);
-
-            // set memory entry cache
-            vm_prot_t memEntryCacheMode = prot | MAP_MEM_ONLY;
-            switch (ref->options & kIOMapCacheMask)
-            {
-               case kIOMapInhibitCache:
-                    SET_MAP_MEM(MAP_MEM_IO, memEntryCacheMode);
-                    break;
-       
-               case kIOMapWriteThruCache:
-                    SET_MAP_MEM(MAP_MEM_WTHRU, memEntryCacheMode);
-                    break;
-
-               case kIOMapWriteCombineCache:
-                    SET_MAP_MEM(MAP_MEM_WCOMB, memEntryCacheMode);
-                    break;
-
-               case kIOMapCopybackCache:
-                    SET_MAP_MEM(MAP_MEM_COPYBACK, memEntryCacheMode);
-                    break;
-
-               case kIOMapDefaultCache:
-               default:
-                    SET_MAP_MEM(MAP_MEM_NOOP, memEntryCacheMode);
-                    break;
-            }
-
-            vm_size_t unused = 0;
-
-            err = mach_make_memory_entry( NULL /*unused*/, &unused, 0 /*unused*/, 
-                                            memEntryCacheMode, NULL, ref->sharedMem );
-            if (KERN_SUCCESS != err)
-                IOLog("MAP_MEM_ONLY failed %d\n", err);
-
+    
             err = vm_map( map,
                             &ref->mapped,
                             ref->size, 0 /* mask */, 
@@ -1667,8 +1524,8 @@ IOReturn IOMemoryDescriptor::doMap(
        vm_map_t                addressMap,
        IOVirtualAddress *      atAddress,
        IOOptionBits            options,
-       IOByteCount             sourceOffset,
-       IOByteCount             length )
+       IOByteCount             sourceOffset = 0,
+       IOByteCount             length = 0 )
 {
     IOReturn           err = kIOReturnSuccess;
     memory_object_t    pager;
@@ -1688,23 +1545,23 @@ IOReturn IOMemoryDescriptor::doMap(
 
         sourceAddr = getSourceSegment( sourceOffset, NULL );
         assert( sourceAddr );
-        pageOffset = sourceAddr - trunc_page_32( sourceAddr );
+        pageOffset = sourceAddr - trunc_page( sourceAddr );
 
-        ref.size = round_page_32( length + pageOffset );
+        ref.size = round_page( length + pageOffset );
 
         logical = *atAddress;
         if( options & kIOMapAnywhere) 
             // vm_map looks for addresses above here, even when VM_FLAGS_ANYWHERE
             ref.mapped = 0;
         else {
-            ref.mapped = trunc_page_32( logical );
+            ref.mapped = trunc_page( logical );
             if( (logical - ref.mapped) != pageOffset) {
                 err = kIOReturnVMError;
                 continue;
             }
         }
 
-        if( ref.sharedMem && (addressMap == kernel_map) && (kIOMemoryBufferPageable & _flags))
+        if( ref.sharedMem && (addressMap == kernel_map) && (kIOMemoryRequiresWire & _flags))
             err = IOIteratePageableMaps( ref.size, &IOMemoryDescriptorMapAlloc, &ref );
         else
             err = IOMemoryDescriptorMapAlloc( addressMap, &ref );
@@ -1751,7 +1608,7 @@ IOReturn IOMemoryDescriptor::handleFault(
     vm_size_t          page;
     IOByteCount                pageOffset;
     IOPhysicalLength   segLen;
-    addr64_t           physAddr;
+    IOPhysicalAddress  physAddr;
 
     if( !addressMap) {
 
@@ -1767,9 +1624,9 @@ IOReturn IOMemoryDescriptor::handleFault(
         return( kIOReturnSuccess );
     }
 
-    physAddr = getPhysicalSegment64( sourceOffset, &segLen );
+    physAddr = getPhysicalSegment( sourceOffset, &segLen );
     assert( physAddr );
-    pageOffset = physAddr - trunc_page_64( physAddr );
+    pageOffset = physAddr - trunc_page( physAddr );
 
     size = length + pageOffset;
     physAddr -= pageOffset;
@@ -1780,14 +1637,14 @@ IOReturn IOMemoryDescriptor::handleFault(
        // in the middle of the loop only map whole pages
        if( segLen >= bytes)
            segLen = bytes;
-       else if( segLen != trunc_page_32( segLen))
+       else if( segLen != trunc_page( segLen))
            err = kIOReturnVMError;
-        if( physAddr != trunc_page_64( physAddr))
+        if( physAddr != trunc_page( physAddr))
            err = kIOReturnBadArgument;
 
 #ifdef DEBUG
        if( kIOLogMapping & gIOKitDebug)
-           IOLog("_IOMemoryMap::map(%p) %08lx->%08qx:%08lx\n",
+           IOLog("_IOMemoryMap::map(%p) %08lx->%08lx:%08lx\n",
                 addressMap, address + pageOffset, physAddr + pageOffset,
                segLen - pageOffset);
 #endif
@@ -1799,7 +1656,7 @@ IOReturn IOMemoryDescriptor::handleFault(
 #ifdef i386  
        /* i386 doesn't support faulting on device memory yet */
        if( addressMap && (kIOReturnSuccess == err))
-            err = IOMapPages( addressMap, address, (IOPhysicalAddress) physAddr, segLen, options );
+            err = IOMapPages( addressMap, address, physAddr, segLen, options );
         assert( KERN_SUCCESS == err );
        if( err)
            break;
@@ -1808,19 +1665,19 @@ IOReturn IOMemoryDescriptor::handleFault(
         if( pager) {
             if( reserved && reserved->pagerContig) {
                 IOPhysicalLength       allLen;
-                addr64_t               allPhys;
+                IOPhysicalAddress      allPhys;
 
-                allPhys = getPhysicalSegment64( 0, &allLen );
+                allPhys = getPhysicalSegment( 0, &allLen );
                 assert( allPhys );
-                err = device_pager_populate_object( pager, 0, allPhys >> PAGE_SHIFT, round_page_32(allLen) );
+                err = device_pager_populate_object( pager, 0, trunc_page(allPhys), round_page(allLen) );
 
             } else {
 
                 for( page = 0;
                      (page < segLen) && (KERN_SUCCESS == err);
                      page += page_size) {
-                        err = device_pager_populate_object(pager, sourceOffset + page,
-                               (ppnum_t)((physAddr + page) >> PAGE_SHIFT), page_size);
+                        err = device_pager_populate_object( pager, sourceOffset + page,
+                                                            physAddr + page, page_size );
                 }
             }
             assert( KERN_SUCCESS == err );
@@ -1858,7 +1715,7 @@ IOReturn IOMemoryDescriptor::handleFault(
        pageOffset = 0;
 
     } while( bytes
-       && (physAddr = getPhysicalSegment64( sourceOffset, &segLen )));
+       && (physAddr = getPhysicalSegment( sourceOffset, &segLen )));
 
     if( bytes)
         err = kIOReturnBadArgument;
@@ -1879,9 +1736,9 @@ IOReturn IOMemoryDescriptor::doUnmap(
                 addressMap, logical, length );
 #endif
 
-    if( true /* && (addressMap == kernel_map) || (addressMap == get_task_map(current_task()))*/) {
+    if( (addressMap == kernel_map) || (addressMap == get_task_map(current_task()))) {
 
-        if( _memEntry && (addressMap == kernel_map) && (kIOMemoryBufferPageable & _flags))
+        if( _memEntry && (addressMap == kernel_map) && (kIOMemoryRequiresWire & _flags))
             addressMap = IOPageableMapForAddress( logical );
 
         err = vm_deallocate( addressMap, logical, length );
@@ -2003,11 +1860,9 @@ void _IOMemoryMap::taskDied( void )
 // of a memory descriptors _mappings set.  This means that we
 // always have 2 references on a mapping.  When either of these mappings
 // are released we need to free ourselves.
-void _IOMemoryMap::taggedRelease(const void *tag) const
+void _IOMemoryMap::taggedRelease(const void *tag = 0) const
 {
-    LOCK;
     super::taggedRelease(tag, 2);
-    UNLOCK;
 }
 
 void _IOMemoryMap::free()
@@ -2136,7 +1991,7 @@ void IOMemoryDescriptor::free( void )
 IOMemoryMap * IOMemoryDescriptor::setMapping(
        task_t                  intoTask,
        IOVirtualAddress        mapAddress,
-       IOOptionBits            options )
+       IOOptionBits            options = 0 )
 {
     _IOMemoryMap *             map;
 
@@ -2159,7 +2014,7 @@ IOMemoryMap * IOMemoryDescriptor::setMapping(
 }
 
 IOMemoryMap * IOMemoryDescriptor::map( 
-       IOOptionBits            options )
+       IOOptionBits            options = 0 )
 {
 
     return( makeMapping( this, kernel_task, 0,
@@ -2171,8 +2026,8 @@ IOMemoryMap * IOMemoryDescriptor::map(
        task_t                  intoTask,
        IOVirtualAddress        toAddress,
        IOOptionBits            options,
-       IOByteCount             offset,
-       IOByteCount             length )
+       IOByteCount             offset = 0,
+       IOByteCount             length = 0 )
 {
     if( 0 == length)
        length = getLength();
@@ -2265,38 +2120,22 @@ OSDefineMetaClassAndStructors(IOSubMemoryDescriptor, IOMemoryDescriptor)
 
 bool IOSubMemoryDescriptor::initSubRange( IOMemoryDescriptor * parent,
                                        IOByteCount offset, IOByteCount length,
-                                       IODirection direction )
+                                       IODirection withDirection )
 {
+    if( !super::init())
+       return( false );
+
     if( !parent)
        return( false);
 
     if( (offset + length) > parent->getLength())
        return( false);
 
-    /*
-     * We can check the _parent instance variable before having ever set it
-     * to an initial value because I/O Kit guarantees that all our instance
-     * variables are zeroed on an object's allocation.
-     */
-
-    if( !_parent) {
-       if( !super::init())
-           return( false );
-    } else {
-       /*
-        * An existing memory descriptor is being retargeted to
-        * point to somewhere else.  Clean up our present state.
-        */
-
-       _parent->release();
-       _parent = 0;
-    }
-
     parent->retain();
     _parent    = parent;
     _start     = offset;
     _length    = length;
-    _direction  = direction;
+    _direction  = withDirection;
     _tag       = parent->getTag();
 
     return( true );
@@ -2362,7 +2201,7 @@ void * IOSubMemoryDescriptor::getVirtualSegment(IOByteCount offset,
 }
 
 IOByteCount IOSubMemoryDescriptor::readBytes(IOByteCount offset,
-                                       void * bytes, IOByteCount length)
+                                       void * bytes, IOByteCount withLength)
 {
     IOByteCount        byteCount;
 
@@ -2373,14 +2212,14 @@ IOByteCount IOSubMemoryDescriptor::readBytes(IOByteCount offset,
 
     LOCK;
     byteCount = _parent->readBytes( _start + offset, bytes,
-                               min(length, _length - offset) );
+                               min(withLength, _length - offset) );
     UNLOCK;
 
     return( byteCount );
 }
 
 IOByteCount IOSubMemoryDescriptor::writeBytes(IOByteCount offset,
-                               const void* bytes, IOByteCount length)
+                               const void* bytes, IOByteCount withLength)
 {
     IOByteCount        byteCount;
 
@@ -2391,14 +2230,14 @@ IOByteCount IOSubMemoryDescriptor::writeBytes(IOByteCount offset,
 
     LOCK;
     byteCount = _parent->writeBytes( _start + offset, bytes,
-                               min(length, _length - offset) );
+                               min(withLength, _length - offset) );
     UNLOCK;
 
     return( byteCount );
 }
 
 IOReturn IOSubMemoryDescriptor::prepare(
-               IODirection forDirection)
+               IODirection forDirection = kIODirectionNone)
 {
     IOReturn   err;
 
@@ -2410,7 +2249,7 @@ IOReturn IOSubMemoryDescriptor::prepare(
 }
 
 IOReturn IOSubMemoryDescriptor::complete(
-               IODirection forDirection)
+               IODirection forDirection = kIODirectionNone)
 {
     IOReturn   err;
 
@@ -2454,17 +2293,17 @@ IOMemoryMap * IOSubMemoryDescriptor::makeMapping(
 
 bool
 IOSubMemoryDescriptor::initWithAddress(void *      address,
-                                    IOByteCount   length,
-                                    IODirection direction)
+                                    IOByteCount   withLength,
+                                    IODirection withDirection)
 {
     return( false );
 }
 
 bool
 IOSubMemoryDescriptor::initWithAddress(vm_address_t address,
-                                    IOByteCount    length,
-                                    IODirection  direction,
-                                    task_t       task)
+                                    IOByteCount    withLength,
+                                    IODirection  withDirection,
+                                    task_t       withTask)
 {
     return( false );
 }
@@ -2472,8 +2311,8 @@ IOSubMemoryDescriptor::initWithAddress(vm_address_t address,
 bool
 IOSubMemoryDescriptor::initWithPhysicalAddress(
                                 IOPhysicalAddress      address,
-                                IOByteCount            length,
-                                IODirection            direction )
+                                IOByteCount            withLength,
+                                IODirection            withDirection )
 {
     return( false );
 }
@@ -2482,9 +2321,9 @@ bool
 IOSubMemoryDescriptor::initWithRanges(
                                        IOVirtualRange * ranges,
                                        UInt32           withCount,
-                                       IODirection      direction,
-                                       task_t           task,
-                                       bool             asReference)
+                                       IODirection      withDirection,
+                                       task_t           withTask,
+                                       bool             asReference = false)
 {
     return( false );
 }
@@ -2492,8 +2331,8 @@ IOSubMemoryDescriptor::initWithRanges(
 bool
 IOSubMemoryDescriptor::initWithPhysicalRanges( IOPhysicalRange * ranges,
                                                UInt32           withCount,
-                                               IODirection      direction,
-                                               bool             asReference)
+                                               IODirection      withDirection,
+                                               bool             asReference = false)
 {
     return( false );
 }
@@ -2504,6 +2343,7 @@ bool IOGeneralMemoryDescriptor::serialize(OSSerialize * s) const
 {
     OSSymbol const *keys[2];
     OSObject *values[2];
+    OSDictionary *dict;
     IOVirtualRange *vcopy;
     unsigned int index, nRanges;
     bool result;
@@ -2634,8 +2474,8 @@ bool IOSubMemoryDescriptor::serialize(OSSerialize * s) const
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 OSMetaClassDefineReservedUsed(IOMemoryDescriptor, 0);
-OSMetaClassDefineReservedUsed(IOMemoryDescriptor, 1);
-OSMetaClassDefineReservedUsed(IOMemoryDescriptor, 2);
+OSMetaClassDefineReservedUnused(IOMemoryDescriptor, 1);
+OSMetaClassDefineReservedUnused(IOMemoryDescriptor, 2);
 OSMetaClassDefineReservedUnused(IOMemoryDescriptor, 3);
 OSMetaClassDefineReservedUnused(IOMemoryDescriptor, 4);
 OSMetaClassDefineReservedUnused(IOMemoryDescriptor, 5);
@@ -2650,6 +2490,6 @@ OSMetaClassDefineReservedUnused(IOMemoryDescriptor, 13);
 OSMetaClassDefineReservedUnused(IOMemoryDescriptor, 14);
 OSMetaClassDefineReservedUnused(IOMemoryDescriptor, 15);
 
-/* ex-inline function implementation */
+/* inline function implementation */
 IOPhysicalAddress IOMemoryDescriptor::getPhysicalAddress()
         { return( getPhysicalSegment( 0, 0 )); }
index 3e31f16b8560d8d83cec5b7004d078a40dcede7d..98eb04d823836892e05aa97abe0cd712cd65abf3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index fb6ceb5cd5f4f40c101a1ccdd0858bdbd66fe2dc..738a03cfabd3c321a9a87bbad62e8bff3057a526 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -1424,23 +1421,18 @@ IOReturn IODTNVRAM::readNVRAMPropertyType1(IORegistryEntry *entry,
       nvPath = start;
     else if (nvName == 0)
       nvName = start;
-    else {
-      IORegistryEntry * compareEntry = IORegistryEntry::fromPath((const char *) nvPath, gIODTPlane);
-      if (entry == compareEntry) {
-        if (compareEntry)
-          compareEntry->release();
-       *name = OSSymbol::withCString((const char *) nvName);
-       *value = unescapeBytesToData(start, where - start - 1);
-       if ((*name != 0) && (*value != 0))
-         err = kIOReturnSuccess;
-       else
-         err = kIOReturnNoMemory;
-       break;
-      }
-      if (compareEntry)
-        compareEntry->release();
+    else if (entry ==
+            IORegistryEntry::fromPath((const char *) nvPath, gIODTPlane)) {
+      *name = OSSymbol::withCString((const char *) nvName);
+      *value = unescapeBytesToData(start, where - start - 1);
+      if ((*name != 0) && (*value != 0))
+        err = kIOReturnSuccess;
+      else
+        err = kIOReturnNoMemory;
+      break;
+    } else
       nvPath = nvName = 0;
-    }
+    
     start = where;
   }
 
@@ -1483,21 +1475,15 @@ IOReturn IODTNVRAM::writeNVRAMPropertyType1(IORegistryEntry *entry,
         nvPath = start;
       else if (nvName == 0)
         nvName = start;
-      else {
-        IORegistryEntry * compareEntry = IORegistryEntry::fromPath((const char *) nvPath, gIODTPlane);
-        if (entry == compareEntry) {
-          if (compareEntry)
-             compareEntry->release();
-           // delete old property (nvPath -> where)
-           data = OSData::withBytes(propStart, nvPath - propStart);
-           if (data)
-             ok &= data->appendBytes(where, end - where);
-          break;
-        }
-        if (compareEntry)
-          compareEntry->release();
+      else if (entry ==
+                IORegistryEntry::fromPath((const char *) nvPath, gIODTPlane)) {
+        // delete old property (nvPath -> where)
+        data = OSData::withBytes(propStart, nvPath - propStart);
+        if (data)
+          ok &= data->appendBytes(where, end - where);
+        break;
+      } else
         nvPath = nvName = 0;
-      }
         
       start = where;
     }
index 88e197d9cc614cd4a20020dd0867d5781be3e700..187e0a1b711ba3142aae6578d11e161db0ae9c16 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b9db0f649e0830282f6978f8e9045c8e845495f9..c91b1ea3d46cd65f71b72937648cdd2ecb3f02d7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1a968d5888dfac3112bb159fbd9bb1e5e3b47e84..dc6c949fec1283f58698eba5c9065c1aa324a7e2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5d8d94c8bc20041cad01b4c75f07ff364364fee9..6c529ca80c2bc5e3eddc190c9d8e0d4edcd7aeb2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9f0bcc537e89d1d1d6bb3cdd9e33f87bd411bfe6..8f7452cf7c4c817e355b2dadae03084fe43d68e5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a9ea2fbcf60d036353cf6cc2325f0f8947fc093a..48a87045725f2fec232196f41543ad6f87abf7c4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 69bd66323127a3dccf1df8f072007badbf928aad..0b34a9e45032afe8eae21ea9c11ecf3501c7701b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index bc3c0e52734c411ccea76e4d2f553ce9c7dc5580..e41e3133bb029eb181e558f8aa63a88f44f298aa 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
  * HISTORY
  */
  
+#include <IOKit/system.h>
+#include <IOKit/IOPlatformExpert.h>
 #include <IOKit/IOCPU.h>
 #include <IOKit/IODeviceTreeSupport.h>
-#include <IOKit/IOKitDebug.h>
-#include <IOKit/IOMapper.h>
-#include <IOKit/IOMessage.h>
-#include <IOKit/IONVRAM.h>
-#include <IOKit/IOPlatformExpert.h>
 #include <IOKit/IORangeAllocator.h>
+#include <IOKit/IONVRAM.h>
+#include <IOKit/IOKitDebug.h>
 #include <IOKit/IOWorkLoop.h>
 #include <IOKit/pwr_mgt/RootDomain.h>
-
-#include <IOKit/system.h>
-
+#include <IOKit/IOMessage.h>
 #include <libkern/c++/OSContainers.h>
 
 
@@ -94,23 +88,6 @@ bool IOPlatformExpert::start( IOService * provider )
     
     if (!super::start(provider))
       return false;
-
-    // Register the presence or lack thereof a system 
-    // PCI address mapper with the IOMapper class
-
-#if 1
-    IORegistryEntry * regEntry = IORegistryEntry::fromPath("/u3/dart", gIODTPlane);
-    if (!regEntry)
-       regEntry = IORegistryEntry::fromPath("/dart", gIODTPlane);
-    if (regEntry) {
-       int debugFlags;
-       if (!PE_parse_boot_arg("dart", &debugFlags) || debugFlags)
-           setProperty(kIOPlatformMapperPresentKey, kOSBooleanTrue);
-       regEntry->release();
-    }
-#endif
-
-    IOMapper::setMapperRequired(0 != getProperty(kIOPlatformMapperPresentKey));
     
     gIOInterruptControllers = OSDictionary::withCapacity(1);
     gIOInterruptControllersLock = IOLockAlloc();
@@ -175,7 +152,7 @@ IOService * IOPlatformExpert::createNub( OSDictionary * from )
 }
 
 bool IOPlatformExpert::compareNubName( const IOService * nub,
-                               OSString * name, OSString ** matched) const
+                               OSString * name, OSString ** matched = 0 ) const
 {
     return( nub->IORegistryEntry::compareName( name, matched ));
 }
@@ -1084,7 +1061,7 @@ OSMetaClassDefineReservedUnused(IOPlatformExpertDevice,  3);
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 bool IOPlatformExpertDevice::compareName( OSString * name,
-                                        OSString ** matched) const
+                                        OSString ** matched = 0 ) const
 {
     return( IODTCompareNubName( this, name, matched ));
 }
@@ -1146,7 +1123,7 @@ OSMetaClassDefineReservedUnused(IOPlatformDevice,  3);
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 bool IOPlatformDevice::compareName( OSString * name,
-                                       OSString ** matched) const
+                                       OSString ** matched = 0 ) const
 {
     return( ((IOPlatformExpert *)getProvider())->
                compareNubName( this, name, matched ));
index 1f42854830f26bd958fcf148e9d228a1e67e6778..cc324276544ee0690de328bcd11ea4374aa44a5b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0dbea067dbe4904d66a40a30fc69e3e316360036..26f6161ac3cf8e5af240df2de67cecf4548b6b6d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f95427287f4fc64b97a6c8a6836ed21dd9600c7b..5d1e530f1a7cb99e607c3b16a44d1e1d7cfce74a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e2fdab2c28351d030ef3ef3a4062e06ffb69dc62..919ea16faee08e67391dd62956518c36355ab1c1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a8542bc7da8064ed0d5184329a69e1bb2daec62b..0f381dbfb81f34cc70029ded1b098ac0fc5bb55a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -636,7 +633,7 @@ IOReturn IOService::removePowerChild ( IOPowerConnection * theNub )
             }
         }
     }
-
+    
     theNub->release();
 
     if ( (pm_vars->theControllingDriver == NULL) ||    // if not fully initialized
@@ -645,10 +642,6 @@ IOReturn IOService::removePowerChild ( IOPowerConnection * theNub )
         return IOPMNoErr;                              // we can do no more
     }
 
-    // Perhaps the departing child was holding up idle or system sleep - we need to re-evaluate our
-    // childrens' requests. Clear and re-calculate our kIOPMChildClamp and kIOPMChildClamp2 bits.
-    rebuildChildClampBits();
-
     computeDesiredState();                             // this may be different now
     changeState();                                     // change state if we can now tolerate lower power
 
@@ -1089,54 +1082,6 @@ void IOService::setParentInfo ( IOPMPowerFlags newPowerStateFlags, IOPowerConnec
     IOLockUnlock(pm_vars->parentLock);
 }
 
-//*********************************************************************************
-// rebuildChildClampBits
-//
-// The ChildClamp bits (kIOPMChildClamp & kIOPMChildClamp2) in our capabilityFlags
-// indicate that one of our children (or grandchildren or great-grandchildren or ...)
-// doesn't support idle or system sleep in its current state. Since we don't track the
-// origin of each bit, every time any child changes state we have to clear these bits 
-// and rebuild them.
-//*********************************************************************************
-
-void IOService::rebuildChildClampBits(void)
-{
-    unsigned long      i;
-    OSIterator *       iter;
-    OSObject *         next;
-    IOPowerConnection *        connection;
-    
-    
-    // A child's desires has changed.  We need to rebuild the child-clamp bits in our
-    // power state array.  Start by clearing the bits in each power state.
-    
-    for ( i = 0; i < pm_vars->theNumberOfPowerStates; i++ ) {
-        pm_vars->thePowerStates[i].capabilityFlags &= ~(kIOPMChildClamp | kIOPMChildClamp2);
-    }
-
-    // Now loop through the children.  When we encounter the calling child, save
-    // the computed state as this child's desire.  And while we're at it, set the ChildClamp bits
-    // in any of our states that some child has requested with clamp on.
-
-    iter = getChildIterator(gIOPowerPlane);
-
-    if ( iter ) 
-    {
-        while ( (next = iter->getNextObject()) ) 
-        {
-            if ( (connection = OSDynamicCast(IOPowerConnection,next)) ) 
-            {
-                if ( connection->getPreventIdleSleepFlag() )
-                    pm_vars->thePowerStates[connection->getDesiredDomainState()].capabilityFlags |= kIOPMChildClamp;
-                if ( connection->getPreventSystemSleepFlag() )
-                    pm_vars->thePowerStates[connection->getDesiredDomainState()].capabilityFlags |= kIOPMChildClamp2;
-            }
-        }
-        iter->release();
-    }
-
-}
-
 
 //*********************************************************************************
 // requestPowerDomainState
@@ -1221,8 +1166,17 @@ IOReturn IOService::requestPowerDomainState ( IOPMPowerFlags desiredState, IOPow
     
     IOLockLock(pm_vars->childLock);
 
-    // Now loop through the children.  When we encounter the calling child, save
-    // the computed state as this child's desire.
+// A child's desires has changed.  We need to rebuild the child-clamp bits in our
+// power state array.  Start by clearing the bits in each power state.
+    
+    for ( i = 0; i < pm_vars->theNumberOfPowerStates; i++ ) {
+        pm_vars->thePowerStates[i].capabilityFlags &= ~(kIOPMChildClamp | kIOPMChildClamp2);
+    }
+
+// Now loop through the children.  When we encounter the calling child, save
+// the computed state as this child's desire.  And while we're at it, set the ChildClamp bits
+// in any of our states that some child has requested with clamp on.
+
     iter = getChildIterator(gIOPowerPlane);
 
     if ( iter ) {
@@ -1234,14 +1188,16 @@ IOReturn IOService::requestPowerDomainState ( IOPMPowerFlags desiredState, IOPow
                     connection->setPreventSystemSleepFlag(desiredState & kIOPMPreventSystemSleep);
                     connection->setChildHasRequestedPower();
                 }
+                if ( connection->getPreventIdleSleepFlag() ) {
+                    pm_vars->thePowerStates[connection->getDesiredDomainState()].capabilityFlags |= kIOPMChildClamp;
+                }
+                if ( connection->getPreventSystemSleepFlag() ) {
+                    pm_vars->thePowerStates[connection->getDesiredDomainState()].capabilityFlags |= kIOPMChildClamp2;
+                }
             }
         }
         iter->release();
     }
-
-    // Since a child's power requirements may have changed, clear and rebuild 
-    // kIOPMChildClamp and kIOPMChildClamp2 (idle and system sleep clamps)
-    rebuildChildClampBits();
         
     IOLockUnlock(pm_vars->childLock);
     
@@ -3268,11 +3224,8 @@ IOReturn IOService::ask_parent ( unsigned long requestedState )
         ourRequest |= kIOPMPreventSystemSleep;
     }
     
-    // is this a new desire?
-    if ( priv->previousRequest == ourRequest )
-    {  
-        // no, the parent knows already, just return
-        return IOPMNoErr;                              
+    if ( priv->previousRequest == ourRequest ) {       // is this a new desire?
+        return IOPMNoErr;                              // no, the parent knows already, just return
     }
 
     if (  priv->we_are_root ) {
index d9a341f470ffe9d60217e0f20cb602bdeec609b1..c74307f6b491a0ceab54b6d3a3f9ac70a8273c8e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a5ce3807961f502cfc0240395814a6f3acb918f5..1121d5ef3da31e95791ce62078a687df3aeffb03 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -112,8 +109,6 @@ void IOKitResetTime( void )
     clock_initialize_calendar();
 }
 
-// From <osfmk/kern/debug.c>
-extern int debug_mode;
 
 void StartIOKit( void * p1, void * p2, void * p3, void * p4 )
 {
@@ -131,11 +126,6 @@ void StartIOKit( void * p1, void * p2, void * p3, void * p4 )
 
     if( PE_parse_boot_arg( "io", &debugFlags ))
        gIOKitDebug = debugFlags;
-
-    // Check for the log synchronous bit set in io
-    if (gIOKitDebug & kIOLogSynchronous)
-        debug_mode = true;
-
     //
     // Have to start IOKit environment before we attempt to start
     // the C++ runtime environment.  At some stage we have to clean up
@@ -148,6 +138,7 @@ void StartIOKit( void * p1, void * p2, void * p3, void * p4 )
 
     IOLog("_cppInit done\n");
 
+
    /*****
     * Declare the fake kmod_info structs for built-in components
     * that must be tracked as independent units for dependencies.
index 1009231d9eed5e1d2ec6d21ce08435285ae3b5fd..46e7a246e0eab02a173c5012447c83eb878e1f4e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2a9cf5465c6780d569915dffe4456db76e91eb10..92e1d07412dbaa25bc11daf98d63049d54ca1f1a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3c86e67090c91405814dfb5e706466d57ede6579..7f42f247113dd7d722995c850ffbc3332817dc9a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 446932b6ae5ee761a9fcd39a02ce616f03286a16..06f700f5bb162d10f5e2f80cbdf9654f0b8e480f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -71,8 +68,6 @@ extern ipc_port_t master_device_port;
 extern void iokit_retain_port( ipc_port_t port );
 extern void iokit_release_port( ipc_port_t port );
 
-extern kern_return_t iokit_switch_object_port( ipc_port_t port, io_object_t obj, ipc_kobject_type_t type );
-
 #include <vm/vm_map.h>
 
 } /* extern "C" */
@@ -224,36 +219,7 @@ void IOMachPort::releasePortForObject( OSObject * obj,
 void IOUserClient::destroyUserReferences( OSObject * obj )
 {
     IOMachPort::releasePortForObject( obj, IKOT_IOKIT_OBJECT );
-
-    // panther, 3160200
-    // IOMachPort::releasePortForObject( obj, IKOT_IOKIT_CONNECT );
-
-    OSDictionary * dict;
-
-    IOTakeLock( gIOObjectPortLock);
-    obj->retain();
-
-    if( (dict = IOMachPort::dictForType( IKOT_IOKIT_CONNECT )))
-    {
-       IOMachPort * port;
-       port = (IOMachPort *) dict->getObject( (const OSSymbol *) obj );
-       if (port)
-       {
-           IOUserClient * uc;
-           if ((uc = OSDynamicCast(IOUserClient, obj)) && uc->mappings)
-           {
-               dict->setObject((const OSSymbol *) uc->mappings, port);
-               iokit_switch_object_port(port->port, uc->mappings, IKOT_IOKIT_CONNECT);
-
-               uc->mappings->release();
-               uc->mappings = 0;
-           }
-           dict->removeObject( (const OSSymbol *) obj );
-       }
-    }
-    obj->release();
-    IOUnlock( gIOObjectPortLock);
-
+    IOMachPort::releasePortForObject( obj, IKOT_IOKIT_CONNECT );
 }
 
 mach_port_name_t IOMachPort::makeSendRightForTask( task_t task,
@@ -322,7 +288,8 @@ iokit_client_died( io_object_t obj, ipc_port_t /* port */,
     if( (IKOT_IOKIT_CONNECT == type)
      && (client = OSDynamicCast( IOUserClient, obj )))
        client->clientDied();
-    if( (map = OSDynamicCast( IOMemoryMap, obj )))
+    else if( (IKOT_IOKIT_OBJECT == type)
+     && (map = OSDynamicCast( IOMemoryMap, obj )))
        map->taskDied();
 
     return( kIOReturnSuccess );
@@ -1675,10 +1642,6 @@ kern_return_t is_io_service_open(
 kern_return_t is_io_service_close(
        io_object_t connection )
 {
-    OSSet * mappings;
-    if ((mappings = OSDynamicCast(OSSet, connection)))
-       return( kIOReturnSuccess );
-
     CHECK( IOUserClient, connection, client );
 
     client->clientClose();
index a6bfd4673a6bb9f9ee44f05c0a367f1dbc78b450..197a095126cc47ca6e8bec16d2f6ab3ec5c29bb5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index aa332a73bdca8647affe8159e695dfb536bb4fa0..0ab16cfbefd6f64fb2b9c0ef97d924862ec4431f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e74e9856c8ccda60a414648099294f00f2d10e57..4483a5d1f92b5e928e14bcbf58b1cb185950fa7c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 58b50f4def1b26fbdad24e2478a89559960a2397..de84a9173c7b6caf947c0f1e30f8ecdbacade6fc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4d922040ce1f8effbc6a5cad2b32e8ddafa11c0a..603f7fd73e2b50760be476885aeeed0c738d0b14 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6e09b2fdd641e345109d4bf21654cef81222060f..5a3d9d38e38e2fd386d8c9a87e9c8ecaa18d94ac 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 58b50f4def1b26fbdad24e2478a89559960a2397..de84a9173c7b6caf947c0f1e30f8ecdbacade6fc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index daf20ac17571bae096c74ff3b191beea18fec050..ce09432b77074d0d4299c142619446f969351ba9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
  */
 const char * gIOKernelKmods =
 "{
-    'com.apple.kernel'                         = '6.8.5';
-    'com.apple.kernel.bsd'                     = '6.8.5';
-    'com.apple.kernel.iokit'                   = '6.8.5';
-    'com.apple.kernel.libkern'                 = '6.8.5';
-    'com.apple.kernel.mach'                    = '6.8.5';
-    'com.apple.iokit.IOADBFamily'              = '6.8.5';
-    'com.apple.iokit.IONVRAMFamily'            = '6.8.5';
-    'com.apple.iokit.IOSystemManagementFamily' = '6.8.5';
-    'com.apple.iokit.ApplePlatformFamily'      = '6.8.5';
-    'com.apple.driver.AppleNMI'                = '6.8.5';
+    'com.apple.kernel'                         = '6.3';
+    'com.apple.kernel.bsd'                     = '6.3';
+    'com.apple.kernel.iokit'                   = '6.3';
+    'com.apple.kernel.libkern'                 = '6.3';
+    'com.apple.kernel.mach'                    = '6.3';
+    'com.apple.iokit.IOADBFamily'              = '6.3';
+    'com.apple.iokit.IONVRAMFamily'            = '6.3';
+    'com.apple.iokit.IOSystemManagementFamily' = '6.3';
+    'com.apple.iokit.ApplePlatformFamily'      = '6.3';
+    'com.apple.driver.AppleNMI'                = '6.3';
 }";
 
 
index 2a6d22ec08f1ed4132498400b9f753ac13f0f8c7..ea7f556f006f83a29fa3e784fbb2b4d29f2fe9da 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6cec00c35f90f85410ddd8b8677c3481f7e9fd39..6641fc6a73c6e9ea51fd3b0ae9f37125ae742070 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8ae6068b4e037ec61eeb4474f35277fdb7f381e7..effbab484b7bb1bbd7e66a3f4678b2bab3dc2d3d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b136e05eff2d5828a87cd09b8841ab821f4c1de5..5e570cc273a9ea14822964a971cd8966cc8a7c04 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1846f47dac66bff3b2ac2611ee6f2128b09bc0ee..99c6033fe525cf065921d0faa65e8ea301a515b8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0900a09855b7aaded06b573c8e3b574d6442c6d0..c125eaeae7a15101a05586044531bb2f78dc523a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -39,8 +36,6 @@ extern "C" {
 // how long to wait for matching root device, secs
 #define ROOTDEVICETIMEOUT      60
 
-extern dev_t mdevadd(int devid, ppnum_t base, unsigned int size, int phys);
-extern dev_t mdevlookup(int devid);
 
 kern_return_t
 IOKitBSDInit( void )
@@ -329,8 +324,6 @@ OSDictionary * IOOFPathMatching( const char * path, char * buf, int maxLen )
 
 }
 
-static int didRam = 0;
-
 kern_return_t IOFindBSDRoot( char * rootName,
                                dev_t * root, u_int32_t * oflags )
 {
@@ -341,7 +334,6 @@ kern_return_t IOFindBSDRoot( char * rootName,
     OSString *         iostr;
     OSNumber *         off;
     OSData *           data = 0;
-    UInt32             *ramdParms = 0;
 
     UInt32             flags = 0;
     int                        minor, major;
@@ -354,9 +346,6 @@ kern_return_t IOFindBSDRoot( char * rootName,
     bool               debugInfoPrintedOnce = false;
 
     static int         mountAttempts = 0;
-                               
-       int xchar, dchar;
-                               
 
     if( mountAttempts++)
        IOSleep( 5 * 1000 );
@@ -372,15 +361,17 @@ kern_return_t IOFindBSDRoot( char * rootName,
 
     do {
         if( (regEntry = IORegistryEntry::fromPath( "/chosen", gIODTPlane ))) {
-                       data = (OSData *) regEntry->getProperty( "rootpath" );
-                       regEntry->release();
-                       if( data) continue;
-               }
+           data = (OSData *) regEntry->getProperty( "rootpath" );
+           regEntry->release();
+           if( data)
+           continue;
+       }
         if( (regEntry = IORegistryEntry::fromPath( "/options", gIODTPlane ))) {
-                       data = (OSData *) regEntry->getProperty( "boot-file" );
-                       regEntry->release();
-                       if( data) continue;
-               }
+           data = (OSData *) regEntry->getProperty( "boot-file" );
+           regEntry->release();
+           if( data)
+           continue;
+       }
     } while( false );
 
     if( data)
@@ -388,64 +379,13 @@ kern_return_t IOFindBSDRoot( char * rootName,
 
     if( rdBootVar[0] == '*') {
         look = rdBootVar + 1;
-               forceNet = false;
+       forceNet = false;
     } else {
         if( (regEntry = IORegistryEntry::fromPath( "/", gIODTPlane ))) {
             forceNet = (0 != regEntry->getProperty( "net-boot" ));
-               regEntry->release();
-               }
-    }
-
-
-
-//
-//     See if we have a RAMDisk property in /chosen/memory-map.  If so, make it into a device.
-//     It will become /dev/mdx, where x is 0-f. 
-//
-
-       if(!didRam) {                                                                                           /* Have we already build this ram disk? */
-               didRam = 1;                                                                                             /* Remember we did this */
-               if((regEntry = IORegistryEntry::fromPath( "/chosen/memory-map", gIODTPlane ))) {        /* Find the map node */
-                       data = (OSData *)regEntry->getProperty("RAMDisk");      /* Find the ram disk, if there */
-                       if(data) {                                                                                      /* We found one */
-
-                               ramdParms = (UInt32 *)data->getBytesNoCopy();   /* Point to the ram disk base and size */
-                               (void)mdevadd(-1, ramdParms[0] >> 12, ramdParms[1] >> 12, 0);   /* Initialize it and pass back the device number */
-                       }
-                       regEntry->release();                                                            /* Toss the entry */
-               }
-       }
-       
-//
-//     Now check if we are trying to root on a memory device
-//
-
-       if((rdBootVar[0] == 'm') && (rdBootVar[1] == 'd') && (rdBootVar[3] == 0)) {
-               dchar = xchar = rdBootVar[2];                                                   /* Get the actual device */
-               if((xchar >= '0') && (xchar <= '9')) xchar = xchar - '0';       /* If digit, convert */
-               else {
-                       xchar = xchar & ~' ';                                                           /* Fold to upper case */
-                       if((xchar >= 'A') && (xchar <= 'F')) {                          /* Is this a valid digit? */
-                               xchar = (xchar & 0xF) + 9;                                              /* Convert the hex digit */
-                               dchar = dchar | ' ';                                                    /* Fold to lower case */
-                       }
-                       else xchar = -1;                                                                        /* Show bogus */
-               }
-               if(xchar >= 0) {                                                                                /* Do we have a valid memory device name? */
-                       *root = mdevlookup(xchar);                                                      /* Find the device number */
-                       if(*root >= 0) {                                                                        /* Did we find one? */
-
-                               rootName[0] = 'm';                                                              /* Build root name */
-                               rootName[1] = 'd';                                                              /* Build root name */
-                               rootName[2] = dchar;                                                    /* Build root name */
-                               rootName[3] = 0;                                                                /* Build root name */
-                               IOLog("BSD root: %s, major %d, minor %d\n", rootName, major(*root), minor(*root));
-                               *oflags = 0;                                                                    /* Show that this is not network */
-                               goto iofrootx;                                                                  /* Join common exit... */
-                       }
-                       panic("IOFindBSDRoot: specified root memory device, %s, has not been configured\n", rdBootVar); /* Not there */
-               }
+           regEntry->release();
        }
+    }
 
     if( look) {
        // from OpenFirmware path
@@ -457,8 +397,8 @@ kern_return_t IOFindBSDRoot( char * rootName,
             matching = IODiskMatching( look, str, kMaxPathBuf );
         }
     }
-    
-      if( (!matching) && rdBootVar[0] ) {
+
+    if( (!matching) && rdBootVar[0] ) {
        // by BSD name
        look = rdBootVar;
        if( look[0] == '*')
@@ -570,7 +510,6 @@ kern_return_t IOFindBSDRoot( char * rootName,
 
     IOFree( str,  kMaxPathBuf + kMaxBootVar );
 
-iofrootx:
     if( (gIOKitDebug & (kIOLogDTree | kIOLogServiceTree | kIOLogMemory)) && !debugInfoPrintedOnce) {
 
        IOService::getPlatform()->waitQuiet();
index 89b79b5cca211e43ac829321fea8335d61866f78..98606f65086897f5f7edec16d98ade0498907064 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 28c5758c4c80e8cfbda39261920b7c31119dc33b..35daa9e5a8d8d2a9179cca809755a91275d00662 100644 (file)
@@ -28,12 +28,9 @@ include $(MakeInc_def)
 #
 CFLAGS+= -DKERNEL -DDRIVER_PRIVATE                             \
        -Wall -Wno-four-char-constants -fno-common              \
-       -DIOMATCHDEBUG=1 -DIOALLOCDEBUG=1                       \
+       -DIOMATCHDEBUG=1 -DIOALLOCDEBUG=1 -DIOASSERT=0          \
 #-DIOKITDEBUG=-1
 
-CFLAGS_RELEASE += -DIOASSERT=0
-CFLAGS_DEBUG += -DIOASSERT=1
-
 SFLAGS+= -DKERNEL
 
 #
index 6c0cf0aed4985edfee422d97cf512b8fc6e572ce..bdaf03c11b80bd9e988a2f7d8fc19335f8c63f7c 100644 (file)
@@ -37,7 +37,6 @@ iokit/Kernel/IOFilterInterruptEventSource.cpp         optional iokitcpp
 iokit/Kernel/IOTimerEventSource.cpp                    optional iokitcpp
 
 iokit/Kernel/IODeviceMemory.cpp                                optional iokitcpp
-iokit/Kernel/IOMapper.cpp                              optional iokitcpp
 iokit/Kernel/IOMemoryDescriptor.cpp                    optional iokitcpp
 iokit/Kernel/IOMemoryCursor.cpp                                optional iokitcpp
 iokit/Kernel/IOBufferMemoryDescriptor.cpp              optional iokitcpp
index 45a4fb75db864000d01701c0f7a51864bd4daabf..00750edc07d6415dcc07ae0351e9397b0222b7ba 100644 (file)
@@ -1 +1 @@
-8
+3
index 7ed6ff82de6bcc2a78243fc9c54d3ef5ac14da69..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1 +0,0 @@
-5
index 46700f5818865766e9a5c5ee744cbf2e3ce42355..ef2a616b8635485eb117e963f706d10bac9a19cd 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 21940a996578f72fbb4086f3ceef39167210ccff..5afc85d65b21d6199b0a35be8c3a642fb326b7d6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3897a792a462736a21196651860b38e4e02b0cbc..408aac2bc0195754fc1b557962c164ed52cf826c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3ed9f2721f12a86b40ba3566e79f67dddd28154a..141036a7736b2453e9988b48e93f4a0f8f64cbd6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 302b178e35a4c74556319bbbedbd32c3763f083d..4ab305b6ca348506128d745f5bf3b4106e89a4e9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 12451f34c4023b00cf2d1f44143ec043ec8458f7..a6f9002a8e0aa5e279357605b17636e0373af5c9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 76ca62d59352a025d7861f700a94796f5bc37ebb..91ffc7f018ef3071e3f220a8c946679bea2e9755 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a94541b1e5c6e95c7df253d37525665759778824..47520fab59f0a3033d48b5090a0bdf61b249e5c3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 22e3fa11ee7e0b95b6d9b34b2ca7daffe36b1e72..e797c040d70e73e391f5e3424342ab8dfd38ed51 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4165734a902894fdc8d47c0d9052f084e24bfc9d..e3b7991536b3ea51c1574eac3a0318222381ac48 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e3982cd83bd8e311edd27af05b4eb38983606c8a..f8d4c1074633adb62ad69649b3e121787913334b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3c6b8febda9950455d3dd25b64c6ec1955b48bc5..588b60c12962b5e2bfb990a5cb39c41bd49d407b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a50e0071874a58ad8a4e629e9e0e1c018bb0494e..d577d8a9f0033c288928570ce86c96f9585d88d9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 993c89ed9f0460e028909067e197b5ca60d69796..e70408425df24927e97414e9f6855563d9f762df 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e0626692a72517cf5ec5e3683e6f97c0a2853b03..3d14ddf25a56ca752bb90003cfcb760124ddaccd 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6b366d70c57c137982c302e30266cf8b9feac3f3..622867427c913508a5f5844d33fcb37214393bab 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index fa8e8357f4e20906412291130672868ae8a900c8..447de68934941d9f1ccf029d46fff120560c996a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6baf3776f9a4475e09641b7ca965496f9f940ec4..2dfcc948cd436e5fec1dd29ca2e813980eec21e3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 45d004b8d1290cbdde0d2dc15eb362d79931780e..71d5658d3188baa5204b0bdfe5f78760c49d4761 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7e2748bf1048e95762fac4a559e4ce0bc41185ba..0abba8c7ec1a7be302c5617a2a8603c5f30b0b91 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a50e0071874a58ad8a4e629e9e0e1c018bb0494e..d577d8a9f0033c288928570ce86c96f9585d88d9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 993c89ed9f0460e028909067e197b5ca60d69796..e70408425df24927e97414e9f6855563d9f762df 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index bfaa8dffbdc0aa5308faec08bf50d4803685cfe5..1a939be0251bdfe1add61c8d51db8e5295725075 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8cab872d68323d4563b83e7948d82553321acf0e..21fc91eb4038e08088d4253013be8565bf8698e0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d8f3ec944992e95a9749899a97213b8defad856a..4d14d138058cb0631d4f7a9c1faf51576472e647 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d76963047b0fe60da15b0d9071d1389dc2d77402..fdc847f10e83895e601685bb0a1821d4392cc807 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -75,7 +72,7 @@ bool OSArray::initWithCapacity(unsigned int inCapacity)
 
 bool OSArray::initWithObjects(const OSObject *objects[],
                               unsigned int theCount,
-                              unsigned int theCapacity)
+                              unsigned int theCapacity = 0)
 {
     unsigned int capacity;
 
@@ -103,7 +100,7 @@ bool OSArray::initWithObjects(const OSObject *objects[],
 }
 
 bool OSArray::initWithArray(const OSArray *anArray,
-                            unsigned int theCapacity)
+                            unsigned int theCapacity = 0)
 {
     if ( !anArray )
         return false;
@@ -117,7 +114,7 @@ OSArray *OSArray::withCapacity(unsigned int capacity)
     OSArray *me = new OSArray;
 
     if (me && !me->initWithCapacity(capacity)) {
-        me->release();
+        me->free();
         return 0;
     }
 
@@ -126,12 +123,12 @@ OSArray *OSArray::withCapacity(unsigned int capacity)
 
 OSArray *OSArray::withObjects(const OSObject *objects[],
                               unsigned int count,
-                              unsigned int capacity)
+                              unsigned int capacity = 0)
 {
     OSArray *me = new OSArray;
 
     if (me && !me->initWithObjects(objects, count, capacity)) {
-        me->release();
+        me->free();
         return 0;
     }
 
@@ -139,12 +136,12 @@ OSArray *OSArray::withObjects(const OSObject *objects[],
 }
 
 OSArray *OSArray::withArray(const OSArray *array,
-                            unsigned int capacity)
+                            unsigned int capacity = 0)
 {
     OSArray *me = new OSArray;
 
     if (me && !me->initWithArray(array, capacity)) {
-        me->release();
+        me->free();
         return 0;
     }
 
index 19c5dd89f658d7f283069b9de37fdcf3b40e513b..42ddc73d2dcec6a14ff530b2caa0628dcf7c36e2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2c39be04e78987bafb52d8c68f9e0809abd253f1..5cf9649d87805e8f88cea716f119160987d010d6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2fe0024b9cc8623678796a90b421b1567ec91db5..6a958424a9a77436e3e32f693dfed3a80826c499 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ac9f6223b30e0e934e83bf5a8957b34193ded433..e9a77ccedaee069a000dc3915ed6888a658b91a7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -63,7 +60,7 @@ OSCollectionIterator::withCollection(const OSCollection *inColl)
     OSCollectionIterator *me = new OSCollectionIterator;
 
     if (me && !me->initWithCollection(inColl)) {
-        me->release();
+        me->free();
         return 0;
     }
 
index 6c5078a1dcf088dcc52c939f8114f75dd44b5c14..d4f12fea6c5c0b6625176a198b2d42a2f4ea2500 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -47,7 +44,9 @@ OSMetaClassDefineReservedUnused(OSData, 7);
 #define EXTERNAL ((unsigned int) -1)
 
 #if OSALLOCDEBUG
-extern int debug_container_malloc_size;
+extern "C" {
+    extern int debug_container_malloc_size;
+};
 #define ACCUMSIZE(s) do { debug_container_malloc_size += (s); } while(0)
 #else
 #define ACCUMSIZE(s)
@@ -58,26 +57,19 @@ bool OSData::initWithCapacity(unsigned int inCapacity)
     if (!super::init())
         return false;
 
-    if (data && (!inCapacity || capacity < inCapacity) ) {
-        // clean out old data's storage if it isn't big enough
-        kfree((vm_address_t) data, capacity);
-        data = 0;
-        ACCUMSIZE(-capacity);
-    }
-
-    if (inCapacity && !data) {
+    if(inCapacity) {
         data = (void *) kalloc(inCapacity);
         if (!data)
             return false;
-        capacity = inCapacity;
-        ACCUMSIZE(inCapacity);
     }
 
     length = 0;
-    if (inCapacity < 16)
+    capacity = inCapacity;
+    capacityIncrement = capacity;
+    if(!capacityIncrement)
         capacityIncrement = 16;
-    else
-        capacityIncrement = inCapacity;
+
+    ACCUMSIZE(capacity);
 
     return true;
 }
@@ -87,8 +79,7 @@ bool OSData::initWithBytes(const void *bytes, unsigned int inLength)
     if ((inLength && !bytes) || !initWithCapacity(inLength))
         return false;
 
-    if (bytes != data)
-       bcopy(bytes, data, inLength);
+    bcopy(bytes, data, inLength);
     length = inLength;
 
     return true;
@@ -127,7 +118,7 @@ OSData *OSData::withCapacity(unsigned int inCapacity)
     OSData *me = new OSData;
 
     if (me && !me->initWithCapacity(inCapacity)) {
-        me->release();
+        me->free();
         return 0;
     }
 
@@ -139,7 +130,7 @@ OSData *OSData::withBytes(const void *bytes, unsigned int inLength)
     OSData *me = new OSData;
 
     if (me && !me->initWithBytes(bytes, inLength)) {
-        me->release();
+        me->free();
         return 0;
     }
     return me;
@@ -150,7 +141,7 @@ OSData *OSData::withBytesNoCopy(void *bytes, unsigned int inLength)
     OSData *me = new OSData;
 
     if (me && !me->initWithBytesNoCopy(bytes, inLength)) {
-        me->release();
+        me->free();
         return 0;
     }
 
@@ -162,7 +153,7 @@ OSData *OSData::withData(const OSData *inData)
     OSData *me = new OSData;
 
     if (me && !me->initWithData(inData)) {
-        me->release();
+        me->free();
         return 0;
     }
 
@@ -175,7 +166,7 @@ OSData *OSData::withData(const OSData *inData,
     OSData *me = new OSData;
 
     if (me && !me->initWithData(inData, start, inLength)) {
-        me->release();
+        me->free();
         return 0;
     }
 
@@ -234,7 +225,7 @@ bool OSData::appendBytes(const void *bytes, unsigned int inLength)
 {
     unsigned int newSize;
 
-    if (!inLength)
+    if (inLength == 0)
         return true;
 
     if (capacity == EXTERNAL)
@@ -244,11 +235,7 @@ bool OSData::appendBytes(const void *bytes, unsigned int inLength)
     if ( (newSize > capacity) && newSize > ensureCapacity(newSize) )
         return false;
 
-    if (bytes)
-        bcopy(bytes, &((unsigned char *)data)[length], inLength);
-    else
-        bzero(&((unsigned char *)data)[length], inLength);
-
+    bcopy(bytes, &((unsigned char *)data)[length], inLength);
     length = newSize;
 
     return true;
@@ -258,7 +245,7 @@ bool OSData::appendByte(unsigned char byte, unsigned int inLength)
 {
     unsigned int newSize;
 
-    if (!inLength)
+    if (inLength == 0)
         return true;
 
     if (capacity == EXTERNAL)
@@ -281,7 +268,7 @@ bool OSData::appendBytes(const OSData *other)
 
 const void *OSData::getBytesNoCopy() const
 {
-    if (!length)
+    if (length == 0)
         return 0;
     else
         return data;
@@ -336,7 +323,7 @@ bool OSData::isEqualTo(const OSString *obj) const
     unsigned int checkLen = length;
     unsigned int stringLen;
 
-    if (!obj)
+    if (NULL == obj)
       return false;
 
     stringLen = obj->getLength ();
index 63ccca6dcf9f0531a70491d000ba75b9037608cd..b89306f94ba4c29ef393293b5dfd840ba123944c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -79,7 +76,7 @@ bool OSDictionary::initWithCapacity(unsigned int inCapacity)
 bool OSDictionary::initWithObjects(const OSObject *objects[],
                                    const OSSymbol *keys[],
                                    unsigned int theCount,
-                                   unsigned int theCapacity)
+                                   unsigned int theCapacity = 0)
 {
     unsigned int capacity = theCount;
 
@@ -109,7 +106,7 @@ bool OSDictionary::initWithObjects(const OSObject *objects[],
 bool OSDictionary::initWithObjects(const OSObject *objects[],
                                    const OSString *keys[],
                                    unsigned int theCount,
-                                   unsigned int theCapacity)
+                                   unsigned int theCapacity = 0)
 {
     unsigned int capacity = theCount;
 
@@ -145,7 +142,7 @@ bool OSDictionary::initWithObjects(const OSObject *objects[],
 }
 
 bool OSDictionary::initWithDictionary(const OSDictionary *dict,
-                                      unsigned int theCapacity)
+                                      unsigned int theCapacity = 0)
 {
     unsigned int capacity;
 
@@ -179,7 +176,7 @@ OSDictionary *OSDictionary::withCapacity(unsigned int capacity)
     OSDictionary *me = new OSDictionary;
 
     if (me && !me->initWithCapacity(capacity)) {
-        me->release();
+        me->free();
         return 0;
     }
 
@@ -189,12 +186,12 @@ OSDictionary *OSDictionary::withCapacity(unsigned int capacity)
 OSDictionary *OSDictionary::withObjects(const OSObject *objects[],
                                         const OSSymbol *keys[],
                                         unsigned int count,
-                                        unsigned int capacity)
+                                        unsigned int capacity = 0)
 {
     OSDictionary *me = new OSDictionary;
 
     if (me && !me->initWithObjects(objects, keys, count, capacity)) {
-        me->release();
+        me->free();
         return 0;
     }
 
@@ -204,12 +201,12 @@ OSDictionary *OSDictionary::withObjects(const OSObject *objects[],
 OSDictionary *OSDictionary::withObjects(const OSObject *objects[],
                                         const OSString *keys[],
                                         unsigned int count,
-                                        unsigned int capacity)
+                                        unsigned int capacity = 0)
 {
     OSDictionary *me = new OSDictionary;
 
     if (me && !me->initWithObjects(objects, keys, count, capacity)) {
-        me->release();
+        me->free();
         return 0;
     }
 
@@ -217,12 +214,12 @@ OSDictionary *OSDictionary::withObjects(const OSObject *objects[],
 }
 
 OSDictionary *OSDictionary::withDictionary(const OSDictionary *dict,
-                                           unsigned int capacity)
+                                           unsigned int capacity = 0)
 {
     OSDictionary *me = new OSDictionary;
 
     if (me && !me->initWithDictionary(dict, capacity)) {
-        me->release();
+        me->free();
         return 0;
     }
 
index 2f8a70cb16669d00d1be59a5ab57383d574fb0d2..b462c88c63ccbbb88908424bd408185f4555e2f1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c3019b599bc00a099ede5dc3d0b29daad2be085b..34b5a2d510abde13c2d7119649eb5434781528ee 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e327230f9a584d25432adf899a6b0c5a9e3fde5e..5607d1e7eaf1f717efb7e938667e299948a4df35 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -85,7 +82,7 @@ OSNumber *OSNumber::withNumber(unsigned long long value,
     OSNumber *me = new OSNumber;
 
     if (me && !me->init(value, numberOfBits)) {
-        me->release();
+        me->free();
         return 0;
     }
 
@@ -97,7 +94,7 @@ OSNumber *OSNumber::withNumber(const char *value, unsigned int numberOfBits)
     OSNumber *me = new OSNumber;
 
     if (me && !me->init(value, numberOfBits)) {
-        me->release();
+        me->free();
         return 0;
     }
 
index ab5873891ebafd2b2b2de496a87a896024255166..4d8122a35daeba7a8d98792d6f8c0b3c1dea7b98 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f90e68322b3123d926d45ff16f74728798b97a93..76e1460ebd2f2af89d5b9e58423e401ac53454e3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -86,7 +83,7 @@ withCapacity(unsigned int capacity,
     OSOrderedSet *me = new OSOrderedSet;
 
     if (me && !me->initWithCapacity(capacity, ordering, orderingRef)) {
-        me->release();
+        me->free();
        me = 0;
     }
 
index 0c50524c3a98cd1f19548c769d7f587fd07bb918..7cf2472a070b08768954175b5a2932f3313303e6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e3eb5e2e5c3f9b7e6d83152c41cfe13c62f83a1d..b84656c48e999728a88ae6ee0c13c5b85671f513 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -151,7 +148,7 @@ bool OSSerialize::initWithCapacity(unsigned int inCapacity)
 
     tag = 0;
     length = 1;
-    capacity = (inCapacity) ? round_page_32(inCapacity) : round_page_32(1);
+    capacity = (inCapacity) ? round_page(inCapacity) : round_page(1);
     capacityIncrement = capacity;
 
     // allocate from the kernel map so that we can safely map this data
@@ -176,7 +173,7 @@ OSSerialize *OSSerialize::withCapacity(unsigned int inCapacity)
        OSSerialize *me = new OSSerialize;
 
        if (me && !me->initWithCapacity(inCapacity)) {
-               me->release();
+               me->free();
                return 0;
        }
 
@@ -200,7 +197,7 @@ unsigned int OSSerialize::ensureCapacity(unsigned int newCapacity)
                return capacity;
 
        // round up
-       newCapacity = round_page_32(newCapacity);
+       newCapacity = round_page(newCapacity);
 
        kern_return_t rc = kmem_realloc(kernel_map,
                                        (vm_offset_t)data,
@@ -241,7 +238,7 @@ void OSSerialize::free()
 OSDefineMetaClassAndStructors(OSSerializer, OSObject)
 
 OSSerializer * OSSerializer::forTarget( void * target,
-                               OSSerializerCallback callback, void * ref )
+                               OSSerializerCallback callback, void * ref = 0 )
 {
     OSSerializer * thing;
 
index 96c67bccb4987359e999f55475a1a32e01058f00..0b86dd4c15c3c69dc9d26f93b07d04412c6e82ef 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -54,7 +51,7 @@ bool OSSet::initWithCapacity(unsigned int inCapacity)
 
 bool OSSet::initWithObjects(const OSObject *inObjects[],
                               unsigned int inCount,
-                              unsigned int inCapacity)
+                              unsigned int inCapacity = 0)
 {
     unsigned int capacity = inCount;
 
@@ -79,7 +76,7 @@ bool OSSet::initWithObjects(const OSObject *inObjects[],
 }
 
 bool OSSet::initWithArray(const OSArray *inArray,
-                          unsigned int inCapacity)
+                          unsigned int inCapacity = 0)
 {
     if ( !inArray )
         return false;
@@ -89,7 +86,7 @@ bool OSSet::initWithArray(const OSArray *inArray,
 }
 
 bool OSSet::initWithSet(const OSSet *inSet,
-                        unsigned int inCapacity)
+                        unsigned int inCapacity = 0)
 {
     return initWithArray(inSet->members, inCapacity);
 }
@@ -99,7 +96,7 @@ OSSet *OSSet::withCapacity(unsigned int capacity)
     OSSet *me = new OSSet;
 
     if (me && !me->initWithCapacity(capacity)) {
-        me->release();
+        me->free();
         return 0;
     }
 
@@ -108,12 +105,12 @@ OSSet *OSSet::withCapacity(unsigned int capacity)
 
 OSSet *OSSet::withObjects(const OSObject *objects[],
                           unsigned int count,
-                          unsigned int capacity)
+                          unsigned int capacity = 0)
 {
     OSSet *me = new OSSet;
 
     if (me && !me->initWithObjects(objects, count, capacity)) {
-        me->release();
+        me->free();
         return 0;
     }
 
@@ -121,12 +118,12 @@ OSSet *OSSet::withObjects(const OSObject *objects[],
 }
 
 OSSet *OSSet::withArray(const OSArray *array,
-                        unsigned int capacity)
+                        unsigned int capacity = 0)
 {
     OSSet *me = new OSSet;
 
     if (me && !me->initWithArray(array, capacity)) {
-        me->release();
+        me->free();
         return 0;
     }
 
@@ -134,12 +131,12 @@ OSSet *OSSet::withArray(const OSArray *array,
 }
 
 OSSet *OSSet::withSet(const OSSet *set,
-                      unsigned int capacity)
+                      unsigned int capacity = 0)
 {
     OSSet *me = new OSSet;
 
     if (me && !me->initWithSet(set, capacity)) {
-        me->release();
+        me->free();
         return 0;
     }
 
index fa02c340e6e5cb33f4702916fa9105d14f18c8a2..77d46d78cdca4181c81cb0f4c2b37120c7feb611 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -101,7 +98,7 @@ OSString *OSString::withString(const OSString *aString)
     OSString *me = new OSString;
 
     if (me && !me->initWithString(aString)) {
-        me->release();
+        me->free();
         return 0;
     }
 
@@ -113,7 +110,7 @@ OSString *OSString::withCString(const char *cString)
     OSString *me = new OSString;
 
     if (me && !me->initWithCString(cString)) {
-        me->release();
+        me->free();
         return 0;
     }
 
@@ -125,7 +122,7 @@ OSString *OSString::withCStringNoCopy(const char *cString)
     OSString *me = new OSString;
 
     if (me && !me->initWithCStringNoCopy(cString)) {
-        me->release();
+        me->free();
         return 0;
     }
 
index 10548e878cf294f30adfcdf03f4e2152521da14f..daff36bc8a6ea967f724f791d304348df684d504 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a82c4d3fa49e8221962f70baebdf54ce1b17ab52..bec93124687d3575318736b0e9ff191cc1160144 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d53cb8d28c46b911e62741e9c8ebefaac202ac11..3a5742ee1962317dcefd2440b5daeda659801bf7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 234fb2912b194e5e822bd5a42c820f0854ae574b..d9f86d6b2f8f28c6ab23f9982e1ce8c2be0decd0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ddc518f3d508c4f80a89b97eace61abff7445feb..5c8af20b3166e24be0be6e5c7a39d3a42f45e0ef 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 15c733c0bcf0e3ef163274a33f54c17e11648dba..c4c735719eb458bd4585397ac1570c0843fe3a99 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 45a4fb75db864000d01701c0f7a51864bd4daabf..00750edc07d6415dcc07ae0351e9397b0222b7ba 100644 (file)
@@ -1 +1 @@
-8
+3
index 7ed6ff82de6bcc2a78243fc9c54d3ef5ac14da69..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1 +0,0 @@
-5
index 222db2a333e870bb4a259b867978684131c7ace9..c6e86aacacdbdb50376dbc9518a4a69c4e1ce991 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a0af3a184a434a466418c35eb3b05d041e55f1fd..c5904c3ea7eb5fdd81e3e84dfc5f0eb4861ee3be 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 83ab5e3d0ed3cbc31fbfcb0c2519f28fa95eb29d..e7f13bf558a62f459cf1d6336d78b2d1277c4d1d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index efb4669eee8526ea2a02ab2802ef42d3977c430c..ad33f01f4137f791d8fee03ae427753e00d2ed4e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7dd1b787336d6e1617b6e6170f87018683be6c98..3de526ad501230e34bdad4f7da691d2132a489e7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 555bde420b91c451e46a20cd5937ff20bc4575df..81bc3adc0609700d8941c4b2ad725290ece302e8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 775a76d59cb52baa00463d0b4bf40cdd4d02e15d..8151fb43f0d4c7bafa7ed20aa4c4a74269289cfa 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 98b5388b412d844f7b1f18f52cfef404d195f230..300bac7df37bb88c5ba682c2a5778a47298af565 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b8134e09deaa35410bb7fdb7d1babf1885460464..0938bc7bc8fce8dbe9bd5f1c22db307662d61807 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b0fd3dabc52f37f91ffe4d3d66a2d00b3a19b8e8..7509cf04023e6dff02dc35cf36125d63eab812f7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e1b07fb2da756ca420166422cedf9768ecee16d6..5e925ac03ad775a7dc843bba3332a839ab944330 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6a24b78c5143a18f8323a8642f4a4b8f979f0577..3328250d0c28a5322a270035db43939c07212241 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9c29e2fe51344f10fddd5f1a855173ab5c912291..03630ed7a3bb24dccfa0678f386edb4b7efd80ea 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2116f1420cafe62a8d5b38512f7494442cb675e3..3934cfeae03c3dd3c2d345892f1ffa5a440c99d6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b04c5d538c3bc7f3866d0070aa56bf9fe0636e7e..8d2eeeb10d41921cf8e7927a01a66d97790f3835 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a76c9c6eb40b288f79d78f7c65b85137fc26600a..1b3a2260000f5e43e8321e7e6cd3783320758719 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d9e5b2727b2b2e3588a4faf607fd439fdb51f7dc..387b6355d37152ce0575bfe01dfa59e4d322d11f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c21557acdab6de71ce76f508df472adbe22e22c2..725a786fb768e4f08f40b5fa726111819e39ed24 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6f84b50edffe9fde55623bd1cd507fdb0fa0f891..2406be7c0d98656d0bb9e6820984f259f3295240 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -95,12 +92,13 @@ public:
                                 unsigned int start, unsigned int inLength);
 
     /*!
-        @function initWithCapacity
-        @abstract A member function to initialize an instance of OSData with a minimum capacity of at least the given size.  If this function is called an an object that has been previously used then the length is set down to 0 and a new block of data is allocated if necessary to ensure the given capacity.
-        @param capacity The length of the allocated block of data.
+        @function initWithBytes
+        @abstract A member function to initialize an instance of OSData with the provided data.
+        @param bytes A pointer to a block of data to be copied.
+        @param inLength The length of the block of data.
         @result Returns true if initialization was successful, false otherwise.
     */
-    virtual bool initWithCapacity(unsigned int capacity);
+    virtual bool initWithCapacity(unsigned int inCapacity);
     /*!
         @function initWithBytes
         @abstract A member function to initialize an instance of OSData which references a block of data.
@@ -175,7 +173,7 @@ public:
     /*!
         @function appendBytes
         @abstract A member function which appends a buffer of data onto the end of the object's internal data buffer.
-        @param bytes A pointer to the block of data.  If the value is 0 then append zero-ed memory to the data object.
+        @param bytes A pointer to the block of data.
         @param inLength The length of the data block.
         @result Returns true if the object was able to append the new data, false otherwise.
     */
@@ -251,8 +249,6 @@ public:
     virtual bool appendByte(unsigned char byte, unsigned int inCount);
 
 
-
-private:
     OSMetaClassDeclareReservedUnused(OSData, 0);
     OSMetaClassDeclareReservedUnused(OSData, 1);
     OSMetaClassDeclareReservedUnused(OSData, 2);
index 091be51a263edfc14967ef40c71fdfecb70140fe..f42c4b1d4e7295d6b335624d136b08bc3d70530a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f774ac32d77589311ca04cf6922b5f3fce2011b6..47fb892138adb8aea72b80e4927526927e46bbf8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2e1258633786a91f395a6d772d77d1429065efe4..d3b597dcac7c3d50d926bc4707c97c079304b69c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4225bc8a58fac5b46a0e40418e339c090078c0e1..a4ecef03668adb2612730eeac68bff7519a120f0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5eb6fa7ed554af25b239ef67cdb5d04ade02b127..aa32d0fcb76b25c3020f9594eab7170ebd6fbcb3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7f2e7a5db6defc90cc764bf9426a23e0d7963f3a..d7ed685bc41bec3d56b18cd5cb832faa97f9e95c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 87548ee9919ae875b72de1158596169b0256c2e0..4357aee374ec25ed2e951985497a21d78f1e1b4d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c57c2b08f1c8b23bc19f0e934f66868f33d12723..b27811dcebac149f7723b00a2ca12ee854e9a3bc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 15bbd47c5170bf71406c1df8bea7e00a6a9d68cd..ee2467122bc52308873bc1d50f1e17a30cf364f1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 49c41c269d8ef2a007558c655d73e6982cd6691a..577807a860e02dd2b0e1e47f33a5ff7468a060e0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d5db609a98109fc9c8c8f6a3e5f92c7e78915583..83143678d0b8ff148e2486377fee2f675d6b18a6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index aa5e7e495c12100c50f8db7d884dfb6fffb8f5ff..540cf91499ed9a10b4f71d536092cdb6803d7693 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0aa2270f16b6ea5f92219b932ac0f73327cdb93f..e650d5c1fb424df0b04c5556d957cac29abe878b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b85d69b9ac5abff5ba5fca2702158b68053bbd21..305f265cf3c1b103a55e35515b00cf97ffcef2b0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 28ff91dc21138b5b1ab74cb7c9203fd77eb16282..e1f90fb8eadcaa62a2a944992b843ee482e86612 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f83101ba32617ee3fd6a5ed7e665bc5a7633b9f0..277b2b1e211fc671e5d379268ee0c42309456b20 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d8f3ec944992e95a9749899a97213b8defad856a..4d14d138058cb0631d4f7a9c1faf51576472e647 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4dc31432d4fc15d92372a714f188deb8ff301ff2..a2aeb032d7c9803edf0b1090a3140e568dd668bd 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -59,27 +56,17 @@ int OSCompareAndSwap( UInt32 oldVal, UInt32 newVal, UInt32 * addr )
 
        ENTRY   _OSCompareAndSwap
 .L_CASretry:
-               lwz             r6,0(r5)                // Get the swap value
-               cmpw    r6,r3                   // Is is the same
-               bne--   .L_CASfail2             // No...
-               
-.L_CASretry2:
-               lwarx   r6,0,r5                 // Get it atomically now
-               cmpw    r6,r3                   // Same?
-               bne--   .L_CASfail              // Nope, go say so and toss reservations...
-               stwcx.  r4,0,r5                 // Stash the new value
-               bne--   .L_CASretry2    // Just got collision...
-               isync
-               li      r3,     1
-               blr
-
+       lwarx   r6,     0,r5
+       cmpw    r6,     r3
+       bne-    .L_CASfail
+       stwcx.  r4,     0,r5
+       bne-    .L_CASretry
+       isync
+       li      r3,     1
+       blr
 .L_CASfail:
-               li              a7,-4                   // Point to a spot in the red zone
-               stwcx.  a7,a7,r1                // Kill reservation
-               
-.L_CASfail2:   
-               li      r3,     0
-               blr
+       li      r3,     0
+       blr
 
 
 /*
index c76ad8c3af137accb7dad1edced8d7d3af89f251..934ec4dcdc51f2d0c9ce0e7f74384f91253462d0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c47f89a7c8365039ba4027c0598a6dd596718930..027af6baec8be650cb19fc3bec71047235992bec 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8f1ca72eb6df0f32325b514894a0cc7759405c86..def6639f38a8498b4c2b39737553bbbb527dae99 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8fd9469edb2757965a7f6a8482a58b0445dee874..3b046ab37f0653e64fa1a32f4053cd9323bd9336 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 
 #include <libsa/kmod.h>
 #include <libsa/catalogue.h>
+extern "C" {
 #include <libsa/malloc.h>
+};
 
 #include "kld_patch.h"
 
+extern "C" {
 /*****
  * This function is used by IOCatalogue to load a kernel
  * extension. libsa initially sets it to be a function
@@ -51,6 +51,7 @@ extern void (*remove_startup_extension_function)(const char * name);
  * about loading and matching drivers.
  */
 extern int kernelLinkerPresent;
+};
 
 
 class KLDBootstrap {
@@ -68,8 +69,6 @@ static KLDBootstrap bootstrap_obj;
  */
 KLDBootstrap::KLDBootstrap() {
 
-    malloc_init();
-
     kmod_load_function = &load_kernel_extension;
 
     record_startup_extensions_function = &recordStartupExtensions;
index e885184da881bddfa73ce05e5ab0b104c9c501e1..2a08324679f34761d93695a0f983c59791a751d7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ef582fef0222819c09e07e7d1cd22b2ff773afb0..9f37019d61c0c9566a929bc0128d0e37a382b488 100644 (file)
@@ -3,22 +3,21 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
+ * "Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
+ * Reserved.  This file contains Original Code and/or Modifications of
+ * Original Code as defined in and that are subject to the Apple Public
+ * Source License Version 1.0 (the 'License').  You may not use this file
+ * except in compliance with the License.  Please obtain a copy of the
+ * License at http://www.apple.com/publicsource and read it before using
+ * this file.
  * 
  * The Original Code and all software distributed under the License are
  * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License."
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 35c88255f97905d69f462893cc7febcda649e603..e9c3019397155ffc81bf3a9f9945dc83e2f2f245 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 45a4fb75db864000d01701c0f7a51864bd4daabf..00750edc07d6415dcc07ae0351e9397b0222b7ba 100644 (file)
@@ -1 +1 @@
-8
+3
index 7ed6ff82de6bcc2a78243fc9c54d3ef5ac14da69..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1 +0,0 @@
-5
index 4e11cd601d86411ba299391569fedd1332b75795..9bbd90f4ae4279a068f3733cd097f430d180301b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 45d11c0c12e3034b5a4e14959270e411dff2cd07..862be7f9646ec497ff17d59a38916115f33d5113 100644 (file)
@@ -3,22 +3,21 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
+ * "Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
+ * Reserved.  This file contains Original Code and/or Modifications of
+ * Original Code as defined in and that are subject to the Apple Public
+ * Source License Version 1.0 (the 'License').  You may not use this file
+ * except in compliance with the License.  Please obtain a copy of the
+ * License at http://www.apple.com/publicsource and read it before using
+ * this file.
  * 
  * The Original Code and all software distributed under the License are
  * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License."
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -1853,13 +1852,13 @@ static Boolean growImage(struct fileRecord *file, vm_size_t delta)
     endMap   = (vm_address_t) file->fMap + file->fMapSize;
 
     // Do we have room in the current mapped image
-    if (endMachO < round_page_32(endMap)) {
+    if (endMachO < round_page(endMap)) {
        file->fMachOSize += delta;
        return true;
     }
 
     newsize = endMachO - startMachO;
-    if (newsize < round_page_32(file->fMapSize)) {
+    if (newsize < round_page(file->fMapSize)) {
         DEBUG_LOG(("Growing image %s by moving\n", file->fPath));
 
        // We have room in the map if we shift the macho image within the
index 8b50f49f1e928ead3f8c2e479f83b44cffe32af9..b0e6058b338c822d4128ea8771d0da0d9e77198b 100644 (file)
@@ -3,22 +3,21 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
+ * "Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
+ * Reserved.  This file contains Original Code and/or Modifications of
+ * Original Code as defined in and that are subject to the Apple Public
+ * Source License Version 1.0 (the 'License').  You may not use this file
+ * except in compliance with the License.  Please obtain a copy of the
+ * License at http://www.apple.com/publicsource and read it before using
+ * this file.
  * 
  * The Original Code and all software distributed under the License are
  * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License."
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6f43bbea0258a2d0b9f669a2a7ac4f992178746b..7e2d50a97d0052b849d81c4c3fb97ac6dc76e68c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -62,8 +59,8 @@ kmod_start_or_stop(
 extern kern_return_t kmod_retain(kmod_t id);
 extern kern_return_t kmod_release(kmod_t id);
 
-extern void flush_dcache64(addr64_t addr, unsigned cnt, int phys);
-extern void invalidate_icache64(addr64_t addr, unsigned cnt, int phys);
+extern void flush_dcache(vm_offset_t addr, unsigned cnt, int phys);
+extern void invalidate_icache(vm_offset_t addr, unsigned cnt, int phys);
 };
 
 
@@ -525,7 +522,7 @@ unsigned long address_for_loaded_kmod(
         return 0;
     }
 
-    round_headers_size = round_page_32(headers_size);
+    round_headers_size = round_page(headers_size);
     headers_pad = round_headers_size - headers_size;
 
     link_load_address = (unsigned long)g_current_kmod_info->address +
@@ -561,8 +558,8 @@ unsigned long alloc_for_kmod(
     unsigned long round_size;
     unsigned long headers_pad;
 
-    round_headers_size  = round_page_32(headers_size);
-    round_segments_size = round_page_32(size - headers_size);
+    round_headers_size  = round_page(headers_size);
+    round_segments_size = round_page(size - headers_size);
     round_size  = round_headers_size + round_segments_size;
     headers_pad = round_headers_size - headers_size;
 
@@ -996,7 +993,7 @@ kern_return_t load_kmod(OSArray * dependencyList) {
     // bcopy() is (from, to, length)
     bcopy((char *)kmod_header, (char *)link_buffer_address, link_header_size);
     bcopy((char *)kmod_header + link_header_size,
-        (char *)link_buffer_address + round_page_32(link_header_size),
+        (char *)link_buffer_address + round_page(link_header_size),
         link_load_size - link_header_size);
 
 
@@ -1024,13 +1021,13 @@ kern_return_t load_kmod(OSArray * dependencyList) {
     */
     kmod_info->address = link_buffer_address;
     kmod_info->size = link_buffer_size;
-    kmod_info->hdr_size = round_page_32(link_header_size);
+    kmod_info->hdr_size = round_page(link_header_size);
 
    /* We've written data and instructions, so *flush* the data cache
     * and *invalidate* the instruction cache.
     */
-    flush_dcache64((addr64_t)link_buffer_address, link_buffer_size, false);
-    invalidate_icache64((addr64_t)link_buffer_address, link_buffer_size, false);
+    flush_dcache(link_buffer_address, link_buffer_size, false);
+    invalidate_icache(link_buffer_address, link_buffer_size, false);
 
 
    /* Register the new kmod with the kernel proper.
index c51badfa812188c0e6a4dd879466c7306e96ec52..0ab263dbfc5a5b14d18cc8f63754946c4ff0a4d9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0f70d2a399186ab4a734cf36699f577d923432af..44638f139859c158c5aa3dfac3a03748aba45f9e 100644 (file)
@@ -1,10 +1,8 @@
 #ifndef _LIBSA_MALLOC_H_
 #define _LIBSA_MALLOC_H_
 
-#include <sys/cdefs.h>
 #include "stdlib.h"
 
-__BEGIN_DECLS
 
 /*****
  * These functions are the minimum necessary for use
@@ -14,7 +12,6 @@ void * malloc(size_t size);
 void * realloc(void * address, size_t new_size);
 void   free(void * address);
 
-void   malloc_init(void);
 void   malloc_reset(void); // Destroy all memory regions
 
 
@@ -42,6 +39,4 @@ int malloc_sanity_check(void);
 #endif /* DEBUG */
 #endif /* 0 */
 
-__END_DECLS
-
 #endif /* defined _LIBSA_MALLOC_H_ */
index df9abf0a65c165ad37360250bb8faa22178391e8..54d17d51bb0421fdbf5543909345a32994989b9e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7e61235cc0a0b16750ada38a748909ab96fc3514..ed021de4e2dc8ee927f550ad567b8c2992c619b0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6b2c48a076e560ec9645f582cf9d19b131fec8e9..56dbcbd4d39276f59163458e542f96f59db8aaf8 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef _LIBSA_STDLIB_H_
 #define _LIBSA_STDLIB_H_
 
-#include <sys/cdefs.h>
 
 #ifndef _BSD_SIZE_T_DEFINED_
 #define _BSD_SIZE_T_DEFINED_
@@ -16,9 +15,6 @@ typedef __SIZE_TYPE__    size_t;
 __private_extern__ char *kld_basefile_name;
 
 
-__BEGIN_DECLS
-
-
 __private_extern__ void * malloc(size_t size);
 __private_extern__ void   free(void * address);
 __private_extern__ void   free_all(void);     // "Free" all memory blocks
@@ -46,6 +42,4 @@ __private_extern__ void * bsearch(
 extern long     strtol(const char *, char **, int);
 extern unsigned long strtoul(const char *, char **, int);
 
-__END_DECLS
-
 #endif /* _LIBSA_STDLIB_H_ */
index 75bcb23feb092eaeda2471c5275027d37edd0dc7..1c04135fef9354fc9e2e4a13b73864ec184099dd 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index bea4dda322fc415c631a39bd7c32b73de5489c7d..415f03e933c57f0b0292f518dd83860a2c098672 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ed3a64d2fb678d8657354152ead847bf9199dbe0..a1a0b4733cc24fb210d7f2cc1cc7bfab66749013 100644 (file)
@@ -3,33 +3,59 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
+#include <vm/vm_kern.h>
+#include <kern/queue.h>
 #include <string.h>
 
-#include <kern/queue.h>
-#include <kern/lock.h>
-#include <kern/assert.h> 
-#include <vm/vm_kern.h>
+#include <libsa/malloc.h>
+
+#undef CLIENT_DEBUG
+
+
+/*********************************************************************
+* I'm not sure this is really necessary....
+*********************************************************************/
+static inline size_t round_to_long(size_t size) {
+    return (size + sizeof(long int)) & ~(sizeof(long int) - 1);
+}
+
+
+typedef struct queue_entry queue_entry;
+
+/*********************************************************************
+* Structure for an allocation region. Each one is created using
+* kmem_alloc(), and the whole list of these is destroyed by calling
+* malloc_reset(). Client blocks are allocated from a linked list of these
+* regions, on a first-fit basis, and are never freed.
+*********************************************************************/
+typedef struct malloc_region {
+    queue_entry   links;         // Uses queue.h for linked list
+    vm_size_t     region_size;   // total size w/ this bookeeping info
+
+    queue_entry   block_list;    // list of allocated blocks; uses queue.h
+
+    vm_size_t     free_size;     // size of unused area
+    void        * free_address;  // points at the unused area
+
+    char          buffer[0];     // beginning of useable area
+} malloc_region;
 
-#include "libsa/malloc.h"
 
 /*********************************************************************
 * Structure for a client memory block. Contains linked-list pointers,
 * field is guaranteed to lie on a 16-byte boundary.
 *********************************************************************/
 typedef struct malloc_block {
-
-       struct malloc_block     *malFwd;
-       struct malloc_block     *malBwd;
-       unsigned int            malSize;
-       unsigned int            malActl;
+    queue_entry     links;       // Uses queue.h for linked list
+    malloc_region * region;
+#ifdef CLIENT_DEBUG
+    size_t         request_size;
+#endif /* CLIENT_DEBUG */
+    size_t         block_size;  // total size w/ all bookeeping info
+
+    // the client's memory block
+    char           buffer[0] __attribute__((aligned(16)));
 } malloc_block;
 
-static malloc_block malAnchor = {&malAnchor, &malAnchor, 0, 0};
 
-static int malInited = 0;
-static mutex_t *malloc_lock;
+/*********************************************************************
+* Private functions.
+*
+* malloc_create_region()
+*   size - The size in bytes of the region. This is rounded up
+*          to a multiple of the VM page size.
+*   Returns a pointer to the new region.
+*
+* malloc_free_region()
+*   region - The region to free.
+*   Returns whatever vm_deallocate() returns.
+*
+* malloc_create_block_in_region()
+*   region - The region to alloate a block from.
+*   size - The total size, including the header, of the block to
+*          allocate.
+*   Returns a pointer to the block, or NULL on failure.
+*
+* malloc_find_block()
+*   address - The address of the client buffer to find a block for.
+*   block (out) - The block header for the address.
+*   region (out) - The region the block was found in, or NULL.
+*********************************************************************/
+static malloc_region * malloc_create_region(vm_size_t size);
+static kern_return_t malloc_free_region(malloc_region * region);
+static malloc_block * malloc_create_block_in_region(
+    malloc_region * region,
+    size_t size);
+static void malloc_find_block(
+    void * address,
+    malloc_block  ** block,
+    malloc_region ** region);
+static void malloc_get_free_block(
+    size_t size,
+    malloc_block  ** block,
+    malloc_region ** region);
+
+
+/*********************************************************************
+* Pointers to the linked list of VM-allocated regions, and a high
+* water mark used in testing/debugging.
+*********************************************************************/
+static queue_entry malloc_region_list = {
+    &malloc_region_list,   // the "next" field
+    &malloc_region_list    // the "prev" field
+};
 
+static queue_entry sorted_free_block_list = {
+    &sorted_free_block_list,
+    &sorted_free_block_list
+};
+
+#ifdef CLIENT_DEBUG
+static size_t   malloc_hiwater_mark   = 0;
+static long int num_regions = 0;
+
+static size_t   current_block_total = 0;
+static double   peak_usage = 0.0;
+static double   min_usage = 100.0;
+#endif /* CLIENT_DEBUG */
+
+
+/*********************************************************************
+* malloc()
+*********************************************************************/
 __private_extern__
 void * malloc(size_t size) {
+    size_t need_size;
+    malloc_region * cur_region = NULL;
+    malloc_region * use_region = NULL;
+    malloc_block  * client_block = NULL;
+    void      * client_buffer = NULL;
+
+   /* Add the size of the block header to the request size.
+    */
+    need_size = round_to_long(size + sizeof(malloc_block));
+
+
+   /* See if there's a previously-freed block that we can reuse.
+    */
+    malloc_get_free_block(need_size,
+        &client_block, &use_region);
 
-    unsigned int nsize;
-    unsigned int nmem, rmem;
-    malloc_block *amem;
-    assert(malInited);
-
-       nsize = size + sizeof(malloc_block) + 15;       /* Make sure we get enough to fit */
-
-       nmem = (unsigned int)kalloc(nsize);                     /* Get some */
-       if(!nmem) {                                                                     /* Got any? */
-               panic("malloc: no memory for a %08X sized request\n", nsize);
-       }
-       
-       rmem = (nmem + 15) & -16;                                       /* Round to 16 byte boundary */
-       amem = (malloc_block *)rmem;                            /* Point to the block */
-       amem->malActl = (unsigned int)nmem;                     /* Set the actual address */
-       amem->malSize = nsize;                                          /* Size */
-       
-       mutex_lock(malloc_lock);
-       
-       amem->malFwd = malAnchor.malFwd;                        /* Move anchor to our forward */
-       amem->malBwd = &malAnchor;                                      /* We point back to anchor */
-       malAnchor.malFwd->malBwd = amem;                        /* The old forward's back points to us */
-       malAnchor.malFwd = amem;                                        /* Now we point the anchor to us */
-       
-       mutex_unlock(malloc_lock);                              /* Unlock now */
-       
-       return (void *)(rmem + 16);                                     /* Return the block */
+
+   /* If we found a free block that we can reuse, then reuse it.
+    */
+    if (client_block != NULL) {
+
+       /* Remove the found block from the list of free blocks
+        * and tack it onto the list of allocated blocks.
+        */
+        queue_remove(&sorted_free_block_list, client_block, malloc_block *, links);
+        queue_enter(&use_region->block_list, client_block, malloc_block *, links);
+
+        client_buffer = client_block->buffer;
+        // Don't return here! There's bookkeeping done below.
+
+    } else {
+
+       /* Didn't find a freed block to reuse. */
+
+       /* Look for a region with enough unused space to carve out a new block.
+        */
+        queue_iterate(&malloc_region_list, cur_region, malloc_region *, links) {
+            if (use_region == NULL && cur_region->free_size >= need_size) {
+                use_region = cur_region;
+                break;
+            }
+        }
+
+    
+       /* If we haven't found a region with room, create a new one and
+        * put it at the end of the list of regions.
+        */
+        if (use_region == NULL) {
+            use_region = malloc_create_region(need_size);
+            if (use_region == NULL) {
+                return NULL;
+                // FIXME: panic?
+            }
+        }
+    
+       /* Create a new block in the found/created region.
+        */
+        client_block = malloc_create_block_in_region(use_region, need_size);
+        if (client_block != NULL) {
+            client_buffer = client_block->buffer;
+            // Don't return here! There's bookkeeping done below.
+        }
+    }
+
+#ifdef CLIENT_DEBUG
+    if (client_block != NULL) {
+        size_t region_usage = malloc_region_usage();
+        double current_usage;
+
+        current_block_total += client_block->block_size;
+        if (region_usage > 0) {
+            current_usage = (double)current_block_total / (double)malloc_region_usage();
+            if (current_usage > peak_usage) {
+                peak_usage = current_usage;
+            }
+    
+            if (current_usage < min_usage) {
+                min_usage = current_usage;
+            }
+        }
+
+        client_block->request_size = size;
+    }
+#endif /* CLIENT_DEBUG */
+
+    return client_buffer;
 
 } /* malloc() */
 
@@ -88,44 +236,55 @@ void * malloc(size_t size) {
 /*********************************************************************
 * free()
 *
+* Moves a block from the allocated list to the free list. Neither
+* list is kept sorted!
 *********************************************************************/
 __private_extern__
 void free(void * address) {
+    malloc_region * found_region = NULL;
+    malloc_block  * found_block = NULL;
+    malloc_block  * cur_block = NULL;
 
+   /* Find the block and region for the given address.
+    */
+    malloc_find_block(address, &found_block, &found_region);
 
-    malloc_block *amem, *fore, *aft;
-    
-    if(!(unsigned int)address) return;                 /* Leave if they try to free nothing */
-    
-    
-    amem = (malloc_block *)((unsigned int)address - sizeof(malloc_block));     /* Point to the header */
+    if (found_block == NULL) {
+        return;
+        // FIXME: panic?
+    }
 
-       mutex_lock(malloc_lock);
 
-       fore = amem->malFwd;                                            /* Get the guy in front */
-       aft  = amem->malBwd;                                            /* And the guy behind */
-       fore->malBwd = aft;                                                     /* The next guy's previous is now my previous */
-       aft->malFwd = fore;                                                     /* The previous guy's forward is now mine */    
+   /* Remove the found block from the list of allocated blocks
+    * and tack it onto the list of free blocks.
+    */
+    queue_remove(&found_region->block_list, found_block, malloc_block *, links);
 
-       mutex_unlock(malloc_lock);                              /* Unlock now */
-   
-       kfree((void *)amem->malActl, amem->malSize);    /* Toss it */
+    found_block->links.next = NULL;
+    queue_iterate(&sorted_free_block_list, cur_block, malloc_block *, links) {
+        if (cur_block->block_size > found_block->block_size) {
+            queue_insert_before(&sorted_free_block_list, found_block, cur_block,
+                malloc_block *, links);
+            break;
+        }
+    }
 
-       return; 
 
-} /* free() */
+   /* If the "next" link is still NULL, then either the list is empty or the
+    * freed block has to go on the end, so just tack it on.
+    */
+    if (found_block->links.next == NULL) {
+        queue_enter(&sorted_free_block_list, found_block, malloc_block *, links);
+    }
 
-/*********************************************************************
-* malloc_reset()
-*
-* Allocate the mutual exclusion lock that protect malloc's data.
-*********************************************************************/
-__private_extern__ void
-malloc_init(void)
-{
-    malloc_lock = mutex_alloc(ETAP_IO_AHA);
-    malInited = 1;
-}
+
+#ifdef CLIENT_DEBUG
+    current_block_total -= found_block->block_size;
+#endif /* CLIENT_DEBUG */
+
+    return;
+
+} /* free() */
 
 
 /*********************************************************************
@@ -137,27 +296,20 @@ malloc_init(void)
 *********************************************************************/
 __private_extern__
 void malloc_reset(void) {
-    malloc_block *amem, *bmem;
-
-       mutex_lock(malloc_lock);
-       
-       amem = malAnchor.malFwd;                                        /* Get the first one */
-       
-       while(amem != &malAnchor) {                                     /* Go until we hit the anchor */
-       
-               bmem = amem->malFwd;                                    /* Next one */
-               kfree((void *)amem->malActl, amem->malSize);    /* Toss it */
-               amem = bmem;                                                    /* Skip to it */
-       
-       } 
-
-       malAnchor.malFwd = 0x666;                                       /* Cause a fault if we try again */
-       malAnchor.malBwd = 0x666;                                       /* Cause a fault if we try again */
-       
-       mutex_unlock(malloc_lock);                              /* Unlock now */
-
-       mutex_free(malloc_lock);
+    malloc_region * cur_region;
+
+    while (! queue_empty(&malloc_region_list)) {
+        kern_return_t kern_result;
+        queue_remove_first(&malloc_region_list, cur_region,
+            malloc_region *, links);
+        kern_result = malloc_free_region(cur_region);
+        if (kern_result != KERN_SUCCESS) {
+            // what sort of error checking can we even do here?
+            // printf("malloc_free_region() failed.\n");
+            // panic();
+        }
+    }
+
     return;
 
 } /* malloc_reset() */
@@ -172,22 +324,270 @@ void malloc_reset(void) {
 *********************************************************************/
 __private_extern__
 void * realloc(void * address, size_t new_client_size) {
+    malloc_region * found_region = NULL;
+    malloc_block  * found_block = NULL;
     void * new_address;
-    malloc_block *amem;
-
-       amem = (malloc_block *)((unsigned int)address - sizeof(malloc_block));  /* Point to allocation block */
-       
-       new_address = malloc(new_client_size);          /* get a new one */
-       if(!new_address) {                                                      /* Did we get it? */
-               panic("realloc: can not reallocate one of %08X size\n", new_client_size);
-       }
-       
-    memcpy(new_address, address, amem->malSize - sizeof(malloc_block));        /* Copy the old in */
-    
-    free(address);                                                             /* Toss the old one */
-       
-    return new_address;
+    size_t new_block_size;
+    size_t copy_bytecount;
+
+
+    malloc_find_block(address, &found_block, &found_region);
+
+
+   /* If we couldn't find the requested block, 
+    * the caller is in error so return NULL.
+    */
+    if (found_block == NULL) {
+        // printf("realloc() called with invalid block.\n");
+        return NULL;
+        // FIXME: panic?
+    }
+
+
+   /* Figure out how much memory is actually needed.
+    */
+    new_block_size = new_client_size + sizeof(malloc_block);
+
+
+   /* If the new size is <= the current size, don't bother.
+    */
+    if (new_block_size <= found_block->block_size) {
+#ifdef CLIENT_DEBUG
+        if (new_client_size > found_block->request_size) {
+            found_block->request_size = new_client_size;
+        }
+#endif /* CLIENT_DEBUG */
+        return address;
+    }
+
+
+   /* Create a new block of the requested size.
+    */
+    new_address = malloc(new_client_size);
+
+    if (new_address == NULL) {
+        // printf("error in realloc()\n");
+        return NULL;
+        // FIXME: panic?
+    }
+
+
+   /* Copy the data from the old block to the new one.
+    * Make sure to copy only the lesser of the existing and
+    * requested new size. (Note: The code above currently
+    * screens out a realloc to a smaller size, but it might
+    * not always do that.)
+    */
+    copy_bytecount = found_block->block_size - sizeof(malloc_block);
+
+    if (new_client_size < copy_bytecount) {
+        copy_bytecount = new_client_size;
+    }
+
+    memcpy(new_address, address, copy_bytecount);
+
+
+   /* Free the old block.
+    */
+    free(address);
+
+    return (void *)new_address;
 
 } /* realloc() */
 
 
+/*********************************************************************
+**********************************************************************
+*****           PACKAGE-INTERNAL FUNCTIONS BELOW HERE            *****
+**********************************************************************
+*********************************************************************/
+
+
+
+/*********************************************************************
+* malloc_create_region()
+*
+* Package-internal function. VM-allocates a new region and adds it to
+* the given region list.
+*********************************************************************/
+__private_extern__
+malloc_region * malloc_create_region(vm_size_t block_size) {
+
+    malloc_region * new_region;
+    vm_address_t    vm_address;
+    vm_size_t       region_size;
+    kern_return_t   kern_result;
+
+
+   /* Figure out how big the region needs to be and allocate it.
+    */
+    region_size = block_size + sizeof(malloc_region);
+    region_size = round_page(region_size);
+
+    kern_result = kmem_alloc(kernel_map,
+        &vm_address, region_size);
+
+    if (kern_result != KERN_SUCCESS) {
+        // printf("kmem_alloc() failed in malloc_create_region()\n");
+        return NULL;
+        // panic();
+    }
+
+
+   /* Cast the allocated pointer to a region header.
+    */
+    new_region = (malloc_region *)vm_address;
+
+
+   /* Initialize the region header fields and link it onto
+    * the previous region.
+    */
+    new_region->region_size = region_size;
+    queue_init(&new_region->block_list);
+//    queue_init(&new_region->free_list);
+
+    new_region->free_size = region_size - sizeof(malloc_region);
+    new_region->free_address = &new_region->buffer;
+
+    queue_enter(&malloc_region_list, new_region, malloc_region *, links);
+
+   /* If debugging, add the new region's size to the total.
+    */
+#ifdef CLIENT_DEBUG
+    malloc_hiwater_mark += region_size;
+    num_regions++;
+#endif /* CLIENT_DEBUG */
+
+    return new_region;
+
+} /* malloc_create_region() */
+
+
+/*********************************************************************
+* malloc_free_region()
+*
+* Package-internal function. VM-deallocates the given region.
+*********************************************************************/
+__private_extern__
+kern_return_t malloc_free_region(malloc_region * region) {
+
+    kmem_free(kernel_map,
+        (vm_address_t)region,
+        region->region_size);
+
+#ifdef CLIENT_DEBUG
+    num_regions--;
+#endif /* CLIENT_DEBUG */
+    return KERN_SUCCESS;
+
+} /* malloc_free_region() */
+
+
+/*********************************************************************
+* malloc_create_block_in_region()
+*
+* Package-internal function. Allocates a new block out of the given
+* region. The requested size must include the block header. If the
+* size requested is larger than the region's free size, returns NULL.
+*********************************************************************/
+__private_extern__
+malloc_block * malloc_create_block_in_region(
+    malloc_region * region,
+    size_t block_size) {
+
+    malloc_block * new_block = NULL;
+
+
+   /* Sanity checking.
+    */
+    if (block_size > region->free_size) {
+        return NULL;
+        // FIXME: panic?
+    }
+
+
+   /* Carve out a new block.
+    */
+    new_block = (malloc_block *)region->free_address;
+    region->free_address = (char *)region->free_address + block_size;
+    region->free_size -= block_size;
+
+    memset(new_block, 0, sizeof(malloc_block));
+
+    new_block->region = region;
+    new_block->block_size = block_size;
+
+   /* Record the new block as the last one in the region.
+    */
+    queue_enter(&region->block_list, new_block, malloc_block *, links);
+
+    return new_block;
+
+} /* malloc_create_block_in_region() */
+
+
+/*********************************************************************
+* malloc_find_block()
+*
+* Package-internal function. Given a client buffer address, find the
+* malloc_block for it.
+*********************************************************************/
+__private_extern__
+void malloc_find_block(void * address,
+    malloc_block ** block,
+    malloc_region ** region) {
+
+    malloc_region * cur_region;
+
+    *block = NULL;
+    *region = NULL;
+
+    queue_iterate(&malloc_region_list, cur_region, malloc_region *, links) {
+
+        malloc_block  * cur_block;
+
+        queue_iterate(&cur_region->block_list, cur_block, malloc_block *, links) {
+            if (cur_block->buffer == address) {
+                *block = cur_block;
+                *region = cur_region;
+                return;
+            }
+        }
+    }
+
+    return;
+
+} /* malloc_find_block() */
+
+
+/*********************************************************************
+* malloc_get_free_block()
+*********************************************************************/
+__private_extern__
+void malloc_get_free_block(
+    size_t size,
+    malloc_block  ** block,
+    malloc_region ** region) {
+
+    malloc_block * cur_block;
+    size_t fit_threshold = 512;
+
+    *block = NULL;
+    *region = NULL;
+
+    queue_iterate(&sorted_free_block_list, cur_block, malloc_block *, links) {
+
+       /* If we find a block large enough, but not too large to waste memory,
+        * pull it out and return it, along with its region.
+        */
+        if (cur_block->block_size >= size &&
+            cur_block->block_size < (size + fit_threshold)) {
+
+            queue_remove(&sorted_free_block_list, cur_block, malloc_block *, links);
+            *block = cur_block;
+            *region = cur_block->region;
+            return;
+        }
+    }
+    return;
+}
index bee2f5982fc74fa8ce7d3e23bed69433c4e05cb0..c5b5a99abba6460342f1f9a0d0065ca53012a1f9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 02014327171627206d51947e5d2241911d168ea4..7f28031edb2c9f713c26ad4bcdb0ff021f06f305 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 14e95b5d44d69d10cad5f7c6beaba0a167ead81b..8350b13d4fb8e3fe01b7ab60d6bae8f792922573 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3815244947287107445e2e756b86646ac9838421..2ed7ab3f083a6875710d7095caf59c4b1afe43a1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 454c30c5b2ff5e28cbebdc3b250dceb80f614790..8c57859e6e0170942b0f59eecbab070d9f19e1c5 100644 (file)
@@ -3,22 +3,21 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
+ * "Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
+ * Reserved.  This file contains Original Code and/or Modifications of
+ * Original Code as defined in and that are subject to the Apple Public
+ * Source License Version 1.0 (the 'License').  You may not use this file
+ * except in compliance with the License.  Please obtain a copy of the
+ * License at http://www.apple.com/publicsource and read it before using
+ * this file.
  * 
  * The Original Code and all software distributed under the License are
  * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License."
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b178084d79f2f427f0e5d415f7d1b4cce91e5304..b5be864afc7f5d4cf99bd66a3034b7f5b93887a0 100644 (file)
@@ -3,22 +3,21 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
+ * "Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
+ * Reserved.  This file contains Original Code and/or Modifications of
+ * Original Code as defined in and that are subject to the Apple Public
+ * Source License Version 1.0 (the 'License').  You may not use this file
+ * except in compliance with the License.  Please obtain a copy of the
+ * License at http://www.apple.com/publicsource and read it before using
+ * this file.
  * 
  * The Original Code and all software distributed under the License are
  * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License."
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5c9d12e8670ede72c222490b78908e0567d15fd7..fb14d0d33b8a5f2a4034f6043afa8527cac4932f 100644 (file)
@@ -129,7 +129,7 @@ export CFLAGS_I386  = -arch i386 -Di386 -DI386 -D__I386__ -D_BIG_ENDIAN=__LITTLE
 
 export CFLAGS_RELEASEPPC = -O2 -mcpu=750 -mmultiple -fschedule-insns
 export CFLAGS_RELEASE_TRACEPPC = -O2 -mcpu=750 -mmultiple -fschedule-insns
-export CFLAGS_DEBUGPPC = -O2 -mcpu=750 -mmultiple -fschedule-insns
+export CFLAGS_DEBUGPPC = -O1 -mcpu=750 -mmultiple -fschedule-insns
 export CFLAGS_RELEASEI386 = -O2
 export CFLAGS_DEBUGI386 = -O2
 
@@ -201,7 +201,7 @@ export LDFLAGS_KERNEL_RELEASE       =
 export LDFLAGS_KERNEL_DEBUG    = 
 export LDFLAGS_KERNEL_PROFILE  = 
 
-export LDFLAGS_KERNEL_PPC      = -arch ppc -segaddr __VECTORS 0x0 -segaddr __TEXT 0x7000 -e __start -sectalign __TEXT __text 0x1000 -sectalign __DATA __common 0x1000 -sectalign __DATA __bss 0x1000
+export LDFLAGS_KERNEL_PPC      = -arch ppc -segaddr __VECTORS 0x0 -segaddr __TEXT 0x11000 -e __start -sectalign __DATA __common 0x1000 -sectalign __DATA __bss 0x1000
 export LDFLAGS_KERNEL_I386     = -arch i386 -segaddr __TEXT 0x100000 -e _pstart
 
 export LDFLAGS_KERNEL  = $(LDFLAGS_KERNEL_GEN) \
index 92ea3b0085fc7b9eb295c4d9f110e3274687f99f..0cf9f4e541699587a416cbdb81303e114fb75f82 100644 (file)
@@ -9,7 +9,6 @@ include $(MakeInc_def)
 
 INSTINC_SUBDIRS = \
        mach    \
-       machine \
        default_pager \
        device \
        mach_debug \
@@ -18,12 +17,10 @@ INSTINC_SUBDIRS = \
 
 INSTINC_SUBDIRS_PPC = \
        mach \
-       ppc     \
        profiling 
 
 INSTINC_SUBDIRS_I386 = \
        mach    \
-       i386    \
        profiling
 
 EXPINC_SUBDIRS = \
index 8007e03b1e8421870fd30ab70f71c857963d2825..a4baa980eb4cca2faea4edf04617d5d0e3a33ace 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c02b2fb11033595bce6460f8b5f5e7b84a8d195e..0351f1d87feac79772dfc7f6ca2a58e80ea8e951 100644 (file)
@@ -2,24 +2,21 @@
  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ *
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ *
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ *
  * @APPLE_LICENSE_HEADER_END@
  */
 
index 9ef979642213a1da4d28325b1ed361537f78c774..87bb8b6ac98e7ef0923293c7856625218939d60e 100644 (file)
@@ -2,24 +2,21 @@
  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ *
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ *
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ *
  * @APPLE_LICENSE_HEADER_END@
  */
 
index 9740fde2a991c16318c6818887450c6601587d20..e73bd03917b92af53d2bb874913d5e8063ba5ef8 100644 (file)
@@ -2,24 +2,21 @@
  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ *
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ *
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ *
  * @APPLE_LICENSE_HEADER_END@
  */
 
index 46f3a21288da92e9b8a9865f1b02f98da1d12bd6..8ccefc6848405a6acd077c562e19ff4084d14a78 100644 (file)
@@ -2,24 +2,21 @@
  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ *
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ *
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ *
  * @APPLE_LICENSE_HEADER_END@
  */
 
index 16cb8a582c293def26791086f7c78aaeb1d7cbf1..32581eec05cf503524e523a94112df657df4e49b 100644 (file)
@@ -2,24 +2,21 @@
  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ *
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ *
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ *
  * @APPLE_LICENSE_HEADER_END@
  */
 
index 70255775eeec08c470790d344230dadffb6ff87b..fbdac7ab90a5eb4bf50c07a22d4dba1b42399e9a 100644 (file)
@@ -64,8 +64,6 @@ osfmk/i386/rtclock.c          standard
 osfmk/i386/trap.c              standard
 osfmk/i386/user_ldt.c          standard
 
-osfmk/i386/commpage/commpage.c standard
-
 osfmk/i386/AT386/autoconf.c    standard
 osfmk/i386/AT386/bbclock.c     standard
 osfmk/i386/AT386/conf.c                standard
index 7c23352f5fe5156d7d31987edbcdcacd49c65026..bef664902de98072c865a803624c119073e75536 100644 (file)
@@ -13,28 +13,29 @@ OPTIONS/mp                  optional mp
 # that the file is placed at the front of the line
 
 
-osfmk/ddb/db_aout.c                    optional mach_kdb
-./ppc_disasm.c                         optional mach_kdb
-osfmk/ppc/db_disasm.c          optional mach_kdb
+osfmk/ddb/db_aout.c            optional mach_kdb
+./ppc_disasm.c         optional mach_kdb
+osfmk/ppc/db_disasm.c  optional mach_kdb
+osfmk/ppc/db_asm.s     optional mach_kdb
 osfmk/ppc/db_interface.c       optional mach_kdb
 osfmk/ppc/db_trace.c           optional mach_kdb
 osfmk/ppc/db_low_trace.c       optional mach_kdb
-osfmk/ppc/bcopytest.c          optional mach_kdb
 
 osfmk/ppc/lowmem_vectors.s     standard
 osfmk/ppc/start.s                      standard
 osfmk/ppc/_setjmp.s                    standard
 
-osfmk/ppc/cpu.c                        standard
+osfmk/ppc/cpu.c                standard
 osfmk/ppc/ppc_init.c           standard
 osfmk/ppc/ppc_vm_init.c                standard
+osfmk/ppc/bat_init.c           standard
 osfmk/ppc/model_dep.c          standard
+osfmk/ppc/mem.c                                standard
 osfmk/ppc/pmap.c                       standard
 osfmk/ppc/mappings.c           standard
 osfmk/ppc/savearea.c           standard
 osfmk/ppc/savearea_asm.s       standard
 osfmk/ppc/hw_vm.s                      standard
-osfmk/ppc/skiplists.s          standard
 osfmk/ppc/hw_lock.s                    standard
 osfmk/ppc/misc_asm.s           standard
 osfmk/ppc/status.c                     standard
@@ -54,41 +55,31 @@ osfmk/ppc/misc.c                    standard
 osfmk/ppc/interrupt.c          standard
 osfmk/ppc/machine_routines.c           standard
 osfmk/ppc/machine_routines_asm.s               standard
+#osfmk/ppc/Performance.s       standard
 osfmk/ppc/Emulate.s                    standard
-osfmk/ppc/Emulate64.s          standard
 osfmk/ppc/AltiAssist.s         standard
 osfmk/ppc/conf.c                       standard
 osfmk/ppc/rtclock.c                    standard
 osfmk/ppc/Diagnostics.c                standard
 osfmk/ppc/PPCcalls.c           standard
 osfmk/ppc/vmachmon.c           standard
-osfmk/ppc/vmachmon_asm.s       standard
+osfmk/ppc/vmachmon_asm.s               standard
 
-osfmk/ppc/Firmware.s           standard
-osfmk/ppc/FirmwareC.c          standard
+#osfmk/ppc/POWERMAC/ser16550.c         standard
+osfmk/ppc/POWERMAC/autoconf.c          optional xxx
+osfmk/ppc/POWERMAC/pci.c               optional xxx
+osfmk/ppc/POWERMAC/pci_probe.c         optional xxx
+osfmk/ppc/POWERMAC/pci_compat.c                optional xxx
 
-osfmk/ppc/aligned_data.s       standard
+osfmk/ppc/Firmware.s                   standard
+osfmk/ppc/FirmwareC.c                  standard
 
-osfmk/ppc/hw_perfmon.c         standard
-
-osfmk/ppc/commpage/commpage.c  standard
-osfmk/ppc/commpage/commpage_asm.s      standard
-osfmk/ppc/commpage/bcopy_g3.s  standard
-osfmk/ppc/commpage/bcopy_g4.s  standard
-osfmk/ppc/commpage/bcopy_970.s standard
-osfmk/ppc/commpage/bcopy_64.s  standard
-osfmk/ppc/commpage/bzero_32.s  standard
-osfmk/ppc/commpage/bzero_128.s standard
-osfmk/ppc/commpage/cacheflush.s        standard
-osfmk/ppc/commpage/gettimeofday.s      standard
-osfmk/ppc/commpage/mach_absolute_time.s        standard
-osfmk/ppc/commpage/pthread.s   standard
-osfmk/ppc/commpage/spinlocks.s standard
-osfmk/ppc/commpage/bigcopy_970.s       standard
+osfmk/ppc/aligned_data.s               standard
 
 osfmk/kdp/ml/ppc/kdp_machdep.c        optional mach_kdp
 osfmk/kdp/ml/ppc/kdp_vm.c             optional mach_kdp
 osfmk/kdp/ml/ppc/kdp_misc.s           optional mach_kdp
+#osfmk/kdp/pe/POWERMAC/kdp_mace.c      optional mach_kdp
 
 osfmk/ppc/serial_console.c             optional        scc device-driver
 osfmk/ppc/POWERMAC/serial_io.c optional        scc device-driver
index 45a4fb75db864000d01701c0f7a51864bd4daabf..00750edc07d6415dcc07ae0351e9397b0222b7ba 100644 (file)
@@ -1 +1 @@
-8
+3
index 7ed6ff82de6bcc2a78243fc9c54d3ef5ac14da69..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1 +0,0 @@
-5
index 45a4fb75db864000d01701c0f7a51864bd4daabf..00750edc07d6415dcc07ae0351e9397b0222b7ba 100644 (file)
@@ -1 +1 @@
-8
+3
index 7ed6ff82de6bcc2a78243fc9c54d3ef5ac14da69..8b137891791fe96927ad78e64b0aad7bded08bdc 100644 (file)
@@ -1 +1 @@
-5
+
index d803b7e549e51edfe7cad552422682d3e88871b8..75fe96d4dc1c4f5b4ac4c6d68e8ba036a386eb4d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 
 int db_access_level = DB_ACCESS_LEVEL;
 
+/*
+ * This table is for sign-extending things.
+ * Therefore its entries are signed, and yes
+ * they are in fact negative numbers.
+ * So don't put Us in it. Or Ls either.
+ * Otherwise there is no point having it, n'est pas ?
+ */
+static int db_extend[sizeof(long)+1] = { /* table for sign-extending */
+#if defined(__arch64__)
+       0,
+       0xFFFFFFFFFFFFFF80,
+       0xFFFFFFFFFFFF8000,
+       0xFFFFFFFFFF800000,
+       0xFFFFFFFF80000000,
+       0xFFFFFF8000000000,
+       0xFFFF800000000000,
+       0xFF80000000000000,
+       0x8000000000000000,
+#else /* !defined(__arch64__) */
+       0,
+       0xFFFFFF80,
+       0xFFFF8000,
+       0xFF800000,
+       0x80000000
+#endif /* defined(__arch64__) */
+};
+
 db_expr_t
 db_get_task_value(
        db_addr_t       addr,
@@ -82,9 +106,6 @@ db_get_task_value(
        char            data[sizeof(db_expr_t)];
        register db_expr_t value;
        register int    i;
-       uint64_t signx;
-
-       if(size == 0) return 0;
 
        db_read_bytes((vm_offset_t)addr, size, data, task);
 
@@ -97,13 +118,11 @@ db_get_task_value(
        {
            value = (value << 8) + (data[i] & 0xFF);
        }
-       
-       if(!is_signed) return value;
-       
-       signx = 0xFFFFFFFFFFFFFFFFULL << ((size << 3) - 1);
-        
-       if(value & signx) value |= signx;       /* Add 1s to front if sign bit is on */
-
+           
+       if (size <= sizeof(int)) {
+           if (is_signed && (value & db_extend[size]) != 0)
+               value |= db_extend[size];
+       }
        return (value);
 }
 
index 11885fa7f2ea56c3bc563829cc23d79ff4d2566d..89e92c114ed18a463229d3105a37b1856bba87cf 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7c02d170cd297cad5c8c54936c751b76a23bae38..05d507670b378b08d1a9dedeb281e25bea810441 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8b03e052d3128fc0e0666a25f5f76eee052123e7..28b9f4255aa8911e6ae3d68bc5a824be931453bd 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4eb4c2146e3e9a69fc7a9a69b87700d7ffd79324..4f7df3ec1263e87858da743a10a510843a291576 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -969,11 +966,7 @@ db_breakpoint_cmd(
              db_error("Invalid user space address\n");
            user_space = TRUE;
            db_printf("%#X is in user space\n", addr);
-#ifdef ppc
-           db_printf("kernel is from %#X to %#x\n", VM_MIN_KERNEL_ADDRESS, vm_last_addr);
-#else
            db_printf("kernel is from %#X to %#x\n", VM_MIN_KERNEL_ADDRESS, VM_MAX_KERNEL_ADDRESS);
-#endif
        }
        if (db_option(modif, 't') || task_bpt) {
            for (n = 0; db_get_next_act(&thr_act, n); n++) {
index c2aa6a5e7c1285e1f739d6e4cdb70b768b2662c5..2882408dddfbdf3a8078f8007e05a81a0392a331 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b49042ef746baca588163bb349435c94045f8532..b0cad757e7fc2fbd69926f556c801b20fac41687 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3dc1af9411e983116ba818ca42124dca9ada3c6b..788cb1eeb4ec400707df957c48a6aa8e6ae38b78 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -465,6 +462,7 @@ struct db_command db_show_cmds[] = {
        { "simple_lock", db_show_one_simple_lock,       0,      0 },
        { "thread_log", (db_func)db_show_thread_log,    0,      0 },
        { "shuttle",    db_show_shuttle,                0,      0 },
+       { "etap_log",   db_show_etap_log,               0,      0 },
        { (char *)0, }
 };
 
@@ -518,19 +516,14 @@ struct db_command db_command_table[] = {
 #if defined(__ppc__)
        { "lt",         db_low_trace,                   CS_MORE|CS_SET_DOT,     0 },
        { "dl",         db_display_long,                CS_MORE|CS_SET_DOT,     0 },
-       { "dc",         db_display_char,                CS_MORE|CS_SET_DOT,     0 },
        { "dr",         db_display_real,                CS_MORE|CS_SET_DOT,     0 },
        { "dv",         db_display_virtual,             CS_MORE|CS_SET_DOT,     0 },
        { "dm",         db_display_mappings,    CS_MORE|CS_SET_DOT,     0 },
-       { "dh",         db_display_hash,                CS_MORE|CS_SET_DOT,     0 },
        { "dp",         db_display_pmap,                CS_MORE,                        0 },
-       { "di",         db_display_iokit,               CS_MORE,                        0 },
        { "ds",         db_display_save,                CS_MORE|CS_SET_DOT,     0 },
        { "dx",         db_display_xregs,               CS_MORE|CS_SET_DOT,     0 },
        { "dk",         db_display_kmod,                CS_MORE,                        0 },
        { "gs",         db_gsnoop,                              CS_MORE,                        0 },
-       { "cm",         db_check_mappings,              CS_MORE,                        0 },
-       { "cp",         db_check_pmaps,                 CS_MORE,                        0 },
 #endif
        { (char *)0, }
 };
@@ -623,6 +616,16 @@ db_error(char *s)
 {
        extern int db_macro_level;
 
+#if defined(__alpha)
+#  if KDEBUG
+       extern boolean_t kdebug_mode;
+       if (kdebug_mode) {
+               if (s) kprintf(DBG_DEBUG, s);
+               return;
+       }
+#  endif /* KDEBUG */
+#endif /* defined(__alpha) */
+
        db_macro_level = 0;
        if (db_recover) {
            if (s > (char *)1)
@@ -648,11 +651,10 @@ db_fncall(void)
 {
        db_expr_t       fn_addr;
 #define        MAXARGS         11
-       uint32_t        args[MAXARGS];
-       db_expr_t argwork;
+       db_expr_t       args[MAXARGS];
        int             nargs = 0;
-       uint32_t        retval;
-       uint32_t        (*func)(uint32_t, ...);
+       db_expr_t       retval;
+       db_expr_t       (*func)(db_expr_t, ...);
        int             t;
 
        if (!db_expression(&fn_addr)) {
@@ -660,33 +662,31 @@ db_fncall(void)
            db_flush_lex();
            return;
        }
-       func = (uint32_t (*) (uint32_t, ...)) fn_addr;
+       func = (db_expr_t (*) (db_expr_t, ...)) fn_addr;
 
        t = db_read_token();
        if (t == tLPAREN) {
-           if (db_expression(&argwork)) {
-                       args[nargs] = (uint32_t)argwork;
-                       nargs++;
-                       while ((t = db_read_token()) == tCOMMA) {
-                               if (nargs == MAXARGS) {
-                                       db_printf("Too many arguments\n");
-                                       db_flush_lex();
-                                       return;
-                               }
-                               if (!db_expression(&argwork)) {
-                                       db_printf("Argument missing\n");
-                                       db_flush_lex();
-                                       return;
-                               }
-                               args[nargs] = (uint32_t)argwork;
-                               nargs++;
-                       }
-                       db_unread_token(t);
-           }
-           if (db_read_token() != tRPAREN) {
-                       db_printf("?\n");
+           if (db_expression(&args[0])) {
+               nargs++;
+               while ((t = db_read_token()) == tCOMMA) {
+                   if (nargs == MAXARGS) {
+                       db_printf("Too many arguments\n");
                        db_flush_lex();
                        return;
+                   }
+                   if (!db_expression(&args[nargs])) {
+                       db_printf("Argument missing\n");
+                       db_flush_lex();
+                       return;
+                   }
+                   nargs++;
+               }
+               db_unread_token(t);
+           }
+           if (db_read_token() != tRPAREN) {
+               db_printf("?\n");
+               db_flush_lex();
+               return;
            }
        }
        while (nargs < MAXARGS) {
index bb5142bea741a23023b6d8c055223b85c25d0850..9626a5091d5b1458f1cd9871ed6812d31a71ab31 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b22b3d76a8cda28600b51b2a04faab190558b1e6..f5aa3af0c764fd2c8674efaadfd64b4f3e9b55f8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2f930448a1c6301112c9be6f198edfee34839ec1..cb178648db01174f673530d185791fd5fb8426ff 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 93e4cce6722d529681f108223e4e37961b54705f..19a46186a0e41bf0db78455854b21370de55ba2d 100644 (file)
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 /*
  * @OSF_COPYRIGHT@
  */
+/*
+ * HISTORY
+ * 
+ * Revision 1.1.1.1  1998/09/22 21:05:47  wsanchez
+ * Import of Mac OS X kernel (~semeria)
+ *
+ * Revision 1.2  1998/04/24 19:34:23  semeria
+ * KDP and KDB support
+ *
+ * Revision 1.1.1.1  1998/03/07 02:26:09  wsanchez
+ * Import of OSF Mach kernel (~mburg)
+ *
+ * Revision 1.2.42.2  1997/09/12  17:15:15  stephen
+ *     make x/x do zero fill right justified hex display
+ *     [1997/09/12  16:31:04  stephen]
+ *
+ * Revision 1.2.42.1  1997/03/27  18:46:31  barbou
+ *     Add 'p' option to the "examine" command - values in
+ *     memory treated as addresses and rendered as sym+offset
+ *     [1995/12/29  21:32:33  mod]
+ *     ri-osc CR1560: make search command output address of any matching
+ *     data it finds (so user knows it did something).
+ *     [1995/09/20  15:24:55  bolinger]
+ *     [97/02/25            barbou]
+ * 
+ * Revision 1.2.25.5  1996/01/09  19:15:38  devrcs
+ *     Add db_print_loc() & db_print_inst() functions.
+ *     Make 'l' display 32 bits and new 'q' to display 64 bits.
+ *     Allow 'u' to display unsigned decimal values (same as 'U').
+ *     Changed declarations of 'register foo' to 'register int foo'.
+ *     [1995/12/01  21:42:03  jfraser]
+ * 
+ *     Merged '64-bit safe' changes from DEC alpha port.
+ *     [1995/11/21  18:02:58  jfraser]
+ * 
+ * Revision 1.2.25.4  1995/06/13  18:21:27  sjs
+ *     Merge with flipc_shared.
+ *     [95/05/22            sjs]
+ * 
+ * Revision 1.2.30.1  1995/04/03  17:35:17  randys
+ *     Minor change; allow a repeat count to work properly when multiple
+ *     modifier flags are given to the ddb 'x' command.  This allows,
+ *     for instance, examination of multiple words in activations other
+ *     than the current one.
+ *     [95/04/03            randys]
+ * 
+ * Revision 1.2.25.3  1995/01/06  19:10:09  devrcs
+ *     mk6 CR668 - 1.3b26 merge
+ *     * Revision 1.2.6.7  1994/05/06  18:39:09  tmt
+ *     Merged osc1.3dec/shared with osc1.3b19
+ *     Merge Alpha changes into osc1.312b source code.
+ *     64bit cleanup.
+ *     * End1.3merge
+ *     [1994/11/04  08:49:22  dwm]
+ * 
+ * Revision 1.2.25.2  1994/09/23  01:18:44  ezf
+ *     change marker to not FREE
+ *     [1994/09/22  21:09:44  ezf]
+ * 
+ * Revision 1.2.25.1  1994/06/11  21:11:43  bolinger
+ *     Merge up to NMK17.2.
+ *     [1994/06/11  20:01:31  bolinger]
+ * 
+ * Revision 1.2.23.1  1994/02/08  10:57:47  bernadat
+ *     Fixed output of an examine command to have a power of 2
+ *     number of fields.
+ *     [93/09/29            paire]
+ * 
+ *     Added dump of hexadecimal address in each line of examine command.
+ *     Fixed beginning of line to be always located at position 0.
+ *     [93/08/11            paire]
+ *     [94/02/07            bernadat]
+ * 
+ * Revision 1.2.21.4  1994/03/17  22:35:27  dwm
+ *     The infamous name change:  thread_activation + thread_shuttle = thread.
+ *     [1994/03/17  21:25:43  dwm]
+ * 
+ * Revision 1.2.21.3  1994/01/12  17:50:40  dwm
+ *     Coloc: initial restructuring to follow Utah model.
+ *     [1994/01/12  17:13:08  dwm]
+ * 
+ * Revision 1.2.21.2  1993/10/12  16:38:58  dwm
+ *     Print '\n' in x/s statements. [rwd]
+ *     [1993/10/12  16:14:41  dwm]
+ * 
+ * Revision 1.2.6.5  1993/08/11  20:37:37  elliston
+ *     Add ANSI Prototypes.  CR #9523.
+ *     [1993/08/11  03:33:05  elliston]
+ * 
+ * Revision 1.2.6.4  1993/08/09  19:34:42  dswartz
+ *     Add ANSI prototypes - CR#9523
+ *     [1993/08/06  15:47:32  dswartz]
+ * 
+ * Revision 1.2.6.3  1993/07/27  18:27:07  elliston
+ *     Add ANSI prototypes.  CR #9523.
+ *     [1993/07/27  18:11:21  elliston]
+ * 
+ * Revision 1.2.6.2  1993/06/09  02:20:00  gm
+ *     Added to OSF/1 R1.3 from NMK15.0.
+ *     [1993/06/02  20:56:10  jeffc]
+ * 
+ * Revision 1.2  1993/04/19  16:01:58  devrcs
+ *     Changes from mk78:
+ *     Added void type to functions that needed it.
+ *     Added init to 'size' in db_search_cmd(). Removed unused variables.
+ *     Other cleanup to quiet gcc warnings.
+ *     [92/05/16            jfriedl]
+ *     x/u now examines current user space. x/t still examines user
+ *     space of the the specified thread. x/tu is redundant.
+ *     To examine an value as unsigned decimal, use x/U.
+ *     [92/04/18            danner]
+ *     [93/02/02            bruel]
+ * 
+ *     Remember count argument when repeating commands instead of the
+ *     default command, also apply all the formats to current address
+ *     instead of incrementing addresses when switching to next format.
+ *     [barbou@gr.osf.org]
+ * 
+ *     Support 'A' format for print 'p' command [barbou@gr.osf.org]
+ *     [92/12/03            bernadat]
+ * 
+ * Revision 1.1  1992/09/30  02:01:01  robert
+ *     Initial revision
+ * 
+ * $EndLog$
+ */
+/* CMU_HIST */
+/*
+ * Revision 2.7  91/10/09  15:59:28  af
+ *      Revision 2.6.1.1  91/10/05  13:05:49  jeffreyh
+ *             Supported non current task space data examination and search.
+ *             Added 'm' format and db_xcdump to print with hex and characters.
+ *             Added db_examine_{forward, backward}.
+ *             Changed db_print_cmd to support variable number of parameters
+ *             including string constant.
+ *             Included "db_access.h".
+ *             [91/08/29            tak]
+ * 
+ * Revision 2.6.1.1  91/10/05  13:05:49  jeffreyh
+ *     Supported non current task space data examination and search.
+ *     Added 'm' format and db_xcdump to print with hex and characters.
+ *     Added db_examine_{forward, backward}.
+ *     Changed db_print_cmd to support variable number of parameters
+ *     including string constant.
+ *     Included "db_access.h".
+ *     [91/08/29            tak]
+ * 
+ * Revision 2.6  91/08/28  11:11:01  jsb
+ *     Added 'A' flag to examine: just like 'a' (address), but prints addr
+ *     as a procedure type, thus printing file/line info if available.
+ *     Useful when called as 'x/Ai'.
+ *     [91/08/13  18:14:55  jsb]
+ * 
+ * Revision 2.5  91/05/14  15:33:31  mrt
+ *     Correcting copyright
+ * 
+ * Revision 2.4  91/02/05  17:06:20  mrt
+ *     Changed to new Mach copyright
+ *     [91/01/31  16:17:37  mrt]
+ * 
+ * Revision 2.3  90/11/07  16:49:23  rpd
+ *     Added db_search_cmd, db_search.
+ *     [90/11/06            rpd]
+ * 
+ * Revision 2.2  90/08/27  21:50:38  dbg
+ *     Add 'r', 'z' to print and examine formats.
+ *     Change calling sequence of db_disasm.
+ *     db_examine sets db_prev and db_next instead of explicitly
+ *     advancing dot.
+ *     [90/08/20            dbg]
+ *     Reflected changes in db_printsym()'s calling seq.
+ *     [90/08/20            af]
+ *     Reduce lint.
+ *     [90/08/07            dbg]
+ *     Created.
+ *     [90/07/25            dbg]
+ * 
+ */
+/* CMU_ENDHIST */
 /* 
  * Mach Operating System
  * Copyright (c) 1991,1990 Carnegie Mellon University
@@ -269,10 +445,10 @@ db_examine(
                                        sizeof(db_expr_t), FALSE, task );
                                    db_find_task_sym_and_offset( value,
                                        &symName, &offset, task);
-                                   db_printf("\n\t*%8llX(%8llX) = %s",
+                                   db_printf("\n\t*%8x(%8X) = %s",
                                                next_addr, value, symName );
                                    if( offset )  {
-                                       db_printf("+%llX", offset );
+                                       db_printf("+%X", offset );
                                    }
                                    next_addr += size;
                                }
@@ -288,7 +464,7 @@ db_examine(
                                    value = db_get_task_value(next_addr,
                                                              sizeof (db_expr_t),
                                                              TRUE,task);
-                                   db_printf("%-*llr", width, value);
+                                   db_printf("%-*r", width, value);
                                    next_addr += sizeof (db_expr_t);
                                }
                                if (sz > 0) {
@@ -298,11 +474,13 @@ db_examine(
                                    }
                                    value = db_get_task_value(next_addr, sz,
                                                              TRUE, task);
-                                   db_printf("%-*llR", width, value);
+                                   db_printf("%-*R", width, value);
                                    next_addr += sz;
                                }
                                break;
+#ifdef APPLE
                            case 'X':   /* unsigned hex */
+#endif
                            case 'x':   /* unsigned hex */
                                for (sz = size, next_addr = addr;
                                     sz >= sizeof (db_expr_t);
@@ -314,10 +492,14 @@ db_examine(
                                    value = db_get_task_value(next_addr,
                                                              sizeof (db_expr_t),
                                                              FALSE,task);
+#ifdef APPLE
                                    if ( c == 'X')
-                                     db_printf("%0*llX ", 2*size, value);
+                                     db_printf("%0*X ", 2*size, value);
                                    else
-                                     db_printf("%-*llx", width, value);
+                                     db_printf("%-*x", width, value);
+#else
+                                   db_printf("%-*x", width, value);
+#endif
                                    next_addr += sizeof (db_expr_t);
                                }
                                if (sz > 0) {
@@ -327,10 +509,14 @@ db_examine(
                                    }
                                    value = db_get_task_value(next_addr, sz,
                                                              FALSE, task);
+#ifdef APPLE
                                    if ( c == 'X')
-                                     db_printf("%0*llX ", 2*size, value);
+                                     db_printf("%0*X ", 2*size, value);
                                    else
-                                     db_printf("%-*llX", width, value);
+                                     db_printf("%-*X", width, value);
+#else
+                                   db_printf("%-*X", width, value);
+#endif
                                    next_addr += sz;
                                }
                                break;
@@ -345,7 +531,7 @@ db_examine(
                                    value = db_get_task_value(next_addr,
                                                              sizeof (db_expr_t),
                                                              TRUE, task);
-                                   db_printf("%-*llz", width, value);
+                                   db_printf("%-*z", width, value);
                                    next_addr += sizeof (db_expr_t);
                                }
                                if (sz > 0) {
@@ -355,7 +541,7 @@ db_examine(
                                    }
                                    value = db_get_task_value(next_addr,sz,
                                                              TRUE,task);
-                                   db_printf("%-*llZ", width, value);
+                                   db_printf("%-*Z", width, value);
                                    next_addr += sz;
                                }
                                break;
@@ -370,7 +556,7 @@ db_examine(
                                    value = db_get_task_value(next_addr,
                                                              sizeof (db_expr_t),
                                                              TRUE,task);
-                                   db_printf("%-*lld", width, value);
+                                   db_printf("%-*d", width, value);
                                    next_addr += sizeof (db_expr_t);
                                }
                                if (sz > 0) {
@@ -380,7 +566,7 @@ db_examine(
                                    }
                                    value = db_get_task_value(next_addr, sz,
                                                              TRUE, task);
-                                   db_printf("%-*llD", width, value);
+                                   db_printf("%-*D", width, value);
                                    next_addr += sz;
                                }
                                break;
@@ -396,7 +582,7 @@ db_examine(
                                    value = db_get_task_value(next_addr,
                                                              sizeof (db_expr_t),
                                                              FALSE,task);
-                                   db_printf("%-*llu", width, value);
+                                   db_printf("%-*u", width, value);
                                    next_addr += sizeof (db_expr_t);
                                }
                                if (sz > 0) {
@@ -406,7 +592,7 @@ db_examine(
                                    }
                                    value = db_get_task_value(next_addr, sz,
                                                              FALSE, task);
-                                   db_printf("%-*llU", width, value);
+                                   db_printf("%-*U", width, value);
                                    next_addr += sz;
                                }
                                break;
@@ -421,7 +607,7 @@ db_examine(
                                    value = db_get_task_value(next_addr,
                                                              sizeof (db_expr_t),
                                                              FALSE,task);
-                                   db_printf("%-*llo", width, value);
+                                   db_printf("%-*o", width, value);
                                    next_addr += sizeof (db_expr_t);
                                }
                                if (sz > 0) {
@@ -431,7 +617,7 @@ db_examine(
                                    }
                                    value = db_get_task_value(next_addr, sz,
                                                              FALSE, task);
-                                   db_printf("%-*llo", width, value);
+                                   db_printf("%-*o", width, value);
                                    next_addr += sz;
                                }
                                break;
@@ -444,9 +630,9 @@ db_examine(
                                    if ((value >= ' ' && value <= '~') ||
                                        value == '\n' ||
                                        value == '\t')
-                                           db_printf("%llc", value);
+                                           db_printf("%c", value);
                                    else
-                                           db_printf("\\%03llo", value);
+                                           db_printf("\\%03o", value);
                                }
                                break;
                            case 's':   /* null-terminated string */
@@ -459,9 +645,9 @@ db_examine(
                                    if (value == 0)
                                        break;
                                    if (value >= ' ' && value <= '~')
-                                       db_printf("%llc", value);
+                                       db_printf("%c", value);
                                    else
-                                       db_printf("\\%03llo", value);
+                                       db_printf("\\%03o", value);
                                }
                                break;
                            case 'i':   /* instruction */
@@ -532,32 +718,29 @@ db_print_cmd(void)
                                 task);
                break;
            case 'r':
-               db_printf("%11llr", value);
-               break;
-           case 'X':
-               db_printf("%016llX", value);
+               db_printf("%11r", value);
                break;
            case 'x':
-               db_printf("%016llx", value);
+               db_printf("%08x", value);
                break;
            case 'z':
-               db_printf("%16llz", value);
+               db_printf("%8z", value);
                break;
            case 'd':
-               db_printf("%11lld", value);
+               db_printf("%11d", value);
                break;
            case 'u':
-               db_printf("%11llu", value);
+               db_printf("%11u", value);
                break;
            case 'o':
-               db_printf("%16llo", value);
+               db_printf("%16o", value);
                break;
            case 'c':
                value = value & 0xFF;
                if (value >= ' ' && value <= '~')
-                   db_printf("%llc", value);
+                   db_printf("%c", value);
                else
-                   db_printf("\\%03llo", value);
+                   db_printf("\\%03o", value);
                break;
            default:
                db_printf("Unknown format %c\n", db_print_format);
@@ -720,11 +903,11 @@ db_xcdump(
                db_printf("%s:\n", name);
                off = -1;
            }
-           db_printf("%0*llX:%s", 2*sizeof(db_addr_t), addr,
+           db_printf("%0*X:%s", 2*sizeof(db_addr_t), addr,
                                        (size != 1) ? " " : "" );
            bcount = ((n > DB_XCDUMP_NC)? DB_XCDUMP_NC: n);
-           if (trunc_page_32(addr) != trunc_page_32(addr+bcount-1)) {
-               db_addr_t next_page_addr = trunc_page_32(addr+bcount-1);
+           if (trunc_page(addr) != trunc_page(addr+bcount-1)) {
+               db_addr_t next_page_addr = trunc_page(addr+bcount-1);
                if (!DB_CHECK_ACCESS(next_page_addr, sizeof(int), task))
                    bcount = next_page_addr - addr;
            }
@@ -733,7 +916,7 @@ db_xcdump(
                if (i % 4 == 0)
                        db_printf(" ");
                value = db_get_task_value(addr, size, FALSE, task);
-               db_printf("%0*llX ", size*2, value);
+               db_printf("%0*x ", size*2, value);
                addr += size;
                db_find_task_sym_and_offset(addr, &name, &off, task);
            }
@@ -744,7 +927,7 @@ db_xcdump(
            db_printf("%s*", (size != 1)? " ": "");
            for (i = 0; i < bcount; i++) {
                value = data[i];
-               db_printf("%llc", (value >= ' ' && value <= '~')? value: '.');
+               db_printf("%c", (value >= ' ' && value <= '~')? value: '.');
            }
            db_printf("*\n");
        }
index dda92dc61c87483af7f2a8e4d5cdd67a4ecce992..e59698ed6a08591ab027efe124822d602e01067e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 28079f5a38e5ac3669d2e02189d7a4d512cb0388..d1a27e584c5f39df52c93dd617d353a28d00a6ba 100644 (file)
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 /*
  * @OSF_COPYRIGHT@
  */
+/*
+ * HISTORY
+ * 
+ * Revision 1.1.1.1  1998/09/22 21:05:48  wsanchez
+ * Import of Mac OS X kernel (~semeria)
+ *
+ * Revision 1.1.1.1  1998/03/07 02:26:09  wsanchez
+ * Import of OSF Mach kernel (~mburg)
+ *
+ * Revision 1.2.19.1  1997/03/27  18:46:35  barbou
+ *     ri-osc CR1561: make operators "logical and", "logical or"
+ *     lex correctly.
+ *     [1995/09/20  15:26:38  bolinger]
+ *     [97/02/25            barbou]
+ *
+ * Revision 1.2.10.2  1995/01/06  19:10:13  devrcs
+ *     mk6 CR668 - 1.3b26 merge
+ *     * Revision 1.2.3.5  1994/05/06  18:39:16  tmt
+ *     Merged osc1.3dec/shared with osc1.3b19
+ *     Merge Alpha changes into osc1.312b source code.
+ *     64bit cleanup.
+ *     * End1.3merge
+ *     [1994/11/04  08:49:27  dwm]
+ * 
+ * Revision 1.2.10.1  1994/09/23  01:19:06  ezf
+ *     change marker to not FREE
+ *     [1994/09/22  21:09:53  ezf]
+ * 
+ * Revision 1.2.3.3  1993/07/27  18:27:15  elliston
+ *     Add ANSI prototypes.  CR #9523.
+ *     [1993/07/27  18:11:36  elliston]
+ * 
+ * Revision 1.2.3.2  1993/06/09  02:20:06  gm
+ *     Added to OSF/1 R1.3 from NMK15.0.
+ *     [1993/06/02  20:56:16  jeffc]
+ * 
+ * Revision 1.2  1993/04/19  16:02:09  devrcs
+ *     Allow unprefixed (0x) hexadecimal constants starting by a letter:
+ *     unknown symbols are tentatively interpreted as hexadecimal constants,
+ *     and ambiguities are reported.
+ *     [93/03/24            barbou]
+ * 
+ *     Changes from mk78:
+ *     Removed unused variable from db_unary().
+ *     [92/05/16            jfriedl]
+ *     [93/02/02            bruel]
+ * 
+ *     Added string format arguments [barbou@gr.osf.org]
+ *     [92/12/03            bernadat]
+ * 
+ * Revision 1.1  1992/09/30  02:01:04  robert
+ *     Initial revision
+ * 
+ * $EndLog$
+ */
+/* CMU_HIST */
+/*
+ * Revision 2.5  91/10/09  15:59:46  af
+ *      Revision 2.4.3.1  91/10/05  13:06:04  jeffreyh
+ *             Added relational expression etc. to support condition expression.
+ *             Supported modifier after indirect expression to specify size,
+ *               sign extention and non current task space indirection.
+ *             Changed error messages to print more information.
+ *             [91/08/29            tak]
+ * 
+ * Revision 2.4.3.1  91/10/05  13:06:04  jeffreyh
+ *     Added relational expression etc. to support condition expression.
+ *     Supported modifier after indirect expression to specify size,
+ *       sign extention and non current task space indirection.
+ *     Changed error messages to print more information.
+ *     [91/08/29            tak]
+ * 
+ * Revision 2.4  91/05/14  15:33:45  mrt
+ *     Correcting copyright
+ * 
+ * Revision 2.3  91/02/05  17:06:25  mrt
+ *     Changed to new Mach copyright
+ *     [91/01/31  16:17:46  mrt]
+ * 
+ * Revision 2.2  90/08/27  21:50:57  dbg
+ *     Use '..' instead of '$$' for db_prev.
+ *     Use '+' for db_next.
+ *     [90/08/22            dbg]
+ * 
+ *     Allow repeated unary operators.
+ *     [90/08/20            dbg]
+ * 
+ *     Reflected back rename of db_symbol_value->db_value_of_name
+ *     [90/08/20            af]
+ *     Reduce lint.
+ *     [90/08/07            dbg]
+ *     Created.
+ *     [90/07/25            dbg]
+ * 
+ */
+/* CMU_ENDHIST */
 /* 
  * Mach Operating System
  * Copyright (c) 1991,1990 Carnegie Mellon University
@@ -369,7 +462,7 @@ db_shift_expr(db_expr_t *valuep)
                lhs <<= rhs;
            else {
                /* Shift right is unsigned */
-               lhs = (uint64_t) lhs >> rhs;
+               lhs = (natural_t) lhs >> rhs;
            }
            t = db_read_token();
        }
index 616837678aedea9f6a9ffdc666661041d4f4de8b..a57dca83b54d039869d9e22f20495e085e9223ec 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4549a76e63b6ad58a8c505a99a1f1ba0e48069ec..d055fbdeb4a33c47910854edc133d88f1fba63d8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -74,9 +71,6 @@
  *     Loads a symbol table for an external file into the kernel debugger.
  *     The symbol table data is an array of characters.  It is assumed that
  *     the caller and the kernel debugger agree on its format.
- *     This has never and will never be supported on MacOS X. The only reason I don't remove
- *     it entirely is that it is an exported symbol.
  */
 kern_return_t
 host_load_symbol_table(
@@ -86,5 +80,69 @@ host_load_symbol_table(
        pointer_t       symtab,
        mach_msg_type_number_t  symtab_count)
 {
+#if !MACH_DEBUG || !MACH_KDB
         return KERN_FAILURE;
+#else
+       kern_return_t   result;
+       vm_offset_t     symtab_start;
+       vm_offset_t     symtab_end;
+       vm_map_t        map;
+       vm_map_copy_t   symtab_copy_object;
+
+       if (host_priv == HOST_PRIV_NULL)
+           return (KERN_INVALID_ARGUMENT);
+
+       /*
+        * Copy the symbol table array into the kernel.
+        * We make a copy of the copy object, and clear
+        * the old one, so that returning error will not
+        * deallocate the data twice.
+        */
+       symtab_copy_object = (vm_map_copy_t) symtab;
+       result = vm_map_copyout(
+                       kernel_map,
+                       &symtab_start,
+                       vm_map_copy_copy(symtab_copy_object));
+       if (result != KERN_SUCCESS)
+           return (result);
+
+       symtab_end = symtab_start + symtab_count;
+
+       /*
+        * Add the symbol table.
+        * Do not keep a reference for the task map.    XXX
+        */
+       if (task == TASK_NULL)
+           map = VM_MAP_NULL;
+       else
+           map = task->map;
+       if (!X_db_sym_init((char *)symtab_start,
+                       (char *)symtab_end,
+                       name,
+                       (char *)map))
+       {
+           /*
+            * Not enough room for symbol table - failure.
+            */
+           (void) vm_deallocate(kernel_map,
+                       symtab_start,
+                       symtab_count);
+           return (KERN_FAILURE);
+       }
+
+       /*
+        * Wire down the symbol table
+        */
+       (void) vm_map_wire(kernel_map,
+               symtab_start,
+               round_page(symtab_end),
+               VM_PROT_READ|VM_PROT_WRITE, FALSE);
+
+       /*
+        * Discard the original copy object
+        */
+       vm_map_copy_discard(symtab_copy_object);
+
+       return (KERN_SUCCESS);
+#endif /* MACH_DEBUG && MACH_KDB */
 }
index 982c42d283e4a00e4e00f74723f10325de053d74..7283a4519cd429b538d7fee4f13f69b5385be4ed 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1330ddeb30c5278826a45da7498a6d30b6104971..c1a89bffdf8bfc156454235fa89fc29b9cdd87dd 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6c7343ce894d0e3dfc4c9248a9c8de6a8ef17e25..efafadfab2259ee36419b932f5b22691b82818a2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4e7814bc3384fa487433d748e0863d64efb845bd..6280d3f7b6a5e0b9195eb4df4b46391f9d7678df 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c82deb92d7887d5bd4e055233176ab0b23468fed..84e69782cb0c1b76488cfc1b4b9ab2787784e7ad 100644 (file)
@@ -3,28 +3,99 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 /*
  * @OSF_COPYRIGHT@
  */
+/*
+ * HISTORY
+ * 
+ * Revision 1.1.1.1  1998/09/22 21:05:48  wsanchez
+ * Import of Mac OS X kernel (~semeria)
+ *
+ * Revision 1.1.1.1  1998/03/07 02:26:09  wsanchez
+ * Import of OSF Mach kernel (~mburg)
+ *
+ * Revision 1.2.10.4  1996/01/09  19:15:54  devrcs
+ *     Change 'register foo' to 'register int foo'.
+ *     [1995/12/01  21:42:14  jfraser]
+ *
+ *     Merged '64-bit safe' changes from DEC alpha port.
+ *     [1995/11/21  18:03:15  jfraser]
+ *
+ * Revision 1.2.10.3  1995/01/06  19:10:28  devrcs
+ *     mk6 CR668 - 1.3b26 merge
+ *     fix typing
+ *     [1994/11/04  08:49:38  dwm]
+ * 
+ * Revision 1.2.10.2  1994/09/23  01:20:19  ezf
+ *     change marker to not FREE
+ *     [1994/09/22  21:10:23  ezf]
+ * 
+ * Revision 1.2.10.1  1994/06/11  21:11:52  bolinger
+ *     Merge up to NMK17.2.
+ *     [1994/06/11  20:01:51  bolinger]
+ * 
+ * Revision 1.2.8.1  1994/02/08  10:58:03  bernadat
+ *     Fixed reinitialization of db_macro_level to -1.
+ *     Put DB_MACRO_LEVEL and DB_NARGS macros to <ddb/db_variables.h>.
+ *     Changed name of DB_NARGS to DB_MACRO_NARGS.
+ *     Added support of DB_VAR_SHOW.
+ *     [93/08/12            paire]
+ *     [94/02/07            bernadat]
+ * 
+ * Revision 1.2.2.4  1993/08/11  20:37:58  elliston
+ *     Add ANSI Prototypes.  CR #9523.
+ *     [1993/08/11  03:33:33  elliston]
+ * 
+ * Revision 1.2.2.3  1993/07/27  18:27:42  elliston
+ *     Add ANSI prototypes.  CR #9523.
+ *     [1993/07/27  18:12:24  elliston]
+ * 
+ * Revision 1.2.2.2  1993/06/09  02:20:18  gm
+ *     Added to OSF/1 R1.3 from NMK15.0.
+ *     [1993/06/02  20:56:40  jeffc]
+ * 
+ * Revision 1.2  1993/04/19  16:02:25  devrcs
+ *     Changes from mk78:
+ *     Removed unused variable from db_exec_macro().
+ *     Added include of <ddb/db_command.h>.
+ *     [92/05/16            jfriedl]
+ *     [93/02/02            bruel]
+ * 
+ * Revision 1.1  1992/09/30  02:01:12  robert
+ *     Initial revision
+ * 
+ * $EndLog$
+ */
+/* CMU_HIST */
+/*
+ * Revision 2.2  91/10/09  16:01:09  af
+ *      Revision 2.1.3.1  91/10/05  13:06:40  jeffreyh
+ *             Created for macro support.
+ *             [91/08/29            tak]
+ * 
+ * Revision 2.1.3.1  91/10/05  13:06:40  jeffreyh
+ *     Created for macro support.
+ *     [91/08/29            tak]
+ * 
+ */
+/* CMU_ENDHIST */
 /* 
  * Mach Operating System
  * Copyright (c) 1991,1990 Carnegie Mellon University
@@ -204,7 +275,7 @@ db_arg_variable(
 
        if (flag == DB_VAR_SHOW) {
            value = db_macro_args[ap->hidden_level][ap->suffix[0]-1];
-           db_printf("%#lln", value);
+           db_printf("%#n", value);
            db_find_xtrn_task_sym_and_offset(value, &name, &offset, TASK_NULL);
            if (name != (char *)0 && offset <= db_maxoff && offset != value) {
                db_printf("\t%s", name);
index 6c6b33f9b0d47eab030d004f1a9e01be368053f6..ecd0dbed8c6bd51573321728693934ff90b2b002 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 972b0e6d86a8d08ee6a035d10711dfe6d926464c..e98eb0757ab6058fda817142b90d6d50bdd71aa9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -85,7 +82,7 @@
  */
 
 #ifndef        DB_MAX_LINE
-#define        DB_MAX_LINE             43      /* maximum line */
+#define        DB_MAX_LINE             24      /* maximum line */
 #define DB_MAX_WIDTH           132     /* maximum width */
 #endif /* DB_MAX_LINE */
 
@@ -147,6 +144,10 @@ db_more(void)
        register  char *p;
        boolean_t quit_output = FALSE;
 
+#if defined(__alpha)
+       extern boolean_t kdebug_mode;
+       if (kdebug_mode) return;
+#endif /* defined(__alpha) */
        for (p = "--db_more--"; *p; p++)
            cnputc(*p);
        switch(cngetc()) {
@@ -288,6 +289,9 @@ db_printf(char *fmt, ...)
 {
        va_list listp;
 
+#ifdef luna88k
+       db_printing();
+#endif
        va_start(listp, fmt);
        _doprnt(fmt, &listp, db_putchar, db_radix);
        va_end(listp);
@@ -336,7 +340,9 @@ void
 db_output_prompt(void)
 {
        db_printf("db%s", (db_default_act) ? "t": "");
+#if    NCPUS > 1
        db_printf("{%d}", cpu_number());
+#endif
        db_printf("> ");
 }
 
index 6d3d0c04c4fbd48170d3f3475fb026b3cc095ef0..c1a3989356195fa1110a493be17d783731687f15 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0cf93a62d54740ad9047a44cf8a6cb5564ea59ee..0dcca6f3a6d79da38429a816f47e85fde8b35d41 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -190,7 +187,7 @@ db_show_regs(
                                12-strlen(regp->name)-((i<10)?1:2), "");
                else
                    db_printf("%-12s", regp->name);
-               db_printf("%#*llN", 2+2*sizeof(db_expr_t), value);
+               db_printf("%#*N", 2+2*sizeof(vm_offset_t), value);
                db_find_xtrn_task_sym_and_offset((db_addr_t)value, &name, 
                                                        &offset, task);
                if (name != 0 && offset <= db_maxoff && offset != value) {
@@ -722,7 +719,7 @@ db_show_one_act(
            thr_act = (thread_act_t) addr;
 
        if ((act_id = db_lookup_act(thr_act)) < 0) {
-           db_printf("bad thr_act address %#llX\n", addr);
+           db_printf("bad thr_act address %#x\n", addr);
            db_error(0);
            /*NOTREACHED*/
        }
@@ -774,7 +771,7 @@ db_show_one_task(
            task = (task_t) addr;
 
        if ((task_id = db_lookup_task(task)) < 0) {
-           db_printf("bad task address 0x%llX\n", addr);
+           db_printf("bad task address 0x%x\n", addr);
            db_error(0);
            /*NOTREACHED*/
        }
@@ -972,7 +969,7 @@ db_show_port_id(
        } else
            thr_act = (thread_act_t) addr;
        if (db_lookup_act(thr_act) < 0) {
-           db_printf("Bad thr_act address 0x%llX\n", addr);
+           db_printf("Bad thr_act address 0x%x\n", addr);
            db_error(0);
            /*NOTREACHED*/
        }
index 101c70c3cb2c19ab234dd466e8e300ca1727290d..e3e622889a3d572c3fb41f5f57b3e10fd4a61484 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e70571169648a38138805366c81dd0db4d879564..d0898f80c7f06868fef02a45174356385de926ab 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1e048fba4778538d0b3c5a1726230d1292d8d02a..a3544402dd9d244961fc262e96481a6530e8b463 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2578ef347e5706dc576a94548c33cec324f8ebad..1e8bd1dbcb523f27f3bcb7dd8b64e8fc7c389be4 100644 (file)
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 /*
  * @OSF_COPYRIGHT@
  */
+/*
+ * HISTORY
+ * 
+ * Revision 1.1.1.1  1998/09/22 21:05:48  wsanchez
+ * Import of Mac OS X kernel (~semeria)
+ *
+ * Revision 1.1.1.1  1998/03/07 02:26:09  wsanchez
+ * Import of OSF Mach kernel (~mburg)
+ *
+ * Revision 1.3.22.8  1996/07/31  09:07:24  paire
+ *     Merged with nmk20b7_shared (1.3.47.1)
+ *     [96/07/24            paire]
+ *
+ * Revision 1.3.47.1  1996/06/13  12:36:08  bernadat
+ *     Do not assume anymore that VM_MIN_KERNEL_ADDRESS
+ *     is greater or equal than VM_MAX_ADDRESS.
+ *     [96/05/23            bernadat]
+ * 
+ * Revision 1.3.22.7  1996/01/09  19:16:15  devrcs
+ *     Added db_task_getlinenum() function. (steved)
+ *     Make db_maxval & db_minval long int's for Alpha.
+ *     Changed declarations of 'register foo' to 'register int foo'.
+ *     [1995/12/01  21:42:29  jfraser]
+ * 
+ *     Merged '64-bit safe' changes from DEC alpha port.
+ *     [1995/11/21  18:03:41  jfraser]
+ * 
+ * Revision 1.3.22.6  1995/02/28  01:58:46  dwm
+ *     Merged with changes from 1.3.22.5
+ *     [1995/02/28  01:53:47  dwm]
+ * 
+ *     mk6 CR1120 - Merge mk6pro_shared into cnmk_shared
+ *     remove a couple local protos, now in .h file (for better or worse)
+ *     [1995/02/28  01:12:51  dwm]
+ * 
+ * Revision 1.3.22.5  1995/02/23  21:43:43  alanl
+ *     Move TR_INIT to model_dep.c (MACH_TR and MACH_KDB shouldn't
+ *     be bound).
+ *     [95/02/16            travos]
+ * 
+ *     Prepend a "db_" to qsort and qsort_limit_search
+ *     (collisions with the real qsort in stdlib.h)
+ *     [95/02/14            travos]
+ * 
+ *     Added X_db_init for object independent formats.
+ *     [95/01/24            sjs]
+ * 
+ *     Merge with DIPC2_SHARED.
+ *     [1995/01/05  13:32:53  alanl]
+ * 
+ * Revision 1.3.30.2  1994/12/22  20:36:15  bolinger
+ *     Fix ri-osc CR881:  enable freer use of symbol table of collocated
+ *     tasks.  No point in requiring task to be named for symbols to be
+ *     usable.  Also fixed glitch in use of symtab cloning.
+ *     [1994/12/22  20:34:55  bolinger]
+ * 
+ * Revision 1.3.30.1  1994/11/04  09:53:14  dwm
+ *     mk6 CR668 - 1.3b26 merge
+ *     add arg to *_db_search_by_addr() from mk6
+ *     * Revision 1.3.4.9  1994/05/13  15:57:14  tmt
+ *     Add hooks for catching calls to uninstalled symbol tables.
+ *     Add XXX_search_by_addr() vectors.
+ *     * Revision 1.3.4.8  1994/05/12  21:59:00  tmt
+ *     Fix numerous db_sym_t/char * mixups.
+ *     Fix and enable db_qualify_ambiguous_names.
+ *     Make dif and newdiff unsigned in symbol searches.
+ *     * Revision 1.3.4.7  1994/05/06  18:39:52  tmt
+ *     Merged osc1.3dec/shared with osc1.3b19
+ *     Fix function prototype declarations.
+ *     Merge Alpha changes into osc1.312b source code.
+ *     String protos.
+ *     Handle multiple, coexisting symbol table types.
+ *     64bit cleanup.
+ *     Revision 1.3.4.5  1993/10/20  18:58:55  gm
+ *     CR9704: Removed symbol load printf.
+ *     * End1.3merge
+ *     [1994/11/04  08:50:02  dwm]
+ * 
+ * Revision 1.3.22.5  1995/02/23  21:43:43  alanl
+ *     Move TR_INIT to model_dep.c (MACH_TR and MACH_KDB shouldn't
+ *     be bound).
+ *     [95/02/16            travos]
+ * 
+ *     Prepend a "db_" to qsort and qsort_limit_search
+ *     (collisions with the real qsort in stdlib.h)
+ *     [95/02/14            travos]
+ * 
+ *     Added X_db_init for object independent formats.
+ *     [95/01/24            sjs]
+ * 
+ *     Merge with DIPC2_SHARED.
+ *     [1995/01/05  13:32:53  alanl]
+ * 
+ * Revision 1.3.30.2  1994/12/22  20:36:15  bolinger
+ *     Fix ri-osc CR881:  enable freer use of symbol table of collocated
+ *     tasks.  No point in requiring task to be named for symbols to be
+ *     usable.  Also fixed glitch in use of symtab cloning.
+ *     [1994/12/22  20:34:55  bolinger]
+ * 
+ * Revision 1.3.30.1  1994/11/04  09:53:14  dwm
+ *     mk6 CR668 - 1.3b26 merge
+ *     add arg to *_db_search_by_addr() from mk6
+ *     * Revision 1.3.4.9  1994/05/13  15:57:14  tmt
+ *     Add hooks for catching calls to uninstalled symbol tables.
+ *     Add XXX_search_by_addr() vectors.
+ *     * Revision 1.3.4.8  1994/05/12  21:59:00  tmt
+ *     Fix numerous db_sym_t/char * mixups.
+ *     Fix and enable db_qualify_ambiguous_names.
+ *     Make dif and newdiff unsigned in symbol searches.
+ *     * Revision 1.3.4.7  1994/05/06  18:39:52  tmt
+ *     Merged osc1.3dec/shared with osc1.3b19
+ *     Fix function prototype declarations.
+ *     Merge Alpha changes into osc1.312b source code.
+ *     String protos.
+ *     Handle multiple, coexisting symbol table types.
+ *     64bit cleanup.
+ *     Revision 1.3.4.5  1993/10/20  18:58:55  gm
+ *     CR9704: Removed symbol load printf.
+ *     * End1.3merge
+ *     [1994/11/04  08:50:02  dwm]
+ * 
+ * Revision 1.3.22.3  1994/09/23  01:21:37  ezf
+ *     change marker to not FREE
+ *     [1994/09/22  21:10:58  ezf]
+ * 
+ * Revision 1.3.22.2  1994/06/26  22:58:24  bolinger
+ *     Suppress symbol table range output when table is unsorted, since output
+ *     is meaningless in this case.
+ *     [1994/06/23  20:19:02  bolinger]
+ * 
+ * Revision 1.3.22.1  1994/06/11  21:12:19  bolinger
+ *     Merge up to NMK17.2.
+ *     [1994/06/11  20:02:31  bolinger]
+ * 
+ * Revision 1.3.17.1  1994/02/08  10:58:40  bernadat
+ *     Check result of X_db_line_at_pc() before
+ *     invoking db_shorten_filename().
+ *     [93/11/30            bernadat]
+ * 
+ *     Installed ddb_init() routine in a symbol-independent file to call
+ *     symbol-dependent and machine-dependent initialization routines.
+ *     [93/08/27            paire]
+ * 
+ *     Fixed db_shorten_filename() to gobble the last slash.
+ *     Modified db_search_task_symbol_and_line() interface to return
+ *     the number of a function arguments.
+ *     [93/08/19            paire]
+ * 
+ *     Added new arguments to db_sym_print_completion() call.
+ *     [93/08/18            paire]
+ * 
+ *     Added db_lookup_incomplete(), db_sym_parse_and_lookup_incomplete(),
+ *     db_sym_print_completion() and db_completion_print() for support of
+ *     symbol completion.
+ *     [93/08/14            paire]
+ *     [94/02/07            bernadat]
+ * 
+ * Revision 1.3.15.4  1994/06/08  19:11:23  dswartz
+ *     Preemption merge.
+ *     [1994/06/08  19:10:24  dswartz]
+ * 
+ * Revision 1.3.20.2  1994/06/01  21:34:39  klj
+ *     Initial preemption code base merge
+ * 
+ * Revision 1.3.15.3  1994/02/10  02:28:15  bolinger
+ *     Fix db_add_symbol_table() to increase db_maxval if highest-addressed
+ *     symbol in new symtab is greater than its current value.
+ *     [1994/02/09  21:42:12  bolinger]
+ * 
+ * Revision 1.3.15.2  1994/02/03  21:44:23  bolinger
+ *     Update db_maxval when a symbol table is cloned for kernel-loaded
+ *     server.
+ *     [1994/02/03  20:47:22  bolinger]
+ * 
+ * Revision 1.3.15.1  1994/02/03  02:41:58  dwm
+ *     Add short-term kludge to provide symbolic info on INKServer.
+ *     [1994/02/03  02:31:17  dwm]
+ * 
+ * Revision 1.3.4.4  1993/08/11  20:38:11  elliston
+ *     Add ANSI Prototypes.  CR #9523.
+ *     [1993/08/11  03:33:59  elliston]
+ * 
+ * Revision 1.3.4.3  1993/07/27  18:28:09  elliston
+ *     Add ANSI prototypes.  CR #9523.
+ *     [1993/07/27  18:12:57  elliston]
+ * 
+ * Revision 1.3.4.2  1993/06/09  02:20:50  gm
+ *     CR9176 - ANSI C violations: trailing tokens on CPP
+ *     directives, extra semicolons after decl_ ..., asm keywords
+ *     [1993/06/07  18:57:31  jeffc]
+ * 
+ *     Added to OSF/1 R1.3 from NMK15.0.
+ *     [1993/06/02  20:57:10  jeffc]
+ * 
+ * Revision 1.3  1993/04/19  16:03:09  devrcs
+ *     Protect db_line_at_pc() against null db_last_symtab.
+ *     [1993/02/11  15:37:16  barbou]
+ * 
+ *     Changes from MK78:
+ *     Upped MAXNOSYMTABS from 3 to 5. Now there is space for kernel,
+ *      bootstrap, server, and emulator symbols - plus one for future
+ *      expansion.
+ *     [92/03/21            danner]
+ *     Changed CHAR arg of db_eqname to UNSIGNED.
+ *     Made arg types proper for db_line_at_pc().
+ *     [92/05/16            jfriedl]
+ *     [92/12/18            bruel]
+ * 
+ *     Sort large symbol tables to speedup lookup.
+ *     Improved symbol lookup (use of max_offset, dichotomic search)
+ *     [barbou@gr.osf.org]
+ * 
+ *     db_add_symbol_table now takes 3 additional arguments. Machine
+ *     dependant modules must provide them. [barbou@gr.osf.org]
+ *     [92/12/03            bernadat]
+ * 
+ * Revision 1.2  1992/11/25  01:04:42  robert
+ *     integrate changes below for norma_14
+ *     [1992/11/13  19:22:44  robert]
+ * 
+ * Revision 1.1  1992/09/30  02:01:25  robert
+ *     Initial revision
+ * 
+ * $EndLog$
+ */
+/* CMU_HIST */
+/*
+ * Revision 2.10.4.1  92/02/18  18:38:53  jeffreyh
+ *     Added db_get_sym(). Simple interface to get symbol names
+ *     knowing the offset.
+ *     [91/12/20            bernadat]
+ * 
+ *     Do not look for symbol names if address
+ *     is to small or to large, otherwise get
+ *     random names like INCLUDE_VERSION+??
+ *     [91/06/25            bernadat]
+ * 
+ * Revision 2.10  91/10/09  16:02:30  af
+ *      Revision 2.9.2.1  91/10/05  13:07:27  jeffreyh
+ *             Changed symbol table name qualification syntax from "xxx:yyy"
+ *               to "xxx::yyy" to allow "file:func:line" in "yyy" part.
+ *                    "db_sym_parse_and_lookup" is also added for "yyy" part parsing.
+ *             Replaced db_search_symbol with db_search_task_symbol, and moved
+ *               it to "db_sym.h" as a macro.
+ *             Added db_task_printsym, and changed db_printsym to call it.
+ *             Added include "db_task_thread.h".
+ *             Fixed infinite recursion of db_symbol_values.
+ *             [91/08/29            tak]
+ * 
+ * Revision 2.9.2.1  91/10/05  13:07:27  jeffreyh
+ *     Changed symbol table name qualification syntax from "xxx:yyy"
+ *       to "xxx::yyy" to allow "file:func:line" in "yyy" part.
+ *            "db_sym_parse_and_lookup" is also added for "yyy" part parsing.
+ *     Replaced db_search_symbol with db_search_task_symbol, and moved
+ *       it to "db_sym.h" as a macro.
+ *     Added db_task_printsym, and changed db_printsym to call it.
+ *     Added include "db_task_thread.h".
+ *     Fixed infinite recursion of db_symbol_values.
+ *     [91/08/29            tak]
+ * 
+ * Revision 2.9  91/07/31  17:31:14  dbg
+ *     Add task pointer and space for string storage to symbol table
+ *     descriptor.
+ *     [91/07/31            dbg]
+ * 
+ * Revision 2.8  91/07/09  23:16:08  danner
+ *     Changed a printf.
+ *     [91/07/08            danner]
+ * 
+ * Revision 2.7  91/05/14  15:35:54  mrt
+ *     Correcting copyright
+ * 
+ * Revision 2.6  91/03/16  14:42:40  rpd
+ *     Changed the default db_maxoff to 4K.
+ *     [91/03/10            rpd]
+ * 
+ * Revision 2.5  91/02/05  17:07:07  mrt
+ *     Changed to new Mach copyright
+ *     [91/01/31  16:19:17  mrt]
+ * 
+ * Revision 2.4  90/10/25  14:44:05  rwd
+ *     Changed db_printsym to print unsigned.
+ *     [90/10/19            rpd]
+ * 
+ * Revision 2.3  90/09/09  23:19:56  rpd
+ *     Avoid totally incorrect guesses of symbol names for small values.
+ *     [90/08/30  17:39:48  af]
+ * 
+ * Revision 2.2  90/08/27  21:52:18  dbg
+ *     Removed nlist.h.  Fixed some type declarations.
+ *     Qualifier character is ':'.
+ *     [90/08/20            dbg]
+ *     Modularized symtab info into a new db_symtab_t type.
+ *     Modified db_add_symbol_table  and others accordingly.
+ *     Defined db_sym_t, a new (opaque) type used to represent
+ *     symbols.  This should support all sort of future symtable
+ *     formats. Functions like db_qualify take a db_sym_t now.
+ *     New db_symbol_values() function to explode the content
+ *     of a db_sym_t.
+ *     db_search_symbol() replaces db_find_sym_and_offset(), which is
+ *     now a macro defined in our (new) header file.  This new
+ *     function accepts more restrictive searches, which are
+ *     entirely delegated to the symtab-specific code.
+ *     Accordingly, db_printsym() accepts a strategy parameter.
+ *     New db_line_at_pc() function.
+ *     Renamed misleading db_eqsym into db_eqname.
+ *     [90/08/20  10:47:06  af]
+ * 
+ *     Created.
+ *     [90/07/25            dbg]
+ * 
+ * Revision 2.1  90/07/26  16:43:52  dbg
+ * Created.
+ * 
+ */
+/* CMU_ENDHIST */
 /* 
  * Mach Operating System
  * Copyright (c) 1991,1990 Carnegie Mellon University
@@ -1319,7 +1632,7 @@ db_clone_symtabXXX(
        }
                                        /* alloc new symbols            */
        size = (vm_size_t)(st_src->end - st_src->private);
-       memp = (char *)kalloc( round_page_32(size) );
+       memp = (char *)kalloc( round_page(size) );
        if (!memp) {
            db_printf("db_clone_symtab: no memory for symtab\n");
            return;
index 672588d861077dea7d1bdd83ef2364abf6d86c51..e5d19a4d977245933d35b56494bdd2e43c43a10c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e01b03f2faafc00bed9fb25a8bff4d12bff6fd6d..cf8f37ea49567abc73bfdc1368b169545738feec 100644 (file)
@@ -3,28 +3,94 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 /*
  * @OSF_COPYRIGHT@
  */
+/*
+ * HISTORY
+ * 
+ * Revision 1.1.1.1  1998/09/22 21:05:48  wsanchez
+ * Import of Mac OS X kernel (~semeria)
+ *
+ * Revision 1.1.1.1  1998/03/07 02:26:09  wsanchez
+ * Import of OSF Mach kernel (~mburg)
+ *
+ * Revision 1.1.16.3  1996/01/09  19:16:26  devrcs
+ *     Make db_lookup_task_id() globally available (remove static).
+ *     Changed declarations of 'register foo' to 'register int foo'.
+ *     [1995/12/01  21:42:37  jfraser]
+ *
+ *     Merged '64-bit safe' changes from DEC alpha port.
+ *     [1995/11/21  18:03:48  jfraser]
+ *
+ * Revision 1.1.16.2  1994/09/23  01:21:59  ezf
+ *     change marker to not FREE
+ *     [1994/09/22  21:11:09  ezf]
+ * 
+ * Revision 1.1.16.1  1994/06/11  21:12:29  bolinger
+ *     Merge up to NMK17.2.
+ *     [1994/06/11  20:02:43  bolinger]
+ * 
+ * Revision 1.1.14.1  1994/02/08  10:59:02  bernadat
+ *     Added support of DB_VAR_SHOW.
+ *     [93/08/12            paire]
+ *     [94/02/08            bernadat]
+ * 
+ * Revision 1.1.12.3  1994/03/17  22:35:35  dwm
+ *     The infamous name change:  thread_activation + thread_shuttle = thread.
+ *     [1994/03/17  21:25:50  dwm]
+ * 
+ * Revision 1.1.12.2  1994/01/17  18:08:54  dwm
+ *     Add patchable integer force_act_lookup to force successful
+ *     lookup, to allow stack trace on orphaned act/thread pairs.
+ *     [1994/01/17  16:06:50  dwm]
+ * 
+ * Revision 1.1.12.1  1994/01/12  17:50:52  dwm
+ *     Coloc: initial restructuring to follow Utah model.
+ *     [1994/01/12  17:13:23  dwm]
+ * 
+ * Revision 1.1.3.3  1993/07/27  18:28:15  elliston
+ *     Add ANSI prototypes.  CR #9523.
+ *     [1993/07/27  18:13:06  elliston]
+ * 
+ * Revision 1.1.3.2  1993/06/02  23:12:39  jeffc
+ *     Added to OSF/1 R1.3 from NMK15.0.
+ *     [1993/06/02  20:57:24  jeffc]
+ * 
+ * Revision 1.1  1992/09/30  02:01:27  robert
+ *     Initial revision
+ * 
+ * $EndLog$
+ */
+/* CMU_HIST */
+/*
+ * Revision 2.2  91/10/09  16:03:04  af
+ *      Revision 2.1.3.1  91/10/05  13:07:50  jeffreyh
+ *             Created for task/thread handling.
+ *             [91/08/29            tak]
+ * 
+ * Revision 2.1.3.1  91/10/05  13:07:50  jeffreyh
+ *     Created for task/thread handling.
+ *     [91/08/29            tak]
+ * 
+ */
+/* CMU_ENDHIST */
 /* 
  * Mach Operating System
  * Copyright (c) 1991,1990 Carnegie Mellon University
index 398e2c270fe86261cb8e6f6c815d53395cc0a00c..d558ba5434d5975946dda03851378c62f67626ca 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 128e966161075c9633e3248d72daff45852a9110..2fcca75ba689a15661f9d687344d174b5d056329 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 435759a3e7546ff1341e1b0eb308e2272c042188..60fad74b394b48c05ca33c4dab331d57e4355be1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b30a422215095f2d0ef61a5459a98ed0366c016c..8e45a4a4294436ddab530d765ccd0bd3f8377c5f 100644 (file)
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 /*
  * @OSF_COPYRIGHT@
  */
+/*
+ * HISTORY
+ * 
+ * Revision 1.1.1.1  1998/09/22 21:05:48  wsanchez
+ * Import of Mac OS X kernel (~semeria)
+ *
+ * Revision 1.1.1.1  1998/03/07 02:26:09  wsanchez
+ * Import of OSF Mach kernel (~mburg)
+ *
+ * Revision 1.2.18.5  1996/01/09  19:16:34  devrcs
+ *     Search the alternate register names if configured
+ *     Changed declarations of 'register foo' to 'register int foo'.
+ *     [1995/12/01  21:42:42  jfraser]
+ *
+ *     Merged '64-bit safe' changes from DEC alpha port.
+ *     [1995/11/21  18:03:56  jfraser]
+ *
+ * Revision 1.2.18.4  1995/02/23  21:43:56  alanl
+ *     Merged with DIPC2_SHARED.
+ *     [1995/01/05  13:35:55  alanl]
+ * 
+ * Revision 1.2.21.1  1994/11/04  09:53:26  dwm
+ *     mk6 CR668 - 1.3b26 merge
+ *     * Revision 1.2.4.6  1994/05/06  18:40:13  tmt
+ *     Merged osc1.3dec/shared with osc1.3b19
+ *     Merge Alpha changes into osc1.312b source code.
+ *     64bit cleanup.
+ *     * End1.3merge
+ *     [1994/11/04  08:50:12  dwm]
+ * 
+ * Revision 1.2.18.2  1994/09/23  01:22:35  ezf
+ *     change marker to not FREE
+ *     [1994/09/22  21:11:24  ezf]
+ * 
+ * Revision 1.2.18.1  1994/06/11  21:12:37  bolinger
+ *     Merge up to NMK17.2.
+ *     [1994/06/11  20:03:04  bolinger]
+ * 
+ * Revision 1.2.23.1  1994/12/06  19:43:18  alanl
+ *     Intel merge, Oct 94 code drop.
+ *     Added db_find_reg_name (came from db_print.c).
+ *     [94/11/28            mmp]
+ * 
+ * Revision 1.2.16.1  1994/02/08  10:59:08  bernadat
+ *     Added completion variable.
+ *     [93/08/17            paire]
+ * 
+ *     Set up new fields (hidden_xxx) of db_vars[] array that are supposed
+ *     to be helpful to display variables depending on an internal value
+ *     like db_macro_level for macro arguments.
+ *     Added db_auto_wrap as new variable.
+ *     Added "set help" for listing all available variables.
+ *     Added db_show_variable() and db_show_one_variable()
+ *     to print variable values.
+ *     [93/08/12            paire]
+ *     [94/02/08            bernadat]
+ * 
+ * Revision 1.2.4.4  1993/08/11  20:38:20  elliston
+ *     Add ANSI Prototypes.  CR #9523.
+ *     [1993/08/11  03:34:13  elliston]
+ * 
+ * Revision 1.2.4.3  1993/07/27  18:28:27  elliston
+ *     Add ANSI prototypes.  CR #9523.
+ *     [1993/07/27  18:13:22  elliston]
+ * 
+ * Revision 1.2.4.2  1993/06/09  02:21:02  gm
+ *     Added to OSF/1 R1.3 from NMK15.0.
+ *     [1993/06/02  20:57:43  jeffc]
+ * 
+ * Revision 1.2  1993/04/19  16:03:25  devrcs
+ *     Changes from mk78:
+ *     Added void to db_read_write_variable().
+ *     Removed unused variable 'func' from db_set_cmd().
+ *     [92/05/16            jfriedl]
+ *     [93/02/02            bruel]
+ * 
+ *     Print old value when changing register values.
+ *     [barbou@gr.osf.org]
+ *     [92/12/03            bernadat]
+ * 
+ * Revision 1.1  1992/09/30  02:01:31  robert
+ *     Initial revision
+ * 
+ * $EndLog$
+ */
+/* CMU_HIST */
+/*
+ * Revision 2.5  91/10/09  16:03:59  af
+ *      Revision 2.4.3.1  91/10/05  13:08:27  jeffreyh
+ *             Added suffix handling and thread handling of variables.
+ *             Added new variables: lines, task, thread, work and arg.
+ *             Moved db_read_variable and db_write_variable to db_variables.h
+ *               as macros, and added db_read_write_variable instead.
+ *             Changed some error messages.
+ *             [91/08/29            tak]
+ * 
+ * Revision 2.4.3.1  91/10/05  13:08:27  jeffreyh
+ *     Added suffix handling and thread handling of variables.
+ *     Added new variables: lines, task, thread, work and arg.
+ *     Moved db_read_variable and db_write_variable to db_variables.h
+ *       as macros, and added db_read_write_variable instead.
+ *     Changed some error messages.
+ *     [91/08/29            tak]
+ * 
+ * Revision 2.4  91/05/14  15:36:57  mrt
+ *     Correcting copyright
+ * 
+ * Revision 2.3  91/02/05  17:07:19  mrt
+ *     Changed to new Mach copyright
+ *     [91/01/31  16:19:46  mrt]
+ * 
+ * Revision 2.2  90/08/27  21:53:24  dbg
+ *     New db_read/write_variable functions.  Should be used instead
+ *     of dereferencing valuep directly, which might not be a true
+ *     pointer if there is an fcn() access function.
+ *     [90/08/20            af]
+ * 
+ *     Fix declarations.
+ *     Check for trailing garbage after last expression on command line.
+ *     [90/08/10  14:34:54  dbg]
+ * 
+ *     Created.
+ *     [90/07/25            dbg]
+ * 
+ */
+/* CMU_ENDHIST */
 /* 
  * Mach Operating System
  * Copyright (c) 1991,1990 Carnegie Mellon University
@@ -264,7 +387,7 @@ db_read_write_variable(
        } else
            (*func)(vp, valuep, rw_flag, ap);
        if (rw_flag == DB_VAR_SET && vp->precious)
-               db_printf("\t$%s:%s<%#x>\t%#8lln\t=\t%#8lln\n", vp->name,
+               db_printf("\t$%s:%s<%#x>\t%#8n\t=\t%#8n\n", vp->name,
                          ap->modif, ap->thr_act, old_value, *valuep);
 }
 
@@ -507,7 +630,7 @@ db_show_one_variable(void)
                aux_param.suffix[0] = i;
                (*cur->fcn)(cur, (db_expr_t *)0, DB_VAR_SHOW, &aux_param);
            } else {
-               db_printf("%#lln", *(cur->valuep + i));
+               db_printf("%#n", *(cur->valuep + i));
                db_find_xtrn_task_sym_and_offset(*(cur->valuep + i), &name,
                                                 &offset, TASK_NULL);
                if (name != (char *)0 && offset <= db_maxoff &&
@@ -653,7 +776,7 @@ db_show_variable(void)
                    aux_param.suffix[0] = i;
                    (*cur->fcn)(cur, (db_expr_t *)0, DB_VAR_SHOW, &aux_param);
                } else {
-                   db_printf("%#lln", *(cur->valuep + i));
+                   db_printf("%#n", *(cur->valuep + i));
                    db_find_xtrn_task_sym_and_offset(*(cur->valuep + i), &name,
                                                     &offset, TASK_NULL);
                    if (name != (char *)0 && offset <= db_maxoff &&
index 71716ee3e6488d4bdbcd7db95e2d526e42bed67c..d4c62d17420c30af8abed0c0480916a1b7459a14 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f6de79c762648cb286c04c7de3b542fe74e07e9f..513ebbb48c63997ec540fa1c00a22bc02c595fca 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -397,8 +394,8 @@ db_set_watchpoints(void)
            for (watch = db_watchpoint_list; watch != 0; watch = watch->link) {
                map = (watch->task)? watch->task->map: kernel_map;
                pmap_protect(map->pmap,
-                            trunc_page_32(watch->loaddr),
-                            round_page_32(watch->hiaddr),
+                            trunc_page(watch->loaddr),
+                            round_page(watch->hiaddr),
                             VM_PROT_READ);
            }
            db_watchpoints_inserted = TRUE;
@@ -427,8 +424,8 @@ db_find_watchpoint(
            if (watch->task == task_space) {
                if ((watch->loaddr <= addr) && (addr < watch->hiaddr))
                    return (TRUE);
-               else if ((trunc_page_32(watch->loaddr) <= addr) &&
-                        (addr < round_page_32(watch->hiaddr)))
+               else if ((trunc_page(watch->loaddr) <= addr) &&
+                        (addr < round_page(watch->hiaddr)))
                    found = watch;
            }
        }
index 613a3e8c670110ca1b302e121f37337182b76b97..2d37eb46f47c51216d52d3cdf8ad9636ad539a1e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index bad5b9857e150af07272d229f72a221fa2acd27a..fdbf1426885899530ae9bd070cb4efcd7388c908 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6905f4e813bad9871cfd952da0ea487a37aa7c5a..21fa8ce653bf5713bb8215f5b3c0f44a161d35bb 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 95a196913a249ec2cc018ad755019fdb7374cd46..b397eb7c483eccd9cc0214c61967560bf915bdb9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8c510320100ce6fe0b66632577524e3909c6cff6..54d868455c1261edca158a57b8b8ca28922a87f8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a58514a2c98168858041cf5023d1201f8bdadf2e..59c51daa9b5100e6e672f3601307b408bd9e5179 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 79e89d8e2f5aee685d7879836d5d003a54b3e247..328bd6d5962d47f0e5cf07fba099b1d443ebcb67 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b60fd2bc0a68d2a21c575d235ff3af3745a78d85..7edac65d57a4f8c8804385ea1652677bdd8a4574 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 65c1c1a8272d6ac3b9d68ac3343ffc0a9d790eaf..4288e3de54c5ea4c3fa845eb92fe396a38d89d8e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 89700135107e756fd5762f8d88fb8db72026424b..864b9eabd2c5cfbd416b88c80afb98d9070ed3d7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -332,8 +329,8 @@ default_pager_info(
 
        bs_global_info(&pages_total, &pages_free);
 
-       infop->dpi_total_space = ptoa_32(pages_total);
-       infop->dpi_free_space = ptoa_32(pages_free);
+       infop->dpi_total_space = ptoa(pages_total);
+       infop->dpi_free_space = ptoa(pages_free);
        infop->dpi_page_size = vm_page_size;
 
        return KERN_SUCCESS;
index a06eebedf15887480f2103958c2cdf416e1a099e..bbf143bd164c072eb46671502cf5b31f9569b461 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 170b0a49c13cabbe06f07ef22640990b2f091be0..f49036b57d863c27ebe9258edea3658618680c7b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cf35688faff8513583f9efff765510599efe8a48..77e4ae75e60455e010c6dab1e9eb779c3c7195a5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2ff5f711287aa828d39d134e619f005c3d1eef0f..1eb3c517f703c0efa3bdc2faad58a91fa25b4f17 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ee9fc10608acedb2ffc15bdaa172b1e79eff084d..59d3956661f9c250a63d209894a79c2776793977 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9e94e9e85c5113ee51d6a1696314eb1591db9c3e..a6e571cfad6a62eaec2246599d2516f67181b5b9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 30d1b6e293dbe65b1390db1147364b7c688f79d9..112ced6c62ba39b9a223a106e8ffaf8be7a97b59 100644 (file)
@@ -1,24 +1,22 @@
+
 /*
  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -552,7 +550,7 @@ default_pager_backing_store_create(
                priority = BS_MINPRI;
        bs->bs_priority = priority;
 
-       bs->bs_clsize = bs_get_global_clsize(atop_32(clsize));
+       bs->bs_clsize = bs_get_global_clsize(atop(clsize));
 
        BSL_LOCK();
        queue_enter(&backing_store_list.bsl_queue, bs, backing_store_t,
@@ -616,7 +614,7 @@ default_pager_backing_store_info(
        basic->bs_pages_out_fail= bs->bs_pages_out_fail;
 
        basic->bs_priority      = bs->bs_priority;
-       basic->bs_clsize        = ptoa_32(bs->bs_clsize);       /* in bytes */
+       basic->bs_clsize        = ptoa(bs->bs_clsize);  /* in bytes */
 
        BS_UNLOCK(bs);
 
@@ -1227,7 +1225,7 @@ ps_vstruct_create(
        vs->vs_errors = 0;
 
        vs->vs_clshift = local_log2(bs_get_global_clsize(0));
-       vs->vs_size = ((atop_32(round_page_32(size)) - 1) >> vs->vs_clshift) + 1;
+       vs->vs_size = ((atop(round_page(size)) - 1) >> vs->vs_clshift) + 1;
        vs->vs_async_pending = 0;
 
        /*
@@ -1773,7 +1771,7 @@ ps_clmap(
        VS_MAP_LOCK(vs);
 
        ASSERT(vs->vs_dmap);
-       cluster = atop_32(offset) >> vs->vs_clshift;
+       cluster = atop(offset) >> vs->vs_clshift;
 
        /*
         * Initialize cluster error value
@@ -1889,14 +1887,14 @@ ps_clmap(
         * relatively quick.
         */
        ASSERT(trunc_page(offset) == offset);
-       newcl = ptoa_32(newcl) << vs->vs_clshift;
+       newcl = ptoa(newcl) << vs->vs_clshift;
        newoff = offset & ((1<<(vm_page_shift + vs->vs_clshift)) - 1);
        if (flag == CL_ALLOC) {
                /*
                 * set bits in the allocation bitmap according to which
                 * pages were requested.  size is in bytes.
                 */
-               i = atop_32(newoff);
+               i = atop(newoff);
                while ((size > 0) && (i < VSCLSIZE(vs))) {
                        VSM_SETALLOC(*vsmap, i);
                        i++;
@@ -1909,7 +1907,7 @@ ps_clmap(
                 * Offset is not cluster aligned, so number of pages
                 * and bitmaps must be adjusted
                 */
-               clmap->cl_numpages -= atop_32(newoff);
+               clmap->cl_numpages -= atop(newoff);
                CLMAP_SHIFT(clmap, vs);
                CLMAP_SHIFTALLOC(clmap, vs);
        }
@@ -1938,7 +1936,7 @@ ps_clmap(
                } else {
                        BS_STAT(clmap->cl_ps->ps_bs,
                                clmap->cl_ps->ps_bs->bs_pages_out_fail +=
-                                       atop_32(size));
+                                       atop(size));
                        off = VSM_CLOFF(*vsmap);
                        VSM_SETERR(*vsmap, error);
                }
@@ -1985,7 +1983,7 @@ ps_clunmap(
                vm_offset_t     newoff;
                int             i;
 
-               cluster = atop_32(offset) >> vs->vs_clshift;
+               cluster = atop(offset) >> vs->vs_clshift;
                if (vs->vs_indirect)    /* indirect map */
                        vsmap = vs->vs_imap[cluster/CLMAP_ENTRIES];
                else
@@ -2010,7 +2008,7 @@ ps_clunmap(
                         * Not cluster aligned.
                         */
                        ASSERT(trunc_page(newoff) == newoff);
-                       i = atop_32(newoff);
+                       i = atop(newoff);
                } else
                        i = 0;
                while ((i < VSCLSIZE(vs)) && (length > 0)) {
@@ -2081,7 +2079,7 @@ vs_cl_write_complete(
                dprintf(("write failed error = 0x%x\n", error));
                /* add upl_abort code here */
        } else
-               GSTAT(global_stats.gs_pages_out += atop_32(size));
+               GSTAT(global_stats.gs_pages_out += atop(size));
        /*
         * Notify the vstruct mapping code, so it can do its accounting.
         */
@@ -2237,7 +2235,7 @@ ps_read_device(
        default_pager_thread_t *dpt = NULL;
 
        device = dev_port_lookup(ps->ps_device);
-       clustered_reads[atop_32(size)]++;
+       clustered_reads[atop(size)]++;
 
        dev_offset = (ps->ps_offset +
                      (offset >> (vm_page_shift - ps->ps_record_shift)));
@@ -2369,7 +2367,7 @@ ps_write_device(
 
 
 
-       clustered_writes[atop_32(size)]++;
+       clustered_writes[atop(size)]++;
 
        dev_offset = (ps->ps_offset +
                      (offset >> (vm_page_shift - ps->ps_record_shift)));
@@ -2406,7 +2404,7 @@ ps_write_device(
                                         "device_write_request returned ",
                                         kr, addr, size, offset));
                        BS_STAT(ps->ps_bs,
-                               ps->ps_bs->bs_pages_out_fail += atop_32(size));
+                               ps->ps_bs->bs_pages_out_fail += atop(size));
                        /* do the completion notification to free resources */
                        device_write_reply(reply_port, kr, 0);
                        return PAGER_ERROR;
@@ -2432,7 +2430,7 @@ ps_write_device(
                                 "device_write returned ",
                                 kr, addr, size, offset));
                        BS_STAT(ps->ps_bs,
-                               ps->ps_bs->bs_pages_out_fail += atop_32(size));
+                               ps->ps_bs->bs_pages_out_fail += atop(size));
                        return PAGER_ERROR;
                }
                if (bytes_written & ((vm_page_size >> ps->ps_record_shift) - 1))
@@ -2494,7 +2492,7 @@ pvs_object_data_provided(
               upl, offset, size));
 
        ASSERT(size > 0);
-       GSTAT(global_stats.gs_pages_in += atop_32(size));
+       GSTAT(global_stats.gs_pages_in += atop(size));
 
 
 #if    USE_PRECIOUS
@@ -2552,16 +2550,10 @@ pvs_cluster_read(
                int     ps_info_valid;
                int     page_list_count;
 
-               if((vs_offset & cl_mask) && 
-                       (cnt > (VM_SUPER_CLUSTER - 
-                               (vs_offset & cl_mask)))) {
-                       size = VM_SUPER_CLUSTER;
-                       size -= vs_offset & cl_mask;
-               } else if (cnt > VM_SUPER_CLUSTER) {
+               if (cnt > VM_SUPER_CLUSTER)
                        size = VM_SUPER_CLUSTER;
-               } else {
+               else
                        size = cnt;
-               }
                cnt -= size;
 
                ps_info_valid = 0;
@@ -2623,7 +2615,7 @@ pvs_cluster_read(
                                /*
                                 * Let VM system know about holes in clusters.
                                 */
-                               GSTAT(global_stats.gs_pages_unavail += atop_32(abort_size));
+                               GSTAT(global_stats.gs_pages_unavail += atop(abort_size));
 
                                page_list_count = 0;
                                memory_object_super_upl_request(
@@ -2666,11 +2658,9 @@ pvs_cluster_read(
                         */
                        for (xfer_size = 0; xfer_size < size; ) {
 
-                               while (cl_index < pages_in_cl 
-                                               && xfer_size < size) {
+                               while (cl_index < pages_in_cl && xfer_size < size) {
                                        /*
-                                        * accumulate allocated pages within
-                                        * a physical segment
+                                        * accumulate allocated pages within a physical segment
                                         */
                                        if (CLMAP_ISSET(clmap, cl_index)) {
                                                xfer_size  += vm_page_size;
@@ -2682,43 +2672,35 @@ pvs_cluster_read(
                                        } else
                                                break;
                                }
-                               if (cl_index < pages_in_cl 
-                                               || xfer_size >= size) {
+                               if (cl_index < pages_in_cl || xfer_size >= size) {
                                        /*
-                                        * we've hit an unallocated page or
-                                        * the end of this request... go fire
-                                        * the I/O
+                                        * we've hit an unallocated page or the
+                                        * end of this request... go fire the I/O
                                         */
                                        break;
                                }
                                /*
-                                * we've hit the end of the current physical
-                                * segment and there's more to do, so try
-                                * moving to the next one
+                                * we've hit the end of the current physical segment
+                                * and there's more to do, so try moving to the next one
                                 */
                                seg_index++;
                                  
-                               ps_offset[seg_index] = 
-                                       ps_clmap(vs,
-                                               cur_offset & ~cl_mask,
-                                               &clmap, CL_FIND, 0, 0);
-                               psp[seg_index] = CLMAP_PS(clmap);
+                               ps_offset[seg_index] = ps_clmap(vs, cur_offset & ~cl_mask, &clmap, CL_FIND, 0, 0);
+                               psp[seg_index]       = CLMAP_PS(clmap);
                                ps_info_valid = 1;
 
                                if ((ps_offset[seg_index - 1] != (ps_offset[seg_index] - cl_size)) || (psp[seg_index - 1] != psp[seg_index])) {
                                        /*
-                                        * if the physical segment we're about
-                                        * to step into is not contiguous to
-                                        * the one we're currently in, or it's
-                                        * in a different paging file, or
+                                        * if the physical segment we're about to step into
+                                        * is not contiguous to the one we're currently
+                                        * in, or it's in a different paging file, or
                                         * it hasn't been allocated....
                                         * we stop here and generate the I/O
                                         */
                                        break;
                                }
                                /*
-                                * start with first page of the next physical
-                                * segment
+                                * start with first page of the next physical segment
                                 */
                                cl_index = 0;
                        }
@@ -2729,78 +2711,68 @@ pvs_cluster_read(
                                 */
                                page_list_count = 0;
                                memory_object_super_upl_request(vs->vs_control,
-                                       (memory_object_offset_t)vs_offset,
-                                       xfer_size, xfer_size, 
-                                       &upl, NULL, &page_list_count,
-                                       request_flags | UPL_SET_INTERNAL);
+                                               (memory_object_offset_t)vs_offset,
+                                               xfer_size, xfer_size, 
+                                               &upl, NULL, &page_list_count,
+                                               request_flags | UPL_SET_INTERNAL);
 
-                               error = ps_read_file(psp[beg_pseg],
-                                       upl, (vm_offset_t) 0, 
-                                       ps_offset[beg_pseg] +
-                                               (beg_indx * vm_page_size),
-                                       xfer_size, &residual, 0);
+                               error = ps_read_file(psp[beg_pseg], upl, (vm_offset_t) 0, 
+                                               ps_offset[beg_pseg] + (beg_indx * vm_page_size), xfer_size, &residual, 0);
                        } else
                                continue;
 
                        failed_size = 0;
 
                        /*
-                        * Adjust counts and send response to VM.  Optimize
-                        * for the common case, i.e. no error and/or partial
-                        * data.  If there was an error, then we need to error
-                        * the entire range, even if some data was successfully
-                        * read.  If there was a partial read we may supply some
+                        * Adjust counts and send response to VM.  Optimize for the
+                        * common case, i.e. no error and/or partial data.
+                        * If there was an error, then we need to error the entire
+                        * range, even if some data was successfully read.
+                        * If there was a partial read we may supply some
                         * data and may error some as well.  In all cases the
                         * VM must receive some notification for every page in the
                         * range.
                         */
                        if ((error == KERN_SUCCESS) && (residual == 0)) {
                                /*
-                                * Got everything we asked for, supply the data
-                                * to the VM.  Note that as a side effect of
-                                * supplying * the data, the buffer holding the
-                                * supplied data is * deallocated from the pager's
-                                * address space.
+                                * Got everything we asked for, supply the data to
+                                * the VM.  Note that as a side effect of supplying
+                                * the data, the buffer holding the supplied data is
+                                * deallocated from the pager's address space.
                                 */
-                               pvs_object_data_provided(
-                                       vs, upl, vs_offset, xfer_size);
+                               pvs_object_data_provided(vs, upl, vs_offset, xfer_size);
                        } else {
                                failed_size = xfer_size;
 
                                if (error == KERN_SUCCESS) {
                                        if (residual == xfer_size) {
-                                       /*
-                                        * If a read operation returns no error
-                                        * and no data moved, we turn it into
-                                        * an error, assuming we're reading at
-                                        * or beyong EOF.
-                                        * Fall through and error the entire
-                                        * range.
-                                        */
+                                               /*
+                                                * If a read operation returns no error
+                                                * and no data moved, we turn it into
+                                                * an error, assuming we're reading at
+                                                * or beyong EOF.
+                                                * Fall through and error the entire
+                                                * range.
+                                                */
                                                error = KERN_FAILURE;
                                        } else {
-                                       /*
-                                        * Otherwise, we have partial read. If
-                                        * the part read is a integral number
-                                        * of pages supply it. Otherwise round
-                                        * it up to a page boundary, zero fill
-                                        * the unread part, and supply it.
-                                        * Fall through and error the remainder
-                                        * of the range, if any.
-                                        */
+                                               /*
+                                                * Otherwise, we have partial read. If
+                                                * the part read is a integral number
+                                                * of pages supply it. Otherwise round
+                                                * it up to a page boundary, zero fill
+                                                * the unread part, and supply it.
+                                                * Fall through and error the remainder
+                                                * of the range, if any.
+                                                */
                                                int fill, lsize;
 
-                                               fill = residual 
-                                                       & ~vm_page_size;
-                                               lsize = (xfer_size - residual) 
-                                                                        + fill;
-                                               pvs_object_data_provided(
-                                                       vs, upl,
-                                                       vs_offset, lsize);
+                                               fill = residual & ~vm_page_size;
+                                               lsize = (xfer_size - residual) + fill;
+                                               pvs_object_data_provided(vs, upl, vs_offset, lsize);
 
                                                if (lsize < xfer_size) {
-                                                       failed_size = 
-                                                           xfer_size - lsize;
+                                                       failed_size = xfer_size - lsize;
                                                        error = KERN_FAILURE;
                                                }
                                        }
@@ -2808,13 +2780,12 @@ pvs_cluster_read(
                        }
                        /*
                         * If there was an error in any part of the range, tell
-                        * the VM. Note that error is explicitly checked again
-                        * since it can be modified above.
+                        * the VM. Note that error is explicitly checked again since
+                        * it can be modified above.
                         */
                        if (error != KERN_SUCCESS) {
                                BS_STAT(psp[beg_pseg]->ps_bs,
-                                       psp[beg_pseg]->ps_bs->bs_pages_in_fail
-                                               += atop_32(failed_size));
+                                       psp[beg_pseg]->ps_bs->bs_pages_in_fail += atop(failed_size));
                        }
                        size       -= xfer_size;
                        vs_offset  += xfer_size;
@@ -2894,18 +2865,16 @@ vs_cluster_write(
                                (memory_object_offset_t)offset,
                                cnt, super_size, 
                                &upl, NULL, &page_list_count,
-                               request_flags | UPL_FOR_PAGEOUT);
+                               request_flags | UPL_PAGEOUT);
 
                pl = UPL_GET_INTERNAL_PAGE_LIST(upl);
 
-               for (seg_index = 0, transfer_size = upl->size; 
-                                               transfer_size > 0; ) {
+               for (seg_index = 0, transfer_size = upl->size; transfer_size > 0; ) {
 
-                       ps_offset[seg_index] = 
-                               ps_clmap(vs, upl->offset + (seg_index * cl_size),
-                                      &clmap, CL_ALLOC, 
-                                      transfer_size < cl_size ? 
-                                      transfer_size : cl_size, 0);
+                       ps_offset[seg_index] = ps_clmap(vs, upl->offset + (seg_index * cl_size),
+                                                     &clmap, CL_ALLOC, 
+                                                     transfer_size < cl_size ? 
+                                                     transfer_size : cl_size, 0);
 
                        if (ps_offset[seg_index] == (vm_offset_t) -1) {
                                upl_abort(upl, 0);
@@ -2922,25 +2891,21 @@ vs_cluster_write(
                        } else
                                transfer_size = 0;
                }
-               for (page_index = 0,
-                               num_of_pages = upl->size / vm_page_size;
-                               page_index < num_of_pages; ) {
+               for (page_index = 0, num_of_pages = upl->size / vm_page_size; page_index < num_of_pages; ) {
                        /*
                         * skip over non-dirty pages
                         */
                        for ( ; page_index < num_of_pages; page_index++) {
-                               if (UPL_DIRTY_PAGE(pl, page_index)
-                                       || UPL_PRECIOUS_PAGE(pl, page_index))
+                               if (UPL_DIRTY_PAGE(pl, page_index) || UPL_PRECIOUS_PAGE(pl, page_index))
                                        /*
                                         * this is a page we need to write
-                                        * go see if we can buddy it up with
-                                        * others that are contiguous to it
+                                        * go see if we can buddy it up with others
+                                        * that are contiguous to it
                                         */
                                        break;
                                /*
-                                * if the page is not-dirty, but present we 
-                                * need to commit it...  This is an unusual
-                                * case since we only asked for dirty pages
+                                * if the page is not-dirty, but present we need to commit it...
+                                * this is an unusual case since we only asked for dirty pages
                                 */
                                if (UPL_PAGE_PRESENT(pl, page_index)) {
                                        boolean_t empty = FALSE;
@@ -2962,16 +2927,14 @@ vs_cluster_write(
                                break;
 
                        /*
-                        * gather up contiguous dirty pages... we have at
-                        * least 1 otherwise we would have bailed above
+                        * gather up contiguous dirty pages... we have at least 1
+                        * otherwise we would have bailed above
                         * make sure that each physical segment that we step
                         * into is contiguous to the one we're currently in
                         * if it's not, we have to stop and write what we have
                         */
-                       for (first_dirty = page_index;
-                                       page_index < num_of_pages; ) {
-                               if ( !UPL_DIRTY_PAGE(pl, page_index)
-                                       && !UPL_PRECIOUS_PAGE(pl, page_index))
+                       for (first_dirty = page_index; page_index < num_of_pages; ) {
+                               if ( !UPL_DIRTY_PAGE(pl, page_index) && !UPL_PRECIOUS_PAGE(pl, page_index))
                                        break;
                                page_index++;
                                /*
@@ -2983,21 +2946,17 @@ vs_cluster_write(
                                        int cur_seg;
                                        int nxt_seg;
 
-                                       cur_seg =
-                                               (page_index - 1) / pages_in_cl;
+                                       cur_seg = (page_index - 1) / pages_in_cl;
                                        nxt_seg = page_index / pages_in_cl;
 
                                        if (cur_seg != nxt_seg) {
                                                if ((ps_offset[cur_seg] != (ps_offset[nxt_seg] - cl_size)) || (psp[cur_seg] != psp[nxt_seg]))
-                                               /*
-                                                * if the segment we're about
-                                                * to step into is not
-                                                * contiguous to the one we're
-                                                * currently in, or it's in a
-                                                * different paging file....
-                                                * we stop here and generate
-                                                * the I/O
-                                                */
+                                                       /*
+                                                        * if the segment we're about to step into
+                                                        * is not contiguous to the one we're currently
+                                                        * in, or it's in a different paging file....
+                                                        * we stop here and generate the I/O
+                                                        */
                                                        break;
                                        }
                                }
@@ -3011,29 +2970,22 @@ vs_cluster_write(
                                seg_offset = upl_offset - (seg_index * cl_size);
                                transfer_size = num_dirty * vm_page_size;
 
+                               error = ps_write_file(psp[seg_index], upl, upl_offset,
+                                                     ps_offset[seg_index] + seg_offset, transfer_size, flags);
 
-                               while (transfer_size) {
-                                       int seg_size;
+                               if (error == 0) {
+                                       while (transfer_size) {
+                                               int seg_size;
 
-                                       if ((seg_size = cl_size - 
-                                               (upl_offset % cl_size)) 
-                                                       > transfer_size)
-                                               seg_size = transfer_size;
+                                               if ((seg_size = cl_size - (upl_offset % cl_size)) > transfer_size)
+                                                       seg_size = transfer_size;
 
-                                       ps_vs_write_complete(vs, 
-                                               upl->offset + upl_offset, 
-                                               seg_size, error);
+                                               ps_vs_write_complete(vs, upl->offset + upl_offset, seg_size, error);
 
-                                       transfer_size -= seg_size;
-                                       upl_offset += seg_size;
+                                               transfer_size -= seg_size;
+                                               upl_offset += seg_size;
+                                       }
                                }
-                               upl_offset = first_dirty * vm_page_size;
-                               transfer_size = num_dirty * vm_page_size;
-                               error = ps_write_file(psp[seg_index], 
-                                               upl, upl_offset,
-                                               ps_offset[seg_index] 
-                                                               + seg_offset, 
-                                               transfer_size, flags);
                                must_abort = 0;
                        }
                        if (must_abort) {
@@ -3076,14 +3028,14 @@ vs_cluster_write(
                        /* Assume that the caller has given us contiguous */
                        /* pages */
                        if(cnt) {
-                               ps_vs_write_complete(vs, mobj_target_addr, 
-                                                               cnt, error);
                                error = ps_write_file(ps, internal_upl,
                                                0, actual_offset,
                                                cnt, flags);
                                if (error)
                                        break;
-                       }
+                               ps_vs_write_complete(vs, mobj_target_addr, 
+                                                               cnt, error);
+                          }
                        if (error)
                                break;
                        actual_offset += cnt;
@@ -3145,7 +3097,7 @@ ps_vstruct_allocated_size(
                }
        }
 
-       return ptoa_32(num_pages);
+       return ptoa(num_pages);
 }
 
 size_t
@@ -3354,7 +3306,7 @@ vs_get_map_entry(
        struct vs_map   *vsmap;
        vm_offset_t     cluster;
 
-       cluster = atop_32(offset) >> vs->vs_clshift;
+       cluster = atop(offset) >> vs->vs_clshift;
        if (vs->vs_indirect) {
                long    ind_block = cluster/CLMAP_ENTRIES;
 
@@ -3719,7 +3671,7 @@ ps_read_file(
        int                     result;
 
 
-       clustered_reads[atop_32(size)]++;
+       clustered_reads[atop(size)]++;
 
        f_offset = (vm_object_offset_t)(ps->ps_offset + offset);
        
@@ -3757,7 +3709,7 @@ ps_write_file(
 
        int             error = 0;
 
-       clustered_writes[atop_32(size)]++;
+       clustered_writes[atop(size)]++;
        f_offset = (vm_object_offset_t)(ps->ps_offset + offset);
 
        if (vnode_pageout(ps->ps_vnode,
index 353b2d9f274d129fb73a08a8cbb2dc164deb3d9a..74c1e12dae524947f91ae3129acc7670d2ead1d4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -659,7 +656,7 @@ dp_memory_object_data_initialize(
        DEBUG(DEBUG_MO_EXTERNAL,
              ("mem_obj=0x%x,offset=0x%x,cnt=0x%x\n",
               (int)mem_obj, (int)offset, (int)size));
-       GSTAT(global_stats.gs_pages_init += atop_32(size));
+       GSTAT(global_stats.gs_pages_init += atop(size));
 
        vs_lookup(mem_obj, vs);
        vs_lock(vs);
@@ -733,9 +730,7 @@ dp_memory_object_data_return(
                return KERN_SUCCESS;
        }
 
-       if ((vs->vs_seqno != vs->vs_next_seqno++)
-                       || (vs->vs_readers)
-                       || (vs->vs_xfer_pending)) {
+       if ((vs->vs_seqno != vs->vs_next_seqno++) || (vs->vs_xfer_pending)) {
                upl_t   upl;
                int     page_list_count = 0;
 
@@ -900,10 +895,10 @@ default_pager_objects(
        if (kr != KERN_SUCCESS)
                return kr;
 
-       osize = round_page_32(*ocountp * sizeof * objects);
+       osize = round_page(*ocountp * sizeof * objects);
        kr = vm_map_wire(ipc_kernel_map, 
-                       trunc_page_32((vm_offset_t)objects),
-                       round_page_32(((vm_offset_t)objects) + osize), 
+                       trunc_page((vm_offset_t)objects),
+                       round_page(((vm_offset_t)objects) + osize), 
                        VM_PROT_READ|VM_PROT_WRITE, FALSE);
        osize=0;
 
@@ -929,7 +924,7 @@ default_pager_objects(
                vm_offset_t     newaddr;
                vm_size_t       newsize;
 
-               newsize = 2 * round_page_32(actual * sizeof * objects);
+               newsize = 2 * round_page(actual * sizeof * objects);
 
                kr = vm_allocate(kernel_map, &newaddr, newsize, TRUE);
                if (kr != KERN_SUCCESS)
@@ -945,7 +940,7 @@ default_pager_objects(
                vm_offset_t     newaddr;
                vm_size_t       newsize;
 
-               newsize = 2 * round_page_32(actual * sizeof * pagers);
+               newsize = 2 * round_page(actual * sizeof * pagers);
 
                kr = vm_allocate(kernel_map, &newaddr, newsize, TRUE);
                if (kr != KERN_SUCCESS)
@@ -1043,7 +1038,7 @@ default_pager_objects(
        } else {
                vm_offset_t used;
 
-               used = round_page_32(actual * sizeof * objects);
+               used = round_page(actual * sizeof * objects);
 
                if (used != osize)
                        (void) vm_deallocate(kernel_map,
@@ -1069,7 +1064,7 @@ default_pager_objects(
        } else {
                vm_offset_t used;
 
-               used = round_page_32(actual * sizeof * pagers);
+               used = round_page(actual * sizeof * pagers);
 
                if (used != psize)
                        (void) vm_deallocate(kernel_map,
@@ -1125,10 +1120,10 @@ default_pager_object_pages(
        if (kr != KERN_SUCCESS)
                return kr;
 
-       size = round_page_32(*countp * sizeof * pages);
+       size = round_page(*countp * sizeof * pages);
        kr = vm_map_wire(ipc_kernel_map, 
-                       trunc_page_32((vm_offset_t)pages),
-                       round_page_32(((vm_offset_t)pages) + size), 
+                       trunc_page((vm_offset_t)pages),
+                       round_page(((vm_offset_t)pages) + size), 
                        VM_PROT_READ|VM_PROT_WRITE, FALSE);
        size=0;
 
@@ -1184,7 +1179,7 @@ default_pager_object_pages(
 
                if (pages != *pagesp)
                        (void) vm_deallocate(kernel_map, addr, size);
-               size = round_page_32(actual * sizeof * pages);
+               size = round_page(actual * sizeof * pages);
                kr = vm_allocate(kernel_map, &addr, size, TRUE);
                if (kr != KERN_SUCCESS)
                        return kr;
@@ -1213,7 +1208,7 @@ default_pager_object_pages(
        } else {
                vm_offset_t used;
 
-               used = round_page_32(actual * sizeof * pages);
+               used = round_page(actual * sizeof * pages);
 
                if (used != size)
                        (void) vm_deallocate(kernel_map,
index 01f3f1dce5ea1f9cf1892171251e3753b56ead95..137cca0577e014eb250f58edd61e3940ae571b1f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ac18239845cb27258a01db7da6b4a64eafba91b7..db8fe7a581521f41e59d6049fd4dfad8ff0071df 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 946c83b4461c6c9e61248740a8540e551b3fd298..1f2bbba59f219eec18dc6d92ac51d747b55726d6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e170ac0ce819eeaca9e13bd64ba3736257830a79..a42ac7c77e1572bd319044af2743240e3233e62e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 85528f9eb904ad534016251f7fc9d084490213a3..1e6c2e85fbe078bb1a35b77b685479e59484f516 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 593ea29e89fbb2e32e65339cdc2de84dc7c77fd7..a61ad9276f9eacb07f7a17ee4a97c7ac80bf511b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -64,6 +61,7 @@
 
 #ifdef __ppc__
 #include <ppc/mappings.h>
+#include <ppc/pmap_internals.h>
 #endif
 #include <IOKit/IOTypes.h>
 
@@ -82,7 +80,7 @@ extern ipc_port_t iokit_port_for_object( io_object_t obj,
                        ipc_kobject_type_t type );
 
 extern kern_return_t iokit_client_died( io_object_t obj,
-                        ipc_port_t port, ipc_kobject_type_t type, mach_port_mscount_t mscount );
+                        ipc_port_t port, ipc_kobject_type_t type, mach_port_mscount_t mscount );
 
 extern kern_return_t
 iokit_client_memory_for_type(
@@ -281,14 +279,6 @@ iokit_destroy_object_port( ipc_port_t port )
     return( KERN_SUCCESS);
 }
 
-EXTERN kern_return_t
-iokit_switch_object_port( ipc_port_t port, io_object_t obj, ipc_kobject_type_t type )
-{
-    ipc_kobject_set( port, (ipc_kobject_t) obj, type);
-
-    return( KERN_SUCCESS);
-}
-
 EXTERN mach_port_name_t
 iokit_make_send_right( task_t task, io_object_t obj, ipc_kobject_type_t type )
 {
@@ -389,80 +379,67 @@ iokit_notify( mach_msg_header_t * msg )
     }
 }
 
-/* need to create a pmap function to generalize */
-unsigned int IODefaultCacheBits(addr64_t pa)
-{
-    unsigned int       flags;
 #ifndef i386
-    struct phys_entry * pp;
-
-    // Find physical address
-    if ((pp = pmap_find_physentry(pa >> 12))) {
-       // Use physical attributes as default
-       // NOTE: DEVICE_PAGER_FLAGS are made to line up
-       flags = VM_MEM_COHERENT;                                                /* We only support coherent memory */
-       if(pp->ppLink & ppG) flags |= VM_MEM_GUARDED;   /* Add in guarded if it is */
-       if(pp->ppLink & ppI) flags |= VM_MEM_NOT_CACHEABLE;     /* Add in cache inhibited if so */
-    } else
-       // If no physical, just hard code attributes
-        flags = VM_WIMG_IO;
-#else
-    extern vm_offset_t avail_end;
+unsigned int IOTranslateCacheBits(struct phys_entry *pp)
+{
+       unsigned int    flags;
+       unsigned int    memattr;
 
-    if (pa < avail_end)
-       flags = VM_WIMG_COPYBACK;
-    else
-       flags = VM_WIMG_IO;
-#endif
+       /* need to create a pmap function to generalize */
+       memattr = ((pp->pte1 & 0x00000078) >> 3);
 
-    return flags;
+       /* NOTE: DEVICE_PAGER_FLAGS are made to line up */
+       flags = memattr & VM_WIMG_MASK;
+       return flags;
 }
+#endif
 
 kern_return_t IOMapPages(vm_map_t map, vm_offset_t va, vm_offset_t pa,
                        vm_size_t length, unsigned int options)
 {
     vm_size_t  off;
     vm_prot_t  prot;
-    unsigned int flags;
-    pmap_t      pmap = map->pmap;
+    int                        memattr;
+    struct phys_entry *pp;
+    pmap_t             pmap = map->pmap;
 
     prot = (options & kIOMapReadOnly)
                ? VM_PROT_READ : (VM_PROT_READ|VM_PROT_WRITE);
 
-    switch(options & kIOMapCacheMask ) {                       /* What cache mode do we need? */
-
-       case kIOMapDefaultCache:
-       default:
-           flags = IODefaultCacheBits(pa);
-           break;
-
-       case kIOMapInhibitCache:
-           flags = VM_WIMG_IO;
-           break;
-
-       case kIOMapWriteThruCache:
-           flags = VM_WIMG_WTHRU;
-           break;
-
-       case kIOWriteCombineCache:
-           flags = VM_WIMG_WCOMB;
-           break;
-
-       case kIOMapCopybackCache:
-           flags = VM_WIMG_COPYBACK;
-           break;
-    }
 #if __ppc__
 
-    // Set up a block mapped area
-    pmap_map_block(pmap, (addr64_t)va, (ppnum_t)(pa >> 12), length, prot, flags, 0);
+       switch(options & kIOMapCacheMask ) {                    /* What cache mode do we need? */
+
+               case kIOMapDefaultCache:
+               default:
+                       if(pp = pmap_find_physentry(pa)) {              /* Find physical address */
+                               memattr = ((pp->pte1 & 0x00000078) >> 3);       /* Use physical attributes as default */
+                       }
+                       else {                                                                  /* If no physical, just hard code attributes */
+                               memattr = PTE_WIMG_UNCACHED_COHERENT_GUARDED;
+                       }
+                       break;
+       
+               case kIOMapInhibitCache:
+                       memattr = PTE_WIMG_UNCACHED_COHERENT_GUARDED;
+                       break;
+       
+               case kIOMapWriteThruCache:
+                       memattr = PTE_WIMG_WT_CACHED_COHERENT_GUARDED;
+                       break;
+
+               case kIOMapCopybackCache:
+                       memattr = PTE_WIMG_CB_CACHED_COHERENT;
+                       break;
+       }
 
+       pmap_map_block(pmap, va, pa, length, prot, memattr, 0); /* Set up a block mapped area */
+       
 #else
-//  enter each page's physical address in the target map
-
-    for (off = 0; off < length; off += page_size)
-       pmap_enter(pmap, va + off, (pa + off) >> 12, prot, flags, TRUE);
-
+//     enter each page's physical address in the target map
+       for (off = 0; off < length; off += page_size) {         /* Loop for the whole length */
+               pmap_enter(pmap, va + off, pa + off, prot, VM_WIMG_USE_DEFAULT, TRUE);  /* Map it in */
+       }
 #endif
 
     return( KERN_SUCCESS );
@@ -472,7 +449,7 @@ kern_return_t IOUnmapPages(vm_map_t map, vm_offset_t va, vm_size_t length)
 {
     pmap_t     pmap = map->pmap;
 
-    pmap_remove(pmap, trunc_page_64(va), round_page_64(va + length));
+    pmap_remove(pmap, trunc_page(va), round_page(va + length));
 
     return( KERN_SUCCESS );
 }
index ccbb9990e0053eeb4c35faee1dd347050b7e38f5..1282fd398f7ae514c2b38d9752742c26524d0824 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4bc3ef0270bca8a4c090798b978db6e8f715f54b..c22b98ac8819bdb683a08eaf4b725ccfa2ec6417 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ba1c1cdd83c10f742ddba08c5df09a831c10fcf8..7a5d3d7f60eb9c3823dff46e49243c9a7c649c28 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 25564bb583d8d3746462b59a25b7db4c9d6b6511..ffcad7a77b23af73a7d95691933b4d949a867572 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b9c6bf3165900a845c5977472d326e5cb96ab780..1fd8ca1d791781629c7396759e181c95524267df 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b6eebb8e726575d4d036a39f337eb0847e1dd248..67632a3230dfa6450c6b6a6d595c21255c6fa54f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5098271fbcddd86ffadeb284e16eede20b614f83..44fd9994843e4ebdca2026a7485cff01393f007e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4a8a539d4ac6c4318bf1b3a956104d092017fc65..a56bef22feb83770a949fa09b549ca85bffd6565 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d9d0fd5f3827327ef3f36ec3e3c21715b8a386c5..f9abdb912dc39a6c2b67171c8cd7a20d548c6044 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2d0ec0f67d8655b7f873581e9956492b99bb2726..c0ae26d10db3e6f6aa0ca9311ccf6a7613b627f8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 26a96c40396f4a80228708ded53d537a26524cd7..25ac9734fe5ac34d031a1f4ebcc24ff12222b92a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d9cc8bebe1bc1d54416354b7e062971a6989d5cd..6ac55d39d98950f0e4175c62ded9954ff0df33d1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ab1001441fa90b688ec88a340d1a6044ee74c1e6..6b6f6a2d813deb0416ca923e928d3e4adc691947 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b8ac30cd58f175b4447881bdbe19ac1e71a5e913..c3cb5bc941d2aa0c5ae2e383ec9a1091269bacdf 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 
 #include <IOKit/IOPlatformExpert.h>
 
-vm_size_t      mem_size = 0;
-uint64_t       max_mem;
+vm_size_t      mem_size = 0; 
 vm_offset_t    first_addr = 0; /* set by start.s - keep out of bss */
 vm_offset_t    first_avail = 0;/* first after page tables */
 vm_offset_t    last_addr;
@@ -371,7 +367,7 @@ machine_init(void)
         * Display CPU identification
         */
        cpuid_cpu_display("CPU identification", 0);
-       cpuid_feature_display("CPU features", 0);
+       cpuid_cache_display("CPU configuration", 0);
 
 #if    MP_V1_1
        mp_v1_1_init();
@@ -512,7 +508,6 @@ i386_init(void)
        first_addr = round_page(first_addr);
        last_addr = trunc_page(last_addr);
        mem_size = last_addr - bios_hole_size;
-       max_mem = mem_size;
 
        avail_start = first_addr;
        avail_end = last_addr;
index 04b61ecff5ae9cb9025f609d3feb28619a766a36..e6551c15f68e25b9f935da546766656e0a410296 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4ea4768278f39291f0149a234506776eb4271082..df8f04a51f49b7fce8380e2dbe0a214a545333c3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a444c5aeb9eca9a247d4f670b93f8091a473cd09..84339bfcfbe7963055d17577609c84b8fca91f57 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4fa8081c6f769580b4d2250bfac71a0f5928995c..2a2e609989927ae1173b18247273967daa1adb8f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index bc5a1c4d94e34d2537c3b7ba023bd7a7096a25ee..0f58f2d5135a9e6e459732018e53893fb16f385d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 86e9d1c0030acb6f3e5084d9ce7a801741c40df1..de330f41bde4035735fbaa730b94ba7973f37583 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a227728d0b116182be371b8178625bf3b76e3df7..4f55d2024fa3b054914d5e9caced6044cb0b3f1b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4efce6dbec9cd47edd7a96c95b5889e15e9d0401..ffb48fa50efe5cde8799dd1c81c7f855bfce8008 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 42e112307645e99c0567377ba8e495b7f452e5c6..9dd18e914d1470a120b47e1452fe2029f83bcd82 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6dc5f04389c0a5e1df963b5f54a81ddea0a68af5..4b610a158328a578bc91de729f8b6b0bc13dd624 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1309560052fa6a4d893384146501c34144603bca..ccf059efff65515ad52878c6e1baef64f0eb660d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cb8a18ef7eac2b129526c1c529dd6cac3807d90d..8e606d05599d00b3c8aa328cbfdb6b58a0544dea 100644 (file)
@@ -7,17 +7,19 @@ export MakeInc_dir=${SRCROOT}/makedefs/MakeInc.dir
 include $(MakeInc_cmd)
 include $(MakeInc_def)
 
-EXPORT_ONLY_FILES =    \
-                   cpu_capabilities.h  \
-                   cpu_number.h \
+DATAFILES = \
+       asm.h eflags.h exec.h machlimits.h \
+       endian.h trap.h soundcard.h
+
+EXPORT_ONLY_FILES = cpu_number.h \
                    hw_lock_types.h \
                    io_map_entries.h \
                    lock.h \
                    machine_routines.h
 
-INSTALL_MD_DIR = i386
+INSTALL_MD_LIST = ${DATAFILES}
 
-INSTALL_MD_LCL_LIST = cpu_capabilities.h
+INSTALL_MD_DIR = i386
 
 EXPORT_MD_LIST = ${EXPORT_ONLY_FILES}
 
index 098cd95ca664b2176f7608b17efd1b86a12da9a3..cde520aeacbf422b28f920d7365f7e03eaa54a4e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f18199a24b1c3358f9f28e33de8a1644f277f30d..2b62c0d0651eeb93cf43c4c666deb95593eb1689 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7cbebf34e5aad736f151a5a5d1554f22b8f9c103..c0403786015a2fb93d09ee379992564dde33be7a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6f2928ccf035be145a5cbfebd29194cc3ba13c1d..1bd157fb247e0a1e075060fa4dc9833861096199 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0b41400c30d9e71e492de7214f054d02cefe84fb..9f201def591e395321e8cf72e8efd845d310eaa5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 267da2ea8a75cb744bb43bd7bafc3fba718d12f7..15d3cd6bc9fb7f239c8b64a99e7f846c9db0293b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 56011fc4a6d2c9f05bd8358d86735929bd9197a2..6ca56f4714293b17d17005da5e46bc25560947f9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0061c2ed492d13cec7f92c44ab4548db4c62719e..b592689e8b266762a547c643c48d091a30622dbc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ad24633c2ee2c9b00bf74ce5c49946152f0a72f6..0a96e3cb8f6bcbb1f09b60197775d38a9b23d919 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 35624b183f027e10036fd41822e7a115e6f1f7ae..e1d668695ed75679dc8374edd947d5c9bac119cc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
diff --git a/osfmk/i386/commpage/commpage.c b/osfmk/i386/commpage/commpage.c
deleted file mode 100644 (file)
index 2c41d66..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-
-#include <machine/cpu_capabilities.h>
-#include <machine/commpage.h>
-
-int    _cpu_capabilities = 0;                          /* define the capability vector */
-
-void   commpage_populate( void ) {
-
-    /* no commpage on Intel yet */
-    
-}
diff --git a/osfmk/i386/commpage/commpage.h b/osfmk/i386/commpage/commpage.h
deleted file mode 100644 (file)
index c16d899..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-
-#ifndef _I386_COMMPAGE_H
-#define _I386_COMMPAGE_H
-
-/* we don't have a comm page on Intel, yet */
-
-#endif /* _I386_COMMPAGE_H */
index dea338a3cc28dbed91e68e71eb94461e6b84306d..d23ae9e9164abcfa80dc4a25e24aae7436a26a1d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
diff --git a/osfmk/i386/cpu_capabilities.h b/osfmk/i386/cpu_capabilities.h
deleted file mode 100644 (file)
index bd02976..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-
-#ifndef _I386_CPU_CAPABILITIES_H
-#define _I386_CPU_CAPABILITIES_H
-
-/* Sadly, some clients of this interface misspell __APPLE_API_PRIVATE.
- * To avoid breaking them, we accept the incorrect _APPLE_API_PRIVATE.
- */
-#ifdef _APPLE_API_PRIVATE
-#ifndef __APPLE_API_PRIVATE
-#define        __APPLE_API_PRIVATE
-#endif /* __APPLE_API_PRIVATE */
-#endif /* _APPLE_API_PRIVATE */
-
-#ifndef __APPLE_API_PRIVATE
-#error cpu_capabilities.h is for Apple Internal use only
-#else  /* __APPLE_API_PRIVATE */
-
-/* _cpu_capabilities
- *
- * This is the authoritative way to determine from user mode what
- * implementation-specific processor features are available.
- * This API only supported for Apple internal use.
- * 
- */
-
-#ifndef        __ASSEMBLER__
-extern int _cpu_capabilities;
-#endif
-
-/* Bit definitions for _cpu_capabilities: */
-
-#endif /* __APPLE_API_PRIVATE */
-#endif /* _I386_CPU_CAPABILITIES_H */
index e4ba6fd33b09e679660d56c63c914d7bd7a19c4a..a62fc6170a02d380ec3d6e8ba4d3b2755aa2a152 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b1da548684828c1b7a0dddeb95b7b13b63771014..255bb119a1fc7b2e2fd71e6838eef260f2fe01b6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 395ed4b6fef4ce0a560c0e12d51d99809e8e5152..d66f01d30ca1f55aae6e6558255f9893ec0b87e3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
  * @OSF_COPYRIGHT@
  */
 
-#include "cpuid.h"
-
-#define min(a,b) ((a) < (b) ? (a) : (b))
-
 /*
- * CPU identification routines.
- *
- * Note that this code assumes a processor that supports the
- * 'cpuid' instruction.
+ * Values from http://einstein.et.tudelft.nl/~offerman/chiplist.html
+ * (dated 18 Oct 1995)
  */
 
-static unsigned int    cpuid_maxcpuid;
-
-static i386_cpu_info_t cpuid_cpu_info;
-
-uint32_t               cpuid_feature;          /* XXX obsolescent for compat */
+#include <kern/misc_protos.h>
+#include <i386/cpuid.h>
 
 /*
- * We only identify Intel CPUs here.  Adding support
- * for others would be straightforward.
+ * Generic product array (before CPUID)
  */
-static void    set_cpu_intel(i386_cpu_info_t *);
-static void    set_cpu_unknown(i386_cpu_info_t *);
-
-struct {
-       char    *vendor;
-       void    (* func)(i386_cpu_info_t *);
-} cpu_vendors[] = {
-       {CPUID_VID_INTEL,       set_cpu_intel},
-       {0,                     set_cpu_unknown}
+unsigned int cpuid_i386_freq[] = { 12, 16, 20, 25, 33, 0 };
+unsigned int cpuid_i486_freq[] = { 20, 25, 33, 50, 0 };
+
+struct cpuid_product cpuid_generic[] = {
+    {
+       0,              CPUID_FAMILY_386,       0,
+       80,     cpuid_i386_freq,                "i386"
+    },
+    {
+       0,              CPUID_FAMILY_486,       0,
+       240,    cpuid_i486_freq,                "i486"
+    },
 };
 
-void
-cpuid_get_info(i386_cpu_info_t *info_p)
-{
-       uint32_t        cpuid_result[4];
-       int             i;
-
-       bzero((void *)info_p, sizeof(i386_cpu_info_t));
-
-       /* do cpuid 0 to get vendor */
-       do_cpuid(0, cpuid_result);
-       cpuid_maxcpuid = cpuid_result[0];
-       bcopy((char *)&cpuid_result[1], &info_p->cpuid_vendor[0], 4); /* ugh */
-       bcopy((char *)&cpuid_result[2], &info_p->cpuid_vendor[8], 4);
-       bcopy((char *)&cpuid_result[3], &info_p->cpuid_vendor[4], 4);
-       info_p->cpuid_vendor[12] = 0;
+/*
+ * INTEL product array
+ */
+unsigned int cpuid_i486_dx_freq[] = { 20, 25, 33, 0 };
+unsigned int cpuid_i486_dx_s_freq[] = { 50, 0 };
+unsigned int cpuid_i486_sx_freq[] = { 16, 20, 25, 33, 0 };
+unsigned int cpuid_i486_dx2_freq[] = { 32, 40, 50, 66, 0 };
+unsigned int cpuid_i486_sl_freq[] = { 25, 33, 0 };
+unsigned int cpuid_i486_sx2_freq[] = { 50, 0 };
+unsigned int cpuid_i486_dx2wb_freq[] = { 50, 66, 0 };
+unsigned int cpuid_i486_dx4_freq[] = { 90, 100, 0 };
+
+unsigned int cpuid_i486_dx2wb_od_freq[] = { 32, 40, 50, 66, 0 };
+unsigned int cpuid_i486_dx4_od_freq[] = { 75, 99, 0 };
+
+unsigned int cpuid_p5_freq[] = { 60, 66, 0 };
+unsigned int cpuid_p54_freq[] = { 60, 66, 75, 90, 100, 120, 133, 166, 200, 0 };
+
+unsigned int cpuid_p24t_freq[] = { 25, 33, 0 };
+unsigned int cpuid_p24ct_freq[] = { 63, 83, 0 };
+
+unsigned int cpuid_pii_freq[] = { 300, 0 };
+
+struct cpuid_product cpuid_intel[] = {
+    {
+       CPUID_TYPE_OEM,         CPUID_FAMILY_486,       CPUID_MODEL_I486_DX,
+       240,    cpuid_i486_dx_freq,             "Intel 486DX"
+    },
+    {
+       CPUID_TYPE_OEM,         CPUID_FAMILY_486,       CPUID_MODEL_I486_DX_S,
+       240,    cpuid_i486_dx_s_freq,           "Intel 486DX-S"
+    },
+    {
+       CPUID_TYPE_OEM,         CPUID_FAMILY_486,       CPUID_MODEL_I486_SX,
+       240,    cpuid_i486_sx_freq,             "Intel 486SX"
+    },
+    {
+       CPUID_TYPE_OEM,         CPUID_FAMILY_486,       CPUID_MODEL_I486_DX2,
+       240,    cpuid_i486_dx2_freq,            "Intel 486DX2"
+    },
+    {
+       CPUID_TYPE_OEM,         CPUID_FAMILY_486,       CPUID_MODEL_I486_SL,
+       240,    cpuid_i486_sl_freq,             "Intel 486SL"
+    },
+    {  
+       CPUID_TYPE_OEM,         CPUID_FAMILY_486,       CPUID_MODEL_I486_SX2,
+       240,    cpuid_i486_sx2_freq,            "Intel 486SX2"
+    },
+    {
+       CPUID_TYPE_OEM,         CPUID_FAMILY_486,       CPUID_MODEL_I486_DX2WB,
+       240,    cpuid_i486_dx2wb_freq,          "Intel 486DX2WB"
+    },
+    {
+       CPUID_TYPE_OEM,         CPUID_FAMILY_486,       CPUID_MODEL_I486_DX4,
+       240,    cpuid_i486_dx4_freq,            "Intel 486DX4"
+    },
+    {
+       CPUID_TYPE_OVERDRIVE,   CPUID_FAMILY_486,       CPUID_MODEL_I486_DX2,
+       240,    cpuid_i486_dx2_freq,            "Intel 486DX2 OverDrive"
+    },
+    {
+       CPUID_TYPE_OVERDRIVE,   CPUID_FAMILY_486,       CPUID_MODEL_I486_DX2WB,
+       240,    cpuid_i486_dx2wb_od_freq,       "Intel 486DX2WB OverDrive"
+    },
+    {
+       CPUID_TYPE_OVERDRIVE,   CPUID_FAMILY_486,       CPUID_MODEL_I486_DX4,
+       240,    cpuid_i486_dx4_od_freq,         "Intel 486DX4 OverDrive"
+    },
+    {
+       CPUID_TYPE_OVERDRIVE,   CPUID_FAMILY_P5,        CPUID_MODEL_P24T,
+       208,    cpuid_p24t_freq,                "Intel Pentium P24T OverDrive"
+    },
+    {
+       CPUID_TYPE_OVERDRIVE,   CPUID_FAMILY_P5,        CPUID_MODEL_P54,
+       207,    cpuid_p24ct_freq,               "Intel Pentium P24CT OverDrive"
+    },
+    {
+       CPUID_TYPE_OEM,         CPUID_FAMILY_P5,        CPUID_MODEL_P5A,
+       207,    cpuid_p5_freq,                  "Intel Pentium P5 rev A"
+    },
+    {
+       CPUID_TYPE_OEM,         CPUID_FAMILY_P5,        CPUID_MODEL_P5,
+       207,    cpuid_p5_freq,                  "Intel Pentium P5"
+    },
+    {
+       CPUID_TYPE_OEM,         CPUID_FAMILY_P5,        CPUID_MODEL_P54,
+       207,    cpuid_p54_freq,                 "Intel Pentium P54"
+    },
+    {
+       CPUID_TYPE_OEM,         CPUID_FAMILY_PPRO,      CPUID_MODEL_PII,
+       480,    cpuid_pii_freq,                 "Intel Pentium II"
+    }
+};
+unsigned int cpuid_intel_size = sizeof (cpuid_intel) / sizeof (cpuid_intel[0]);
 
-       /* look up vendor */
-       for (i = 0; ; i++) {
-               if ((cpu_vendors[i].vendor == 0) ||
-                   (!strcmp(cpu_vendors[i].vendor, info_p->cpuid_vendor))) {
-                       cpu_vendors[i].func(info_p);
-                       break;
-               }
-       }
-}
+/*
+ * AMD product arrays
+ */
+unsigned int cpuid_am486_dx_freq[] = { 33, 40, 0 };
+unsigned int cpuid_am486_dx2_freq[] = { 50, 66, 80, 99, 0 };
+unsigned int cpuid_am486_dx4_freq[] = { 99, 120, 133, 0 };
+unsigned int cpuid_am486_dx4wb_freq[] = { 99, 120, 133, 0 };
 
 /*
- * A useful model name string takes some decoding.
+ * UMC product array 
  */
-char *
-cpuid_intel_get_model_name(
-       uint8_t         brand,
-       uint8_t         family,
-       uint8_t         model,
-       uint32_t        signature)
-{
-       /* check for brand id */
-       switch(brand) {
-           case 0:
-               /* brand ID not supported; use alternate method. */
-               switch(family) {
-                   case CPUID_FAMILY_486:
-                       return "486";
-                   case CPUID_FAMILY_P5:
-                       return "Pentium";
-                   case CPUID_FAMILY_PPRO:
-                       switch(model) {
-                           case CPUID_MODEL_P6:
-                               return "Pentium Pro";
-                           case CPUID_MODEL_PII:
-                               return "Pentium II";
-                           case CPUID_MODEL_P65:
-                           case CPUID_MODEL_P66:
-                               return "Celeron";
-                           case CPUID_MODEL_P67:
-                           case CPUID_MODEL_P68:
-                           case CPUID_MODEL_P6A:
-                           case CPUID_MODEL_P6B:
-                               return "Pentium III";
-                           default:
-                               return "Unknown P6 Family";
-                       }
-                   case CPUID_FAMILY_PENTIUM4:
-                       return "Pentium 4";
-                   default:
-                       return "Unknown Family";
-               }
-           case 0x01:
-               return "Celeron";
-           case 0x02:
-           case 0x04:
-               return "Pentium III";
-           case 0x03:
-               if (signature == 0x6B1)
-                       return "Celeron";
-               else
-                       return "Pentium III Xeon";
-           case 0x06:
-               return "Mobile Pentium III";
-           case 0x07:
-               return "Mobile Celeron";
-           case 0x08:
-               if (signature >= 0xF20)
-                       return "Genuine Intel";
-               else
-                       return "Pentium 4";
-           case 0x09:
-               return "Pentium 4";
-           case 0x0b:
-               return "Xeon";
-           case 0x0e:
-           case 0x0f:
-               return "Mobile Pentium 4";
-           default:
-               return "Unknown Pentium";
-       }
-}
+unsigned int cpuid_u5sd_freq[] = { 25, 33, 40, 0 };
+unsigned int cpuid_u5s_freq[] = { 25, 33, 40, 0 };
 
 /*
- * Cache descriptor table. Each row has the form:
- *        (descriptor_value,           cache,  size,           linesize,
- *                             description)
- * Note: the CACHE_DESC macro does not expand description text in the kernel.
+ * Vendor ID array
  */
-static cpuid_cache_desc_t cpuid_cache_desc_tab[] = {
-CACHE_DESC(CPUID_CACHE_ITLB_4K,        Lnone,  0,              0, \
-       "Instruction TLB, 4K, pages 4-way set associative, 64 entries"),
-CACHE_DESC(CPUID_CACHE_ITLB_4M,        Lnone,  0,              0, \
-       "Instruction TLB, 4M, pages 4-way set associative, 4 entries"),
-CACHE_DESC(CPUID_CACHE_DTLB_4K,        Lnone,  0,              0, \
-       "Data TLB, 4K pages, 4-way set associative, 64 entries"),
-CACHE_DESC(CPUID_CACHE_DTLB_4M,        Lnone,  0,              0, \
-       "Data TLB, 4M pages, 4-way set associative, 4 entries"),
-CACHE_DESC(CPUID_CACHE_ITLB_64,        Lnone,  0,              0, \
-       "Instruction TLB, 4K and 2M or 4M pages, 64 entries"),
-CACHE_DESC(CPUID_CACHE_ITLB_128,       Lnone,  0,              0, \
-       "Instruction TLB, 4K and 2M or 4M pages, 128 entries"),
-CACHE_DESC(CPUID_CACHE_ITLB_256,       Lnone,  0,              0, \
-       "Instruction TLB, 4K and 2M or 4M pages, 256 entries"),
-CACHE_DESC(CPUID_CACHE_DTLB_64,                Lnone,  0,              0, \
-       "Data TLB, 4K and 4M pages, 64 entries"),
-CACHE_DESC(CPUID_CACHE_DTLB_128,       Lnone,  0,              0, \
-       "Data TLB, 4K and 4M pages, 128 entries"),
-CACHE_DESC(CPUID_CACHE_DTLB_256,       Lnone,  0,              0, \
-       "Data TLB, 4K and 4M pages, 256 entries"),
-CACHE_DESC(CPUID_CACHE_ICACHE_8K,      L1I,    8*1024,         32, \
-       "Instruction L1 cache, 8K, 4-way set associative, 32byte line size"),
-CACHE_DESC(CPUID_CACHE_DCACHE_8K,      L1D,    8*1024,         32, \
-       "Data L1 cache, 8K, 2-way set associative, 32byte line size"),
-CACHE_DESC(CPUID_CACHE_ICACHE_16K,     L1I,    16*1024,         32, \
-       "Instruction L1 cache, 16K, 4-way set associative, 32byte line size"),
-CACHE_DESC(CPUID_CACHE_DCACHE_16K,     L1D,    16*1024,        32, \
-       "Data L1 cache, 16K, 4-way set associative, 32byte line size"),
-CACHE_DESC(CPUID_CACHE_DCACHE_8K_64,   L1D,    8*1024,         64, \
-       "Data L1 cache, 8K, 4-way set associative, 64byte line size"),
-CACHE_DESC(CPUID_CACHE_DCACHE_16K_64,  L1D,    16*1024,        64, \
-       "Data L1 cache, 16K, 4-way set associative, 64byte line size"),
-CACHE_DESC(CPUID_CACHE_DCACHE_32K_64,  L1D,    32*1024,        64, \
-       "Data L1 cache, 32K, 4-way set associative, 64byte line size"),
-CACHE_DESC(CPUID_CACHE_TRACE_12K,      L1I,    12*1024,        64, \
-       "Trace cache, 12K-uop, 8-way set associative"),
-CACHE_DESC(CPUID_CACHE_TRACE_12K,      L1I,    16*1024,        64, \
-       "Trace cache, 16K-uop, 8-way set associative"),
-CACHE_DESC(CPUID_CACHE_TRACE_12K,      L1I,    32*1024,        64, \
-       "Trace cache, 32K-uop, 8-way set associative"),
-CACHE_DESC(CPUID_CACHE_UCACHE_128K,    L2U,    128*1024,       32, \
-       "Unified L2 cache, 128K, 4-way set associative, 32byte line size"),
-CACHE_DESC(CPUID_CACHE_UCACHE_256K,    L2U,    128*1024,       32, \
-       "Unified L2 cache, 256K, 4-way set associative, 32byte line size"),
-CACHE_DESC(CPUID_CACHE_UCACHE_512K,    L2U,    512*1024,       32, \
-       "Unified L2 cache, 512K, 4-way set associative, 32byte line size"),
-CACHE_DESC(CPUID_CACHE_UCACHE_1M,      L2U,    1*1024*1024,    32, \
-       "Unified L2 cache, 1M, 4-way set associative, 32byte line size"),
-CACHE_DESC(CPUID_CACHE_UCACHE_2M,      L2U,    2*1024*1024,    32, \
-       "Unified L2 cache, 2M, 4-way set associative, 32byte line size"),
-CACHE_DESC(CPUID_CACHE_UCACHE_128K_64, L2U,    128*1024,       64, \
-       "Unified L2 cache, 128K, 8-way set associative, 64byte line size"),
-CACHE_DESC(CPUID_CACHE_UCACHE_256K_64, L2U,    256*1024,       64, \
-       "Unified L2 cache, 256K, 8-way set associative, 64byte line size"),
-CACHE_DESC(CPUID_CACHE_UCACHE_512K_64, L2U,    512*1024,       64, \
-       "Unified L2 cache, 512K, 8-way set associative, 64byte line size"),
-CACHE_DESC(CPUID_CACHE_UCACHE_1M_64,   L2U,    1*1024*1024,    64, \
-       "Unified L2 cache, 1M, 8-way set associative, 64byte line size"),
-CACHE_DESC(CPUID_CACHE_UCACHE_256K_32, L2U,    256*1024,       32, \
-       "Unified L2 cache, 256K, 8-way set associative, 32byte line size"),
-CACHE_DESC(CPUID_CACHE_UCACHE_512K_32, L2U,    512*1024,       32, \
-       "Unified L2 cache, 512K, 8-way set associative, 32byte line size"),
-CACHE_DESC(CPUID_CACHE_UCACHE_1M_32,   L2U,    1*1024*1024,    32, \
-       "Unified L2 cache, 1M, 8-way set associative, 32byte line size"),
-CACHE_DESC(CPUID_CACHE_UCACHE_2M_32,   L2U,    2*1024*1024,    32, \
-       "Unified L2 cache, 2M, 8-way set associative, 32byte line size"),
-CACHE_DESC(CPUID_CACHE_NULL, Lnone, 0, 0, \
-       (char *)0),
+struct cpuid_name cpuid_name[] = {
+    {  CPUID_VID_INTEL,
+       cpuid_intel,    sizeof (cpuid_intel) / sizeof (cpuid_intel[0])
+    },
+    {  CPUID_VID_UMC,
+       (struct cpuid_product *)0,
+    },
+    {  CPUID_VID_AMD,
+       (struct cpuid_product *)0,
+    },
+    {  CPUID_VID_CYRIX,
+       (struct cpuid_product *)0,
+    },
+    {  CPUID_VID_NEXTGEN,
+       (struct cpuid_product *)0
+    },
+    {  "",
+       cpuid_generic,  sizeof (cpuid_generic) / sizeof (cpuid_generic[0])
+    },
+    {  (char *)0,
+    }
 };
 
-static void
-set_cpu_intel(i386_cpu_info_t *info_p)
-{
-       uint32_t        cpuid_result[4];
-       uint32_t        max_extid;
-        char            str[128], *p;
-       char            *model;
-       int             i;
-       int             j;
-
-       /* get extended cpuid results */
-       do_cpuid(0x80000000, cpuid_result);
-       max_extid = cpuid_result[0];
-
-       /* check to see if we can get brand string */
-       if (max_extid > 0x80000000) {
-               /*
-                * The brand string 48 bytes (max), guaranteed to
-                * be NUL terminated.
-                */
-               do_cpuid(0x80000002, cpuid_result);
-               bcopy((char *)cpuid_result, &str[0], 16);
-               do_cpuid(0x80000003, cpuid_result);
-               bcopy((char *)cpuid_result, &str[16], 16);
-               do_cpuid(0x80000004, cpuid_result);
-               bcopy((char *)cpuid_result, &str[32], 16);
-               for (p = str; *p != '\0'; p++) {
-                       if (*p != ' ') break;
-               }
-               strncpy(info_p->cpuid_brand_string,
-                       p, sizeof(info_p->cpuid_brand_string)-1);
-               info_p->cpuid_brand_string[sizeof(info_p->cpuid_brand_string)-1] = '\0';
-       }
-    
-       /* get processor signature and decode */
-       do_cpuid(1, cpuid_result);
-       info_p->cpuid_signature =  cpuid_result[0];
-       info_p->cpuid_stepping  =  cpuid_result[0]        & 0x0f;
-       info_p->cpuid_model     = (cpuid_result[0] >> 4)  & 0x0f;
-       info_p->cpuid_family    = (cpuid_result[0] >> 8)  & 0x0f;
-        info_p->cpuid_type      = (cpuid_result[0] >> 12) & 0x03;
-       info_p->cpuid_extmodel  = (cpuid_result[0] >> 16) & 0x0f;
-       info_p->cpuid_extfamily = (cpuid_result[0] >> 20) & 0xff;
-       info_p->cpuid_brand     =  cpuid_result[1]        & 0xff;
-       info_p->cpuid_features  =  cpuid_result[3];
-
-       /* decode family/model/type */
-       switch (info_p->cpuid_type) {
-           case CPUID_TYPE_OVERDRIVE:
-               strcat(info_p->model_string, "Overdrive ");
-               break;
-           case CPUID_TYPE_DUAL:
-               strcat(info_p->model_string, "Dual ");
-               break;
-       }
-       strcat(info_p->model_string,
-              cpuid_intel_get_model_name(info_p->cpuid_brand,
-                                         info_p->cpuid_family,
-                                         info_p->cpuid_model,
-                                         info_p->cpuid_signature));
-       info_p->model_string[sizeof(info_p->model_string)-1] = '\0';
-
-       /* get processor cache descriptor info */
-       do_cpuid(2, cpuid_result);
-       for (j = 0; j < 4; j++) {
-               if ((cpuid_result[j] >> 31) == 1)       /* bit31 is validity */
-                       continue;
-               ((uint32_t *) info_p->cache_info)[j] = cpuid_result[j];
-       }
-       /* first byte gives number of cpuid calls to get all descriptors */
-       for (i = 1; i < info_p->cache_info[0]; i++) {
-               if (i*16 > sizeof(info_p->cache_info))
-                       break;
-               do_cpuid(2, cpuid_result);
-               for (j = 0; j < 4; j++) {
-                       if ((cpuid_result[j] >> 31) == 1) 
-                               continue;
-                       ((uint32_t *) info_p->cache_info)[4*i+j] =
-                               cpuid_result[j];
-               }
-       }
-
-       /* decode the descriptors looking for L1/L2/L3 size info */
-       for (i = 1; i < sizeof(info_p->cache_info); i++) {
-               cpuid_cache_desc_t      *descp;
-               uint8_t                 desc = info_p->cache_info[i];
-
-               if (desc == CPUID_CACHE_NULL)
-                       continue;
-               for (descp = cpuid_cache_desc_tab;
-                       descp->value != CPUID_CACHE_NULL; descp++) {
-                       if (descp->value != desc)
-                               continue;
-                       info_p->cache_size[descp->type] = descp->size;
-                       if (descp->type == L2U)
-                               info_p->cache_linesize = descp->linesize;
-                       break;
-               }
-       }
-       /* For P-IIIs, L2 could be 256k or 512k but we can't tell */ 
-       if (info_p->cache_size[L2U] == 0 &&
-           info_p->cpuid_family == 0x6 && info_p->cpuid_model == 0xb) {
-               info_p->cache_size[L2U] = 256*1024;
-               info_p->cache_linesize = 32;
-       }
-
-       return;
-}
-
-static void
-set_cpu_unknown(i386_cpu_info_t *info_p)
-{
-       strcat(info_p->model_string, "Unknown");
-}
-
-
-static struct {
-       uint32_t        mask;
-       char            *name;
-} feature_names[] = {
-       {CPUID_FEATURE_FPU,   "FPU",},
-       {CPUID_FEATURE_VME,   "VME",},
-       {CPUID_FEATURE_DE,    "DE",},
-       {CPUID_FEATURE_PSE,   "PSE",},
-       {CPUID_FEATURE_TSC,   "TSC",},
-       {CPUID_FEATURE_MSR,   "MSR",},
-       {CPUID_FEATURE_PAE,   "PAE",},
-       {CPUID_FEATURE_MCE,   "MCE",},
-       {CPUID_FEATURE_CX8,   "CX8",},
-       {CPUID_FEATURE_APIC,  "APIC",},
-       {CPUID_FEATURE_SEP,   "SEP",},
-       {CPUID_FEATURE_MTRR,  "MTRR",},
-       {CPUID_FEATURE_PGE,   "PGE",},
-       {CPUID_FEATURE_MCA,   "MCA",},
-       {CPUID_FEATURE_CMOV,  "CMOV",},
-       {CPUID_FEATURE_PAT,   "PAT",},
-       {CPUID_FEATURE_PSE36, "PSE36",},
-       {CPUID_FEATURE_PSN,   "PSN",},
-       {CPUID_FEATURE_CLFSH, "CLFSH",},
-       {CPUID_FEATURE_DS,    "DS",},
-       {CPUID_FEATURE_ACPI,  "ACPI",},
-       {CPUID_FEATURE_MMX,   "MMX",},
-       {CPUID_FEATURE_FXSR,  "FXSR",},
-       {CPUID_FEATURE_SSE,   "SSE",},
-       {CPUID_FEATURE_SSE2,  "SSE2",},
-       {CPUID_FEATURE_SS,    "SS",},
-       {CPUID_FEATURE_HTT,   "HTT",},
-       {CPUID_FEATURE_TM,    "TM",},
-       {0, 0}
+/*
+ * Feature Flag values
+ */
+char *cpuid_flag[] = {
+    "FPU",     /* Floating point unit on-chip */
+    "VME",     /* Virtual Mode Extension */
+    "DE",      /* Debugging Extension */
+    "PSE",     /* Page Size Extension */
+    "TSC",     /* Time Stamp Counter */
+    "MSR",     /* Model Specific Registers */
+    "PAE",     /* Physical Address Extension */
+    "MCE",     /* Machine Check Exception */
+    "CX8",     /* CMPXCHG8 Instruction sSupported */
+    "APIC",    /* Local APIC Supported */
+    "(bit 10)",
+    "(bit 11)",
+    "MTRR",    /* Machine Type Range Register */
+    "PGE",     /* Page Global Enable */
+    "MCA",     /* Machine Check Architecture */
+    "CMOV",    /* Conditional Move Instruction Supported */
+    "(bit 16)",
+    "(bit 17)",
+    "(bit 18)",
+    "(bit 19)",
+    "(bit 20)",
+    "(bit 21)",
+    "(bit 22)",
+    "MMX",     /* Supports MMX instructions */
+    "(bit 24)",
+    "(bit 25)",
+    "(bit 26)",
+    "(bit 27)",
+    "(bit 28)",
+    "(bit 29)",
+    "(bit 30)",
+    "(bit 31)",
 };
 
-char *
-cpuid_get_feature_names(uint32_t feature, char *buf, unsigned buf_len)
-{
-       int     i;
-       int     len;
-       char    *p = buf;
-
-       for (i = 0; feature_names[i].mask != 0; i++) {
-               if ((feature & feature_names[i].mask) == 0)
-                       continue;
-               if (i > 0)
-                       *p++ = ' ';
-               len = min(strlen(feature_names[i].name), (buf_len-1) - (p-buf));
-               if (len == 0)
-                       break;
-               bcopy(feature_names[i].name, p, len);
-               p += len;
-       }
-       *p = '\0';
-       return buf;
-}
+/*
+ * Cache description array
+ */
+struct cpuid_cache_desc cpuid_cache_desc[] = {
+    {  CPUID_CACHE_ITLB_4K,
+       "Instruction TBL, 4K, pages 4-way set associative, 64 entries"
+    },
+    {  CPUID_CACHE_ITLB_4M,
+       "Instruction TBL, 4M, pages 4-way set associative, 4 entries"
+    },
+    {  CPUID_CACHE_DTLB_4K,
+       "Data TBL, 4K pages, 4-way set associative, 64 entries"
+    },
+    {  CPUID_CACHE_DTLB_4M,
+       "Data TBL, 4M pages, 4-way set associative, 4 entries"
+    },
+    {  CPUID_CACHE_ICACHE_8K,
+       "Instruction L1 cache, 8K, 4-way set associative, 32byte line size"
+    },
+    {  CPUID_CACHE_DCACHE_8K,
+       "Data L1 cache, 8K, 2-way set associative, 32byte line size"
+    },
+    {  CPUID_CACHE_UCACHE_128K,
+       "Unified L2 cache, 128K, 4-way set associative, 32byte line size"
+    },
+    {  CPUID_CACHE_UCACHE_256K,
+       "Unified L2 cache, 256K, 4-way set associative, 32byte line size"
+    },
+    {  CPUID_CACHE_UCACHE_512K,
+       "Unified L2 cache, 512K, 4-way set associative, 32byte line size"
+    },
+    {  CPUID_CACHE_NULL,
+       (char *)0
+    }
+};
+    
+/*
+ * CPU identification
+ */
+unsigned int   cpuid_value;
+unsigned char  cpuid_type;
+unsigned char  cpuid_family;
+unsigned char  cpuid_model;
+unsigned char  cpuid_stepping;
+unsigned int   cpuid_feature;
+char           cpuid_vid[CPUID_VID_SIZE + 1];
+unsigned char  cpuid_cache[CPUID_CACHE_SIZE];
 
-void
-cpuid_feature_display(
-       char    *header,
-       int     my_cpu)
+/*
+ * Return correct CPU_TYPE
+ */
+/*ARGSUSED*/
+cpu_type_t
+cpuid_cputype(
+    int my_cpu)
 {
-       char    buf[256];
-
-       printf("%s: %s\n", header,
-                 cpuid_get_feature_names(cpuid_features(), buf, sizeof(buf)));
+#ifndef MACH_BSD       /* FIXME  - add more family/chip types */
+    switch (cpuid_family) {
+    case CPUID_FAMILY_PPRO:
+       return (CPU_TYPE_PENTIUMPRO);
+    case CPUID_FAMILY_P5:
+       return (CPU_TYPE_PENTIUM);
+    case CPUID_FAMILY_486:
+       return (CPU_TYPE_I486);
+    default:
+       break;
+    }
+#endif
+    return (CPU_TYPE_I386);
 }
 
+/*
+ * Display processor signature
+ */
+/*ARGSUSED*/
 void
 cpuid_cpu_display(
-       char    *header,
-       int     my_cpu)
-{
-       printf("%s: %s\n", header,
-               (cpuid_cpu_info.cpuid_brand_string[0] != '\0') ?
-                       cpuid_cpu_info.cpuid_brand_string :
-                       cpuid_cpu_info.model_string);
-}
-
-unsigned int
-cpuid_family(void)
+    char *header,
+    int my_cpu)
 {
-       return cpuid_cpu_info.cpuid_family;
-}
-
-unsigned int
-cpuid_features(void)
-{
-       return cpuid_cpu_info.cpuid_features;
-}
-
-i386_cpu_info_t        *
-cpuid_info(void)
-{
-       return &cpuid_cpu_info;
+    struct cpuid_name *name;
+    unsigned int i;
+    unsigned int *freq;
+    unsigned int mhz;
+    unsigned int feature;
+    char **flag;
+    extern unsigned int delaycount;
+
+    /*
+     * Identify vendor ID
+     */
+    for (name = cpuid_name; name->name != (char *)0; name++) {
+       char *p = name->name;
+       char *q = cpuid_vid;
+       while (*p == *q && *p != 0) {
+           p++;
+           q++;
+       }
+       if (*p == '\0' && *q == '\0')
+           break;
+    }
+    if (name->name == (char *)0) {
+       printf("Unrecognized processor vendor id = '%s'\n", cpuid_vid);
+       return;
+    }
+
+    /*
+     * Identify Product ID
+     */
+    for (i = 0; i < name->size; i++)
+       if (name->product[i].type == cpuid_type &&
+           name->product[i].family == cpuid_family &&
+           name->product[i].model == cpuid_model)
+           break;
+    if (i == name->size) {
+       printf("%s processor (type = 0x%x, family = 0x%x, model = 0x%x)\n",
+              "Unrecognized", cpuid_type, cpuid_family, cpuid_model);
+       return;
+    }
+
+    /*
+     * Look for frequency and adjust it to known values
+     */
+    mhz = (1000 * delaycount) / name->product[i].delay;
+    for (freq = name->product[i].frequency; *freq != 0; freq++)
+       if (*freq >= mhz)
+           break;
+    if (*freq == 0)
+       mhz = *(freq - 1);
+    else if (freq == name->product[i].frequency)
+       mhz = *freq;
+    else if (*freq - mhz > mhz - *(freq - 1))
+       mhz = *(freq - 1);
+    else if (*freq != mhz)
+       mhz = *freq;
+
+    /*
+     * Display product and frequency
+     */
+    printf("%s: %s at %d MHz (signature = %d/%d/%d/%d)\n",
+          header, name->product[i].name, mhz, cpuid_type,
+          cpuid_family, cpuid_model, cpuid_stepping);
+
+    /*
+     * Display feature (if any)
+     */
+    if (cpuid_feature) {
+       i = 0;
+       flag = cpuid_flag;
+       for (feature = cpuid_feature; feature != 0; feature >>= 1) {
+           if (feature & 1)
+               if (i == 0) {
+                   printf("%s: %s", header, *flag);
+                   i = 1;
+               } else 
+                   printf(", %s", *flag);
+           flag++;
+       }
+       printf("\n");
+    }
 }
 
-/* XXX for temporary compatibility */
+/*
+ * Display processor configuration information
+ */
+/*ARGSUSED*/
 void
-set_cpu_model(void)
+cpuid_cache_display(
+    char *header,
+    int my_cpu)
 {
-       cpuid_get_info(&cpuid_cpu_info);
-       cpuid_feature = cpuid_cpu_info.cpuid_features;  /* XXX compat */
+    struct cpuid_cache_desc *desc;
+    unsigned int i;
+
+    if (cpuid_cache[CPUID_CACHE_VALID] == 1)
+       for (i = 0; i < CPUID_CACHE_SIZE; i++) {
+           if (i != CPUID_CACHE_VALID || cpuid_cache[i] == CPUID_CACHE_NULL)
+               continue;
+           for (desc = cpuid_cache_desc;
+                desc->description != (char *)0; desc++)
+               if (desc->value == cpuid_cache[i])
+                   break;
+           if (desc->description != (char *)0)
+               printf("%s: %s\n", header, desc->description);
+       }
 }
-
index c8fad3ffbd45549f77d24b46fc94848206aa3dc4..a500c8d0214880e0ef23ffc4e97197fe734db760 100644 (file)
@@ -1,24 +1,21 @@
 /*
- * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 /*
  * x86 CPU identification
  *
+ * TODO : Add TI/Thomson processors
  */
 
 #ifndef _MACHINE_CPUID_H_
 #define _MACHINE_CPUID_H_
 
-#include <sys/appleapiopts.h>
-
-#ifdef __APPLE_API_PRIVATE
-
 #define        CPUID_VID_SIZE          12
 #define        CPUID_VID_INTEL         "GenuineIntel"
 #define        CPUID_VID_UMC           "UMC UMC UMC "
 
 #define        CPUID_FEATURE_FPU    0x00000001 /* Floating point unit on-chip */
 #define        CPUID_FEATURE_VME    0x00000002 /* Virtual Mode Extension */
-#define        CPUID_FEATURE_DE     0x00000004 /* Debugging Extension */
+#define        CPUID_FEATURE_IOB    0x00000004 /* I/O Breakpoints */
 #define        CPUID_FEATURE_PSE    0x00000008 /* Page Size Extension */
 #define        CPUID_FEATURE_TSC    0x00000010 /* Time Stamp Counter */
 #define        CPUID_FEATURE_MSR    0x00000020 /* Model Specific Registers */
-#define CPUID_FEATURE_PAE    0x00000040 /* Physical Address Extension */
 #define        CPUID_FEATURE_MCE    0x00000080 /* Machine Check Exception */
 #define        CPUID_FEATURE_CX8    0x00000100 /* CMPXCHG8B */
 #define        CPUID_FEATURE_APIC   0x00000200 /* On-chip APIC */
-#define CPUID_FEATURE_SEP    0x00000800 /* Fast System Call */
 #define        CPUID_FEATURE_MTRR   0x00001000 /* Memory Type Range Register */
 #define        CPUID_FEATURE_PGE    0x00002000 /* Page Global Enable */
 #define        CPUID_FEATURE_MCA    0x00004000 /* Machine Check Architecture */
 #define        CPUID_FEATURE_CMOV   0x00008000 /* Conditional Move Instruction */
-#define CPUID_FEATURE_PAT    0x00010000 /* Page Attribute Table */
-#define CPUID_FEATURE_PSE36  0x00020000 /* 36-bit Page Size Extension */
-#define CPUID_FEATURE_PSN    0x00040000 /* Processor Serial Number */
-#define CPUID_FEATURE_CLFSH  0x00080000 /* CLFLUSH Instruction supported */
-#define CPUID_FEATURE_DS     0x00200000 /* Debug Store */
-#define CPUID_FEATURE_ACPI   0x00400000 /* Thermal Monitor, SW-controlled clock */
-#define CPUID_FEATURE_MMX    0x00800000 /* MMX supported */
-#define CPUID_FEATURE_FXSR   0x01000000 /* Fast floating point save/restore */
-#define CPUID_FEATURE_SSE    0x02000000 /* Streaming SIMD extensions */
-#define CPUID_FEATURE_SSE2   0x04000000 /* Streaming SIMD extensions 2 */
-#define CPUID_FEATURE_SS     0x08000000 /* Self-Snoop */
-#define CPUID_FEATURE_HTT    0x10000000 /* Hyper-Threading Technology */
-#define CPUID_FEATURE_TM     0x20000000 /* Thermal Monitor */
 
 #define        CPUID_TYPE_OEM              0x0 /* Original processor */
 #define        CPUID_TYPE_OVERDRIVE        0x1 /* Overdrive processor */
@@ -82,8 +61,7 @@
 #define        CPUID_FAMILY_386            0x3 /* Intel 386 (not part of CPUID) */
 #define        CPUID_FAMILY_486            0x4 /* Intel 486 */
 #define        CPUID_FAMILY_P5             0x5 /* Intel Pentium */
-#define        CPUID_FAMILY_PPRO           0x6 /* Intel Pentium Pro, II, III */
-#define CPUID_FAMILY_PENTIUM4       0xF /* Intel Pentium 4 */
+#define        CPUID_FAMILY_PPRO           0x6 /* Intel Pentium Pro */
 
 #define        CPUID_MODEL_I386_DX         0x0 /* Intel 386 (not part of CPUID) */
 
 
 #define        CPUID_MODEL_P6              0x1 /* Intel P6 */
 #define        CPUID_MODEL_PII             0x3 /* Intel PII */
-#define CPUID_MODEL_P65             0x5 /* Intel PII/Xeon/Celeron model 5 */
-#define CPUID_MODEL_P66             0x6 /* Intel Celeron model 6 */
-#define CPUID_MODEL_P67             0x7 /* Intel PIII/Xeon model 7 */
-#define CPUID_MODEL_P68             0x8 /* Intel PIII/Xeon/Celeron model 8 */
-#define CPUID_MODEL_P6A             0xA /* Intel PIII Xeon model A */
-#define CPUID_MODEL_P6B             0xB /* Intel PIII model B */
 
 #define        CPUID_CACHE_SIZE        16      /* Number of descriptor vales */
+#define        CPUID_CACHE_VALID        4      /* Index of descriptor validity */
 
 #define        CPUID_CACHE_NULL           0x00 /* NULL */
 #define        CPUID_CACHE_ITLB_4K        0x01 /* Instruction TLB, 4K pages */
 #define        CPUID_CACHE_DTLB_4K        0x03 /* Data TLB, 4K pages */
 #define        CPUID_CACHE_DTLB_4M        0x04 /* Data TLB, 4M pages */
 #define        CPUID_CACHE_ICACHE_8K      0x06 /* Instruction cache, 8K */
-#define        CPUID_CACHE_ICACHE_16K     0x08 /* Instruction cache, 16K */
 #define        CPUID_CACHE_DCACHE_8K      0x0A /* Data cache, 8K */
-#define        CPUID_CACHE_DCACHE_16K     0x0C /* Data cache, 16K */
-#define        CPUID_CACHE_UCACHE_128K    0x41 /* 2nd-level cache, 128K */
-#define        CPUID_CACHE_UCACHE_256K    0x42 /* 2nd-level cache, 256K */
-#define        CPUID_CACHE_UCACHE_512K    0x43 /* 2nd-level cache, 512K */
-#define        CPUID_CACHE_UCACHE_1M      0x44 /* 2nd-level cache, 1M */
-#define        CPUID_CACHE_UCACHE_2M      0x45 /* 2nd-level cache, 2M */
-#define CPUID_CACHE_ITLB_64        0x50 /* Instruction TLB, 64 entries */
-#define CPUID_CACHE_ITLB_128       0x51 /* Instruction TLB, 128 entries */
-#define CPUID_CACHE_ITLB_256       0x52 /* Instruction TLB, 256 entries */
-#define CPUID_CACHE_DTLB_64        0x5B /* Data TLB, 64 entries */
-#define CPUID_CACHE_DTLB_128       0x5C /* Data TLB, 128 entries */
-#define CPUID_CACHE_DTLB_256       0x5D /* Data TLB, 256 entries */
-#define        CPUID_CACHE_DCACHE_8K_64   0x66 /* Data cache, 8K, 64 byte line size */
-#define        CPUID_CACHE_DCACHE_16K_64  0x67 /* Data cache, 16K, 64 byte line size */
-#define        CPUID_CACHE_DCACHE_32K_64  0x68 /* Data cache, 32K, 64 byte line size */
-#define CPUID_CACHE_TRACE_12K      0x70 /* Trace cache 12K-uop, 8-way */
-#define CPUID_CACHE_TRACE_16K      0x71 /* Trace cache 16K-uop, 8-way */
-#define CPUID_CACHE_TRACE_32K      0x72 /* Trace cache 32K-uop, 8-way */
-#define        CPUID_CACHE_UCACHE_128K_64 0x79 /* 2nd-level, 128K, 8-way, 64 bytes */
-#define        CPUID_CACHE_UCACHE_256K_64 0x7A /* 2nd-level, 256K, 8-way, 64 bytes */
-#define        CPUID_CACHE_UCACHE_512K_64 0x7B /* 2nd-level, 512K, 8-way, 64 bytes */
-#define        CPUID_CACHE_UCACHE_1M_64   0x7C /* 2nd-level, 1M, 8-way, 64 bytes */
-#define CPUID_CACHE_UCACHE_256K_32 0x82 /* 2nd-level, 256K, 8-way, 32 bytes */
-#define CPUID_CACHE_UCACHE_512K_32 0x83 /* 2nd-level, 512K, 8-way, 32 bytes */
-#define CPUID_CACHE_UCACHE_1M_32   0x84 /* 2nd-level, 1M, 8-way, 32 bytes */
-#define CPUID_CACHE_UCACHE_2M_32   0x85 /* 2nd-level, 2M, 8-way, 32 bytes */
+#define        CPUID_CACHE_UCACHE_128K    0x41 /* Unified cache, 128K */
+#define        CPUID_CACHE_UCACHE_256K    0x42 /* Unified cache, 256K */
+#define        CPUID_CACHE_UCACHE_512K    0x43 /* Unified cache, 512K */
 
 #ifndef ASSEMBLER
-#include <stdint.h>
-#include <mach/mach_types.h>
-#include <kern/kern_types.h>
 #include <mach/machine.h>
 
+extern unsigned int    cpuid_value;
+extern unsigned char   cpuid_type;
+extern unsigned char   cpuid_family;
+extern unsigned char   cpuid_model;
+extern unsigned char   cpuid_stepping;
+extern unsigned int    cpuid_feature;
+extern char            cpuid_vid[];
+extern unsigned char   cpuid_cache[];
 
-static inline void
-do_cpuid(uint32_t selector, uint32_t *data)
-{
-       asm("cpuid"
-               : "=a" (data[0]),
-                 "=b" (data[1]),
-                 "=c" (data[2]),
-                 "=d" (data[3])
-               : "a"(selector));
-}
+/*
+ * Product ID arrays per vendor
+ */
+struct cpuid_product {
+    unsigned char              type;           /* CPU type */
+    unsigned char              family;         /* CPU family */
+    unsigned char              model;          /* CPU model */
+    unsigned int               delay;          /* 1MHz Delay (scale 1000) */
+    unsigned int               *frequency;     /* Frequency array */
+    char                       *name;          /* Model name */
+};
 
 /*
- * Cache ID descriptor structure.
- * Note: description string absent in kernel.
+ * Vendor ID structure
  */
-typedef enum { Lnone, L1I, L1D, L2U, LCACHE_MAX } cache_type_t ; 
-typedef struct {
-       unsigned char   value;          /* Descriptor value */
-       cache_type_t    type;           /* Cache type */
-       unsigned int    size;           /* Cache size */
-       unsigned int    linesize;       /* Cache line size */
-#ifdef KERNEL
-       char            *description;   /* Cache description */
-#endif /* KERNEL */
-} cpuid_cache_desc_t;  
-
-#ifdef KERNEL
-#define CACHE_DESC(value,type,size,linesize,text) \
-       { value, type, size, linesize, text }
-#else
-#define CACHE_DESC(value,type,size,linesize,text) \
-       { value, type, size, linesize }
-#endif /* KERNEL */
-
-/* Physical CPU info */
-typedef struct {
-       char            cpuid_vendor[16];
-       char            cpuid_brand_string[48];
-
-       uint32_t        cpuid_value;
-       cpu_type_t      cpuid_type;
-       uint8_t         cpuid_family;
-       uint8_t         cpuid_model;
-       uint8_t         cpuid_extmodel;
-       uint8_t         cpuid_extfamily;
-       uint8_t         cpuid_stepping;
-       uint32_t        cpuid_features;
-       uint32_t        cpuid_signature;
-       uint8_t         cpuid_brand; 
-       
-       uint32_t        cache_size[LCACHE_MAX];
-       uint32_t        cache_linesize;
-
-       char            model_string[64];  /* sanitized model string */
-       uint8_t         cache_info[64];    /* list of cache descriptors */
-
-} i386_cpu_info_t;
+struct cpuid_name {
+    char                       *name;          /* Vendor ID name */
+    struct cpuid_product       *product;       /* product array */
+    unsigned int               size;           /* #elements in product array */
+};
 
+/*
+ * Cache ID description structure
+ */
+struct cpuid_cache_desc {
+    unsigned char              value;          /* Descriptor value */
+    char                       *description;   /* Cache description */
+};
 
 /*
  * External declarations
  */
 extern cpu_type_t      cpuid_cputype(int);
 extern void            cpuid_cpu_display(char *, int);
-extern void            cpuid_features_display(char *, int);
-extern char *          cpuid_get_feature_names(uint32_t, char *, unsigned);
-
-extern uint32_t                cpuid_features(void);
-extern uint32_t                cpuid_family(void);
-
-extern char *          cpuid_intel_get_model_name(uint8_t, uint8_t,
-                                                  uint8_t, uint32_t);
+extern void            cpuid_cache_display(char *, int);
 
-extern i386_cpu_info_t *cpuid_info(void);
-
-extern uint32_t                cpuid_feature;  /* XXX obsolescent */
 #endif /* ASSEMBLER */
-
-#endif /* __APPLE_API_PRIVATE */
 #endif /* _MACHINE_CPUID_H_ */
index 5f7b715a64d0562d342f9958be9e9c2dc1c55104..dd82543905aa605d25582a72d0e3487d820ffb3e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c99127502b22ecf2ac72b1acb5ae5e015928c536..67e73801faa5b1735eb06328c3ccfcbc06fb85d1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a6744c240027e709011e4db8e26877e1bb8aa75e..15fd0003d263c4b2ac18bba815e77c6ff415b081 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f79971f27499c7f696af206406ca3340820d70db..bd3a523695a9718c2f62251969cd7af2dff344fd 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9a62924517fbfae6b01feca6b5c87c17f9eed319..09acd12c9edc0227779dbdda8c8376c5473bed64 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3d21d6f388efe1a891fd2d91114c25ea18659bc0..41349103f2e8baaf8617d9d892ae0e0999ff11be 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e1496e6c93ef6f69049f4685a11feb999c7c678b..bb5d56d4a59fe4c09d729da5bedacc54e2257b6e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0f802c36ad3a88c7edd017aad888a1bf3894f984..55de05e4d779791f52dd9b55d5865a6e30e8093b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f63add90b3053a125f56e58053b635632392d3a7..72526d18020cb4cc85693d1b11672f05b4ac24b4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index aac088fad05a8ce5c7e63e559542f82154a905b1..542c8a446670f7bbf653629b6b068326a6912639 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 34bf4752a6536eec49eb5b323af7ef6c4cee7346..0bce988843a33b096bc6dffd4606b65883a1a807 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 85ff1b94e163b666487824ab2d3d174008ebb5b4..2b1f9acd755667ae8dfe9ed5211c6fd39595a8ee 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 705fb33b3ef9de1e717610814041b587ba4f08da..6537364ce09c54324021f7164feb12cd50e83e48 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0eacdf01be3b5c55e1c023db279e48103679ecaf..c8942d570637c48eeb6d47c0eac17332283851d4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8677ba1e1c2ccc880224e8767b3cad8a813e1720..8d9f57b57a2a8ac6ae810be986b51a2f5648bcb7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f84ee345a370c71b1c6bec4c80dbd598147ea505..302dbe497746c44f671856898ce9e9f11c985fe0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ebdd3c1ee5241dcbbf80520db7c2bd15ac051568..31121460f2b58689bd830896794fe62953c8a7e5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ea87802edd64428857def0292e2d2cf3994b97d7..80001989d6855eba219f541c497972b84518b8d2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4a1f6f7c64d8a659a0f8c042a91983d2d18eaeb5..f9c0063107d84e99d6be21a2a6db237758c53e92 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 293c5bb691a963128b87c9022ddfdc041fff1284..66ca626ff81ecd89a29461948be0e105fb64d541 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1ec07fb8076a193d08850d4fc23e51da21f28546..57ba52cbc5c28ffc95b5aa2903ffcf3a82076e39 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ed2710ccca30e80c1016643144175a943bdccd03..5e6acea432d06fee0d5f771963cff082851c22c3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 03a3535a1d17b3315454d99cb8f3755b83ec19d7..e68a8f4fdfac82e348f3861542bb39df2bfc3e3a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d23b32b75cb60c9862fa26e294c172d6593fcedd..fbecc796638a96e7a5a832559997b3a16e064ffc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f381088c72ec920f67c3c94c5dc6cc8e0076f0f3..0c955e130815a5497e2d7f144335c73a2bc4e1d6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4a61a51601260dbd6bd16e02ff6554e02526ac8f..239fd081c048d9421eb4324afdf00603c2ec1a62 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9b7c831323e61e77f0425c4b2715c6277d3e4852..b83e3eb02bc7587999300e3c2923cb57a20510f6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 62673c04713c3981da6c3241b4ea1744e80bba72..2335e4db3b8b5b5072fee89ef71296bf90de46ce 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 537b12d4530d6a0630cbfe5487537a073f9abcd5..4d06849176e92a7221c38edc70b5e172b8aef807 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 02e6f05435090c6943a986ea10f2e67d08c693dc..ec00e33f2de5f8d43c96b15b47eef9a343429597 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a202605af9c6b1ed76950c8551eea7d12c14d64f..bd9705115c672717c96cdea703851394dcf64ce2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e62cb0eed05bad57c003db8e5e4b49377b048091..8b50a7eb2da5d159f1158dc33b77f2266c82ee38 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 532ba81311208c0da35b37162a03b817e4691a18..db59db5d18dd4cb85b782ec843c573257e8a2b38 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b2236f355e60bac92fd20571d4db4d0dafa33405..23a39df8fcf00e160700c087056bd4be1c704a79 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 50429cb9225def763598224846c63586d9336ac4..824610f9b06dc45b750c20421b32853c641b6879 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3abc1ea93238792ecdd3dfd3ce89e8ec06f3bdb1..2f623c68c85433ad981b5bf2f2528a4c829e9d6a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f0a0a08d87830cfc6b4e97e1c887d4d9f0a75808..547a233b6532e221eb430223c90ea501257bebe7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -2776,6 +2773,79 @@ ENTRY(dr_addr)
        .long   0,0,0,0
        .text
 
+/*
+ * Determine cpu model and set global cpuid_xxx variables
+ *
+ * Relies on 386 eflags bit 18 (AC) always being zero & 486 preserving it.
+ * Relies on 486 eflags bit 21 (ID) always being zero & 586 preserving it.
+ * Relies on CPUID instruction for next x86 generations
+ * (assumes cpuid-family-homogenous MPs; else convert to per-cpu array)
+ */
+
+ENTRY(set_cpu_model)
+       FRAME
+       pushl   %ebx                    /* save ebx */
+       andl    $~0x3,%esp              /* Align stack to avoid AC fault */
+       pushfl                          /* push EFLAGS */
+       popl    %eax                    /* pop into eax */
+       movl    %eax,%ecx               /* Save original EFLAGS */
+       xorl    $(EFL_AC+EFL_ID),%eax   /* toggle ID,AC bits */
+       pushl   %eax                    /* push new value */
+       popfl                           /* through the EFLAGS register */
+       pushfl                          /* and back */
+       popl    %eax                    /* into eax */
+       movb    $(CPUID_FAMILY_386),EXT(cpuid_family)
+       pushl   %ecx                    /* push original EFLAGS */
+       popfl                           /* restore EFLAGS */
+       xorl    %ecx,%eax               /* see what changed */
+       testl   $ EFL_AC,%eax           /* test AC bit */
+       jz      0f                      /* if AC toggled (486 or higher) */
+       
+       movb    $(CPUID_FAMILY_486),EXT(cpuid_family)
+       testl   $ EFL_ID,%eax           /* test ID bit */
+       jz      0f                      /* if ID toggled use cpuid instruction */
+       
+       xorl    %eax,%eax               /* get vendor identification string */
+       .word   0xA20F                  /* cpuid instruction */
+       movl    %eax,EXT(cpuid_value)   /* Store high value */ 
+       movl    %ebx,EXT(cpuid_vid)     /* Store byte 0-3 of Vendor ID */
+       movl    %edx,EXT(cpuid_vid)+4   /* Store byte 4-7 of Vendor ID */
+       movl    %ecx,EXT(cpuid_vid)+8   /* Store byte 8-B of Vendor ID */
+       movl    $1,%eax                 /* get processor signature */
+       .word   0xA20F                  /* cpuid instruction */
+       movl    %edx,EXT(cpuid_feature) /* Store feature flags */
+       movl    %eax,%ecx               /* Save original signature */
+       andb    $0xF,%al                /* Get Stepping ID */
+       movb    %al,EXT(cpuid_stepping) /* Save Stepping ID */
+       movl    %ecx,%eax               /* Get original signature */
+       shrl    $4,%eax                 /* Shift Stepping ID */
+       movl    %eax,%ecx               /* Save original signature */
+       andb    $0xF,%al                /* Get Model */
+       movb    %al,EXT(cpuid_model)    /* Save Model */
+       movl    %ecx,%eax               /* Get original signature */
+       shrl    $4,%eax                 /* Shift Stepping ID */
+       movl    %eax,%ecx               /* Save original signature */
+       andb    $0xF,%al                /* Get Family */
+       movb    %al,EXT(cpuid_family)   /* Save Family */
+       movl    %ecx,%eax               /* Get original signature */
+       shrl    $4,%eax                 /* Shift Stepping ID */
+       andb    $0x3,%al                /* Get Type */
+       movb    %al,EXT(cpuid_type)     /* Save Type */
+
+       movl    EXT(cpuid_value),%eax   /* Get high value */
+       cmpl    $2,%eax                 /* Test if processor configuration */
+       jle     0f                      /* is present */
+       movl    $2,%eax                 /* get processor configuration */
+       .word   0xA20F                  /* cpuid instruction */
+       movl    %eax,EXT(cpuid_cache)   /* Store byte 0-3 of configuration */
+       movl    %ebx,EXT(cpuid_cache)+4 /* Store byte 4-7 of configuration */
+       movl    %ecx,EXT(cpuid_cache)+8 /* Store byte 8-B of configuration */
+       movl    %edx,EXT(cpuid_cache)+12 /* Store byte C-F of configuration */
+0:
+       popl    %ebx                    /* restore ebx */
+       EMARF
+       ret                             /* return */
+
 ENTRY(get_cr0)
        movl    %cr0, %eax
        ret
index 48bbed0e40f6fad4293c5c135327f7e5f50a8715..b0cd27fffdea95a0cd901f63905aa54f6ab5336c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -306,40 +303,3 @@ void machine_callstack(
 }
 
 #endif /* MACH_ASSERT */
-
-
-
-
-/* FIXMEx86 */
-/* These all need to be implemented somewhere */
-
-void fillPage(ppnum_t pa, unsigned int fill)
-{
-}
-
-uint64_t max_mem;
-uint64_t sane_size;
-
-#include <vm/pmap.h>
-
-ppnum_t pmap_find_phys(pmap_t pmap, addr64_t va)
-{
-  return 0;
-}
-
-kern_return_t copypv(addr64_t source, addr64_t sink, unsigned int size, int which)
-{
-  return KERN_SUCCESS;
-}
-
-void mapping_set_mod(ppnum_t pa)
-{
-}
-
-void flush_dcache64(addr64_t addr, unsigned count, int phys)
-{
-}
-
-void invalidate_icache64(addr64_t addr, unsigned cnt, int phys)
-{
-}
index 95cbb59fa59da1c11533fd7eb6a8771bed2e9b00..7b2a7e7cefdd2def091f8aab031699eaa2d99b90 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2b141f2d1b32af41f7ef3645e479a8376c9afd19..b340b6fada8c25cd76a8940590224738706c3a9d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index fbc3b418851d4e992b8bc2962789a65656c8d391..beeb5130488c53f6ba8339b5f01022fbcbb023fb 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0e358d657b10bd0ec324660c7cd36fa037cb775d..eb25581691368f5a074fc20fbf67b3991d9eb456 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -136,28 +133,6 @@ machine_signal_idle(
 {
 }
 
-void
-ml_cpu_get_info(ml_cpu_info_t *cpu_info)
-{
-}
-
-void
-ml_init_max_cpus(unsigned long max_cpus)
-{
-}
-
-int
-ml_get_max_cpus(void)
-{
-       return(machine_info.max_cpus);
-}
-
-int
-ml_get_current_cpus(void)
-{
-       return machine_info.avail_cpus;
-}
-
 /* Stubs for pc tracing mechanism */
 
 int *pc_trace_buf;
index 97038c555e5f58db4351635106af37d42ed64f92..4908a08f5a5244963c6dc1aef29f40a993e51fbc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -76,70 +73,6 @@ vm_offset_t
 ml_static_ptovirt(
        vm_offset_t);
 
-/* PCI config cycle probing */
-boolean_t ml_probe_read(
-       vm_offset_t paddr,
-       unsigned int *val);
-boolean_t ml_probe_read_64(
-       addr64_t paddr,
-       unsigned int *val);
-
-/* Read physical address byte */
-unsigned int ml_phys_read_byte(
-       vm_offset_t paddr);
-unsigned int ml_phys_read_byte_64(
-       addr64_t paddr);
-
-/* Read physical address half word */
-unsigned int ml_phys_read_half(
-       vm_offset_t paddr);
-unsigned int ml_phys_read_half_64(
-       addr64_t paddr);
-
-/* Read physical address word*/
-unsigned int ml_phys_read(
-       vm_offset_t paddr);
-unsigned int ml_phys_read_64(
-       addr64_t paddr);
-unsigned int ml_phys_read_word(
-       vm_offset_t paddr);
-unsigned int ml_phys_read_word_64(
-       addr64_t paddr);
-
-/* Read physical address double word */
-unsigned long long ml_phys_read_double(
-       vm_offset_t paddr);
-unsigned long long ml_phys_read_double_64(
-       addr64_t paddr);
-
-/* Write physical address byte */
-void ml_phys_write_byte(
-       vm_offset_t paddr, unsigned int data);
-void ml_phys_write_byte_64(
-       addr64_t paddr, unsigned int data);
-
-/* Write physical address half word */
-void ml_phys_write_half(
-       vm_offset_t paddr, unsigned int data);
-void ml_phys_write_half_64(
-       addr64_t paddr, unsigned int data);
-
-/* Write physical address word */
-void ml_phys_write(
-       vm_offset_t paddr, unsigned int data);
-void ml_phys_write_64(
-       addr64_t paddr, unsigned int data);
-void ml_phys_write_word(
-       vm_offset_t paddr, unsigned int data);
-void ml_phys_write_word_64(
-       addr64_t paddr, unsigned int data);
-
-/* Write physical address double word */
-void ml_phys_write_double(
-       vm_offset_t paddr, unsigned long long data);
-void ml_phys_write_double_64(
-       addr64_t paddr, unsigned long long data);
-
 void ml_static_mfree(
        vm_offset_t,
        vm_size_t);
@@ -148,23 +81,6 @@ void ml_static_mfree(
 vm_offset_t ml_vtophys(
        vm_offset_t vaddr);
 
-/* Struct for ml_cpu_get_info */
-struct ml_cpu_info {
-       unsigned long           vector_unit;
-       unsigned long           cache_line_size;
-       unsigned long           l1_icache_size;
-       unsigned long           l1_dcache_size;
-       unsigned long           l2_settings;
-       unsigned long           l2_cache_size;
-       unsigned long           l3_settings;
-       unsigned long           l3_cache_size;
-};
-
-typedef struct ml_cpu_info ml_cpu_info_t;
-
-/* Get processor info */
-void ml_cpu_get_info(ml_cpu_info_t *cpu_info);
-
 #endif /* __APPLE_API_UNSTABLE */
 
 #ifdef __APPLE_API_PRIVATE
@@ -183,6 +99,8 @@ vm_offset_t ml_static_malloc(
 #endif /* PEXPERT_KERNEL_PRIVATE || MACH_KERNEL_PRIVATE  */
 
 #ifdef  MACH_KERNEL_PRIVATE 
+/* check pending timers */
+#define machine_clock_assist()
 
 void machine_idle(void);
 
@@ -200,18 +118,6 @@ void ml_thread_policy(
 #define MACHINE_NETWORK_WORKLOOP               0x00000001
 #define MACHINE_NETWORK_NETISR                 0x00000002
 
-/* Initialize the maximum number of CPUs */
-void ml_init_max_cpus(
-       unsigned long max_cpus);
-
-/* Return the maximum number of CPUs set by ml_init_max_cpus() */
-int ml_get_max_cpus(
-       void);
-
-/* Return the current number of CPUs */
-int ml_get_current_cpus(
-       void);
-
 #endif /* __APPLE_API_PRIVATE */
 
 #endif /* _I386_MACHINE_ROUTINES_H_ */
index 2c7d9bae275601f85af82bc8328dfe8daaa68733..2c5162fd382e8822660c4f3707d5a3b2a29eaee4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -42,254 +39,3 @@ ENTRY(ml_get_timebase)
         movl    %eax, 4(%ecx)
 
         ret
-
-
-/* PCI config cycle probing
- *
- *      boolean_t ml_probe_read(vm_offset_t paddr, unsigned int *val)
- *
- *      Read the memory location at physical address paddr.
- *  This is a part of a device probe, so there is a good chance we will
- *  have a machine check here. So we have to be able to handle that.
- *  We assume that machine checks are enabled both in MSR and HIDs
- */
-ENTRY(ml_probe_read)
-
-        movl S_ARG0, %ecx
-        movl S_ARG1, %eax
-        movl 0(%ecx), %ecx
-        movl %ecx, 0(%eax)
-        movl $1, %eax
-
-        ret
-
-
-/* PCI config cycle probing - 64-bit
- *
- *      boolean_t ml_probe_read_64(addr64_t paddr, unsigned int *val)
- *
- *      Read the memory location at physical address paddr.
- *  This is a part of a device probe, so there is a good chance we will
- *  have a machine check here. So we have to be able to handle that.
- *  We assume that machine checks are enabled both in MSR and HIDs
- */
-ENTRY(ml_probe_read_64)
-
-        /* Only use lower 32 bits of address for now */
-        movl S_ARG0, %ecx
-        movl S_ARG2, %eax
-        movl 0(%ecx), %ecx
-        movl %ecx, 0(%eax)
-        movl $1, %eax
-
-        ret
-
-
-/* Read physical address byte
- *
- *      unsigned int ml_phys_read_byte(vm_offset_t paddr)
- *      unsigned int ml_phys_read_byte_64(addr64_t paddr)
- *
- *      Read the byte at physical address paddr. Memory should not be cache inhibited.
- */
-ENTRY(ml_phys_read_byte_64)
-
-        /* Only use lower 32 bits of address for now */
-        movl S_ARG0, %ecx
-        xor %eax, %eax
-        movb 0(%ecx), %eax
-
-       ret
-
-ENTRY(ml_phys_read_byte)
-
-        movl S_ARG0, %ecx
-        xor %eax, %eax
-        movb 0(%ecx), %eax
-
-       ret
-
-
-/* Read physical address half word
- *
- *      unsigned int ml_phys_read_half(vm_offset_t paddr)
- *      unsigned int ml_phys_read_half_64(addr64_t paddr)
- *
- *      Read the half word at physical address paddr. Memory should not be cache inhibited.
- */
-ENTRY(ml_phys_read_half_64)
-
-        /* Only use lower 32 bits of address for now */
-        movl S_ARG0, %ecx
-        xor %eax, %eax
-        movw 0(%ecx), %eax
-
-       ret
-
-ENTRY(ml_phys_read_half)
-
-        movl S_ARG0, %ecx
-        xor %eax, %eax
-        movw 0(%ecx), %eax
-
-       ret
-
-
-/* Read physical address word
- *
- *      unsigned int ml_phys_read(vm_offset_t paddr)
- *      unsigned int ml_phys_read_64(addr64_t paddr)
- *      unsigned int ml_phys_read_word(vm_offset_t paddr)
- *      unsigned int ml_phys_read_word_64(addr64_t paddr)
- *
- *      Read the word at physical address paddr. Memory should not be cache inhibited.
- */
-ENTRY(ml_phys_read_64)
-ENTRY(ml_phys_read_word_64)
-
-        /* Only use lower 32 bits of address for now */
-        movl S_ARG0, %ecx
-        movl 0(%ecx), %eax
-
-       ret
-
-ENTRY(ml_phys_read)
-ENTRY(ml_phys_read_word)
-
-        movl S_ARG0, %ecx
-        movl 0(%ecx), %eax
-
-       ret
-
-
-/* Read physical address double
- *
- *      unsigned long long ml_phys_read_double(vm_offset_t paddr)
- *      unsigned long long ml_phys_read_double_64(addr64_t paddr)
- *
- *      Read the double word at physical address paddr. Memory should not be cache inhibited.
- */
-ENTRY(ml_phys_read_double_64)
-
-        /* Only use lower 32 bits of address for now */
-        movl S_ARG0, %ecx
-        movl 0(%ecx), %eax
-        movl 4(%ecx), %edx
-
-       ret
-
-ENTRY(ml_phys_read_double)
-
-        movl S_ARG0, %ecx
-        movl 0(%ecx), %eax
-        movl 4(%ecx), %edx
-
-       ret
-
-
-/* Write physical address byte
- *
- *      void ml_phys_write_byte(vm_offset_t paddr, unsigned int data)
- *      void ml_phys_write_byte_64(addr64_t paddr, unsigned int data)
- *
- *      Write the byte at physical address paddr. Memory should not be cache inhibited.
- */
-ENTRY(ml_phys_write_byte_64)
-
-        /* Only use lower 32 bits of address for now */
-        movl S_ARG0, %ecx
-        movl S_ARG2, %eax
-        movb %eax, 0(%ecx)
-
-       ret
-
-ENTRY(ml_phys_write_byte)
-
-        movl S_ARG0, %ecx
-        movl S_ARG1, %eax
-        movb %eax, 0(%ecx)
-
-       ret
-
-
-/* Write physical address half word
- *
- *      void ml_phys_write_half(vm_offset_t paddr, unsigned int data)
- *      void ml_phys_write_half_64(addr64_t paddr, unsigned int data)
- *
- *      Write the byte at physical address paddr. Memory should not be cache inhibited.
- */
-ENTRY(ml_phys_write_half_64)
-
-        /* Only use lower 32 bits of address for now */
-        movl S_ARG0, %ecx
-        movl S_ARG2, %eax
-        movw %eax, 0(%ecx)
-
-       ret
-
-ENTRY(ml_phys_write_half)
-
-        movl S_ARG0, %ecx
-        movl S_ARG1, %eax
-        movw %eax, 0(%ecx)
-
-       ret
-
-
-/* Write physical address word
- *
- *      void ml_phys_write(vm_offset_t paddr, unsigned int data)
- *      void ml_phys_write_64(addr64_t paddr, unsigned int data)
- *      void ml_phys_write_word(vm_offset_t paddr, unsigned int data)
- *      void ml_phys_write_word_64(addr64_t paddr, unsigned int data)
- *
- *      Write the word at physical address paddr. Memory should not be cache inhibited.
- */
-ENTRY(ml_phys_write_64)
-ENTRY(ml_phys_write_word_64)
-
-        /* Only use lower 32 bits of address for now */
-        movl S_ARG0, %ecx
-        movl S_ARG2, %eax
-        movl %eax, 0(%ecx)
-
-       ret
-
-ENTRY(ml_phys_write)
-ENTRY(ml_phys_write_word)
-
-        movl S_ARG0, %ecx
-        movl S_ARG1, %eax
-        movl %eax, 0(%ecx)
-
-       ret
-
-
-/* Write physical address double word
- *
- *      void ml_phys_write_double(vm_offset_t paddr, unsigned long long data)
- *      void ml_phys_write_double_64(addr64_t paddr, unsigned long long data)
- *
- *      Write the double word at physical address paddr. Memory should not be cache inhibited.
- */
-ENTRY(ml_phys_write_double_64)
-
-        /* Only use lower 32 bits of address for now */
-        movl S_ARG0, %ecx
-        movl S_ARG2, %eax
-        movl %eax, 0(%ecx)
-        movl S_ARG3, %eax
-        movl %eax, 4(%ecx)
-
-       ret
-
-ENTRY(ml_phys_write_double)
-
-        movl S_ARG0, %ecx
-        movl S_ARG1, %eax
-        movl %eax, 0(%ecx)
-        movl S_ARG2, %eax
-        movl %eax, 4(%ecx)
-
-       ret
index 5f3bbfe56228e8864fb590fbe57ebc6f5468fe33..b444de08919b9fb180fed0a8d1f6dc035f1c8912 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1403188787f906e4b32eedc2386f0cd6c3c7ad93..5aefbace28c502e176cc985b5b59c9eeba8c37d4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d61055f83cb7366d8d7fb1f42169d73de1390d6c..34e24e8085c7c1b3ecc3b6da7d345866dc696455 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7b9caa113f93de77c48f07b780b2d6af241b3ca2..d869fc2d69d09a6749fc23938c86ef32a476c579 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 29b6aeb26287f1b10ea0fa5960ca31ba901237e0..dcab9ae43d4943e2c047adfb290a4189ecd9fb56 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 29f2f26b9256a51f19e38fa16e66b3078f4f04d2..9882f2ae37d29fa3a30858aaa1cf56b4cf5ba85c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 71d7d45a5739b73e51671f6ea3929919b033ecce..cda06b5214026c2d9824bd7e7bbbc61f284ebe40 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 199d22f746b486f944c1bb6e27ceab8ffc08ba78..2f9e26ce27287e4fe5ffb204bc69e53ddfee0916 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 908e1b5becf744ec435759f765b8abf30b1d6873..47868223d56df62180aa2ba5662d274491c8420f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 19501854233693ae31e2d51dfba4352a7e3f0eb2..c261f42148f8bd3f6f16ba7a4a901b55a3d967e8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 62ccfe5dac3a98ed75fc9087efafbcc8684e3ddc..f5060f2b9e2812c629908be97f61b6afdca33cc2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index acb3178c2fb4cda5938f86577c33a5dc0a7d2c27..1c9311a52032ee1f3fa01f6491fd7f769fdd7886 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 14a4b5506a4d7b29db07bf4ef6bb8ecab924bc81..309714aafa27cd6141336a5f2de244a442c60a37 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c82c26f26e62fc379db642b960c9ac07126ad0f3..ab14da5c1ec127c1dd274eb854053c1510fcbd5d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cb6396a9c6e9599abcc13ee020062cc603cf13ad..a3e6bfa4e017bb738478d6a1a322dd2d4203ecab 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -255,7 +252,6 @@ char        *pmap_phys_attributes;
  */
 #define        PHYS_MODIFIED   INTEL_PTE_MOD   /* page modified */
 #define        PHYS_REFERENCED INTEL_PTE_REF   /* page referenced */
-#define PHYS_NCACHE    INTEL_PTE_NCACHE
 
 /*
  *     Amount of virtual memory mapped by one
@@ -795,19 +791,6 @@ pmap_bootstrap(
 
        kernel_pmap->pdirbase = kvtophys((vm_offset_t)kernel_pmap->dirbase);
 
-       if (cpuid_features() & CPUID_FEATURE_PAT)
-       {
-               uint64_t pat;
-               uint32_t msr;
-           
-               msr = 0x277;
-               asm volatile("rdmsr" : "=A" (pat) : "c" (msr));
-           
-               pat &= ~(0xfULL << 48);
-               pat |= 0x01ULL << 48;
-           
-               asm volatile("wrmsr" :: "A" (pat), "c" (msr));
-       }
 }
 
 void
@@ -1301,13 +1284,11 @@ pmap_remove_some_phys(
  *     rounded to the hardware page size.
  */
 
-
-/* FIXMEx86 */
 void
 pmap_remove(
        pmap_t          map,
-       addr64_t        s,
-       addr64_t        e)
+       vm_offset_t     s,
+       vm_offset_t     e)
 {
        spl_t                   spl;
        register pt_entry_t     *pde;
@@ -1684,15 +1665,8 @@ Retry:
            /*
             *  May be changing its wired attribute or protection
             */
-       
+               
            template = pa_to_pte(pa) | INTEL_PTE_VALID;
-
-           if(flags & VM_MEM_NOT_CACHEABLE) {
-               if(!(flags & VM_MEM_GUARDED))
-                       template |= INTEL_PTE_PTA;
-               template |= INTEL_PTE_NCACHE;
-           }
-
            if (pmap != kernel_pmap)
                template |= INTEL_PTE_USER;
            if (prot & VM_PROT_WRITE)
@@ -2011,13 +1985,6 @@ RetryPvList:
         *      only the pfn changes.
         */
        template = pa_to_pte(pa) | INTEL_PTE_VALID;
-
-       if(flags & VM_MEM_NOT_CACHEABLE) {
-               if(!(flags & VM_MEM_GUARDED))
-                       template |= INTEL_PTE_PTA;
-               template |= INTEL_PTE_NCACHE;
-       }
-
        if (pmap != kernel_pmap)
                template |= INTEL_PTE_USER;
        if (prot & VM_PROT_WRITE)
@@ -2173,7 +2140,7 @@ pmap_expand(
         *      Map the page to its physical address so that it
         *      can be found later.
         */
-       pa = m->phys_page;
+       pa = m->phys_addr;
        vm_object_lock(pmap_object);
        vm_page_insert(m, pmap_object, pa);
        vm_page_lock_queues();
@@ -2245,22 +2212,6 @@ pmap_copy(
 }
 #endif/*       0 */
 
-/*
- * pmap_sync_caches_phys(ppnum_t pa)
- * 
- * Invalidates all of the instruction cache on a physical page and
- * pushes any dirty data from the data cache for the same physical page
- */
-void pmap_sync_caches_phys(ppnum_t pa)
-{
-       if (!(cpuid_features() & CPUID_FEATURE_SS))
-       {
-               __asm__ volatile("wbinvd");     
-       }
-       return;
-}
-
 int    collect_ref;
 int    collect_unref;
 
index a33be7898051c3a01faf1aaa4515e8b73f38fe58..0517c243cb05201ff84c1a47c098f53aa8dd8640 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -109,14 +106,7 @@ typedef unsigned int       pt_entry_t;
 #define PTEMASK                0x3ff   /* mask for page table index */
 
 
-#define        VM_WIMG_COPYBACK        VM_MEM_COHERENT
 #define        VM_WIMG_DEFAULT         VM_MEM_COHERENT
-/* ?? intel ?? */
-#define VM_WIMG_IO             (VM_MEM_COHERENT |      \
-                               VM_MEM_NOT_CACHEABLE | VM_MEM_GUARDED)
-#define VM_WIMG_WTHRU          (VM_MEM_WRITE_THROUGH | VM_MEM_COHERENT | VM_MEM_GUARDED)
-/* write combining mode, aka store gather */
-#define VM_WIMG_WCOMB          (VM_MEM_NOT_CACHEABLE | VM_MEM_COHERENT) 
 
 /*
  *     Convert kernel virtual address to linear address
@@ -158,7 +148,6 @@ typedef unsigned int        pt_entry_t;
 #define INTEL_PTE_MOD          0x00000040
 #define INTEL_PTE_WIRED                0x00000200
 #define INTEL_PTE_PFN          0xfffff000
-#define INTEL_PTE_PTA          0x00000080
 
 #define        pa_to_pte(a)            ((a) & INTEL_PTE_PFN)
 #define        pte_to_pa(p)            ((p) & INTEL_PTE_PFN)
@@ -535,6 +524,8 @@ extern void flush_dcache(vm_offset_t addr, unsigned count, int phys);
                                        (KERN_INVALID_ADDRESS)
 #define        pmap_attribute_cache_sync(addr,size,attr,value) \
                                        (KERN_INVALID_ADDRESS)
+#define pmap_sync_caches_phys(pa) \
+                                       (KERN_INVALID_ADDRESS)
 
 #endif /* ASSEMBLER */
 
index 74d9d50ebe15465dc0a78d541fe79c0b285da51c..ef752ca61d0f7e120d9d0cda03f0c99d0336232e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 17adc5879867d4a218feee8f169ced91dfeec580..1af4a97f214f933991a8275f7dd73190268bc487 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 43ab1f3be79d6f54858c4cc65e902132a903415e..3a995311d459436acd37351ea99b561c77e75ce3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 04a2cb5a3eb3524e41a69d81b016ac7ffb266bc5..151882afe81fa1eb280b8e4acea12277925a2729 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2873b03454685fc07ea1b7e9af20a9ce61022530..7aecc1b1f5852876e0c9128b3c05e078d97b0371 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3afe55d5daf449be3f6be2c47fa312467894ab42..21c63306a8c8c2fdfc930ba0baf0729def7b090c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 114358680fb18e4a75bbb051c9f66193e1a0650c..0f98cd323e73cfbc0d2540f04df2c087aa9c5e8e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ddc518f3d508c4f80a89b97eace61abff7445feb..5c8af20b3166e24be0be6e5c7a39d3a42f45e0ef 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 26b4c34d4a9eb1231b2c79f43b6063eb086458b5..897f79e2cc8f41cad28885d5018c00cc2174a72a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7618127ab6d272e33ba57051fbae9c8c599eb697..41347ee882c8efed236e4f9117c99ea759c3d83c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2fc46b452b5041bee3abc39d01505200467906fd..931b12a2a6b1db3d274b74b0fef8e6c4b5b8a09d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 99bcca4a09349d63cf404933eda3deec361ebd1c..0aa89434890ab2f2cd62c513a7c0327b6a1482d2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 20f8b7ed942166165ef5790dc434f78bf5989cea..ffe762201a007319b89b194e845e71854ad6a759 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 63b82cc9adc98ed592d2e91037e6e5f7e716d475..713bb946acc325a4d86648182ea0e485b5303a41 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 29ead88d9f5aa55d2611ce762a480d117c6bbc6c..5a6b78c200e366f9d38d249d8354b6546af86da2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8b2cc1389117cc067462508272a1160a160a093a..1b90618f36c76045b625efc2ed17ba9c612a0c4a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 92e5de8769d0151578749a811a79aacbb438425b..21604bcd3628d526f657802e6e6c3dac4a1fa3d9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5074e296baf8e34a90f10c3ac20e0ceb2187b262..5e27532e7680a518735712a708f9094409f22842 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 03e6882ac35f2cb20d11fd6fc928576305784fd0..77768c9121937c987b8be8d4d21851fb64d8c50b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 33885a5fd73308bcdfd043c2756bcb69100c6b2b..ba65481ba0acbb4382c03db84e1c660e20dc8179 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0a8071dea05f1a838d75793c6606107b9976fed4..85b2cbd13b812938d5d8d1cdae9b39ff454847f3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3eab9631cade3d15a41bed9e2e08a45dda0b3298..9d48e93f9399f815d49c8325c56bee4bc6359d16 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index daf5ee4fbce04effc562e222a4b25c3bb28ef4fb..57e393c6e1e6effe77c2c84e1d3cae6ca10eada9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0c45f24416ce6aaf65a2aecdbd2f57ad53cfd28d..84450169538faa269790b34db7ecf1bf0da01c9c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5e88611d8f8e99f24696817e8f37dcfa678eb388..2b864e5fcc63cfc2742ebd6645cadd10b7ca72e2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7545baf93a75eb201f8385022eb0516b9d7ea23c..a32e5c24a6d1da7b092f86d121f2e0599079d452 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0faf4bcbb0db360983303272a1b357edc17d1ab7..dbe2831f2aa26896f998f041726830a9e3088ee4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 34ecc07d662f874ee3e579ef81959a1b88385f15..58a91459339e668fd5dcbe38bc8f58f6f519007d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 
 #include <string.h>
 
-#ifdef ppc
-#include <ppc/Firmware.h>
-#include <ppc/low_trace.h>
-#endif
-
-
 extern vm_map_t                ipc_kernel_copy_map;
 extern vm_size_t       ipc_kmsg_max_vm_space;
 extern vm_size_t       msg_ool_size_small;
@@ -688,12 +679,7 @@ ipc_kmsg_get(
        trailer->msgh_sender = current_thread()->top_act->task->sec_token;
        trailer->msgh_trailer_type = MACH_MSG_TRAILER_FORMAT_0;
        trailer->msgh_trailer_size = MACH_MSG_TRAILER_MINIMUM_SIZE;
-       
-#ifdef ppc
-       if(trcWork.traceMask) dbgTrace((unsigned int)kmsg->ikm_header.msgh_id, 
-               (unsigned int)kmsg->ikm_header.msgh_remote_port, 
-               (unsigned int)kmsg->ikm_header.msgh_local_port, 0); 
-#endif
+
        *kmsgp = kmsg;
        return MACH_MSG_SUCCESS;
 }
@@ -1405,7 +1391,7 @@ ipc_kmsg_copyin_body(
                         * Out-of-line memory descriptor, accumulate kernel
                         * memory requirements
                         */
-                       space_needed += round_page_32(sstart->out_of_line.size);
+                       space_needed += round_page(sstart->out_of_line.size);
                        if (space_needed > ipc_kmsg_max_vm_space) {
 
                                /*
@@ -1512,7 +1498,7 @@ ipc_kmsg_copyin_body(
                         */
                        if (!page_aligned(length)) {
                                (void) memset((void *) (paddr + length), 0,
-                                       round_page_32(length) - length);
+                                       round_page(length) - length);
                        }
                        if (vm_map_copyin(ipc_kernel_copy_map, paddr, length,
                                           TRUE, &copy) != KERN_SUCCESS) {
@@ -1521,8 +1507,8 @@ ipc_kmsg_copyin_body(
                            return MACH_MSG_VM_KERNEL;
                        }
                        dsc->address = (void *) copy;
-                       paddr += round_page_32(length);
-                       space_needed -= round_page_32(length);
+                       paddr += round_page(length);
+                       space_needed -= round_page(length);
                } else {
 
                        /*
index b838576335501f2e4bdabc68bd92473662124930..dce03b573889f37c6e454d36431388b8fc770751 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9cea21fe2a6e26e17164aceb7b2ba828e5aa091a..f528d8913a2152c4ac261fb1eaf1af4159f87358 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d00ebe34f6f82c45055423a4c47d3070e485dc9a..81defb81f9531e4d65efe63fedd202cef47b21a3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 93b6fb2fa9d65770bd506678d544f584bf52a16e..2094146668c50c0519f1f5dcf5cbb71f9669ef3b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e00829214b1e4dc34b898dfd081149c697ab9357..4b311ded00d5791e1e6e3a65eb22943aa8d20e3d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0d4d0eea51bf9518a89934d3abf252f8cda83a24..8c0bc9eb19032ae53af42e57e48a24801caa4b26 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index df9081bef58c7c8f7408615c01121fc86eb6c3b1..a20d572b8859ec0e0ccad60ef460c61e8a8c9498 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4b89b4611072edcf394d07d90a6c5a54f357e5c4..62a11978a5caedc1f02c4e23ca93ae5bc37b6c7f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d4d49166e38b7019eaf8d8db14f00dbf88334b77..9bb7ed78115ef3517e56250371fe83ea01d5bdfc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -1159,7 +1156,7 @@ ipc_port_dealloc_special(
 {
        ip_lock(port);
        assert(ip_active(port));
-//     assert(port->ip_receiver_name != MACH_PORT_NULL);
+       assert(port->ip_receiver_name != MACH_PORT_NULL);
        assert(port->ip_receiver == space);
 
        /*
index 2cf4e699c5d1df237525ac6ee1930887d0fe0d12..50bc7ed87182644ca8e61480e429534524bfa17c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f0541f8cc50d9c805b85ec4fc2b18c246e2c1925..f35dff5fb5cf2191c036ae1557b96ceebd46f9f9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 06f5fd11f8288bd8a053e4e8e5c6ce787dffeb9e..0befd406cff4d877bd824e2d5754ab304bf8fc41 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 66846cc77c8794f0e0e9c5e5294e6b9e13a97b49..e673bd8d84650f578103bc53f9d856e63168721e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3a06a1c9708b4149f40f30b897eec50e55806f43..b2822ebe974c9d66b63a0307786e2524f919b372 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 06c3956ee7afae3b75d6ec0d81c67a63e142be29..0623ba61c29fa792b3d650ab7d3a360872f5f35d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3429fe5afb0b2c342110bd18647bb0425ab56ce2..b51b029992f3d476dfaa5ce0fed89caa4a8368a6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 864edc0b3d1fe119902b8a9db39d5cdcc24767e3..6ac5349513c73c1e8cef00e1f554d7bb0a7b8eac 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9d02f6ac3c6e0fc684676971497c9e1b9251db8a..ca7817be22fa7c4352c2fbef79ea9f98e8a60b2e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2f223620b132a2168ec16dbd5ba6e9a3218fc8f3..a25350d5de5980b269453b79a6b1ee0ff3d35fdc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 73da0b40bfdf8c65949080dcec766b121123126e..e8de5a125638204ed0d943a809c5360315d85163 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d099f63cb08f15871d0a11b446b4b3d7f009a3d8..16a02b3038f71c992dba18012bff61f0d13ef838 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -208,21 +205,21 @@ extern void ipc_table_free(
 #define        it_entries_alloc(its)                                           \
        ((ipc_entry_t)                                                  \
        ipc_table_alloc(it_entries_reallocable(its) ?                   \
-           round_page_32((its)->its_size * sizeof(struct ipc_entry)) : \
+           round_page((its)->its_size * sizeof(struct ipc_entry)) :    \
            (its)->its_size * sizeof(struct ipc_entry)                  \
        ))
 
 #define        it_entries_realloc(its, table, nits)                            \
        ((ipc_entry_t)                                                  \
        ipc_table_realloc(                                              \
-           round_page_32((its)->its_size * sizeof(struct ipc_entry)),  \
+           round_page((its)->its_size * sizeof(struct ipc_entry)),     \
            (vm_offset_t)(table),                                       \
-           round_page_32((nits)->its_size * sizeof(struct ipc_entry))  \
+           round_page((nits)->its_size * sizeof(struct ipc_entry))     \
        ))
 
 #define        it_entries_free(its, table)                                     \
        ipc_table_free(it_entries_reallocable(its) ?                    \
-           round_page_32((its)->its_size * sizeof(struct ipc_entry)) : \
+           round_page((its)->its_size * sizeof(struct ipc_entry)) :    \
            (its)->its_size * sizeof(struct ipc_entry),                 \
            (vm_offset_t)(table)                                        \
        )
index cdf89ede6c60693ee16ccd6275648f4d92bf2d3f..935d44b9e455263173a832ceffc2a6ccab567d2c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ead49e1bcb93be27f056b323d7af0557135aa19a..7fe99ea813081cb65d9a6309bf24f62c340372f8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -170,7 +167,7 @@ host_ipc_hash_info(
                if (info != *infop)
                        kmem_free(ipc_kernel_map, addr, size);
 
-               size = round_page_32(actual * sizeof *info);
+               size = round_page(actual * sizeof *info);
                kr = kmem_alloc_pageable(ipc_kernel_map, &addr, size);
                if (kr != KERN_SUCCESS)
                        return KERN_RESOURCE_SHORTAGE;
@@ -191,7 +188,7 @@ host_ipc_hash_info(
                vm_map_copy_t copy;
                vm_size_t used;
 
-               used = round_page_32(actual * sizeof *info);
+               used = round_page(actual * sizeof *info);
 
                if (used != size)
                        kmem_free(ipc_kernel_map, addr + used, size - used);
@@ -285,7 +282,7 @@ mach_port_space_info(
                                kmem_free(ipc_kernel_map,
                                          table_addr, table_size);
 
-                       table_size = round_page_32(table_actual *
+                       table_size = round_page(table_actual *
                                                sizeof *table_info);
                        kr = kmem_alloc(ipc_kernel_map,
                                        &table_addr, table_size);
@@ -306,7 +303,7 @@ mach_port_space_info(
                                kmem_free(ipc_kernel_map,
                                          tree_addr, tree_size);
 
-                       tree_size = round_page_32(tree_actual *
+                       tree_size = round_page(tree_actual *
                                               sizeof *tree_info);
                        kr = kmem_alloc(ipc_kernel_map,
                                        &tree_addr, tree_size);
@@ -396,7 +393,7 @@ mach_port_space_info(
                /* kmem_alloc doesn't zero memory */
 
                size_used = table_actual * sizeof *table_info;
-               rsize_used = round_page_32(size_used);
+               rsize_used = round_page(size_used);
 
                if (rsize_used != table_size)
                        kmem_free(ipc_kernel_map,
@@ -434,7 +431,7 @@ mach_port_space_info(
                /* kmem_alloc doesn't zero memory */
 
                size_used = tree_actual * sizeof *tree_info;
-               rsize_used = round_page_32(size_used);
+               rsize_used = round_page(size_used);
 
                if (rsize_used != tree_size)
                        kmem_free(ipc_kernel_map,
index 6036e409d83137fc4864f4202e90150c6ef7a281..2e3e114938e3237fd1e0ed60fbb078a098a32827 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -1048,9 +1045,9 @@ mach_msg_overwrite_trap(
 
                assert(ip_active(dest_port));
                assert(dest_port->ip_receiver != ipc_space_kernel);
-//             assert(!imq_full(&dest_port->ip_messages) ||
-//                    (MACH_MSGH_BITS_REMOTE(hdr->msgh_bits) ==
-//                                             MACH_MSG_TYPE_PORT_SEND_ONCE));
+               assert(!imq_full(&dest_port->ip_messages) ||
+                      (MACH_MSGH_BITS_REMOTE(hdr->msgh_bits) ==
+                                               MACH_MSG_TYPE_PORT_SEND_ONCE));
                assert((hdr->msgh_bits & MACH_MSGH_BITS_CIRCULAR) == 0);
 
            {
index bed9efd82156958c66b32afddb55d6820ab0b095..e2a75b69206e72810936accf576d4897ce3ddb7f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -240,7 +237,7 @@ mach_port_names(
                /* upper bound on number of names in the space */
 
                bound = space->is_table_size + space->is_tree_total;
-               size_needed = round_page_32(bound * sizeof(mach_port_name_t));
+               size_needed = round_page(bound * sizeof(mach_port_name_t));
 
                if (size_needed <= size)
                        break;
@@ -332,7 +329,7 @@ mach_port_names(
                vm_size_t vm_size_used;
 
                size_used = actual * sizeof(mach_port_name_t);
-               vm_size_used = round_page_32(size_used);
+               vm_size_used = round_page(size_used);
 
                /*
                 *      Make used memory pageable and get it into
@@ -1128,7 +1125,7 @@ mach_port_get_set_status(
                /* didn't have enough memory; allocate more */
 
                kmem_free(ipc_kernel_map, addr, size);
-               size = round_page_32(actual * sizeof(mach_port_name_t)) + PAGE_SIZE;
+               size = round_page(actual * sizeof(mach_port_name_t)) + PAGE_SIZE;
        }
 
        if (actual == 0) {
@@ -1140,7 +1137,7 @@ mach_port_get_set_status(
                vm_size_t vm_size_used;
 
                size_used = actual * sizeof(mach_port_name_t);
-               vm_size_used = round_page_32(size_used);
+               vm_size_used = round_page(size_used);
 
                /*
                 *      Make used memory pageable and get it into
index 981e207f04fa0616009f3ab5a84d40e437d5f752..9d9e85e55ed9994c49b89e05d3c408faf4013a99 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 544f5bc9012bb154ac56d8c33c545f9cb5cf5718..52ffaaf687cf676927994ea3207a09bcae0deab9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 35e5b610574df6920d82c151b8a2ea18967d33e1..2c22fa44cbbc7fbe2046ad4076b992e952b640db 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f24d8e67fd3333d4ddd159e0c8ac9c751a1a8871..da499119445af777c0361bd3a04e57b7bcc10238 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5868307d2cc8308bb33b9623732253f189eb688e..6904c399de13c898b8ce08c94513db718a37f98b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b9fbc8ca9236193aabc0a60f8dbf74c702bbf40f..d3d45b7e7a8cff6a29c2a8f3a032db798a8011ff 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d8ea7521a134686ac4c517b2a05835551629636f..e9399002a4f1474e62f22d0bcf205bcb6b403032 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b4a0d0a87bda99041b0590f5ecdd7b07d9ef27d1..8768c9c872337e886d2902dc92e1e2a6d08641ff 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5027e333fc6fb18d58c78559b30202a075880581..78b33b16d0067b169cd6d7fbba0dc530e04af6b9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -33,8 +30,8 @@
 
 #include <mach_kdb.h>
 #include <mach/boolean.h>
-#include <mach/mach_types.h>
 #include <mach/exception_types.h>
+#include <mach/mach_types.h>
 #include <kern/cpu_data.h>
 #include <kern/debug.h>
 
index 0dda441bd6f811644a96fffb4b0272db51653375..ce34cde0069355cbd8d03b0c0ee5cae51c7e72cb 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4087324276574d193fd2c9f31e69802ec4ff8d14..b5990a653c9226ee5d81131cae28a0e17dc4a8a1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 53783b91ff1fb33915b66132acbf1d557dd7ba8b..c5315aea076258c943eb4754125ef260ba999cf8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3cb2a0a746cd0e85fadee4e3916ac07c121509b5..c01b2e5de3c5aa7ea58723d35f27294b8e365376 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 
 ENTRY(kdp_call_with_ctx, TAG_NO_FRAME_USED)
        
-       lis             r2,hi16(MASK(MSR_VEC))  ; Get the vector enable
-       mfmsr   r7                                      ; Get the MSR
-       ori             r2,r2,lo16(MASK(MSR_EE)|MASK(MSR_FP))   ; Get FP and EE
+       mfmsr   r7                                      /* Get the MSR */
        mflr    r0
-       andc    r7,r7,r2                        ; Clear FP, VEC, and EE
+       rlwinm  r7,r7,0,MSR_EE_BIT+1,MSR_EE_BIT-1       /* Turn off interruptions enable bit */
+       rlwinm  r7,r7,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+       rlwinm  r7,r7,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
        mtmsr   r7
        isync                                                                           ; Need this because we may have ditched fp/vec
        mfsprg  r8,0                            /* Get the per_proc block address */
@@ -72,13 +69,13 @@ ENTRY(kdp_call_with_ctx, TAG_NO_FRAME_USED)
        
        bl      EXT(kdp_trap)
 
-       lis             r2,hi16(MASK(MSR_VEC))          ; Get the vector enable
        mfmsr   r0                                      /* Get the MSR */
-       ori             r2,r2,lo16(MASK(MSR_EE)|MASK(MSR_FP))   ; Get FP and EE
        addi    r1,     r1,     FM_SIZE
-       andc    r0,r0,r2                        ; Clear FP, VEC, and EE
+       rlwinm  r0,r0,0,MSR_EE_BIT+1,MSR_EE_BIT-1       /* Turn off interruptions enable bit */
+       rlwinm  r0,r0,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+       rlwinm  r0,r0,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
        mtmsr   r0
-       isync                                           ; Need this because we may have ditched fp/vec
+       isync                                                                           ; Need this because we may have ditched fp/vec
 
        mfsprg  r8,0                            /* Get the per_proc block address */
        
index d1dce210a5c196f1dbfd638d218da117442e846c..d315e6a91c43a6256c8a74e9fb1ed261103c744a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -120,57 +117,6 @@ kdp_getintegerstate(
    
     bzero((char *)state,sizeof (struct ppc_thread_state)) ;
 
-    state->srr0        = (unsigned int)saved_state->save_srr0;
-    state->srr1        = (unsigned int)saved_state->save_srr1;
-    state->r0  = (unsigned int)saved_state->save_r0;
-    state->r1  = (unsigned int)saved_state->save_r1;
-    state->r2  = (unsigned int)saved_state->save_r2;
-    state->r3  = (unsigned int)saved_state->save_r3;
-    state->r4  = (unsigned int)saved_state->save_r4;
-    state->r5  = (unsigned int)saved_state->save_r5;
-    state->r6  = (unsigned int)saved_state->save_r6;
-    state->r7  = (unsigned int)saved_state->save_r7;
-    state->r8  = (unsigned int)saved_state->save_r8;
-    state->r9  = (unsigned int)saved_state->save_r9;
-    state->r10 = (unsigned int)saved_state->save_r10;
-    state->r11 = (unsigned int)saved_state->save_r11;
-    state->r12 = (unsigned int)saved_state->save_r12;
-    state->r13 = (unsigned int)saved_state->save_r13;
-    state->r14 = (unsigned int)saved_state->save_r14;
-    state->r15 = (unsigned int)saved_state->save_r15;
-    state->r16 = (unsigned int)saved_state->save_r16;
-    state->r17 = (unsigned int)saved_state->save_r17;
-    state->r18 = (unsigned int)saved_state->save_r18;
-    state->r19 = (unsigned int)saved_state->save_r19;
-    state->r20 = (unsigned int)saved_state->save_r20;
-    state->r21 = (unsigned int)saved_state->save_r21;
-    state->r22 = (unsigned int)saved_state->save_r22;
-    state->r23 = (unsigned int)saved_state->save_r23;
-    state->r24 = (unsigned int)saved_state->save_r24;
-    state->r25 = (unsigned int)saved_state->save_r25;
-    state->r26 = (unsigned int)saved_state->save_r26;
-    state->r27 = (unsigned int)saved_state->save_r27;
-    state->r28 = (unsigned int)saved_state->save_r28;
-    state->r29 = (unsigned int)saved_state->save_r29;
-    state->r30 = (unsigned int)saved_state->save_r30;
-    state->r31 = (unsigned int)saved_state->save_r31;
-    state->cr  = (unsigned int)saved_state->save_cr;
-    state->xer = (unsigned int)saved_state->save_xer;
-    state->lr  = (unsigned int)saved_state->save_lr;
-    state->ctr = (unsigned int)saved_state->save_ctr;
-}
-
-static void
-kdp_getintegerstate64(
-    struct ppc_thread_state64  *state
-)
-{
-    struct savearea    *saved_state;
-   
-    saved_state = kdp.saved_state;
-   
-    bzero((char *)state,sizeof (struct ppc_thread_state64)) ;
-
     state->srr0        = saved_state->save_srr0;
     state->srr1        = saved_state->save_srr1;
     state->r0  = saved_state->save_r0;
@@ -226,19 +172,13 @@ kdp_machine_read_regs(
                kdp_getintegerstate((struct ppc_thread_state *)data);
                *size = PPC_THREAD_STATE_COUNT * sizeof(int);
                return KDPERR_NO_ERROR;
-
-    case PPC_THREAD_STATE64:
-               dprintf(("kdp_readregs THREAD_STATE\n"));
-               kdp_getintegerstate64((struct ppc_thread_state64 *)data);
-               *size = PPC_THREAD_STATE64_COUNT * sizeof(int);
-               return KDPERR_NO_ERROR;
-
+       
     case PPC_FLOAT_STATE:
                dprintf(("kdp_readregs THREAD_FPSTATE\n"));
                bzero((char *)data ,sizeof(struct ppc_float_state));    
                *size = PPC_FLOAT_STATE_COUNT * sizeof(int);
                return KDPERR_NO_ERROR;
-
+       
     default:
                dprintf(("kdp_readregs bad flavor %d\n"));
                return KDPERR_BADFLAVOR;
@@ -294,55 +234,6 @@ kdp_setintegerstate(
     saved_state->save_ctr      = state->ctr;
 }
 
-static void
-kdp_setintegerstate64(
-    struct ppc_thread_state64          *state
-)
-{
-    struct savearea    *saved_state;
-   
-    saved_state = kdp.saved_state;
-
-    saved_state->save_srr0     = state->srr0;
-    saved_state->save_srr1     = state->srr1;
-    saved_state->save_r0       = state->r0;
-    saved_state->save_r1       = state->r1;
-    saved_state->save_r2       = state->r2;
-    saved_state->save_r3       = state->r3;
-    saved_state->save_r4       = state->r4;
-    saved_state->save_r5       = state->r5;
-    saved_state->save_r6       = state->r6;
-    saved_state->save_r7       = state->r7;
-    saved_state->save_r8       = state->r8;
-    saved_state->save_r9       = state->r9;
-    saved_state->save_r10      = state->r10;
-    saved_state->save_r11      = state->r11;
-    saved_state->save_r12      = state->r12;
-    saved_state->save_r13      = state->r13;
-    saved_state->save_r14      = state->r14;
-    saved_state->save_r15      = state->r15;
-    saved_state->save_r16      = state->r16;
-    saved_state->save_r17      = state->r17;
-    saved_state->save_r18      = state->r18;
-    saved_state->save_r19      = state->r19;
-    saved_state->save_r20      = state->r20;
-    saved_state->save_r21      = state->r21;
-    saved_state->save_r22      = state->r22;
-    saved_state->save_r23      = state->r23;
-    saved_state->save_r24      = state->r24;
-    saved_state->save_r25      = state->r25;
-    saved_state->save_r26      = state->r26;
-    saved_state->save_r27      = state->r27;
-    saved_state->save_r28      = state->r28;
-    saved_state->save_r29      = state->r29;
-    saved_state->save_r30      = state->r30;
-    saved_state->save_r31      = state->r31;
-    saved_state->save_cr       = state->cr;
-    saved_state->save_xer      = state->xer;
-    saved_state->save_lr       = state->lr;
-    saved_state->save_ctr      = state->ctr;
-}
-
 kdp_error_t
 kdp_machine_write_regs(
     unsigned int cpu,
@@ -361,19 +252,11 @@ kdp_machine_write_regs(
                DumpTheSave((struct savearea *)data);           /* (TEST/DEBUG) */
 #endif
                return KDPERR_NO_ERROR;
-
-    case PPC_THREAD_STATE64:
-               dprintf(("kdp_writeregs THREAD_STATE64\n"));
-               kdp_setintegerstate64((struct ppc_thread_state64 *)data);
-
-#if KDP_TEST_HARNESS
-               DumpTheSave((struct savearea *)data);           /* (TEST/DEBUG) */
-#endif
-               return KDPERR_NO_ERROR;
+       
     case PPC_FLOAT_STATE:
                dprintf(("kdp_writeregs THREAD_FPSTATE\n"));
                return KDPERR_NO_ERROR;
-
+       
     default:
                dprintf(("kdp_writeregs bad flavor %d\n"));
                return KDPERR_BADFLAVOR;
@@ -535,7 +418,7 @@ kdp_trap(
 )
 {
        unsigned int *fp;
-       unsigned int sp;
+       unsigned int register sp;
        struct savearea *state;
 
        if (kdp_noisy) {
@@ -563,7 +446,7 @@ kdp_trap(
        if (kdp_noisy)
                printf("kdp_trap: kdp_raise_exception() ret\n");
 
-       if ((unsigned int)(saved_state->save_srr0) == 0x7c800008)
+       if (*((int *)saved_state->save_srr0) == 0x7c800008)
                saved_state->save_srr0 += 4;                    /* BKPT_SIZE */
 
        if(saved_state->save_srr1 & (MASK(MSR_SE) | MASK(MSR_BE))) {    /* Are we just stepping or continuing */
index 9eb3f6c6f80b32744504d93a4e9fe93d81f341f6..850b3c232625e4143ce1fa2775b5654622db7489 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #include <mach/ppc/vm_param.h>
 #include <assym.s>
 
+.set kLog2CacheLineSize, 5
+.set kCacheLineSize, 32
+ENTRY(kdp_flush_cache, TAG_NO_FRAME_USED)
+       cmpi    cr0,0,r4,0                      /* is this zero length? */
+       add     r4,r3,r4                        /* calculate last byte + 1 */
+       subi    r4,r4,1                         /* calculate last byte */
+
+       srwi    r5,r3,kLog2CacheLineSize        /* calc first cache line index */
+       srwi    r4,r4,kLog2CacheLineSize        /* calc last cache line index */
+       beq     cr0, LdataToCodeDone            /* done if zero length */
+
+       subf    r4,r5,r4                        /* calc diff (# lines minus 1) */
+       addi    r4,r4,1                         /* # of cache lines to flush */
+       slwi    r5,r5,kLog2CacheLineSize        /* calc addr of first cache line */
+
+       /* flush the data cache lines */
+       mr      r3,r5                           /* starting address for loop */
+       mtctr   r4                                      /* loop count */
+LdataToCodeFlushLoop:
+       dcbf    0, r3                                           /* flush the data cache line */
+       addi    r3,r3,kCacheLineSize            /* advance to next cache line */
+       bdnz    LdataToCodeFlushLoop            /* loop until count is zero */
+       sync                                                            /* wait until RAM is valid */
+
+       /* invalidate the code cache lines */
+       mr      r3,r5                                           /* starting address for loop */
+       mtctr   r4                                                      /* loop count */
+LdataToCodeInvalidateLoop:
+       icbi    0, r3                                           /* invalidate code cache line */
+       addi    r3,r3,kCacheLineSize            /* advance to next cache line */
+       bdnz    LdataToCodeInvalidateLoop       /* loop until count is zero */
+       sync                                                            /* wait until last icbi completes */
+       isync                                                           /* discard prefetched instructions */
+LdataToCodeDone:
+       blr                                                                     /* return nothing */
+
 ENTRY(kdp_sync_cache, TAG_NO_FRAME_USED)
        sync                                    /* data sync */
        isync                                   /* inst sync */
        blr                                             /* return nothing */
 
+ENTRY(kdp_xlate_off, TAG_NO_FRAME_USED)
+       mfmsr   r3
+       rlwinm  r3,r3,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+       rlwinm  r3,r3,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+       rlwinm  r4, r3, 0, MSR_DR_BIT+1, MSR_IR_BIT-1
+       mtmsr   r4
+       isync
+       blr
 
-;
-;              This is a really stupid physical copy. 1 whole byte at a time...
-;              Source and dest are long longs.  We do this with 64-bit on if
-;              supported.
-;
-
-                       .align  5
-                       .globl  EXT(kdp_copy_phys)
-                       
-LEXT(kdp_copy_phys)
+ENTRY(kdp_xlate_restore, TAG_NO_FRAME_USED)
+       mtmsr   r3
+       isync
+       blr
 
-                       mflr    r12                                             ; Save return
-                       
-                       bl              EXT(ml_set_physical_disabled)   ; No DR and get 64-bit
-                       
-                       rlwinm  r3,r3,0,1,0                             ; Dup low to high source
-                       rlwinm  r5,r5,0,1,0                             ; Dup low to high dest
-                       rlwimi  r3,r4,0,0,31                    ; Copy bottom on in source
-                       rlwimi  r5,r6,0,0,31                    ; Copy bottom on in dest
-                       
-kcpagain:      addic.  r7,r7,-1                                ; Drop count
-                       blt--   kcpdone                                 ; All done...
-                       lbz             r0,0(r3)                                ; Grab a whole one
-                       stb             r0,0(r5)                                ; Lay it gently down
-                       addi    r3,r3,1                                 ; Next source
-                       addi    r5,r5,1                                 ; Next destination
-                       b               kcpagain                                ; Once more with feeling...
-               
-kcpdone:       bl              EXT(ml_restore)                 ; Put trans, etc back
-                       mtlr    r12                                             ; Restore return
-                       blr                                                             ; Come again please...
-               
index ddb002b8c63c2aab3981d5bc454ce89170fb65ab..066204a66aa19124a38401bac09c405ba26eb509 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #include <ppc/machparam.h>
 #include <ppc/mem.h>
 #include <ppc/pmap.h>
+#include <ppc/pmap_internals.h> 
 #include <ppc/mappings.h> 
 
 pmap_t kdp_pmap=0;
 boolean_t kdp_trans_off=0;
-boolean_t kdp_read_io  =0;
 
+unsigned kdp_xlate_off(void);
+void kdp_xlate_restore(unsigned);
+void kdp_flush_cache(vm_offset_t, unsigned);
+vm_offset_t kdp_vtophys(pmap_t pmap, vm_offset_t vaddr);
+void kdp_bcopy( unsigned char *, unsigned char *, unsigned);
+void kdp_pmemcpy( vm_offset_t , vm_offset_t, unsigned);
 unsigned kdp_vm_read( caddr_t, caddr_t, unsigned);
 unsigned kdp_vm_write( caddr_t, caddr_t, unsigned);
 
+extern vm_offset_t kvtophys(vm_offset_t);
+extern vm_offset_t mem_actual;
 
 /*
  *
  */
-addr64_t kdp_vtophys(
+vm_offset_t kdp_vtophys(
        pmap_t pmap,
-       addr64_t va)
+       vm_offset_t va)
 {
-       addr64_t    pa;
-       ppnum_t pp;
+       register mapping                *mp;
+       register vm_offset_t    pa;
+
+       pa = (vm_offset_t)LRA(pmap->space,(void *)va);
+
+       if (pa != 0)            
+               return(pa);     
+
+       mp = hw_lock_phys_vir(pmap->space, va);
+       if((unsigned int)mp&1) {
+               return 0;
+       }
+
+       if(!mp) {                                                               /* If it was not a normal page */
+               pa = hw_cvp_blk(pmap, va);                      /* Try to convert odd-sized page (returns 0 if not found) */
+               return pa;                                                      /* Return physical address */
+       }
+
+       mp = hw_cpv(mp);
+
+       if(!mp->physent) {
+               pa = (vm_offset_t)((mp->PTEr & -PAGE_SIZE) | ((unsigned int)va & (PAGE_SIZE-1)));
+       } else {
+               pa = (vm_offset_t)((mp->physent->pte1 & -PAGE_SIZE) | ((unsigned int)va & (PAGE_SIZE-1)));
+               hw_unlock_bit((unsigned int *)&mp->physent->phys_link, PHYS_LOCK);
+       }
 
-       pp = pmap_find_phys(pmap, va);                          /* Get the page number */
-       if(!pp) return 0;                                                       /* Just return if no translation */
-       
-       pa = ((addr64_t)pp << 12) | (va & 0x0000000000000FFFULL);       /* Shove in the page offset */
        return(pa);
 }
 
+/*
+ *
+ */
+void kdp_bcopy(
+       unsigned char *src, 
+       unsigned char *dst,
+       unsigned cnt)
+{
+        while (cnt--)
+                *dst++ = *src++;
+}
+
 /*
  *
  */
@@ -67,63 +104,63 @@ unsigned kdp_vm_read(
        caddr_t dst, 
        unsigned len)
 {
-       addr64_t cur_virt_src, cur_virt_dst;
-       addr64_t cur_phys_src;
+       vm_offset_t cur_virt_src, cur_virt_dst;
+       vm_offset_t cur_phys_src;
        unsigned resid, cnt;
-       unsigned int dummy;
-       pmap_t pmap;
+       unsigned msr;
 
 #ifdef KDP_VM_READ_DEBUG
     kprintf("kdp_vm_read1: src %x dst %x len %x - %08X %08X\n", src, dst, len, ((unsigned long *)src)[0], ((unsigned long *)src)[1]);
 #endif
-
-       cur_virt_src = (addr64_t)((unsigned int)src);
-       cur_virt_dst = (addr64_t)((unsigned int)dst);
-       
        if (kdp_trans_off) {
-               
-               
-               resid = len;                                                            /* Get the length to copy */
+               cur_virt_src = (vm_offset_t)src;
+               if((vm_offset_t)src >= mem_actual) return 0;    /* Can't read where there's not any memory */
+               cur_virt_dst = (vm_offset_t)dst;
+               resid = (mem_actual - (vm_offset_t)src) > len ? len : (mem_actual - (vm_offset_t)src);
 
                while (resid != 0) {
-
-                       if(kdp_read_io == 0)
-                               if(!mapping_phys_lookup((ppnum_t)(cur_virt_src >> 12), &dummy)) return 0;       /* Can't read where there's not any memory */
-               
-                       cnt = 4096 - (cur_virt_src & 0xFFF);    /* Get length left on page */
-               
+                       cur_phys_src = cur_virt_src;
+                       cnt = ((cur_virt_src + NBPG) & (-NBPG)) - cur_virt_src; 
                        if (cnt > resid)  cnt = resid;
-
-                       bcopy_phys(cur_virt_src, cur_virt_dst, cnt);            /* Copy stuff over */
-
-                       cur_virt_src += cnt;
-                       cur_virt_dst += cnt;
+                       msr = kdp_xlate_off();
+                       kdp_bcopy((unsigned char *)cur_phys_src, 
+                               (unsigned char *)cur_virt_dst, cnt);
+                       kdp_xlate_restore(msr);
+                       cur_virt_src +=cnt;
+                       cur_virt_dst +=cnt;
                        resid -= cnt;
                }
-               
        } else {
-
+               cur_virt_src = (vm_offset_t)src;
+               cur_virt_dst = (vm_offset_t)dst;
                resid = len;
 
-               if(kdp_pmap) pmap = kdp_pmap;                           /* If special pmap, use it */
-               else pmap = kernel_pmap;                                        /* otherwise, use kernel's */
-
                while (resid != 0) {   
-
-                       if((cur_phys_src = kdp_vtophys(pmap, cur_virt_src)) == 0) goto exit;
-                       if(kdp_read_io == 0)
-                               if(!mapping_phys_lookup((ppnum_t)(cur_phys_src >> 12), &dummy)) goto exit;      /* Can't read where there's not any memory */
-
-                       cnt = 4096 - (cur_virt_src & 0xFFF);    /* Get length left on page */
+                       if (kdp_pmap) {
+                               if ((cur_phys_src = 
+                                       kdp_vtophys(kdp_pmap,trunc_page(cur_virt_src))) == 0)
+                                       goto exit;
+                               cur_phys_src += (cur_virt_src & PAGE_MASK);
+                       } else {
+                               if ((cur_phys_src = kdp_vtophys(kernel_pmap,cur_virt_src)) == 0)
+                                       goto exit;
+                       }
+
+                       cnt = ((cur_virt_src + NBPG) & (-NBPG)) - cur_virt_src;
                        if (cnt > resid) cnt = resid;
-
+                               if (kdp_pmap) {
 #ifdef KDP_VM_READ_DEBUG
-                               kprintf("kdp_vm_read2: pmap %08X, virt %016LLX, phys %016LLX\n", 
-                                       pmap, cur_virt_src, cur_phys_src);
+                                       kprintf("kdp_vm_read2: pmap %x, virt %x, phys %x\n", 
+                                                       kdp_pmap, cur_virt_src, cur_phys_src);
 #endif
-
-                       bcopy_phys(cur_phys_src, cur_virt_dst, cnt);            /* Copy stuff over */
-                       
+                               msr = kdp_xlate_off();
+                               kdp_bcopy((unsigned char *)cur_phys_src, 
+                                               (unsigned char *)cur_virt_dst, cnt);
+                               kdp_xlate_restore(msr);
+                       } else {
+                               kdp_bcopy((unsigned char *)cur_virt_src, 
+                                               (unsigned char *)cur_virt_dst, cnt);
+                       }
                        cur_virt_src +=cnt;
                        cur_virt_dst +=cnt;
                        resid -= cnt;
@@ -133,7 +170,7 @@ exit:
 #ifdef KDP_VM_READ_DEBUG
        kprintf("kdp_vm_read: ret %08X\n", len-resid);
 #endif
-        return (len - resid);
+        return (len-resid);
 }
 
 /*
@@ -144,17 +181,17 @@ unsigned kdp_vm_write(
         caddr_t dst,
         unsigned len)
 {       
-       addr64_t cur_virt_src, cur_virt_dst;
-       addr64_t cur_phys_src, cur_phys_dst;
-    unsigned resid, cnt, cnt_src, cnt_dst;
+       vm_offset_t cur_virt_src, cur_virt_dst;
+       vm_offset_t cur_phys_src, cur_phys_dst;
+        unsigned resid, cnt, cnt_src, cnt_dst;
+       unsigned msr;
 
 #ifdef KDP_VM_WRITE_DEBUG
        printf("kdp_vm_write: src %x dst %x len %x - %08X %08X\n", src, dst, len, ((unsigned long *)src)[0], ((unsigned long *)src)[1]);
 #endif
 
-       cur_virt_src = (addr64_t)((unsigned int)src);
-       cur_virt_dst = (addr64_t)((unsigned int)dst);
-
+       cur_virt_src = (vm_offset_t)src;
+       cur_virt_dst = (vm_offset_t)dst;
        resid = len;
 
        while (resid != 0) {
@@ -173,14 +210,16 @@ unsigned kdp_vm_write(
                if (cnt > resid) 
                        cnt = resid;
 
-               bcopy_phys(cur_phys_src, cur_phys_dst, cnt);            /* Copy stuff over */
-               sync_cache64(cur_phys_dst, cnt);                                        /* Sync caches */
+               msr = kdp_xlate_off();
+               kdp_bcopy((unsigned char *)cur_virt_src,  (unsigned char *)cur_phys_dst, cnt);
+               kdp_flush_cache(cur_phys_dst, cnt);
+               kdp_xlate_restore(msr);
 
                cur_virt_src +=cnt;
                cur_virt_dst +=cnt;
                resid -= cnt;
        }
 exit:
-       return (len - resid);
+       return (len-resid);
 }
 
diff --git a/osfmk/kdp/pe/POWERMAC/kdp_mace.c b/osfmk/kdp/pe/POWERMAC/kdp_mace.c
new file mode 100644 (file)
index 0000000..542f125
--- /dev/null
@@ -0,0 +1,672 @@
+/*
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*
+ * Copyright (c) 1997 Apple Computer, Inc.
+ *
+ * ethernet driver for mace on-board ethernet
+ *
+ * HISTORY
+ *
+ * Dieter Siegmund (dieter@next.com) Thu Feb 27 18:25:33 PST 1997
+ * - ripped off code from MK/LINUX, turned it into a polled-mode
+ *   driver for the PCI (8500) class machines
+ *
+ * Dieter Siegmund (dieter@next.com) Fri Mar 21 12:41:29 PST 1997
+ * - reworked to support a BSD-style interface, and to support kdb polled
+ *   interface and interrupt-driven interface concurrently
+ *
+ * Justin Walker (justin@apple.com) Tue May 20 10:29:29 PDT 1997
+ * - Added multicast support
+ *
+ * Dieter Siegmund (dieter@next.com) Thu May 29 15:02:29 PDT 1997
+ * - fixed problem with sending arp packets for ip address 0.0.0.0
+ * - use kdp_register_send_receive() instead of defining 
+ *   en_send_pkt/en_recv_pkt routines to avoid name space 
+ *   collisions with IOEthernetDebugger and allow these routines to be
+ *   overridden by a driverkit-style driver
+ *
+ * Dieter Siegmund (dieter@apple.com) Tue Jun 24 18:29:15 PDT 1997
+ * - don't let the adapter auto-strip 802.3 receive frames, it messes
+ *   up the frame size logic
+ *
+ * Dieter Siegmund (dieter@apple.com) Tue Aug  5 16:24:52 PDT 1997
+ * - handle multicast address deletion correctly
+ */
+#ifdef MACE_DEBUG
+/*
+ * Caveat: MACE_DEBUG delimits some code that is getting kind of
+ *         stale. Before blindly turning on MACE_DEBUG for your
+ *         testing, take a look at the code enabled by it to check
+ *         that it is reasonably sane.
+ */
+#endif
+
+#include <mach/boolean.h>
+#include <mach/exception_types.h>
+#include <mach/mach_types.h>
+
+#include <ppc/proc_reg.h>
+#include <ppc/pmap.h>
+#include <pexpert/ppc/powermac.h>
+#include <pexpert/ppc/dbdma.h>
+#include <kdp/kdp_en_debugger.h>
+#include <kdp/kdp_udp.h>
+
+#include "kdp_mace.h"
+
+struct kdp_mace_copy_desc {
+    int *       len;
+    char *      data;
+};
+static mace_t  mace;
+#define MACE_DMA_AREA_SIZE \
+                (ETHER_RX_NUM_DBDMA_BUFS * ETHERNET_BUF_SIZE + PG_SIZE)
+static unsigned long 
+       mace_rx_dma_area[(MACE_DMA_AREA_SIZE + 
+                               sizeof(long))/sizeof(long)];                
+static unsigned long 
+       mace_tx_dma_area[(ETHERNET_BUF_SIZE + PG_SIZE + 
+                               sizeof(long))/sizeof(long)];
+#ifdef MACE_DEBUG
+static unsigned char testBuffer[PG_SIZE * 4];
+static unsigned char testMsg[] = "mace ethernet interface test";
+#endif
+
+static void polled_send_pkt(char * data, int len);
+static void polled_receive_pkt(char *data, int *len, int timeout_ms);
+
+void kdp_mace_reset(mace_t *);
+void kdp_mace_geteh(unsigned char *);
+void kdp_mace_setup_dbdma(void);
+boolean_t kdp_mace_init(void * baseAddresses[3], unsigned char * netAddr);
+#ifdef MACE_DEBUG
+static void printContiguousEtherPacket(u_char *, int);
+static void send_test_packet(void);
+#endif
+
+typedef int (*funcptr)(char *, int, void *);
+int kdp_mace_recv_pkt(funcptr , void *);
+
+#ifdef MACE_DEBUG
+static int
+macAddrsEqual(unsigned char * one, unsigned char * two)
+{
+    int i;
+
+    for (i = 0; i < NUM_EN_ADDR_BYTES; i++)
+       if (*one++ != *two++)
+           return 0;
+    return 1;
+}
+
+static __inline__ int
+isprint(unsigned char c)
+{
+    return (c >= 0x20 && c <= 0x7e);
+}
+
+static void
+printEtherHeader(enet_addr_t * dh, enet_addr_t * sh, u_short etype)
+{
+    u_char * dhost = dh->ether_addr_octet; 
+    u_char * shost = sh->ether_addr_octet;
+
+    printf("Dst: %x:%x:%x:%x:%x:%x Src: %x:%x:%x:%x:%x:%x Type: 0x%x\n", 
+           dhost[0], dhost[1], dhost[2], dhost[3], dhost[4], dhost[5],
+           shost[0], shost[1], shost[2], shost[3], shost[4], shost[5],
+           etype);
+}
+
+static void
+printData(u_char * data_p, int n_bytes)
+{
+#define CHARS_PER_LINE         16
+    char               line_buf[CHARS_PER_LINE + 1];
+    int                        line_pos;
+    int                        offset;
+
+    for (line_pos = 0, offset = 0; offset < n_bytes; offset++, data_p++) {
+       if (line_pos == 0) {
+           printf("%04d ", offset);
+       }
+
+       line_buf[line_pos] = isprint(*data_p) ? *data_p : '.';
+       printf(" %02x", *data_p);
+       line_pos++;
+       if (line_pos == CHARS_PER_LINE) {
+           line_buf[CHARS_PER_LINE] = '\0';
+           printf("  %s\n", line_buf);
+           line_pos = 0;
+       }
+    }
+    if (line_pos) { /* need to finish up the line */
+       for (; line_pos < CHARS_PER_LINE; line_pos++) {
+           printf("   ");
+           line_buf[line_pos] = ' ';
+       }
+       line_buf[CHARS_PER_LINE] = '\0';
+       printf("  %s\n", line_buf);
+    }
+}
+
+static void
+printEtherPacket(enet_addr_t * dhost, enet_addr_t * shost, u_short type, 
+                u_char * data_p, int n_bytes)
+{
+    printEtherHeader(dhost, shost, type);
+    printData(data_p, n_bytes);
+}
+
+static void
+printContiguousEtherPacket(u_char * data_p, int n_bytes)
+{
+    printEtherPacket((enet_addr_t *)data_p, 
+                    (enet_addr_t *)(data_p + NUM_EN_ADDR_BYTES), 
+                    *((u_short *)(data_p + (NUM_EN_ADDR_BYTES * 2))),
+                    data_p, n_bytes);
+}
+#endif
+
+
+/*
+ * kdp_mace_reset
+ *
+ * Reset the board..
+ */
+void
+kdp_mace_reset(mace_t * m)
+{
+    dbdma_reset(m->rv_dbdma);
+    dbdma_reset(m->tx_dbdma);
+}
+
+
+/*
+ * kdp_mace_geteh:
+ *
+ *     This function gets the ethernet address (array of 6 unsigned
+ *     bytes) from the MACE board registers.
+ *
+ */
+void
+kdp_mace_geteh(unsigned char *ep)
+{
+    int        i;
+    unsigned char ep_temp;
+
+    mace.ereg->iac = IAC_PHYADDR; eieio();
+       
+    for (i = 0; i < ETHER_ADD_SIZE; i++) {
+       ep_temp = mace.ereg->padr; eieio();
+       *ep++ = ep_temp;
+    }
+}
+
+/*
+ * mace_seteh:
+ *
+ *     This function sets the ethernet address (array of 6 unsigned
+ *     bytes) on the MACE board. 
+ */
+static void
+mace_seteh(unsigned char *ep)
+{
+    int        i;
+    unsigned char      status;
+
+    if (mace.chip_id != MACE_REVISION_A2) {
+       mace.ereg->iac = IAC_ADDRCHG|IAC_PHYADDR; eieio();
+
+       while ((status = mace.ereg->iac)) {
+           if ((status & IAC_ADDRCHG) == 0) {
+               eieio();
+               break;
+           }
+           eieio();
+       }
+    }
+    else {
+       /* start to load the address.. */
+       mace.ereg->iac = IAC_PHYADDR; eieio();
+    }
+
+    for (i = 0; i < NUM_EN_ADDR_BYTES; i++) {
+       mace.ereg->padr = *(ep+i); eieio();
+    }
+    return;
+}
+
+/*
+ * kdp_mace_setup_dbdma
+ *
+ * Setup various dbdma pointers.
+ */
+void
+kdp_mace_setup_dbdma()
+{
+    mace_t *           m = &mace;
+    int                        i;
+    dbdma_command_t *  d;
+    vm_offset_t                address;
+    dbdma_regmap_t *   regmap;
+
+#define ALIGN_MASK     0xfffffffcUL
+    if (m->rv_dma_area == 0) {
+       m->rv_dma_area = (unsigned char *)
+           ((((unsigned long)mace_rx_dma_area) + 3) & ALIGN_MASK);
+       m->rv_dma = dbdma_alloc(ETHER_RX_NUM_DBDMA_BUFS + 2);
+       m->tx_dma = dbdma_alloc(TX_NUM_DBDMA);
+       m->tx_dma_area = (unsigned char *)
+           ((((unsigned long)mace_tx_dma_area) + 3) & ALIGN_MASK);
+    }
+
+    /* set up a ring of buffers */
+    d = m->rv_dma;
+    for (i = 0; i < ETHER_RX_NUM_DBDMA_BUFS; i++, d++) {
+       address = (vm_offset_t) kvtophys((vm_offset_t)&m->rv_dma_area[i*ETHERNET_BUF_SIZE]);
+       DBDMA_BUILD(d, DBDMA_CMD_IN_LAST, 0, ETHERNET_BUF_SIZE,
+                   address, DBDMA_INT_ALWAYS,
+                   DBDMA_WAIT_NEVER, 
+                   DBDMA_BRANCH_NEVER);
+    }
+
+    /* stop when we hit the end of the list */
+    DBDMA_BUILD(d, DBDMA_CMD_STOP, 0, 0, 0, DBDMA_INT_ALWAYS,
+               DBDMA_WAIT_NEVER, DBDMA_BRANCH_NEVER);
+    d++;
+
+    /* branch to command at "address" ie. element 0 of the "array" */
+    DBDMA_BUILD(d, DBDMA_CMD_NOP, 0, 0, 0, DBDMA_INT_NEVER,
+               DBDMA_WAIT_NEVER, DBDMA_BRANCH_ALWAYS);
+    address = (vm_offset_t) kvtophys((vm_offset_t)m->rv_dma);
+    dbdma_st4_endian(&d->d_cmddep, address);
+
+    m->rv_head = 0;
+    m->rv_tail = ETHER_RX_NUM_DBDMA_BUFS; /* always contains DBDMA_CMD_STOP */
+    regmap = m->rv_dbdma;
+
+    /* stop/init/restart dma channel */
+    dbdma_reset(regmap);
+    dbdma_reset(m->tx_dbdma);
+
+    /* Set the wait value.. */
+    dbdma_st4_endian(&regmap->d_wait, DBDMA_SET_CNTRL(0x00));
+
+    /* Set the tx wait value */
+    regmap = m->tx_dbdma;
+    dbdma_st4_endian(&regmap->d_wait, DBDMA_SET_CNTRL(0x20));
+
+    flush_dcache((vm_offset_t)m->rv_dma, 
+                 sizeof(dbdma_command_t) * (ETHER_RX_NUM_DBDMA_BUFS + 2),
+                       FALSE);
+    /* start receiving */
+    dbdma_start(m->rv_dbdma, m->rv_dma);
+}
+
+#ifdef MACE_DEBUG
+static void
+send_test_packet()
+{
+    unsigned char * tp;
+
+    bzero((char *)testBuffer, sizeof(testBuffer));
+
+    tp = testBuffer;
+
+    /* send self-addressed packet */
+    bcopy((char *)&mace.macaddr[0], (char *)tp, NUM_EN_ADDR_BYTES);
+    tp += NUM_EN_ADDR_BYTES;
+    bcopy((char *)&mace.macaddr[0], (char *)tp, NUM_EN_ADDR_BYTES);
+    tp += NUM_EN_ADDR_BYTES;
+    *tp++ = 0;
+    *tp++ = 0;
+    bcopy((char *)testMsg, (char *)tp, sizeof(testMsg));
+    polled_send_pkt((char *)testBuffer, 80);
+    return;
+}
+#endif
+
+/*
+ * Function: kdp_mace_init
+ *
+ * Purpose:
+ *   Called early on, initializes the adapter and readies it for
+ *   kdb kernel debugging. 
+ */
+boolean_t
+kdp_mace_init(void * baseAddresses[3], unsigned char * netAddr)
+{
+    unsigned char      status;
+    mace_t *           m = &mace;
+    struct mace_board * ereg;
+    int                mpc = 0;
+    int                        i;
+
+    bzero((char *)&mace, sizeof(mace));
+
+    /* get the ethernet registers' mapped address */
+    ereg = m->ereg 
+       = (struct mace_board *) baseAddresses[0];
+    m->tx_dbdma = (dbdma_regmap_t *) baseAddresses[1];
+    m->rv_dbdma = (dbdma_regmap_t *) baseAddresses[2];
+
+    for (i = 0; i < NUM_EN_ADDR_BYTES; i++)
+        m->macaddr[i] = netAddr[i];
+
+    /* Reset the board & AMIC.. */
+    kdp_mace_reset(m);
+
+    /* grab the MACE chip rev  */
+    m->chip_id = (ereg->chipid2 << 8 | ereg->chipid1);
+
+    /* don't auto-strip for 802.3 */
+    m->ereg->rcvfc &= ~(RCVFC_ASTRPRCV);
+
+    /* set the ethernet address */
+    mace_seteh(mace.macaddr);
+    {
+       unsigned char macaddr[NUM_EN_ADDR_BYTES];
+       kdp_mace_geteh(macaddr);
+       printf("mace ethernet [%02x:%02x:%02x:%02x:%02x:%02x]\n",
+               macaddr[0], macaddr[1], macaddr[2], 
+               macaddr[3], macaddr[4], macaddr[5]);
+    }
+
+    /* Now clear the Multicast filter */
+    if (m->chip_id != MACE_REVISION_A2) {
+       ereg->iac = IAC_ADDRCHG|IAC_LOGADDR; eieio();
+
+       while ((status = ereg->iac)) {
+           if ((status & IAC_ADDRCHG) == 0)
+               break;
+           eieio();
+       }
+       eieio();
+    }
+    else {
+       ereg->iac = IAC_LOGADDR; eieio();
+    }
+    {
+       int i;
+
+       for (i=0; i < 8; i++) 
+       {    ereg->ladrf = 0;
+            eieio();
+        }
+    }
+
+    /* register interrupt routines */
+    kdp_mace_setup_dbdma();
+
+    /* Start the chip... */
+    m->ereg->maccc = MACCC_ENXMT|MACCC_ENRCV; eieio();
+    {
+       volatile char ch =  mace.ereg->ir; eieio();
+    }
+
+    delay(500); /* paranoia */
+    mace.ereg->imr = 0xfe; eieio();
+
+    /* register our debugger routines */
+    kdp_register_send_receive((kdp_send_t)polled_send_pkt, 
+                             (kdp_receive_t)polled_receive_pkt);
+
+#ifdef MACE_DEBUG
+    printf("Testing 1 2 3\n");
+    send_test_packet();
+    printf("Testing 1 2 3\n");
+    send_test_packet();
+    printf("Testing 1 2 3\n");
+    send_test_packet();
+    do {
+       static unsigned char buf[ETHERNET_BUF_SIZE];
+       int len;
+       int nmpc = mace.ereg->mpc; eieio();
+
+       if (nmpc > mpc) {
+           mpc = nmpc;
+           printf("mpc %d\n", mpc);
+       }
+       polled_receive_pkt((char *)buf, &len, 100);
+       if (len > 0) {
+           printf("rx %d\n", len);
+           printContiguousEtherPacket(buf, len);
+       }
+    } while(1);
+#endif
+
+    return TRUE;
+}
+
+#ifdef MACE_DEBUG
+static void
+kdp_mace_txstatus(char * msg)
+{
+    dbdma_regmap_t *           dmap = mace.tx_dbdma;
+    volatile unsigned long     status;
+    volatile unsigned long     intr;
+    volatile unsigned long     branch;
+    volatile unsigned long     wait;
+
+    status = dbdma_ld4_endian(&dmap->d_status); eieio();
+    intr = dbdma_ld4_endian(&dmap->d_intselect); eieio();
+    branch = dbdma_ld4_endian(&dmap->d_branch); eieio();
+    wait = dbdma_ld4_endian(&dmap->d_wait); eieio();
+    printf("(%s s=0x%x i=0x%x b=0x%x w=0x%x)", msg, status, intr, branch,
+          wait);
+    return;
+}
+#endif
+
+static void
+kdp_mace_tx_dbdma(char * data, int len)
+{
+    unsigned long      count;
+    dbdma_command_t *  d;
+    unsigned long      page;
+
+    d = mace.tx_dma;
+    page = ((unsigned long) data) & PG_MASK;
+    if ((page + len) <= PG_SIZE) { /* one piece dma */
+       DBDMA_BUILD(d, DBDMA_CMD_OUT_LAST, DBDMA_KEY_STREAM0,
+                   len,
+                   (vm_offset_t) kvtophys((vm_offset_t) data),
+                   DBDMA_INT_NEVER, 
+                   DBDMA_WAIT_IF_FALSE, DBDMA_BRANCH_NEVER);
+    }
+    else { /* two piece dma */
+       count = PG_SIZE - page;
+       DBDMA_BUILD(d, DBDMA_CMD_OUT_MORE, DBDMA_KEY_STREAM0,
+                   count,
+                   (vm_offset_t)kvtophys((vm_offset_t) data),
+                   DBDMA_INT_NEVER, 
+                   DBDMA_WAIT_NEVER, DBDMA_BRANCH_NEVER);
+       d++;
+       DBDMA_BUILD(d, DBDMA_CMD_OUT_LAST, DBDMA_KEY_STREAM0, 
+                   len - count, (vm_offset_t)
+                   kvtophys((vm_offset_t)((unsigned char *)data + count)),
+                   DBDMA_INT_NEVER, 
+                   DBDMA_WAIT_IF_FALSE, DBDMA_BRANCH_NEVER);
+    }
+    d++;
+    DBDMA_BUILD(d, DBDMA_CMD_LOAD_QUAD, DBDMA_KEY_SYSTEM,
+               1, kvtophys((vm_offset_t) &mace.ereg->xmtfs),DBDMA_INT_NEVER, 
+//             1, &mace.ereg->xmtfs,DBDMA_INT_NEVER, 
+               DBDMA_WAIT_NEVER, DBDMA_BRANCH_NEVER);
+    d++;
+    DBDMA_BUILD(d, DBDMA_CMD_LOAD_QUAD, DBDMA_KEY_SYSTEM,
+               1, kvtophys((vm_offset_t) &mace.ereg->ir), DBDMA_INT_ALWAYS,
+//             1, &mace.ereg->ir, DBDMA_INT_ALWAYS,
+               DBDMA_WAIT_NEVER, DBDMA_BRANCH_NEVER);
+    d++;
+    DBDMA_BUILD(d, DBDMA_CMD_STOP, 0, 0, 0, 0, 0, 0);
+
+    flush_dcache((vm_offset_t)mace.tx_dma, 
+               sizeof(dbdma_command_t) * TX_NUM_DBDMA,
+               FALSE);
+    dbdma_start(mace.tx_dbdma, mace.tx_dma);
+    return;
+
+}
+
+static void
+waitForDBDMADone(char * msg)
+{
+    {
+       /* wait for tx dma completion */
+       dbdma_regmap_t *        dmap = mace.tx_dbdma;
+       int                     i;
+       volatile unsigned long  val;
+
+       i = 0;
+       do {
+           val = dbdma_ld4_endian(&dmap->d_status); eieio();
+           delay(50);
+           i++;
+       } while ((i < 100000) && (val & DBDMA_CNTRL_ACTIVE));
+       if (i == 100000)
+           printf("mace(%s): kdp_mace_tx_dbdma poll timed out 0x%x", msg, val);
+    }
+}
+
+int
+kdp_mace_recv_pkt(funcptr pktfunc, void * p)
+{
+    vm_offset_t                        address;
+    struct mace_board *                board;
+    long                       bytes;
+    int                                done = 0;
+    int                                doContinue = 0;
+    mace_t *                   m;
+    unsigned long              resid;
+    unsigned short             status;
+    int                                tail;
+
+    m = &mace;
+    board = m->ereg;
+
+    /* remember where the tail was */
+    tail = m->rv_tail;
+    for (done = 0; (done == 0) && (m->rv_head != tail);) {
+       dbdma_command_t *       dmaHead;
+       
+       dmaHead = &m->rv_dma[m->rv_head];
+       resid = dbdma_ld4_endian(&dmaHead->d_status_resid);
+       status = (resid >> 16);
+       bytes  = resid & 0xffff;
+       bytes = ETHERNET_BUF_SIZE - bytes - 8; /* strip off FCS/CRC */
+
+       if ((status & DBDMA_ETHERNET_EOP) == 0)  {
+           /* no packets are ready yet */
+           break;
+       }
+       doContinue = 1;
+       /* if the packet is good, pass it up */
+       if (bytes >= (ETHER_MIN_PACKET - 4)) {
+           char * dmaPacket;
+           dmaPacket = (char *)&m->rv_dma_area[m->rv_head * ETHERNET_BUF_SIZE];
+           done = (*pktfunc)(dmaPacket, bytes, p);
+       }
+       /* mark the head as the new tail in the dma channel command list */
+       DBDMA_BUILD(dmaHead, DBDMA_CMD_STOP, 0, 0, 0, DBDMA_INT_ALWAYS,
+                   DBDMA_WAIT_NEVER, DBDMA_BRANCH_NEVER);
+       flush_dcache((vm_offset_t)dmaHead, 
+               sizeof(*dmaHead),
+               FALSE);
+       eieio();
+
+       /* make the tail an available dma'able entry */
+       {
+           dbdma_command_t *           dmaTail;
+           dmaTail = &m->rv_dma[m->rv_tail];
+           address = kvtophys((vm_offset_t) 
+                              &m->rv_dma_area[m->rv_tail*ETHERNET_BUF_SIZE]);
+           // this command is live so write it carefully
+           DBDMA_ST4_ENDIAN(&dmaTail->d_address, address);
+           dmaTail->d_status_resid = 0;
+           dmaTail->d_cmddep = 0;
+           eieio();
+           DBDMA_ST4_ENDIAN(&dmaTail->d_cmd_count,
+                           ((DBDMA_CMD_IN_LAST) << 28) | ((0) << 24) |
+                           ((DBDMA_INT_ALWAYS) << 20) |
+                           ((DBDMA_BRANCH_NEVER) << 18) | ((DBDMA_WAIT_NEVER) << 16) |
+                           (ETHERNET_BUF_SIZE));
+           eieio();
+           flush_dcache((vm_offset_t)dmaTail, 
+                       sizeof(*dmaTail),
+                       FALSE);
+       }
+       /* head becomes the tail */
+       m->rv_tail = m->rv_head;
+
+       /* advance the head */
+       m->rv_head++;
+       if (m->rv_head == (ETHER_RX_NUM_DBDMA_BUFS + 1))
+           m->rv_head = 0;
+    }
+    if (doContinue) {
+       sync();
+       dbdma_continue(m->rv_dbdma);
+    }
+    return (done);
+}
+
+static int
+kdp_mace_copy(char * pktBuf, int len, void * p)
+{
+    struct kdp_mace_copy_desc * cp = (struct kdp_mace_copy_desc *)p;
+
+    bcopy((char *)pktBuf, (char *)cp->data, len);
+    *cp->len = len;
+    return (1); /* signal that we're done */
+}
+
+/* kdb debugger routines */
+static void
+polled_send_pkt(char * data, int len)
+{
+    waitForDBDMADone("mace: polled_send_pkt start");
+    kdp_mace_tx_dbdma(data, len);
+    waitForDBDMADone("mace: polled_send_pkt end");
+    return;
+}
+
+static void
+polled_receive_pkt(char *data, int *len, int timeout_ms)
+{
+    struct kdp_mace_copy_desc cp;
+
+    cp.len = len;
+    cp.data = data;
+
+    timeout_ms *= 1000;
+    *len = 0;
+    while (kdp_mace_recv_pkt(kdp_mace_copy, (void *)&cp) == 0) {
+       if (timeout_ms <= 0)
+           break;
+       delay(50);
+       timeout_ms -= 50;
+    }
+    return;
+}
diff --git a/osfmk/kdp/pe/POWERMAC/kdp_mace.h b/osfmk/kdp/pe/POWERMAC/kdp_mace.h
new file mode 100644 (file)
index 0000000..f6e978b
--- /dev/null
@@ -0,0 +1,389 @@
+/*
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*
+ * Copyright 1996 1995 by Open Software Foundation, Inc. 1997 1996 1995 1994 1993 1992 1991  
+ *              All Rights Reserved 
+ *  
+ * Permission to use, copy, modify, and distribute this software and 
+ * its documentation for any purpose and without fee is hereby granted, 
+ * provided that the above copyright notice appears in all copies and 
+ * that both the copyright notice and this permission notice appear in 
+ * supporting documentation. 
+ *  
+ * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE 
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
+ * FOR A PARTICULAR PURPOSE. 
+ *  
+ * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR 
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT, 
+ * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 
+ * 
+ */
+/*
+ * Copyright 1996 1995 by Apple Computer, Inc. 1997 1996 1995 1994 1993 1992 1991  
+ *              All Rights Reserved 
+ *  
+ * Permission to use, copy, modify, and distribute this software and 
+ * its documentation for any purpose and without fee is hereby granted, 
+ * provided that the above copyright notice appears in all copies and 
+ * that both the copyright notice and this permission notice appear in 
+ * supporting documentation. 
+ *  
+ * APPLE COMPUTER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE 
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
+ * FOR A PARTICULAR PURPOSE. 
+ *  
+ * IN NO EVENT SHALL APPLE COMPUTER BE LIABLE FOR ANY SPECIAL, INDIRECT, OR 
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT, 
+ * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 
+ */
+/*
+ * MKLINUX-1.0DR2
+ */
+/* 
+ * PMach Operating System
+ * Copyright (c) 1995 Santa Clara University
+ * All Rights Reserved.
+ */
+/* 
+ * Mach Operating System
+ * Copyright (c) 1991,1990,1989 Carnegie Mellon University
+ * All Rights Reserved.
+ * 
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ * 
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ * 
+ * Carnegie Mellon requests users of this software to return to
+ * 
+ *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
+ *  School of Computer Science
+ *  Carnegie Mellon University
+ *  Pittsburgh PA 15213-3890
+ * 
+ * any improvements or extensions that they make and grant Carnegie Mellon
+ * the rights to redistribute these changes.
+ */
+/*
+ *     File:   if_3c501.h
+ *     Author: Philippe Bernadat
+ *     Date:   1989
+ *     Copyright (c) 1989 OSF Research Institute 
+ *
+ *     3COM Etherlink 3C501 Mach Ethernet drvier
+ */
+/*
+  Copyright 1990 by Open Software Foundation,
+Cambridge, MA.
+
+               All Rights Reserved
+
+  Permission to use, copy, modify, and distribute this software and
+its documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appears in all copies and
+that both the copyright notice and this permission notice appear in
+supporting documentation, and that the name of OSF or Open Software
+Foundation not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+  OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
+IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
+NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+*/
+
+
+
+#define ENETPAD(n)      char n[15] 
+
+/* 0x50f0a000 */
+struct mace_board {
+     volatile unsigned char   rcvfifo;  /* 00  receive fifo */
+     ENETPAD(epad0);
+     volatile unsigned char   xmtfifo;  /* 01  transmit fifo */
+     ENETPAD(epad1);
+     volatile unsigned char   xmtfc;    /* 02  transmit frame control */
+     ENETPAD(epad2);
+     volatile unsigned char   xmtfs;    /* 03  transmit frame status */
+     ENETPAD(epad3);
+     volatile unsigned char   xmtrc;    /* 04  transmit retry count */
+     ENETPAD(epad4);
+     volatile unsigned char   rcvfc;    /* 05  receive frame control -- 4 bytes */
+     ENETPAD(epad5); 
+     volatile unsigned char   rcvfs;    /* 06  receive frame status */
+     ENETPAD(epad6);
+     volatile unsigned char   fifofc;   /* 07  fifo frame count */
+     ENETPAD(epad7);
+     volatile unsigned char   ir;       /* 08  interrupt */
+     ENETPAD(epad8);
+     volatile unsigned char   imr;      /* 09  interrupt mask */
+     ENETPAD(epad9);
+     volatile unsigned char   pr;       /* 10  poll */
+     ENETPAD(epad10);
+     volatile unsigned char   biucc;    /* 11  bus interface unit configuration control */
+     ENETPAD(epad11);
+     volatile unsigned char   fifocc;   /* 12  fifo configuration control */
+     ENETPAD(epad12);
+     volatile unsigned char   maccc;    /* 13  media access control configuration control */
+     ENETPAD(epad13);
+     volatile unsigned char   plscc;    /* 14  physical layer signalling configuration control */
+     ENETPAD(epad14);
+     volatile unsigned char   phycc;    /* 15  physical layer configuration control */
+     ENETPAD(epad15);
+     volatile unsigned char   chipid1;  /* 16  chip identification LSB */
+     ENETPAD(epad16);
+     volatile unsigned char   chipid2;  /* 17  chip identification MSB */
+     ENETPAD(epad17);
+     volatile unsigned char   iac;      /* 18  internal address configuration */
+     ENETPAD(epad18);
+     volatile unsigned char   res1;     /* 19  */
+     ENETPAD(epad19);
+     volatile unsigned char   ladrf;    /* 20  logical address filter -- 8 bytes */
+     ENETPAD(epad20);
+     volatile unsigned char   padr;     /* 21  physical address -- 6 bytes */
+     ENETPAD(epad21);
+     volatile unsigned char   res2;     /* 22  */
+     ENETPAD(epad22);
+     volatile unsigned char   res3;     /* 23  */
+     ENETPAD(epad23);
+     volatile unsigned char   mpc;      /* 24  missed packet count */
+     ENETPAD(epad24);
+     volatile unsigned char   res4;     /* 25  */
+     ENETPAD(epad25);
+     volatile unsigned char   rntpc;    /* 26  runt packet count */
+     ENETPAD(epad26);
+     volatile unsigned char   rcvcc;    /* 27  receive collision count */
+     ENETPAD(epad27);
+     volatile unsigned char   res5;     /* 28  */
+     ENETPAD(epad28);
+     volatile unsigned char   utr;      /* 29  user test */
+     ENETPAD(epad29);
+     volatile unsigned char   res6;     /* 30  */
+     ENETPAD(epad30);
+     volatile unsigned char   res7;     /* 31  */
+     };
+
+/*
+ * Chip Revisions..
+ */
+
+#define        MACE_REVISION_B0        0x0940
+#define        MACE_REVISION_A2        0x0941
+
+/* xmtfc */
+#define XMTFC_DRTRY       0X80
+#define XMTFC_DXMTFCS     0x08
+#define XMTFC_APADXNT     0x01
+
+/* xmtfs */
+#define XMTFS_XNTSV    0x80
+#define XMTFS_XMTFS    0x40
+#define XMTFS_LCOL     0x20
+#define XMTFS_MORE     0x10
+#define XMTFS_ONE      0x08
+#define XMTFS_DEFER    0x04
+#define XMTFS_LCAR     0x02
+#define XMTFS_RTRY     0x01
+
+/* xmtrc */
+#define XMTRC_EXDEF  0x80
+
+/* rcvfc */
+#define RCVFC_LLRCV       0x08
+#define RCVFC_M_R         0x04
+#define RCVFC_ASTRPRCV    0x01
+
+/* rcvfs */
+#define RCVFS_OFLO     0x80
+#define RCVFS_CLSN     0x40
+#define RCVFS_FRAM     0x20
+#define RCVFS_FCS      0x10
+#define RCVFS_REVCNT   0x0f
+
+/* fifofc */
+#define        FIFOCC_XFW_8    0x00 
+#define        FIFOCC_XFW_16   0x40 
+#define        FIFOCC_XFW_32   0x80 
+#define        FIFOCC_XFW_XX   0xc0 
+#define        FIFOCC_RFW_16   0x00 
+#define        FIFOCC_RFW_32   0x10 
+#define        FIFOCC_RFW_64   0x20 
+#define        FIFOCC_RFW_XX   0x30 
+#define FIFOCC_XFWU    0x08    
+#define FIFOCC_RFWU    0x04    
+#define FIFOCC_XBRST   0x02    
+#define FIFOCC_RBRST   0x01    
+
+
+/* ir */
+#define IR_JAB         0x80
+#define IR_BABL        0x40
+#define IR_CERR        0x20
+#define IR_RCVCCO      0x10
+#define IR_RNTPCO      0x08
+#define IR_MPCO        0x04
+#define IR_RCVINT      0x02
+#define IR_XMTINT      0x01
+
+/* imr */
+#define IMR_MJAB       0x80
+#define IMR_MBABL      0x40
+#define IMR_MCERR      0x20
+#define IMR_MRCVCCO    0x10
+#define IMR_MRNTPCO    0x08
+#define IMR_MMPCO      0x04
+#define IMR_MRCVINT    0x02
+#define IMR_MXMTINT    0x01
+
+/* pr */
+#define PR_XMTSV       0x80
+#define PR_TDTREQ      0x40
+#define PR_RDTREQ      0x20
+
+/* biucc */
+#define BIUCC_BSWP        0x40
+#define BIUCC_XMTSP04     0x00
+#define BIUCC_XMTSP16     0x10
+#define BIUCC_XMTSP64     0x20
+#define BIUCC_XMTSP112    0x30
+#define BIUCC_SWRST       0x01
+
+/* fifocc */
+#define FIFOCC_XMTFW08W    0x00
+#define FIFOCC_XMTFW16W    0x40
+#define FIFOCC_XMTFW32W    0x80
+
+#define FIFOCC_RCVFW16     0x00     
+#define FIFOCC_RCVFW32     0x10
+#define FIFOCC_RCVFW64     0x20
+
+#define FIFOCC_XMTFWU      0x08
+#define FIFOCC_RCVFWU      0x04
+#define FIFOCC_XMTBRST     0x02
+#define FIFOCC_RCVBRST     0x01
+
+/* maccc */
+#define MACCC_PROM        0x80
+#define MACCC_DXMT2PD     0x40
+#define MACCC_EMBA        0x20
+#define MACCC_DRCVPA      0x08
+#define MACCC_DRCVBC      0x04
+#define MACCC_ENXMT       0x02
+#define MACCC_ENRCV       0x01
+
+/* plscc */
+#define PLSCC_XMTSEL      0x08
+#define PLSCC_AUI         0x00
+#define PLSCC_TENBASE     0x02
+#define PLSCC_DAI         0x04
+#define PLSCC_GPSI        0x06
+#define PLSCC_ENPLSIO     0x01
+
+/* phycc */
+#define PHYCC_LNKFL       0x80
+#define PHYCC_DLNKTST     0x40
+#define PHYCC_REVPOL      0x20
+#define PHYCC_DAPC        0x10
+#define PHYCC_LRT         0x08
+#define PHYCC_ASEL        0x04
+#define PHYCC_RWAKE       0x02
+#define PHYCC_AWAKE       0x01
+
+/* iac */
+#define IAC_ADDRCHG     0x80
+#define IAC_PHYADDR     0x04
+#define IAC_LOGADDR     0x02
+
+/* utr */
+#define UTR_RTRE        0x80
+#define UTR_RTRD        0x40
+#define UTR_RPA         0x20
+#define UTR_FCOLL       0x10
+#define UTR_RCVFCSE     0x08
+
+#define UTR_NOLOOP      0x00
+#define UTR_EXTLOOP     0x02
+#define UTR_INLOOP      0x04
+#define UTR_INLOOP_M    0x06
+
+#define ENET_PHYADDR_LEN       6
+#define ENET_HEADER         14
+
+#define BFRSIZ         2048
+#define ETHER_ADD_SIZE 6       /* size of a MAC address */
+#define        DSF_LOCK        1
+#define DSF_RUNNING    2
+#define MOD_ENAL 1
+#define MOD_PROM 2
+
+/*
+ * MACE Chip revision codes
+ */
+#define MACERevA2       0x0941
+#define MACERevB0       0x0940
+
+/*
+ * Defines and device state
+ * Dieter Siegmund (dieter@next.com) Thu Feb 27 18:25:33 PST 1997
+ */
+
+#define PG_SIZE         0x1000UL
+#define PG_MASK         (PG_SIZE - 1UL)
+
+#define ETHERMTU                1500
+#define ETHER_RX_NUM_DBDMA_BUFS 32
+#define ETHERNET_BUF_SIZE       (ETHERMTU + 36)
+#define ETHER_MIN_PACKET        64
+#define TX_NUM_DBDMA            6
+#define NUM_EN_ADDR_BYTES   6
+
+#define DBDMA_ETHERNET_EOP      0x40
+
+typedef struct mace_s {
+    struct mace_board *         ereg;   /* ethernet register set address */
+    dbdma_regmap_t *           tx_dbdma;
+    dbdma_regmap_t *           rv_dbdma;
+    unsigned char               macaddr[NUM_EN_ADDR_BYTES]; /* mac address */
+    int                         chip_id;
+    dbdma_command_t             *rv_dma;
+    dbdma_command_t             *tx_dma;
+    unsigned char               *rv_dma_area;
+    unsigned char               *tx_dma_area;
+    int                         rv_tail;
+    int                         rv_head;
+} mace_t;
+
+
index 278cd577a5cf5f99634c9b19e6cde4571d3b2240..42718d5cabb370cd312d4a7d9c5fa75941daf700 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0764da904b06a6100d8700ee665834a9a8688f42..848c13caf68ee2344aa2bcd00b4667c43fb351ad 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3df0a0460d330b2cc5d4c69042301efa92b3cb50..9d2a912c089b61cd330db7905b5566b1c339fe7b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 151888d826ffe2951b6dd99041972b35bd38b075..085ccd9a69a0bb6dd7112b64405e1bf2a5b7a4ca 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 34afe5ae2fb0d7abf20436c2aaaa7896e4ff97ce..6b27ea5a9ac41e32f31b32fe8c4cdfd4baa96ff7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -234,17 +231,6 @@ int  get_task_numacts(task_t t)
        return(t->thr_act_count);
 }
 
-
-/* does this machine need  64bit register set for signal handler */
-int is_64signalregset(void)
-{
-       task_t t = current_task();
-       if(t->taskFeatures[0] & tf64BitData)
-               return(1);
-       else
-               return(0);
-}
-
 /*
  * Reset the current task's map by taking a reference
  * on the new map.  The old map reference is returned.
index e172384ae17f97353d4962b7eb0dd39b75e8aa2e..ad846bf5c918129b2c867cb479d33195bd93255a 100644 (file)
@@ -4,22 +4,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8f74809795ef0fc6b906bb9d758bbe29236a9e49..b6a263b70d464d4e1ade8225b5a514e67bca961d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 25dfac50eaa2e1db58fc5434695b8f14fd2ea713..26cefa13cad8de964fc36f82d1a95c3b9e41b527 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -189,10 +186,6 @@ extern int64_t             clock_set_calendar_adjtime(
 
 extern void                    clock_initialize_calendar(void);
 
-extern void                    clock_gettimeofday(
-                        uint32_t                       *secs,
-                        uint32_t                       *microsecs);
-
 #endif /* __APPLE_API_PRIVATE */
 
 #ifdef __APPLE_API_UNSTABLE
index 2b1fbf18fa41421d557ea003de8249a0f68e222e..5116219f06163530863054cb3291263eb28c29cf 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b2c44767b03c322555ce9e4101a3a1ba8a135bed..7921e0172505013d652f77c6449b963f8efb8d3d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4c255ec3ee1b02a2434d92d4712bc17ff27ae36f..10d1afb1f7391492387f409e013910bd9193ae2e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9a2ffafc66cd40d2a5c697f170caa3aade0f027f..1bd1c9e16af93ae28e17189161e03c00cbd906d7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d08d17ea5a1da682fcd189b40aea46c429bc6c9a..59d1f50c4fd1dfd24c24138262d134f32d49f920 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f698c52cf454fbe2f3ebe0a5bd4b8b342e4d5c96..7793cb8c242faad5624b14f803c3fe7c41ab2b1f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a2d96f04739d290f782deaebe39c0451ea4941fb..990b10f959633b6b7ee408f8f59341c335b7aef1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0a53037676f19a08976471a9d0ded58420a83bd8..d1f5ad91309cdba130db4347cfde25e11b5c9820 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 896c0f4a7bc389488b0084bb85d9ee95a65a2386..530522648edbb0a3c8afecac5212863cc90c3eab 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3676080bfe45b7f261fa889113e9e7659db4d92a..76b125c60d9b80ea7e6880a40d77855f7d50f2e8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6cbce6947b91627544b3ebee8d5dc05a23d36cfe..1e6349d0f5175b4779bc22c8b7dd38e846c8ef92 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 45ee48b20e0b5a9557670d4d47d5d45aa66d3d6c..4af3a402285e270117c6171d81de070e986851b3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 24b6655969f6d409032315cc39e5a7be5fec2916..afb69bdd7275489d0dd4873d02645958e8963823 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b4d18b36604aada0654a2fd55373294e0d5dd37b..7114cd52bfcc521bbad858d5aaa15ebe10925dc9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 682ba555d552ec1c9eb0be4ebc9e84a705163e5e..b99139fc23c0c82077a1a2f3170a3d0c223d1a21 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -55,7 +52,6 @@
 
 #include <mach_kdb.h>
 
-#include <mach/mach_types.h>
 #include <mach/boolean.h>
 #include <mach/kern_return.h>
 #include <mach/message.h>
index a75a36c762b2b6ffd52ddf8c3efa78a423dc9c55..360da95fc91a0462f082a488165a432d4bcb537b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 308885c44e9e2797938ef4640b2ee39e37afab86..2d13930a1aa185972f69bdef42bd21f70690c5a9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -514,7 +511,7 @@ host_processor_info(
                if (machine_slot[i].is_cpu)
                        num++;
 
-       size = (vm_size_t)round_page_32(num * count * sizeof(natural_t));
+       size = (vm_size_t)round_page(num * count * sizeof(natural_t));
 
        kr = vm_allocate(ipc_kernel_map, &addr, size, TRUE);
        if (kr != KERN_SUCCESS)
index bf3800d508ab79ca41b41b780b690ae080ccc499..1318ec508f0534c5ca06b32f28720c2c0192d572 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d5965452e04c3358404443b86f3236507b2e8d2b..2d5da22079bffcf9166ba2dc1f478670c1ee072d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ac0cfeece06af2c96afc93758efa148036255f0c..a8524dbe5e6be5c3f8289d9589069a8cd9770de7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 23d830ffd5c5ed25455a0310e17aedeb3d1c9a22..4c3aa3b45ea49da9b98ad1e7fffdba8edf54cc0a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 01701d24a28bab93ad741affa645ae9ab35613d9..6b4a0916b3ce00da08d86c5fd7353f4a6b0ad4be 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 06898cc5f0b03697813c954a562e3d9d83bffbad..95fbf38856bf276e23cb54c696c0c92337dbd63c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a3595a6a251db8d4721bd0e8b9730774f394d32a..39365d61357ccd5f897d0ea8de089a1f86fcdf1f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a880cdea1d31a8555ddaca07497c76f3b65dc920..90321582306ab7bfc60af2e691e1f9e1f2cd0578 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 637b78fad6911e8e88e50e0d5c6926aae6db6045..e962d46f120f955f0a9975435727b971ed4d9f8c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 37ced9071176245ae08efe11499966b73b2661fe..34c8ffc000af727c490aa4d5806b07bbbe1cbff3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e9e7a07c849a4d9f5194c245034b7e82ba150996..5d18af44d49d3ce7f7b25e92abb7811c26dc65b6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2cb2d6ef12537df7c011ed125e20f5b10e8b4498..f387287a512c3dc0ca41982b9425a15f5b4a1ae0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -59,7 +56,6 @@
  *     Task and thread related IPC functions.
  */
 
-#include <mach/mach_types.h>
 #include <mach/boolean.h>
 #include <mach_rt.h>
 #include <mach/kern_return.h>
index a14b5eae357df13da9e1226840b3313aa50feca9..ded87c88cd91ff3d2fd544bcfae2168778b13a95 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7a135a654ef63a2f0eca7c3b5bd6ed33a12ee053..a67c71d14324df7476a2ea31cc630f5cf5c98df3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -438,8 +435,8 @@ krealloc(
        /* if old block was kmem_alloc'd, then use kmem_realloc if necessary */
 
        if (old_size >= kalloc_max_prerounded) {
-               old_size = round_page_32(old_size);
-               new_size = round_page_32(new_size);
+               old_size = round_page(old_size);
+               new_size = round_page(new_size);
                if (new_size > old_size) {
 
                        if (kmem_realloc(kalloc_map, *addrp, old_size, &naddr,
index 2baeb5a72da8716fcbc80e70831c2a212bd592bb..657848b41b8a7659c93e97ae16292061862538f1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8d4e543878d021e7acda2defbf566c18fe7af7db..2a5b7d0620a48150967ce3f6e01c132aa77333b6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 34d5ed68f34e318824c32e970e09f1ef4ac875c7..13f58fb7415c3c5965d79bcffed87181ba1e276e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cb42a9f6ae5bfffebd12db90fe2abc6e851098ab..0de60c5ce314675932905855f556b4bf88f97039 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -791,7 +788,7 @@ kmod_dump(vm_offset_t *addr, unsigned int cnt)
         if (!k->address) {
             continue; // skip fake entries for built-in kernel components
         }
-        if (pmap_find_phys(kernel_pmap, (addr64_t)k) == 0) {
+        if (pmap_extract(kernel_pmap, (vm_offset_t)k) == 0) {
             kdb_printf("         kmod scan stopped due to missing "
                 "kmod page: %08x\n", stop_kmod);
             break;
@@ -811,7 +808,7 @@ kmod_dump(vm_offset_t *addr, unsigned int cnt)
                 for (r = k->reference_list; r; r = r->next) {
                     kmod_info_t * rinfo;
 
-                    if (pmap_find_phys(kernel_pmap, (addr64_t)r) == 0) {
+                    if (pmap_extract(kernel_pmap, (vm_offset_t)r) == 0) {
                         kdb_printf("            kmod dependency scan stopped "
                             "due to missing dependency page: %08x\n", r);
                         break;
@@ -823,7 +820,7 @@ kmod_dump(vm_offset_t *addr, unsigned int cnt)
                         continue; // skip fake entries for built-ins
                     }
 
-                    if (pmap_find_phys(kernel_pmap, (addr64_t)rinfo) == 0) {
+                    if (pmap_extract(kernel_pmap, (vm_offset_t)rinfo) == 0) {
                         kdb_printf("            kmod dependency scan stopped "
                             "due to missing kmod page: %08x\n", rinfo);
                         break;
index d70952ba7a9c806449f4202411ab3061bf2bdd95..e7e897c49497dec0076663713b577b28c671d278 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e175372982ce8733a75f617900c97ff17ca42b3c..afad3b62829436fa7ad32f88861878fda9ac3d67 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2e2080ab36ae8d0af63ef2643988a51fd4ae937d..0475b12b0a6fbc700df06b9c5f3d6d30847eb452 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -81,6 +78,7 @@
 
 #ifdef __ppc__
 #include <ppc/Firmware.h>
+#include <ppc/POWERMAC/mp/MPPlugIn.h>
 #endif
 
 #include <sys/kdebug.h>
@@ -215,13 +213,9 @@ usimple_lock_init(
        usimple_lock_t  l,
        etap_event_t    event)
 {
-#ifndef        MACHINE_SIMPLE_LOCK
        USLDBG(usld_lock_init(l, event));
        ETAPCALL(etap_simplelock_init((l),(event)));
        hw_lock_init(&l->interlock);
-#else
-       simple_lock_init(l,event);
-#endif
 }
 
 
@@ -236,7 +230,6 @@ void
 usimple_lock(
        usimple_lock_t  l)
 {
-#ifndef        MACHINE_SIMPLE_LOCK
        int i;
        pc_t            pc;
 #if    ETAP_LOCK_TRACE
@@ -258,9 +251,6 @@ usimple_lock(
 
        ETAPCALL(etap_simplelock_hold(l, pc, start_wait_time));
        USLDBG(usld_lock_post(l, pc));
-#else
-       simple_lock(l);
-#endif
 }
 
 
@@ -275,7 +265,6 @@ void
 usimple_unlock(
        usimple_lock_t  l)
 {
-#ifndef        MACHINE_SIMPLE_LOCK
        pc_t    pc;
 
 //     checkNMI();                                                                             /* (TEST/DEBUG) */
@@ -283,13 +272,7 @@ usimple_unlock(
        OBTAIN_PC(pc, l);
        USLDBG(usld_unlock(l, pc));
        ETAPCALL(etap_simplelock_unlock(l));
-#ifdef  __ppc__
-       sync();
-#endif
        hw_lock_unlock(&l->interlock);
-#else
-       simple_unlock_rwmb(l);
-#endif
 }
 
 
@@ -309,7 +292,6 @@ unsigned int
 usimple_lock_try(
        usimple_lock_t  l)
 {
-#ifndef        MACHINE_SIMPLE_LOCK
        pc_t            pc;
        unsigned int    success;
        etap_time_t     zero_time;
@@ -322,9 +304,6 @@ usimple_lock_try(
                ETAPCALL(etap_simplelock_hold(l, pc, zero_time));
        }
        return success;
-#else
-       return(simple_lock_try(l));
-#endif
 }
 
 #if ETAP_LOCK_TRACE
index 6ffdea90dcbc80bb0eff9ed6258cea883aaeb1f4..5119b89596c3444176cfc78ba0a56e60153e99e0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 37ef12ed9e19c7882de99741330ba71f3f49b8d8..05cfb54a3707645fe8c46fbd5e2ee0fb89315924 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c0b234c63cf281df69b767ae1245ef3b627cf0aa..1d922cac45ae7114c9dd55473edd0d33e4bdc15c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 47a8b3e25790fa37a441d0773123cb351f4e863a..3b86b697085384dec6a76563615a1ed4932d9c5b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6451b3769a27d5e5db97d4ba0a77192924c1c41b..db780aca10b282aa3b1a5553b38714c85827d2a2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index bb76bcf963ac5352b433cb447a6cd6585330be8f..0ef1b7e90c66b504ced413a16ecb23d5bbb302c3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -460,18 +457,17 @@ void
 processor_doshutdown(
        processor_t             processor)
 {
-       register thread_t       old_thread = current_thread();
-       register int            cpu = processor->slot_num;
+       register int    cpu = processor->slot_num;
 
        timer_call_cancel(&processor->quantum_timer);
+       thread_dispatch(current_thread());
        timer_switch(&kernel_timer[cpu]);
-       thread_machine_set_current(processor->idle_thread);
-       thread_dispatch(old_thread);
 
        /*
         *      OK, now exit this cpu.
         */
        PMAP_DEACTIVATE_KERNEL(cpu);
+       thread_machine_set_current(processor->idle_thread);
        cpu_down(cpu);
        cpu_sleep();
        panic("zombie processor");
index 4ad3e6931d2bb5691247825a2f599d71eca77641..5c3f211f4792551c8cd02b4c9e1d47446e6481af 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b7e838fb91ed8ccc9a5aa5365d869d8635c386b1..eeaf1ae97270764370bbf92024bb603399600670 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0419d720c5cf398d6ceba1bf56b00687ee6b368e..181bb0fed681514c37c65714368c36da58ce8f3a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -120,8 +117,6 @@ extern integer_t sprintf(char *buf, const char *fmt, ...);
 
 extern void printf(const char *format, ...);
 
-extern void dbugprintf(const char *format, ...);
-
 extern void kdp_printf(const char *format, ...);
 
 extern void printf_init(void);
index f976f5f51e399f0242516e62fa795e47caa84afb..384d1bf7934d10e136ec2fb89e895991a0887e59 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2f2381af6e0c2bfc56f8a20b27a7f0addd636bbc..fe78f780894461d5cd109897b96d214c2f1c9ade 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index da3c9258370878cffe449611090825e82974441e..6680727634af7fa247db645816fb8790138bb3ce 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e630fdbe9a21870e24aa934c76c83a2d556da3f7..3ac2e415ccea0502bb720215b50032ad9d77f5da 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ab0eb5a7502a2368ad57d06f772b8189c9fdae89..d00d2901add3e4d4e2b81c0e8dfa8ed22192b86b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ece7a7806635bd627a421bf573155d39f0035208..472ab86c27721e3ea72362233e075206267df70a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
  * output bases such as x, X, u, U, o, and O also work.
  */
 
-#include <debug.h>
-#include <mach_kdb.h>
-#include <mach_kdp.h>
 #include <platforms.h>
 #include <mach/boolean.h>
 #include <cpus.h>
@@ -724,22 +718,6 @@ conslog_putc(
 #endif
 }
 
-void
-dbugprintf(const char *fmt, ...)
-{
-
-#if    MACH_KDB
-
-       extern void db_putchar(char c);
-       va_list listp;
-
-       va_start(listp, fmt);
-       _doprnt(fmt, &listp, db_putchar, 16);
-       va_end(listp);
-#endif
-       return;
-}
-
 void
 printf(const char *fmt, ...)
 {
index 23f5e43f0c72dc1f180b8f5cd4482ba362274fd5..084e8fe2cf147a2089a8ec3aa2b3e1d46eec9369 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c9251cc75919c80c060d7aed560b9971aaeee47f..243afa7af765f7915af023f3eb392561924b5488 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5ecbbc53944d0305be3c4d13de06a33ab4be0d00..be99fc1e760f4ea03194491be0f5b483cb6dec39 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1b3bfa0c35fd320a16b2c74a0cbb7ead81e69a69..599765fc86358d94fb046a07c217c8f477f200b0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 31e890bea3331cf07ab395254701f80e72506dfd..5124b2316821808db6e9ac02a9148c3d7bfa49f7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b7ca7cf929e7ee2c07aee94beed9a53d60da0693..2ada9236dd494d58b2811f4a264e3f9cb26464ea 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ee25fb8ff10bcc8803d954813e29cc1adeb98114..bdb700fb3806396b0cb5e66f33247f53af20bd8f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6f5c9d398bd32c0932ddb9555152541ed2194e4b..62c06f5ed89bf992243f6ecc40f6247b5d8339c4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 47165b49cafd33786ccf314cc7c713d38d26d0d3..c45c31048d49f32cba59e8cb75fceb1e491cd287 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -1601,6 +1598,8 @@ thread_block_reason(
 
        check_simple_locks();
 
+       machine_clock_assist();
+
        s = splsched();
 
        if ((thread->funnel_state & TH_FN_OWNED) && !(reason & AST_PREEMPT)) {
@@ -1681,6 +1680,8 @@ thread_run(
 
        assert(old_thread == current_thread());
 
+       machine_clock_assist();
+
        if (old_thread->funnel_state & TH_FN_OWNED) {
                old_thread->funnel_state = TH_FN_REFUNNEL;
                KERNEL_DEBUG(
@@ -2418,6 +2419,8 @@ idle_thread_continue(void)
 #else
                                (void)spllo();
 #endif
+               machine_clock_assist();
+
                        (void)splsched();
                }
 
index 47ed03dbcb68237f971d90b55bdc197eda26c381..758c22e2005138e771343f31d6554e9137ed3ddd 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 44436c742334768372eb58b07b39095242bb1345..708998e565bf80a3ee3b2ffe877cac6487c9e17f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5a5bf702cb56f5f56921a7cb752b056a65f23e9a..72b0a2f50d93714137214d11ae264cd631c19736 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9eeab1dd9cbb69b042438544b7568a579f5303e9..15d7cf72edcd74b5410fce4055d4dea651fad2db 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index bb256b467aa5b4fe42b0d816a7bd206dc5fb7e18..e7553a211269b375c32530d689112c294f908059 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9fca321558aa5b11733d8d2f7c66fd394222e101..ade695877d7e032ef226fbd806bfa417d5c962e2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f5ca35a41f6e165116bd14b044475280c9d03f57..0972af8e1de5c1c4f2f9f405ac2334f3715b1a37 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -86,7 +83,6 @@
 #include <kern/timer_call.h>
 #include <kern/xpr.h>
 #include <kern/zalloc.h>
-#include <vm/vm_shared_memory_server.h>
 #include <vm/vm_kern.h>
 #include <vm/vm_init.h>
 #include <vm/vm_map.h>
@@ -94,7 +90,6 @@
 #include <vm/vm_page.h>
 #include <vm/vm_pageout.h>
 #include <machine/pmap.h>
-#include <machine/commpage.h>
 #include <sys/version.h>
 
 #ifdef __ppc__
@@ -260,25 +255,20 @@ start_kernel_threads(void)
         */
        device_service_create();
 
-       shared_file_boot_time_init(ENV_DEFAULT_SYSTEM, ENV_DEFAULT_ROOT);
+       shared_file_boot_time_init();
 
 #ifdef IOKIT
        {
                PE_init_iokit();
        }
 #endif
-       
-       (void) spllo();         /* Allow interruptions */
-
-    /*
-     * Fill in the comm area (mapped into every task address space.)
-     */
-    commpage_populate();
 
        /*
         *      Start the user bootstrap.
         */
        
+       (void) spllo();         /* Allow interruptions */
+       
 #ifdef MACH_BSD
        { 
                extern void bsd_init(void);
@@ -286,10 +276,6 @@ start_kernel_threads(void)
        }
 #endif
 
-#if __ppc__
-       serial_keyboard_init();         /* Start serial keyboard if wanted */
-#endif
-
        thread_bind(current_thread(), PROCESSOR_NULL);
 
        /*
index 62cb3fa1c90c1b35ad22a20b9832cf59de33cb92..bbd76a4474f7f6f83b043e2d16b34814278a0391 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d11aa1f8988bc3c57378c9688c7afd83e25d803d..9acae3739f1f21c444019445d80049588fbfc81c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 70a142bd00fab85643beed56216dfb60ce7ad13f..99f2d098c340544966276756ec91a7ae4470ac86 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6ca0132080fa148388fd1d89890ecc567dd2e829..34618b4b5e6be305c8e39420324e7a56deaf5d1a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c25950a936aa2ad8d9b926d14aaa7fea804f0b95..8d50bcfa74bff924687106201ddbf85bf96d754f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 308e3ef7cb6d51897650de67b51c6ff5d11fbdb2..843dd5a1ebef479c0834aed31fc9b8456f1f660d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -377,10 +374,10 @@ task_set_emulation_vector(
         *      Can't fault while we hold locks.
         */
        kr = vm_map_wire(ipc_kernel_map,
-                            trunc_page_32(emul_vector_addr),
-                            round_page_32(emul_vector_addr +
-                                          emulation_vector_count *
-                                          sizeof(eml_dispatch_t)),
+                            trunc_page(emul_vector_addr),
+                            round_page(emul_vector_addr +
+                                       emulation_vector_count *
+                                       sizeof(eml_dispatch_t)),
                             VM_PROT_READ|VM_PROT_WRITE, FALSE);
        assert(kr == KERN_SUCCESS);
 
@@ -447,7 +444,7 @@ task_get_emulation_vector(
             */
            vector_size = eml->disp_count * sizeof(vm_offset_t);
 
-           size_needed = round_page_32(vector_size);
+           size_needed = round_page(vector_size);
            if (size_needed <= size)
                break;
 
@@ -484,7 +481,7 @@ task_get_emulation_vector(
        /*
         * Free any unused memory beyond the end of the last page used
         */
-       size_used = round_page_32(vector_size);
+       size_used = round_page(vector_size);
        if (size_used != size)
            (void) kmem_free(ipc_kernel_map,
                             addr + size_used,
index 8b7e447715dfd9759b2b98fb72f33d496eeac22b..baf87c6675b4b5d572596ec53aebd9b8ddcec259 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index dd4716262c6fe4cf618e6ba937d60944c1fa16df..886f49f0003820d7922bd20ef4fa303dcad77bfc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a147e3d55c2bb82ff7954eec89c695a89d57b739..80c86fe8202ade8c421c1b626d8b489b58a6a711 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f44d5cd266a82b1c0874dd52a394cd93ed0d74ef..bd96882de6fe9a98023ec20caab4747792758fc2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1272c1863cdf31090f8e7ecf7d5ad5ea6ff10b32..c8b3d31bd2a603b0fb7282633b6a4e38a4f4d071 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index aef657a271e5d615c5c7d8eee99ae15097999ad7..ea12d7b399f46b1fdf2cc2f115ff49f9ee2dcbb3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #include <kern/task_swap.h>
 #endif /* TASK_SWAPPER */
 
-#ifdef __ppc__
-#include <ppc/exception.h>
-#include <ppc/hw_perfmon.h>
-#endif
-
 /*
  * Exported interfaces
  */
@@ -357,8 +349,8 @@ task_create_local(
                new_task->map = vm_map_fork(parent_task->map);
        else
                new_task->map = vm_map_create(pmap_create(0),
-                                       round_page_32(VM_MIN_ADDRESS),
-                                       trunc_page_32(VM_MAX_ADDRESS), TRUE);
+                                       round_page(VM_MIN_ADDRESS),
+                                       trunc_page(VM_MAX_ADDRESS), TRUE);
 
        mutex_init(&new_task->lock, ETAP_THREAD_TASK_NEW);
        queue_init(&new_task->thr_acts);
@@ -379,8 +371,6 @@ task_create_local(
        new_task->syscalls_mach = 0;
        new_task->syscalls_unix=0;
        new_task->csw=0;
-       new_task->taskFeatures[0] = 0;                          /* Init task features */
-       new_task->taskFeatures[1] = 0;                          /* Init task features */
        new_task->dynamic_working_set = 0;
        
        task_working_set_create(new_task, TWS_SMALL_HASH_LINE_COUNT, 
@@ -390,10 +380,6 @@ task_create_local(
        new_task->bsd_info = 0;
 #endif /* MACH_BSD */
 
-#ifdef __ppc__
-       if(per_proc_info[0].pf.Available & pf64Bit) new_task->taskFeatures[0] |= tf64BitData;   /* If 64-bit machine, show we have 64-bit registers at least */
-#endif
-
 #if    TASK_SWAPPER
        new_task->swap_state = TASK_SW_IN;
        new_task->swap_flags = 0;
@@ -524,10 +510,6 @@ task_deallocate(
        assert((task->swap_state & TASK_SW_ELIGIBLE) == 0);
 #endif /* TASK_SWAPPER */
 
-       if(task->dynamic_working_set)
-               tws_hash_destroy((tws_hash_t)task->dynamic_working_set);
-
-
        eml_task_deallocate(task);
 
        ipc_task_terminate(task);
@@ -726,12 +708,8 @@ task_terminate_internal(
 
        shared_region_mapping_dealloc(task->system_shared_region);
 
-       /*
-        * Flush working set here to avoid I/O in reaper thread
-        */
        if(task->dynamic_working_set)
-               tws_hash_ws_flush((tws_hash_t)
-                               task->dynamic_working_set);
+               tws_hash_destroy((tws_hash_t)task->dynamic_working_set);
 
        /*
         * We no longer need to guard against being aborted, so restore
@@ -739,10 +717,6 @@ task_terminate_internal(
         */
        thread_interrupt_level(interrupt_save);
 
-#if __ppc__
-    perfmon_release_facility(task); // notify the perfmon facility
-#endif
-
        /*
         * Get rid of the task active reference on itself.
         */
index 9b1e4afb6683c24bc7d5a6dc57cd6d6d4b069f15..e59bcbc4a3b1f95d449d8c049eb714e104903c0e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -212,9 +209,6 @@ typedef struct task {
 #endif  
        vm_offset_t     system_shared_region;
        vm_offset_t     dynamic_working_set;
-       uint32_t taskFeatures[2];               /* Special feature for this task */
-#define tf64BitAddr    0x80000000              /* Task has 64-bit addressing */
-#define tf64BitData    0x40000000              /* Task has 64-bit data registers */
 } Task;
 
 #define task_lock(task)                mutex_lock(&(task)->lock)
index 83aaa43e55ef065adf3e03647697ad82962ba2b6..a0f9672ae6a4a777ca98230017f882a5fb070be5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2e97218707320bb4d9ea11b0b521e85ea08a52b5..7d69ca1e403d5cbfa9d2d74a1aab7f2a4a5cde5b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9dd342913b0073648094e2a823f907e736a7e49d..279caefe687ee620ec42f747aaad0b9ce7d6a533 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9c208da92c5ae041fd1ced0ffce4293763b540ec..98c7a90c106cea9a64a7dfff8f7833e1fca59b2f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -585,7 +582,7 @@ thread_init(void)
 #ifndef MACHINE_STACK
        simple_lock_init(&stack_lock_data, ETAP_THREAD_STACK);  /* Initialize the stack lock */
        
-       if (KERNEL_STACK_SIZE < round_page_32(KERNEL_STACK_SIZE)) {     /* Kernel stacks must be multiples of pages */
+       if (KERNEL_STACK_SIZE < round_page(KERNEL_STACK_SIZE)) {        /* Kernel stacks must be multiples of pages */
                panic("thread_init: kernel stack size (%08X) must be a multiple of page size (%08X)\n", 
                        KERNEL_STACK_SIZE, PAGE_SIZE);
        }
@@ -1545,7 +1542,7 @@ host_stack_usage(
 
        *reservedp = 0;
        *totalp = total;
-       *spacep = *residentp = total * round_page_32(KERNEL_STACK_SIZE);
+       *spacep = *residentp = total * round_page(KERNEL_STACK_SIZE);
        *maxusagep = maxusage;
        *maxstackp = 0;
        return KERN_SUCCESS;
@@ -1673,7 +1670,7 @@ processor_set_stack_usage(
                kfree(addr, size);
 
        *totalp = total;
-       *residentp = *spacep = total * round_page_32(KERNEL_STACK_SIZE);
+       *residentp = *spacep = total * round_page(KERNEL_STACK_SIZE);
        *maxusagep = maxusage;
        *maxstackp = maxstack;
        return KERN_SUCCESS;
index 13c981605732e0fd8ef3cf91c036816f4d848346..51180364414a71106b5a7939cdc497b7545a6b35 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 129f39d9a1f3ab5c484ef4d4881927a1f5e1b16c..f7e5000ecb4f73201e36b75c997125ecbe65e487 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4e7e1d58c4325696ab0afb16fc44c19d93f70436..0d7a102da6515670e9443400c515bdb5b4bc6c23 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 15cd7e8a4eb190a940f5aec43464c4fa81a0c890..b69dcdd30efcae91807a5df3e261aeefecf72495 100644 (file)
@@ -4,22 +4,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5d5576eb635353a69dc9c261f64382fe1b7796f4..952265dd9bf7ef25e76e485405f131ceabb2731f 100644 (file)
@@ -4,22 +4,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cf5cb1f2e0c9f323fe2c8e8ab5ee5184b068f5e0..d7e2c311ac28316e389583200ca9d4425a8846c7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 60655208a189531d97a285c1d1cc2f3ce1d7cbd7..845b98dd4c25a8f41740d9df84587fc9c25fba6f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1fd9b78d9ff74bece7e67f4f76254e9e5f811794..a6b107e56814fc57340c17831ffd8e8bce0dbabf 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f1dcc8fd8b65b514252d80dc856409d2a7f0c4a2..f5ec5c019a81559a21791b3cb949f12fd5c297bf 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3540b1ef7839e042ed8d32aaec02d0a26e297afa..996bc6fe6d2419b152a1e26469b6e8a38bcc4d0e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 776fb5d76c47b5f49981f14a0aef17439c5db7f1..c55f093da9804fa4f90daa2d9c8c7598d5e6f95f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index fe421d3e06f67a84a85a4b04d22eaaf64059c71a..b65df6b2599dbd830ae7d026298d8452c3f473aa 100644 (file)
@@ -4,22 +4,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5d49861dfa1544e5794858a0ad28a0f5300f6a12..bc5ef3773511579e984688944a746309ed598cb6 100644 (file)
@@ -4,22 +4,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d27ca92a18192ab8733b58a9d9a1784328e609b8..627bf793cd34a3ab5c4662add87d5d82818a61da 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 40955cb270c574afa75ca786079154456374dab6..960a07b8dada7d7a65b77b377a021bc0393761e4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 448da12a1795b743f28d04d3ff027b5fcbc6b702..2a8d85f3f04d943b5df162f704fbe308cd641677 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 65e5b4a669bdefc1409bfdc18504ce61a39bf537..9c528830a8d1561d9d62041f30bba3b53c9385a5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6c1b81d27acd71f1dcd7109723c89ba4db5f0f3a..66e36c0160d98f71c7f4825a167329c8629fc17c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -326,8 +323,8 @@ zinit(
                ((size-1) % sizeof(z->free_elements));
        if (alloc == 0)
                alloc = PAGE_SIZE;
-       alloc = round_page_32(alloc);
-       max   = round_page_32(max);
+       alloc = round_page(alloc);
+       max   = round_page(max);
        /*
         * We look for an allocation size with least fragmentation
         * in the range of 1 - 5 pages.  This size will be used unless
@@ -434,7 +431,7 @@ zget_space(
                 *      Add at least one page to allocation area.
                 */
 
-               space_to_add = round_page_32(size);
+               space_to_add = round_page(size);
 
                if (new_space == 0) {
                        kern_return_t retval;
@@ -503,7 +500,7 @@ zget_space(
 void
 zone_steal_memory(void)
 {
-       zdata_size = round_page_32(128*sizeof(struct zone));
+       zdata_size = round_page(128*sizeof(struct zone));
        zdata = pmap_steal_memory(zdata_size);
 }
 
@@ -529,7 +526,7 @@ zfill(
        if (nelem <= 0)
                return 0;
        size = nelem * zone->elem_size;
-       size = round_page_32(size);
+       size = round_page(size);
        kr = kmem_alloc_wired(kernel_map, &memory, size);
        if (kr != KERN_SUCCESS)
                return 0;
@@ -587,17 +584,17 @@ zone_init(
                                                FALSE, TRUE, &zone_map);
        if (retval != KERN_SUCCESS)
                panic("zone_init: kmem_suballoc failed");
-       zone_max = zone_min + round_page_32(max_zonemap_size);
+       zone_max = zone_min + round_page(max_zonemap_size);
        /*
         * Setup garbage collection information:
         */
-       zone_table_size = atop_32(zone_max - zone_min) * 
+       zone_table_size = atop(zone_max - zone_min) * 
                                sizeof(struct zone_page_table_entry);
        if (kmem_alloc_wired(zone_map, (vm_offset_t *) &zone_page_table,
                             zone_table_size) != KERN_SUCCESS)
                panic("zone_init");
-       zone_min = (vm_offset_t)zone_page_table + round_page_32(zone_table_size);
-       zone_pages = atop_32(zone_max - zone_min);
+       zone_min = (vm_offset_t)zone_page_table + round_page(zone_table_size);
+       zone_pages = atop(zone_max - zone_min);
        zone_map_min_address = zone_min;
        zone_map_max_address = zone_max;
        simple_lock_init(&zone_page_table_lock, ETAP_MISC_ZONE_PTABLE);
@@ -668,7 +665,7 @@ zalloc_canblock(
 
                                if (vm_pool_low())
                                        alloc_size = 
-                                         round_page_32(zone->elem_size);
+                                         round_page(zone->elem_size);
                                else
                                        alloc_size = zone->alloc_size;
 
@@ -1007,8 +1004,8 @@ zone_page_collectable(
                panic("zone_page_collectable");
 #endif
 
-       i = atop_32(addr-zone_map_min_address);
-       j = atop_32((addr+size-1) - zone_map_min_address);
+       i = atop(addr-zone_map_min_address);
+       j = atop((addr+size-1) - zone_map_min_address);
        lock_zone_page_table();
        for (; i <= j; i++) {
                if (zone_page_table[i].in_free_list ==
@@ -1033,8 +1030,8 @@ zone_page_keep(
                panic("zone_page_keep");
 #endif
 
-       i = atop_32(addr-zone_map_min_address);
-       j = atop_32((addr+size-1) - zone_map_min_address);
+       i = atop(addr-zone_map_min_address);
+       j = atop((addr+size-1) - zone_map_min_address);
        lock_zone_page_table();
        for (; i <= j; i++) {
                zone_page_table[i].in_free_list = 0;
@@ -1054,8 +1051,8 @@ zone_page_in_use(
                panic("zone_page_in_use");
 #endif
 
-       i = atop_32(addr-zone_map_min_address);
-       j = atop_32((addr+size-1) - zone_map_min_address);
+       i = atop(addr-zone_map_min_address);
+       j = atop((addr+size-1) - zone_map_min_address);
        lock_zone_page_table();
        for (; i <= j; i++) {
                if (zone_page_table[i].in_free_list > 0)
@@ -1076,8 +1073,8 @@ zone_page_free(
                panic("zone_page_free");
 #endif
 
-       i = atop_32(addr-zone_map_min_address);
-       j = atop_32((addr+size-1) - zone_map_min_address);
+       i = atop(addr-zone_map_min_address);
+       j = atop((addr+size-1) - zone_map_min_address);
        lock_zone_page_table();
        for (; i <= j; i++) {
                assert(zone_page_table[i].in_free_list >= 0);
@@ -1099,8 +1096,8 @@ zone_page_init(
                panic("zone_page_init");
 #endif
 
-       i = atop_32(addr-zone_map_min_address);
-       j = atop_32((addr+size-1) - zone_map_min_address);
+       i = atop(addr-zone_map_min_address);
+       j = atop((addr+size-1) - zone_map_min_address);
        lock_zone_page_table();
        for (; i <= j; i++) {
                zone_page_table[i].alloc_count = value;
@@ -1121,8 +1118,8 @@ zone_page_alloc(
                panic("zone_page_alloc");
 #endif
 
-       i = atop_32(addr-zone_map_min_address);
-       j = atop_32((addr+size-1) - zone_map_min_address);
+       i = atop(addr-zone_map_min_address);
+       j = atop((addr+size-1) - zone_map_min_address);
        lock_zone_page_table();
        for (; i <= j; i++) {
                /* Set alloc_count to (ZONE_PAGE_USED + 1) if
@@ -1149,8 +1146,8 @@ zone_page_dealloc(
                panic("zone_page_dealloc");
 #endif
 
-       i = atop_32(addr-zone_map_min_address);
-       j = atop_32((addr+size-1) - zone_map_min_address);
+       i = atop(addr-zone_map_min_address);
+       j = atop((addr+size-1) - zone_map_min_address);
        lock_zone_page_table();
        for (; i <= j; i++) {
                zone_page_table[i].alloc_count--;
@@ -1171,8 +1168,8 @@ zone_add_free_page_list(
                panic("zone_add_free_page_list");
 #endif
 
-       i = atop_32(addr-zone_map_min_address);
-       j = atop_32((addr+size-1) - zone_map_min_address);
+       i = atop(addr-zone_map_min_address);
+       j = atop((addr+size-1) - zone_map_min_address);
        lock_zone_page_table();
        for (; i <= j; i++) {
                if (zone_page_table[i].alloc_count == 0) {
@@ -1398,7 +1395,7 @@ host_zone_info(
 
                names = *namesp;
        } else {
-               names_size = round_page_32(max_zones * sizeof *names);
+               names_size = round_page(max_zones * sizeof *names);
                kr = kmem_alloc_pageable(ipc_kernel_map,
                                         &names_addr, names_size);
                if (kr != KERN_SUCCESS)
@@ -1411,7 +1408,7 @@ host_zone_info(
 
                info = *infop;
        } else {
-               info_size = round_page_32(max_zones * sizeof *info);
+               info_size = round_page(max_zones * sizeof *info);
                kr = kmem_alloc_pageable(ipc_kernel_map,
                                         &info_addr, info_size);
                if (kr != KERN_SUCCESS) {
index 659efb92e111be118b404812c209644d5907313a..74aeab881614e69495d9a46a88d69715dff3ff0a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index bff8494b4a5caf8c365aa198295d6ad66e3bc8d9..152f2ab4c4e3f7832e614019b652c4e071a16a15 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 44da56bb3324893791e908b5e7bdf6bd668dac37..36b9df2c68cd065796b5ef17017c03d7b8a52d0a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c006288d9174ade29107652f3b44be3c4aafb75c..a1da5a17962b58ad66267477c8ef52b37b50c9ea 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a10d56dbbd98b2a9b305762d971e89cf6e046ad0..e3d1c1ef17cacfb63e23f0add3760c21d0770edd 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index abed7be9fffeb4fe5ad31f08318c0e393f667eb0..21728795aede6645fdb08a7b7d0e3eea48ae4992 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1a303a1bb08dc30a7c30081f0366c3bdc7038250..7a9022fa6d61d6dbee34405f7b8f62aa7286dfb2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2dc28342a658c3f3f1487058be61a71d6b8b5f22..650acf6a3e0bc4fc6ed547d18a268acf8d821b77 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9f8924de732b3744b844028d86138b1cbe74d403..aa14743d2d69a37827754f3b711a22f15cabdbab 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 26aeee88c40bc0caf33cc4a8ee53ad6dae19f1ff..c42f141c6a3bbb2aca3599c00c2e1236815218ee 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index bb04b179cca5c2a9a7c95cfbbe1b8a324ca74c12..424b40983c1fb2fb3e0e06c58c58522257a1e189 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a32486aff618cf4abf7d40adf3cb6da639e4e6fe..fde11df56078dfe074e373065bdbeb53403e32d8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c19a0a062d15a0ab4088267c87e70b7bea265d89..710311b83264a0a40062768313b5b195c9bd9dc5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2787267608236edfdc3cfd252d6166349e7f2335..95929edb71134bc928683eacd29e15db6d55139b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c471818cffbae0938f750f8000c1e80fb8a95ddc..49cffc7d06a3e8c9e4ec8f771cc6d4d9d55c7788 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a059652e1a760790d0defb6e9005c21f579f5170..f2608b5ee61fb4cffcf53fb8ab9b76f3cffb1235 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a5f3c39bd70903ad7df5e49c682ecbca7db3f863..b094a20cb123df136d3b1df7f91539eeb664cfb7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 43229c2d4ad4ba7ebb31272a160f839792ac5acc..dcb67693bd06746661e28d609f6a27c0f8af4e01 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 82056e44c1857121ce967fe676f904b191a27e4c..c1bcea725bf0e73d5b7ed3bc938f96600d6a77c8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 462a0a7b45585649a42b1eafe3153bac9ac28542..939b82d4feac9c8c5117b3de07796477b4cc4422 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f4c4e4bba76d42f9ab09e6e3f4d733b364bef83d..1c42bff896868bec0d838a77917704cd45d29828 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index dfe3776b33c023e09f5225e654e99d4f251ca941..962196ed7e43b2fb8701e334caad9f7f64d3e81b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8511e9e81595e9cb66fc7c4c2d9570bf78158f78..37ecb60a51d45033515e5b2a349e8c5aca8d4d43 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cce6f857ef6bbb2e89ced5362b75914963605acc..655f8779d1e49ced48c66d9c6deaf2bacda5740d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e6a0baf637852b29c98fa75d4e0352eba242144d..486492e952815abaa6bd1312c8adf3f7cdd9e06d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a67472892796e1ee33773bc65ff56b05c86dcfdf..645aba5600898de0073329b344871c65589d50d7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2d72826162c03603d30d7fe8eeffc722b24faeba..ec12bec91fb4eb533bcd75a52176b06ecf2faf1b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 38ccb271f171816ef1aec336ce6dbd03902c7e6d..4034a0ce74989486ae3629cbec6f78bed55fe98d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f83101ba32617ee3fd6a5ed7e665bc5a7633b9f0..277b2b1e211fc671e5d379268ee0c42309456b20 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2b2167ce27edb028af3643a562941aad9d4de316..02e88426b776cd314a3471625fd638d61b0bc42b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ecc1a9c978fab6a0255c57045ca3081a722fbbba..8cf4848690ea292b446f98c80dce619bb79a35f6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1afa97d98704418ebc5749ca29d2baecd1c0de25..801aeb6bb4e94dd0d2bfb85604f88a598581b5a7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 52c843fb354eb7213ab0d8a5611f2c93ac337ed8..4b41b4462e116a9d6f061d54e22e00d055170ac5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e36bcc26b76b5203f45745ac91ed40ca65b40135..9c9555187d5ba4776b2ce92a458225ba5d100f09 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4fa74247077cf5826b0b5ef2587b4f48df29f8c8..04564593804516b4ad76dd40a9ffef840c3ee65e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cac58b8230702d991b3d4c5ce7719f204bc7f4fd..5c94e007eaa279f902df46f6fbcc81233c24fe38 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 52bf312f618ca24ce733a951cd23fdb70155f898..e9be2636f5069399a770497fdeb14a64c6956966 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0679939809118133041f0ef7f3a5b070b4649600..c96663319e0a8eedc118914d895b761cdfe02c68 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d1a4f531b8ed0ce0c63f23fb82a439a4533cceda..840926dc8623d0f946f2cebefe73dfff12c99210 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f05a73ec7cfbdd2c6418c2c49cb4d2992f1109a5..93687e94441b2f5c1dbf20b30d36184cbbe02d5f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 11a95723beff938d1d9c055acc6cb17105e678eb..2f6d6c4cbebfa01e97eb563b5e020c4e4d12c173 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a774411d1335cdd0d61d70c080c2261d3ff06300..a83d30cff3d9d0db38924f27102d970df317220c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 29f426aebf215d99c2c170e18361f6f285f164af..29dced2f9f9f200743cc5c60aea27904b0b40ca9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c2ce93179291ded825795d65534d937301875951..c6eead64ec599e95b7718443c396a03035307200 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 795bc26d4bf9a89bd318b63fab87e72e0633b2d6..8236168a89acf48271ccc436da9ae7196db5aceb 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e2d00bde8fcb7a538ec3ded2c0537e3ba27431ac..6796107b294881b7c7345f4793251e6c91d18fe8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 94253c86f8e2ff98620d53a2621971a3153752d2..014349674bdce29c523741335591154082d6030f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2c835d07c1949bbfcb51743c6998549512da8f48..43d811757712ce91dd1b194118af9f2101f9484e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index bfcb2e1216ff6e3b70ae7d8fbf289d3adaa82b5d..693d695c59a9bb8b44aec9347eb36e89b5242daa 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index dbf34985f0e0022db23c3302e816ee5a19a324f2..413a1e1cb366f672deaed5f7426b56cff39493f0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3a9755787fac0e4b42546eba0a6c121f1d1c7d5b..222bb0b793d477a00fc97e41bc71a86dd6dbd182 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3e2c5a130a37320bf3c4b8e7b7c68ce9ad6a21af..1019cfbbc2f3c8d580808a99171f129e5b41647d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5729bc3ac4b52d4e5720123acc76e620f4f788e2..28cdb19fe31ca34afd26450cc486d4bcf072f4ee 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 48f5be8608775d03934058bb356b88204dae89ca..244c387531d0b917a3bd5cdcf2934f54dafb7ab7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 57e9bbed94a55a7cd3902de2f237422d8cede2e2..acb4f643f8fa62d6f04b4bfb13d06752a6aacdad 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c15f134c618bcd1eaa756383173a2c5a082fd7a0..ee9a8a4702661cbf3234ec88b9fe89081ed475df 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 92398a34f316bd9c9f6fdd8e43bab52c3ead2f9f..0ec6b1893b57622b94982cf39e93399c808dc9b8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 96ab9058ad7b22eecf9f7f0f66a08858d3cbdbd8..aa45d06ddfbd34934444ada4e5e5da034dde3e4e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b71afbdaff07e66c6438297d6cf4109d36d589d7..7aa606390e50bd5cfa0e0521469b302831bf4c40 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4357deb736c2f1150489e2485bab38f5238a0ced..39b6c761c453ede8dc113c0eeda5f2ae9eea6305 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 156be66a0cf0b195791d15448aa0d5b519ac6ff7..d317340c0c514b8e1931988ba204c91d25efaea8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e27468ad5bf8ec7daf2f6007517b891e688e7c3b..c29abf0b0b5eda9363274980b31a40c00dac87e1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 414f8ddd8406b15e7d3199258f30c6bf1bb4bdbe..b2023f05e553134f8417c47e9bf4589ba5ff2d7b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9ec567bd5caa4abcbbc967d204b1b15d9e7735e5..109f98a21a1956d00c29a8a0645e96cba9a1c9b8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f9798cb3dfbc56df4761d40ff92e72887a4fd0c6..7a36022f113c2ec65b66a36f1116272dbadcb226 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e362f5fad146083532bd95ae0dab88251ddcdc2c..8709e475ab6a87d769b9ec794d7ab88588a25546 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b2e2a50ed5006ccfdceabb14da3b17dbfae54ec9..1f8b879b85dddf7b9027660ccc364cd33ced74b6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1d08cd47fc1566ba831fafce7a39571838cffe84..16104a874f1136e48207b880615f0045303917dc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 955f692128f0caa48741c7298884000c65f78c49..300462b9c50c5f7af10adfed212a173e8c912ecb 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index eb740972bbb528690cc1c947358cc901a70898c8..e67be918c98f809ede6a5b5b81068baf61e58feb 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6f4746d7d3c34e690f0ca9a9aaacfbe4c744da6f..0f18100e6710a7e776f4e0134dbbf01298ab311e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
        pmap_enter(                                     \
                (pmap),                                 \
                (virtual_address),                      \
-               (page)->phys_page,                      \
+               (page)->phys_addr,                      \
                __prot__,                               \
                flags,                                  \
                (wired)                                 \
index 1b78956af824aa04424d31d6bae7e0d2731c2d22..0ad257fcbb9529acb2e93543321758b6dce14045 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 50278e96b8a5a7131ebf61a9e3ac2ff221f947ce..c347f1e3dfb08924bb38d02c97ea498fce6c0c53 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4c9dd54f8455147914bb13d27b1c3a1d7ba7dc10..49d0f0103e5a0be918525d1e222a3ade24ef0297 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7f9ea0a58c3c199e21005275daea237ff7c4eec6..ec1b94f7624c16131c97d9166fb9e549ff4892d7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index fc1d88261807524f4a0fbf123ba79f1d018a6f99..da19ca38839ce142dda481eb8b2ed5b7ba81b7d4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d672bc26fb75fce29f435e612acbb57ca215cdab..c0e4100ecf4c3b5cfec24f274cecd090985db056 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 943ba258bf773d36fe4addffee37aa82db587cca..0877e01cbf43707ac34e4eafd1266e48b5683816 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ecfa07c4746a05d50cd66182ff0ff49fadfb71a3..6b0a54fb729dee838bb22cb2c7699c8c895e2161 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a7de4ba7d0b82e23744d71a0c2fced4d63eedf35..8e5ff7f09273d78654cb31185317a1ec744f9bde 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index be886626ed077f0ce77404da2934d6bcbf3fdb72..f82d2b3ffc34590e5b1e86d3a57d0bc0b1cf9428 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index bac4fefaa56e2ecabec45fa239d045ee85f1b702..60ee11f1c6ea66de12368bf1a5ecd022f2c70efd 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index bb4af94709fb074752a1fc45c31e0a578f8293a4..9b9eb91cbe45253b000a9ed6ea61a0cdb53fa1ee 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 253875f0c379e75254c2b8422bf72b839db27735..fe70975e0cc7f6110040b5604da1c06fe5b8974a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4f845279a6f3d5aac2060e7d72f8528cf73885df..d87b2869ee17a6296bddfba9bf55ab74957ebe1e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a13f14eacddfbb2e996694cf6c9bd84bc6313f96..5a7897eb0552bf96da73088bc84c9f32e199e79f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7bf77076f5efdd34fde83830a8d914a50b6758cb..04f9bd114f95eb2996d882b23b1b81306f0cdf2e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 17694ea70c7677ec5b027289e555fa65bbde07ab..40f6ac7dd6fdbc3313fc2fa37e66ac89822ce08c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -283,6 +280,5 @@ extern struct machine_slot  machine_slot[];
 #define CPU_SUBTYPE_POWERPC_750                ((cpu_subtype_t) 9)
 #define CPU_SUBTYPE_POWERPC_7400       ((cpu_subtype_t) 10)
 #define CPU_SUBTYPE_POWERPC_7450       ((cpu_subtype_t) 11)
-#define CPU_SUBTYPE_POWERPC_970                ((cpu_subtype_t) 100)
 
 #endif /* _MACH_MACHINE_H_ */
index 5495511c9bddb4ecdc70fb0f79101b5fecfd8945..ed74cc334c1999c591950de1cc9f9f0d0ff4c62a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a2f88cd61ad6f58983dbf217e4416088240dc64f..d85824189d5b968785d3a79c50e1fcfcae9c45b9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ca1cf0e854e26edf233e50e12f2489d09233061a..e08c34a15756a5fab95209fb3eeeecb382a0ed45 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c5261961c9c72d7e6e61ac380b6ca8335d34add2..45ad20b8bf295448d47ccfc449c52d6c41b89783 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2c7494b8278e082ec0898f6333e12ba430c48f83..2b9ecc264cae2609434804187b6b70499f6c383a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cac70c7b5245c8fb84204f0c5967f20ec774e781..498d5c984680edd8424a46ba4f922ee4f76920cd 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 130a7237cd134f865ffe04ca4800399f86287da2..fa04db434c6e6987e8aa4d4d2b5673e090e39638 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3560fb8550c3fd4acad9148c0e3f5d33629d494e..3d3f19243f9cd60b9dca484b25cc9ac66299fd48 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6cdb2fa36aa47abc219c18ad63dd6572bc1d4576..c140fcdbc13f80a512ecad162d3433fef897996a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7677db2095cebef82a093c1ac273ecb3cd9a1095..286cfc29da70f4c584d67a26a7b670aec08e81aa 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7de6e5bb13b77b08a7e6cc8ae342fd14f7e112a9..6047637e636896cf2722f632a1ba5d5077674ee5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b3ae8c93df04e7afa3fc16f2685e5c38114f090a..beb5bc185ec005b5a87dea0222e815a5b4699d64 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 403d7e9eb3ef4abc424ab8be504ebfbadca3590c..7b8770485a1b4999f2c17cc19da00ad17787cfb3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 23b942e7991b154c9367a889da248b751e516fb3..63c50d18cc061c223f7599d880399aa59bfc0dbf 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9c5401ec861b9a41cb5f7551d32d37ece0b588f2..63675bd21eca744564d3756df59c2d61974af2ee 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 67bb838c284774f8b21103402f49707c514948d7..72f91d927965623fd56d5edc1f91a5b098bacd73 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -165,7 +162,7 @@ routine memory_object_page_op(
                memory_control  : memory_object_control_t;
        in      offset          : memory_object_offset_t;
        in      ops             : integer_t;
-       out     phys_entry      : uint32_t;
+       out     phys_entry      : vm_offset_t;
        out     flags           : integer_t);
 
 routine memory_object_recover_named(
index a2db5c1bbb0a5b3760ab3dac27c4326f442e8455..1a15e1bbde4c62c016c5f4681a28212276b70371 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 57eb3aa1939f113227964865de024b8f10b2e92d..589a998c4a24c61335d3f61f1e922bee945b3f57 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d953a3102ba971dc5a65bc569adf8922cb4bc845..7592100f160b75f0769bf1f3e94c4511645151a7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -290,28 +287,8 @@ typedef struct upl_page_info       upl_page_info_t;
 typedef upl_page_info_t                *upl_page_info_array_t;
 typedef upl_page_info_array_t  upl_page_list_ptr_t;
 
-/* named entry processor mapping options */
-/* enumerated */
-#define MAP_MEM_NOOP           0
-#define MAP_MEM_COPYBACK       1
-#define MAP_MEM_IO             2
-#define MAP_MEM_WTHRU          3
-#define MAP_MEM_WCOMB          4       /* Write combining mode */
-                                       /* aka store gather     */
-
-#define GET_MAP_MEM(flags)     \
-       ((((unsigned int)(flags)) >> 24) & 0xFF)
-
-#define SET_MAP_MEM(caching, flags)    \
-       ((flags) = ((((unsigned int)(caching)) << 24) \
-                       & 0xFF000000) | ((flags) & 0xFFFFFF));
-
-/* leave room for vm_prot bits */
-#define MAP_MEM_ONLY           0x10000 /* change processor caching  */
-#define MAP_MEM_NAMED_CREATE   0x20000 /* create extant object      */
 
 /* upl invocation flags */
-/* top nibble is used by super upl */
 
 #define UPL_FLAGS_NONE         0x0
 #define UPL_COPYOUT_FROM       0x1
@@ -324,10 +301,6 @@ typedef upl_page_info_array_t      upl_page_list_ptr_t;
 #define        UPL_QUERY_OBJECT_TYPE   0x80
 #define UPL_RET_ONLY_ABSENT    0x100  /* used only for COPY_FROM = FALSE */
 #define UPL_FILE_IO             0x200
-#define UPL_SET_LITE           0x400
-#define UPL_SET_INTERRUPTIBLE  0x800
-#define UPL_SET_IO_WIRE                0x1000
-#define UPL_FOR_PAGEOUT                0x2000
 
 /* upl abort error flags */
 #define UPL_ABORT_RESTART      0x1
@@ -407,7 +380,6 @@ typedef upl_page_info_array_t       upl_page_list_ptr_t;
 #define UPL_POP_CLR            0x80000000
 
 
-
 #ifdef KERNEL_PRIVATE
 
 extern void memory_object_reference(memory_object_t object);
@@ -445,60 +417,6 @@ extern void                upl_set_dirty(upl_t   upl);
 
 extern void            upl_clear_dirty(upl_t   upl);
 
-
-/* 
- * The following interface definitions should be generated automatically 
- * through Mig definitions or whatever follows the MIG tool as part of the
- * component API.  Until this is up and running however this explicit 
- * description will do.
- */
-
-#include <mach/message.h>
-
-/*  supply a map and a range, a upl will be returned. */
-extern int kernel_vm_map_get_upl(
-       vm_map_t                map,
-       vm_address_t            offset,
-       vm_size_t               *upl_size,
-       upl_t                   *upl,
-       upl_page_info_array_t   page_list,
-       unsigned int            *count,
-       int                     *flags,
-       int                     force_data_sync);
-
-extern int kernel_upl_map(
-       vm_map_t        map,
-       upl_t           upl,
-       vm_offset_t     *dst_addr);
-
-extern int kernel_upl_unmap(
-       vm_map_t        map,
-       upl_t           upl);
-
-extern int     kernel_upl_commit(
-       upl_t                   upl,
-       upl_page_info_t         *pl,
-       mach_msg_type_number_t   count);
-
-extern int kernel_upl_commit_range(
-       upl_t                   upl,
-       vm_offset_t             offset,
-       vm_size_t               size,
-       int                     flags,
-       upl_page_info_array_t   pl,
-       mach_msg_type_number_t  count);
-
-extern int kernel_upl_abort(
-       upl_t                   upl,
-       int                     abort_type);
-
-extern int kernel_upl_abort_range(
-       upl_t                   upl,
-       vm_offset_t             offset,
-       vm_size_t               size,
-       int                     abort_flags);
-
-
 #endif  /* KERNEL_PRIVATE */
 
 #endif  /* __APPLE_API_EVOLVING */
index 75d3531deb3a3b995b31377bfd04676eb54df1a8..a346aa32741820d9acf1aa194b5014e4dbbf8cf2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e274ca543ac2b8952edf7ea112466a598de10ea8..fa6ac0b03c1f795ccc2443cb07bc297749b519b2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e57e77f105fc1b1c272918296932ddb262372a37..680054f57eb1e658fed633c31c0dfc949514e523 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8551a53943aa7c9d84836806718925f57b3049f3..c8f1e719027c79155917d65abc2d97c7f9a5321d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a1744efb184835fccf4e7732ced1f51572f786f6..df8a66997f720659ae256a73748c7505a93cbf26 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index dcc2af3844ea7ea120161a56e5580c55213b3f03..c5159b834648babfd9b6b8efa20878fc00d761d5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 415fca4c3ecd52aad82918bef799d9f11976231c..00d56bbb24873eaf9bc12bc3ab71e7fca5bad9bf 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e034eae059cdd3612d1d12953c7052f5a1168526..56e982d9adbf12f2be83c625f5d9dd8602b5e50b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 708511a182d40a569d01e345c06de6e0c542ca77..e0d33258ed53fe6645da3dca041152decd9991cb 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9549738aaa06fe757c0b9a50f23cfb9a3d950fdf..7845a868e1340783881e08fb5655ce4c590817a1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0c9dd124644598ce58d1b8a953fbd3f41a9c7bbe..716f3e4fecd4822beaaf9db4d712f1edc5e34125 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0e004fc95fdba583a2e19836f04d5c0eef88d63a..12df6e4f565ed2a7596f1ca01d9c46f06572108b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 670924537750ac7973d6fe149db2a773e872413f..df7d75142ced79a00455b641b5d3b96467ab6742 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6bc37cf03f42d10fa31ce701290066f656010835..8e5a91443b771553ebdaba17c3cb977a8c6d65cc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 67757395babe230b95d3c296374672c3689d76d1..480c56edff84b58db03be9630ca718eb8db0905d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -66,7 +63,6 @@
 #define EXC_PPC_PRIVINST       3    /* priviledged instruction */
 #define EXC_PPC_PRIVREG                4    /* priviledged register */
 #define EXC_PPC_TRACE          5    /* trace/single-step */
-#define EXC_PPC_PERFMON     6    /* performance monitor */ 
 
 /*
  *     EXC_BAD_ACCESS
index 18906657eba9f30d818ec0c5abe24cc525cd5724..e14be8d2216aabd4a1f93c31f0880cbf31f886b3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 007b9e45549cec01fe1da827fc377fc0de918e1a..022702abd981182dca665e7ba6af545b67e3f41d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3e8e6145b64a8e983e0c1233a5ce5bbbe939d9ab..40e82519cc88a612b132cc9cb32c9ca8e7fa235f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2a7fa52d0b5555d90a4dbba1bb22ae89075f3d13..15219f087668554a9272d27efb729e359ad868f2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -107,6 +104,12 @@ typedef struct processor_pm_regs *processor_pm_regs_t;
 #define PROCESSOR_PM_REGS_COUNT \
         (sizeof(processor_pm_regs_data_t) / sizeof (unsigned int))
 
+#define PROCESSOR_PM_REGS_COUNT_POWERPC_604 \
+            (PROCESSOR_PM_REGS_COUNT * 1 )
+
+#define PROCESSOR_PM_REGS_COUNT_POWERPC_604e \
+            (PROCESSOR_PM_REGS_COUNT * 2 )
+
 #define PROCESSOR_PM_REGS_COUNT_POWERPC_750 \
             (PROCESSOR_PM_REGS_COUNT * 2 )
 
index 109824983cf0251e53e9a10b3149cc46fb01ae95..1ceb410c32f04434070dce1db712eac68bf76e10 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a2d4fd0456e96dc1b5a80d1611c5018707619ea4..1af2369d893422e8eebe4bfd29641142fdd5f02b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -74,9 +71,6 @@ ppc_trap(bb_disable_bluebox,0x6006)
 ppc_trap(bb_settaskenv,0x6007) 
 ppc_trap(vmm_stop_vm,0x6008)   
 ppc_trap(CHUDCall,0x6009)      
-ppc_trap(ppcNull,0x600A)       
-ppc_trap(perfmon_control,0x600B)       
-ppc_trap(ppcNullinst,0x600C)   
 #endif /* _MACH_SYSCALL_SW_H_ */
 
 #endif /* _MACH_PPC_SYSCALL_SW_H_ */
index ca4ba1cecef9450a68ab3c00c19c027b7a436b49..515d0d7305b35f53ba703284702dd472c71cd89e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c19acd8c01cc60dab03ae610d87d57f35849a8e7..5f95da004399065bd019895bc380f2a256fcd932 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -44,8 +41,6 @@
 #define PPC_FLOAT_STATE         2
 #define PPC_EXCEPTION_STATE            3
 #define PPC_VECTOR_STATE               4
-#define PPC_THREAD_STATE64             5
-#define PPC_EXCEPTION_STATE64  6
 #define THREAD_STATE_NONE              7
               
 /*
 #define VALID_THREAD_STATE_FLAVOR(x)       \
         ((x == PPC_THREAD_STATE)        || \
          (x == PPC_FLOAT_STATE)         || \
-        (x == PPC_EXCEPTION_STATE)             || \
+        (x == PPC_EXCEPTION_STATE)     || \
          (x == PPC_VECTOR_STATE)        || \
-         (x == PPC_THREAD_STATE64)      || \
-         (x == PPC_EXCEPTION_STATE64)   || \
          (x == THREAD_STATE_NONE))
 
 typedef struct ppc_thread_state {
@@ -109,52 +102,6 @@ typedef struct ppc_thread_state {
        unsigned int vrsave;    /* Vector Save Register */
 } ppc_thread_state_t;
 
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
-typedef struct ppc_thread_state64 {
-       unsigned long long srr0;        /* Instruction address register (PC) */
-       unsigned long long srr1;        /* Machine state register (supervisor) */
-       unsigned long long r0;
-       unsigned long long r1;
-       unsigned long long r2;
-       unsigned long long r3;
-       unsigned long long r4;
-       unsigned long long r5;
-       unsigned long long r6;
-       unsigned long long r7;
-       unsigned long long r8;
-       unsigned long long r9;
-       unsigned long long r10;
-       unsigned long long r11;
-       unsigned long long r12;
-       unsigned long long r13;
-       unsigned long long r14;
-       unsigned long long r15;
-       unsigned long long r16;
-       unsigned long long r17;
-       unsigned long long r18;
-       unsigned long long r19;
-       unsigned long long r20;
-       unsigned long long r21;
-       unsigned long long r22;
-       unsigned long long r23;
-       unsigned long long r24;
-       unsigned long long r25;
-       unsigned long long r26;
-       unsigned long long r27;
-       unsigned long long r28;
-       unsigned long long r29;
-       unsigned long long r30;
-       unsigned long long r31;
-
-       unsigned int cr;                        /* Condition register */
-       unsigned long long xer;         /* User's integer exception register */
-       unsigned long long lr;          /* Link register */
-       unsigned long long ctr;         /* Count register */
-
-       unsigned int vrsave;            /* Vector Save Register */
-} ppc_thread_state64_t;
-#pragma pack()
-
 /* This structure should be double-word aligned for performance */
 
 typedef struct ppc_float_state {
@@ -199,24 +146,14 @@ typedef struct ppc_thread_state ppc_saved_state_t;
  */
 
 typedef struct ppc_exception_state {
-       unsigned long dar;                      /* Fault registers for coredump */
+       unsigned long dar;      /* Fault registers for coredump */
        unsigned long dsisr;
-       unsigned long exception;        /* number of powerpc exception taken */
-       unsigned long pad0;                     /* align to 16 bytes */
+       unsigned long exception;/* number of powerpc exception taken */
+       unsigned long pad0;     /* align to 16 bytes */
 
-       unsigned long pad1[4];          /* space in PCB "just in case" */
+       unsigned long pad1[4];  /* space in PCB "just in case" */
 } ppc_exception_state_t;
 
-#pragma pack(4)                                        /* Make sure the structure stays as we defined it */
-typedef struct ppc_exception_state64 {
-       unsigned long long dar;         /* Fault registers for coredump */
-       unsigned long dsisr;
-       unsigned long exception;        /* number of powerpc exception taken */
-
-       unsigned long pad1[4];          /* space in PCB "just in case" */
-} ppc_exception_state64_t;
-#pragma pack()
-
 /*
  * Save State Flags
  */
@@ -224,15 +161,9 @@ typedef struct ppc_exception_state64 {
 #define PPC_THREAD_STATE_COUNT \
    (sizeof(struct ppc_thread_state) / sizeof(int))
 
-#define PPC_THREAD_STATE64_COUNT \
-   (sizeof(struct ppc_thread_state64) / sizeof(int))
-
 #define PPC_EXCEPTION_STATE_COUNT \
    (sizeof(struct ppc_exception_state) / sizeof(int))
 
-#define PPC_EXCEPTION_STATE64_COUNT \
-   (sizeof(struct ppc_exception_state64) / sizeof(int))
-
 #define PPC_FLOAT_STATE_COUNT \
    (sizeof(struct ppc_float_state) / sizeof(int))
 
index d14a6e90663587da9a367d1e15e876c31fdff26e..459bbfd247f7598afd051036dcbb25988dfd83af 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 
 #define VM_MIN_KERNEL_ADDRESS  ((vm_offset_t) 0x00001000)
 
-#define VM_MAX_KERNEL_ADDRESS  ((vm_offset_t) 0xDFFFFFFF)
+/* We map the kernel using only SR0,SR1,SR2,SR3 leaving segments alone */
+#define VM_MAX_KERNEL_ADDRESS  ((vm_offset_t) 0x3fffffff)
 
 #define USER_STACK_END  ((vm_offset_t) 0xffff0000U)
 
+#define ppc_round_page(x)      ((((unsigned)(x)) + PPC_PGBYTES - 1) & \
+                                       ~(PPC_PGBYTES-1))
+#define ppc_trunc_page(x)      (((unsigned)(x)) & ~(PPC_PGBYTES-1))
+
+
 #define KERNEL_STACK_SIZE      (4 * PPC_PGBYTES)
 #define INTSTACK_SIZE          (5 * PPC_PGBYTES)
 
index 2f030e070720980a6560b248b0f2cecbff3c9d26..157684e16c1bdd73ac31d3a75609e204f53b4d11 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -58,7 +55,7 @@
  *     Author: Avadis Tevanian, Jr.
  *     Date: 1985
  *
- *     Header file for VM data types.  PPC version.
+ *     Header file for VM data types.  I386 version.
  */
 
 #ifndef        _MACH_PPC_VM_TYPES_H_
@@ -66,8 +63,6 @@
 
 #ifndef        ASSEMBLER
 
-#include <stdint.h>
-
 /*
  * A natural_t is the type for the native
  * integer type, e.g. 32 or 64 or.. whatever
@@ -103,6 +98,11 @@ typedef     natural_t       vm_offset_t;
  */
 typedef        natural_t               vm_size_t;
 
+/*
+ * space_t is used in the pmap system
+ */
+typedef unsigned int   space_t;
+
 #endif /* ndef ASSEMBLER */
 
 /*
index 50c7c4698af2a7b312e8e96f90e6c8f63a51e1bb..be0f2ae0eed5bf4709cbe648b2d3d140610291aa 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8ab6322eb4450a896d7ef9f08e71f9e7f56f0258..17824334b4cfeb8b1d3467f4fa89962fbbc4111c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3277557036a556c7b0acb3134f27da9814e8efc6..8b01834b5291c910b35bcf6242b52252756cd763 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4a9d93a4299d2d688c7f1d7cf7ae8d53a1b1b9ac..9c140a6b83cdf64aedc4383bb9c017a02a011b7c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3512b6648e8460c30bfc29fec7b01880218843a9..e7096ddc4166e5465418a82c160bb111b098d82c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 229ce23fd3ec2c3f86d2a4e74b1679d1a917c483..29d511d22942b91a6ab45498792a74408db2c59e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d906e7da0332aa068f328b016b91058f525e7cf0..468b8c94fb9b3a1a221bb873c3fb719183618d1f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8ac6f1963ba698feb8404d0087d67809d45b108e..55a4a39abad04abc60ada4722c733219fbe21f2c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 03195e2c52f49b011ec3e599c1b3c55e2c32c5a5..4f44265d9e0eea01a4d3aed2733808d17b667214 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7b1cf5301773c61cbaf3504da31f548050199dab..23b1d49f5ed5bb20e1e1333f7ea5473731aebbb8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8a46240bad92ff7576699427f0dc3eb759fbd1aa..c002d05fe9fbd5acdde5dc0ddc63a43dbaec3bac 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index dadf4d80d2506993047722d3334ee7b9cbd970b9..fb011c404ba7c44f16ebad2d315291f9de7d4276 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4e40284543f69db2af17e380256d5ec3836552d8..bca61a6d8d542993323ae5f688f3084aa183a7a6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1bbf2c75de14497cc04def4ed84e8c56c5e66438..c939b8050b0987cf59d75126a71039e9c1c94610 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b3d410599dcd6cdc21c0c5bbe7898b0c2e7da8d4..45e9519e2d84abc0a31bd6a3360f3eac9e8f7730 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f6dc3b1a1f5fe04d4d6597805d9b7fca28dd7147..d9750ddd8601239177b17d97cbebc5864067d035 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a5c535172d11ed59fef2ca2e3e12a952e76ca9a8..cf68eded1da481ba8e5e000abdb5efd63b7353b7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 780eb181e90a484a3988b0f208209af8936229c2..cbf35f467189b5062718a61e4902dbf8bcf51c8f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2c98197be7eebd90a89a2cc36964f95d8d643d88..b3384f50e1352762cc9834e6a5598010af82981a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 530dd22637e3c17e8a270a4dbad5f81f36d97f8b..2637408a4039745b7524a1032f107b932f4766f0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6282d506e71933193437e38c4cc13c724745d3e4..7b99b9f596599f6eb6674986a10ed0609c118830 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ef8c3bf770b80c5e124ea8e7d9e6a90f97a5b730..143081614bf54dedfce18ff8a76eee8f404aa4ca 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c2419daac2be31502ef139dd753aeda7f73dc107..a7e7a3193fc595fcc01ebe1b88bf37ad4a540c12 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index dc01b6ae31cc4f36ff09a8131ca5967d4081ae5f..49903043b5c054eecffd1ef9ba1dd31d62c1a1d5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index eb675e284457902656f00560414f55d314626ac2..e03383287a87604ea29d26374eeb77a5eb744145 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3bc09a77bb6f68810eb34b5e505558c764541e29..afaff9eeed505872880a15e60af846d79fe78e17 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b10e5a2a1bd064ab83f151f1c1766361f151757a..89fc9438927242a6d0e1824b3c157694c6eeb977 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 73fa44766c9957ea5d80a01a2a18d19ccbe11896..595c8b926842ff12e5a9215421687c72cb262ca2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 31431769bbf22662d7cc595c934b3d861bb26398..6b2eee6d680c4799d7283aba4f3b783e86fa8c4d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0fff917681ca74f35b3461d837734c349ae2ff7e..d6efd9b574872093904f98be64e91c18aae37faa 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index aeb2fe50a46e89e45c8f468bb8e78fda27d41a4e..e0f88b10a6abd63aae4cd9b0b81cb3fee44806ba 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c7a03438955b841bd0373fc68b4f80e04b8f95f5..aba1ed3efe80f3f457de9b88d71c01fb60d01f7d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #endif /* KERNEL_PRIVATE */
 
 #include <mach/machine/vm_param.h>
-
-#ifndef        ASSEMBLER
-#include <mach/vm_types.h>
-#endif /* ASSEMBLER */
+#include <mach/machine/vm_types.h>
 
 /*
  *     The machine independent pages are refered to as PAGES.  A page
  *     virtual memory system implementation.
  */
 
-#ifdef PAGE_SIZE_FIXED
-#define PAGE_SIZE      4096
-#define PAGE_SHIFT     12
-#define        PAGE_MASK       (PAGE_SIZE-1)
-#endif /* PAGE_SIZE_FIXED */
-
-#ifndef        ASSEMBLER
-
+#ifndef        PAGE_SIZE_FIXED
 extern vm_size_t       page_size;
 extern vm_size_t       page_mask;
 extern int             page_shift;
 
-#ifndef        PAGE_SIZE_FIXED
 #define PAGE_SIZE      page_size       /* pagesize in addr units */
 #define PAGE_SHIFT     page_shift      /* number of bits to shift for pages */
 #define PAGE_MASK      page_mask       /* mask for off in page */
@@ -124,123 +110,33 @@ extern int               page_shift;
 #define PAGE_SIZE_64 (unsigned long long)page_size /* pagesize in addr units */
 #define PAGE_MASK_64 (unsigned long long)page_mask /* mask for off in page */
 #else  /* PAGE_SIZE_FIXED */
-
+#define PAGE_SIZE      4096
+#define PAGE_SHIFT     12
+#define        PAGE_MASK       (PAGE_SIZE-1)
 #define PAGE_SIZE_64   (unsigned long long)4096
 #define PAGE_MASK_64   (PAGE_SIZE_64-1)
 #endif /* PAGE_SIZE_FIXED */
 
+#ifndef        ASSEMBLER
 /*
- *     Convert addresses to pages and vice versa.  No rounding is used.
- *      The atop_32 and ptoa_32 macros should not be use on 64 bit types.
- *      The round_page_64 and trunc_page_64 macros should be used instead.
- */
-
-#define atop_32(x) ((uint32_t)(x) >> PAGE_SHIFT)
-#define ptoa_32(x) ((uint32_t)(x) << PAGE_SHIFT)
-#define atop_64(x) ((uint64_t)(x) >> PAGE_SHIFT)
-#define ptoa_64(x) ((uint64_t)(x) << PAGE_SHIFT)
-
-/*
- *      While the following block is enabled, the legacy atop and ptoa
- *      macros will behave correctly.  If not, they will generate
- *      invalid lvalue errors.
+ *     Convert addresses to pages and vice versa.
+ *     No rounding is used.
  */
 
-#if 1
-#define atop(x)        ((uint32_t)(x) >> PAGE_SHIFT)
-#define ptoa(x)        ((uint32_t)(x) << PAGE_SHIFT)
-#else
-#define atop(x) (0UL = 0)
-#define ptoa(x) (0UL = 0)
-#endif
-
+#define atop(x)                (((natural_t)(x)) >> PAGE_SHIFT)
+#define ptoa(x)                ((vm_offset_t)((x) << PAGE_SHIFT))
 
 /*
  *     Round off or truncate to the nearest page.  These will work
  *     for either addresses or counts.  (i.e. 1 byte rounds to 1 page
- *     bytes.  The round_page_32 and trunc_page_32 macros should not be
- *      use on 64 bit types.  The round_page_64 and trunc_page_64 macros
- *      should be used instead.
- */
-
-#define round_page_32(x) (((uint32_t)(x) + PAGE_MASK) & ~((signed)PAGE_MASK))
-#define trunc_page_32(x) ((uint32_t)(x) & ~((signed)PAGE_MASK))
-#define round_page_64(x) (((uint64_t)(x) + PAGE_MASK) & ~((signed)PAGE_MASK))
-#define trunc_page_64(x) ((uint64_t)(x) & ~((signed)PAGE_MASK))
-
-
-/*
- *      While the following block is enabled, the legacy round_page
- *      and trunc_page macros will behave correctly.  If not, they will
- *      generate invalid lvalue errors.
- */
-
-#if 1
-#define round_page(x) (((uint32_t)(x) + PAGE_MASK) & ~((signed)PAGE_MASK))
-#define trunc_page(x) ((uint32_t)(x) & ~((signed)PAGE_MASK))
-#else
-#define round_page(x) (0UL = 0)
-#define trunc_page(x) (0UL = 0)
-#endif
-
-/*
- *      Enable the following block to find uses of xxx_32 macros that should
- *      be xxx_64.  These macros only work in C code, not C++.  The resulting
- *      binaries are not functional.  Look for invalid lvalue errors in
- *      the compiler output.
- *
- *      Enabling the following block will also find use of the xxx_64 macros
- *      that have been passed pointers.  The parameters should be case to an
- *      unsigned long type first.  Look for invalid operands to binary + error
- *      in the compiler output.
+ *     bytes.
  */
 
-#if 0
-#undef atop_32
-#undef ptoa_32
-#undef round_page_32
-#undef trunc_page_32
-#undef atop_64
-#undef ptoa_64
-#undef round_page_64
-#undef trunc_page_64
-
-#ifndef __cplusplus
-
-#define atop_32(x) \
-    (__builtin_choose_expr (sizeof(x) != sizeof(uint64_t), \
-        (*(long *)0), \
-        (0UL)) = 0)
-
-#define ptoa_32(x) \
-    (__builtin_choose_expr (sizeof(x) != sizeof(uint64_t), \
-        (*(long *)0), \
-        (0UL)) = 0)
-
-#define round_page_32(x) \
-    (__builtin_choose_expr (sizeof(x) != sizeof(uint64_t), \
-        (*(long *)0), \
-        (0UL)) = 0)
-
-#define trunc_page_32(x) \
-    (__builtin_choose_expr (sizeof(x) != sizeof(uint64_t), \
-        (*(long *)0), \
-        (0UL)) = 0)
-#else
-
-#define atop_32(x) (0)
-#define ptoa_32(x) (0)
-#define round_page_32(x) (0)
-#define trunc_page_32(x) (0)
-
-#endif /* ! __cplusplus */
-
-#define atop_64(x) ((uint64_t)((x) + (uint8_t *)0))
-#define ptoa_64(x) ((uint64_t)((x) + (uint8_t *)0))
-#define round_page_64(x) ((uint64_t)((x) + (uint8_t *)0))
-#define trunc_page_64(x) ((uint64_t)((x) + (uint8_t *)0))
+#define round_page(x)  ((vm_offset_t)((((vm_offset_t)(x)) + PAGE_MASK) & ~PAGE_MASK))
+#define trunc_page(x)  ((vm_offset_t)(((vm_offset_t)(x)) & ~PAGE_MASK))
 
-#endif
+#define round_page_64(x)       ((unsigned long long)((((unsigned long long)(x)) + PAGE_MASK_64) & ~PAGE_MASK_64))
+#define trunc_page_64(x)       ((unsigned long long)(((unsigned long long)(x)) & ~PAGE_MASK_64))
 
 /*
  *     Determine whether an address is page-aligned, or a count is
@@ -249,11 +145,7 @@ extern int         page_shift;
 
 #define        page_aligned(x) ((((vm_object_offset_t) (x)) & PAGE_MASK) == 0)
 
-extern vm_size_t       mem_size;               /* 32-bit size of memory - limited by maxmem - deprecated */
-extern uint64_t        max_mem;                        /* 64-bit size of memory - limited by maxmem */
-extern uint64_t        mem_actual;                     /* 64-bit size of memory - not limited by maxmem */
-extern uint64_t        sane_size;                      /* Memory size to use for defaults calculations */
-extern addr64_t        vm_last_addr;   /* Highest kernel virtual address known to the VM system */
+extern vm_size_t       mem_size;       /* size of physical memory (bytes) */
 
 #endif /* ASSEMBLER */
 #endif /* _MACH_VM_PARAM_H_ */
index 4f29436d459da75e06227f1449fb8b37047e3402..9980336e47426a7e8151be7c65f31411344a28f2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f77c731daebdbb69b586e5689fbb2971c6a532b8..1fd3e24925adc10e992266bb4976dbde5cd5cf33 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 754aec336195e5477a887c44a7a5030af0a5d875..f2667b9c52d564dd6573922c68e2ff05913e43f3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 827b22d5ae082a70bbaa2d84a1c29233b4b79f15..af5562372b8c3f18634815c874270900d2f856b3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cdfa02cd3a5da086e14babf3f975d08a4d3d2725..0e7470124cf3f7ebe3f6859425a472f09abb27f6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -39,34 +36,6 @@ typedef vm_offset_t          pointer_t;
 typedef vm_offset_t            vm_address_t;
 typedef uint64_t               vm_object_offset_t;
 
-/*
- * We use addr64_t for 64-bit addresses that are used on both
- * 32 and 64-bit machines.  On PPC, they are passed and returned as
- * two adjacent 32-bit GPRs.  We use addr64_t in places where
- * common code must be useable both on 32 and 64-bit machines.
- */
-typedef uint64_t addr64_t;             /* Basic effective address */
-
-/*
- * We use reg64_t for addresses that are 32 bits on a 32-bit
- * machine, and 64 bits on a 64-bit machine, but are always
- * passed and returned in a single GPR on PPC.  This type
- * cannot be used in generic 32-bit c, since on a 64-bit
- * machine the upper half of the register will be ignored
- * by the c compiler in 32-bit mode.  In c, we can only use the
- * type in prototypes of functions that are written in and called
- * from assembly language.  This type is basically a comment.
- */
-typedef        uint32_t        reg64_t;
-
-/*
- * To minimize the use of 64-bit fields, we keep some physical
- * addresses (that are page aligned) as 32-bit page numbers. 
- * This limits the physical address space to 16TB of RAM.
- */
-typedef uint32_t ppnum_t;              /* Physical page number */
-
-
 #ifdef KERNEL_PRIVATE
 
 #if !defined(__APPLE_API_PRIVATE) || !defined(MACH_KERNEL_PRIVATE)
index bb99a45858a28480ac7a5249a231e1a370230f2f..bb8b5e3a2006a0b962df963013dde66cb61b0c99 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 70cb315775a7fc3b0aac3d00d2ae7054def37f90..f3ec4fac8352b0317cb1cdd3f17a19d245dc3b20 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5779704aa99df3e0f4fd0fe60e000b0242cd2454..8f1a6f095b7ddfe14675cac35d89a09bd3e6fa63 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2188fb46c311a21e1a938f708cc868f57a8c752c..ce06a74d0263153c197dcf1058ecf5c25cd58b0a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2cb575b852b077137cfe0794bb3ea88767f44ae1..27e2684cc749b8092ad526bf015963636cba5568 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d98d7dcb257808d7ddb95ed0d91cc73db09ff19e..3f05d26a82229bf1fc638bdb07bbe196873afd8e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7807016c87b5b61a5aedc9277a791c36457ba2e6..38aa6e6b16c6a71fb16cd312e8ca6f27771af486 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e6d533dd1730a2a0693324117cb01a3622ba11b2..60b56d694f5c107bbe37c24ea730d99d0bd4e921 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 141fa285be90850f0be8bd2c031590893ee54138..ae517d9e93551ce356f71ee72b5080cb63af60f6 100644 (file)
@@ -12,8 +12,6 @@ DATAFILES = \
        machlimits.h    \
        ast.h   \
        ast_types.h     \
-       commpage.h      \
-       cpu_capabilities.h      \
        cpu_number.h    \
        db_machdep.h    \
        endian.h        \
@@ -38,9 +36,6 @@ DATAFILES = \
        xpr.h           \
        hw_lock_types.h
 
-INSTALL_MI_LCL_LIST = cpu_capabilities.h
-
-INSTALL_MI_DIR = machine
 
 EXPORT_MI_LIST = ${DATAFILES}
 
index df298a6b8f0c5920198804b352e4c96c043598ec..b0ace52722d30bc4bcc096c86167a777797cded0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index db97c7293f83d6cf3f16e5aea630ce7271155866..5ec6ba6eb3204c836136c24e9cd68f62ab126a56 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index de7ca848da5a0a226c195ba8525bc3503b409601..b04ed63179849e7b43a0fcb2ada7b95c652fa319 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
diff --git a/osfmk/machine/commpage.h b/osfmk/machine/commpage.h
deleted file mode 100644 (file)
index cac45f5..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-
-#ifndef _MACHINE_COMMPAGE_H
-#define _MACHINE_COMMPAGE_H
-
-#if defined (__ppc__)
-#include "ppc/commpage/commpage.h"
-#elif defined (__i386__)
-#include "i386/commpage/commpage.h"
-#else
-#error architecture not supported
-#endif
-
-#ifndef        __ASSEMBLER__
-
-extern void    commpage_populate( void );      /* called once during startup */
-
-#endif /* __ASSEMBLER__ */
-
-#endif /* _MACHINE_COMMPAGE_H */
diff --git a/osfmk/machine/cpu_capabilities.h b/osfmk/machine/cpu_capabilities.h
deleted file mode 100644 (file)
index 52ec0f3..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-
-#ifndef _MACHINE_CPU_CAPABILITIES_H
-#define _MACHINE_CPU_CAPABILITIES_H
-
-#ifdef __APPLE_API_PRIVATE
-
-#if defined (__ppc__)
-#include "ppc/cpu_capabilities.h"
-#elif defined (__i386__)
-#include "i386/cpu_capabilities.h"
-#else
-#error architecture not supported
-#endif
-
-#endif /* __APPLE_API_PRIVATE */
-#endif /* _MACHINE_CPU_CAPABILITIES_H */
index 17e30b0ff08b8a119b03cd3075653850648897bf..b10bac948ade6d3f3bbe2537a92ce52955cc8b20 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cda615448e0cba5b85b90d57948f9cf1333d909e..075c108eb79db42ea719140c8f61c4375df9a5c5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5b74664d4f5c1152285a2e21803d4c520177e987..bec9b4715cfd52d56ce2d5329561b5ad964a1f73 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3ff990564c1a8a8e5fb6ae03eb15aa5a74c24e67..03174e58d498248a6558b988b439eb641999a4a8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 14eb8c515f7a67859133fcbe0b69986618a849da..f0c8b29d3046655a6812150292c3d0d4d3b580ef 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5fba823bb5c47c8c078ed4ad33d2759196ce050b..821448666efca3448cb08ef725fc71d742a6b693 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d15ba77907acafb33127aaacdee6a763784b822e..0335f36013dc90b809a08489d94eea9a1ddf9b55 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8257fca0b020ac39c74d9cb0a1cde838dff04bed..49a6b83abb01ad22fe660330d470b380e226c6d6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2ea845c13dcc0db9aaf1311c34f7376eb66eaba0..b6e758edd5dfea16c86a107d68ba5bb5b5e2c324 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index f9a0a8d8e292d2a9d8f880a08e3e35df4135a8b7..c4178dcd108b2c3ce75d4ba1e637f0b27d7f44b4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8d8458bec11b28bf7d7dfef42bcc94e5d286afca..256830d27faec103d0d90669b0d2e0653de9d4e7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 17b0b62e9e54a358d04d2823df856320a191dad6..a654440443394aaeac002106422d616f94151ceb 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d473a3406d643ec782ce2f64534e8a05f8e2fcde..f143d6affcc73ac68f1bffe08393e401803cefba 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4d01bb68c940294583e5803200fbc5801be51b53..57481db5ac61f00ed3418a5801064751cdb7522d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6f1379eb5f327fe346b5a4e2795b5362d76c8893..bb1891453dad8df4780f7185c11272556f36e9c2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9f9de5e3a6707966a2664696efa42d82fcbdb566..2add98192fe105a4e234eb3dea7a348dd9865621 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c2d1eea78408cd4c787ce9b109eabb1b4cd9fe85..f29685ffc05188a3372e00bfe244c8899568c7f9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a35c0206c40ee493dd336a18f58cb84b2ca15e60..198bdd16762f66328485a1bf2797ca619b1673d8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c419f7105d7bda43fb7414303c709666c300698f..c32ea5f610f2ce04115cb3800bf72f4d58f3ecc3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2678b53cbd6b4832e4de297c4e4c5050560b9873..1f4e5ef2c35b6fb25eb9da8d2fc2e51c2e9b625d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index aa82e03d908fff16c0f98e89fa511dccf51b448f..f343dbb3e13ce39d3b098c408d9620dddd777d62 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index dd32100ec7b13d7218a0f437602e1cb2cb58ec8d..56f48ae72c39699e1bc973925e89a945d4fcca22 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 823c46327f7672cc5bb55727b682c8f933796cb2..11ace465a21056a35507919a664a3e3f762e9705 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 658f50db70af8d12633923e3d5ca38499da5b8bc..e409899816e5231010b7b5c88111a0f455c30985 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6d9f8520fd369246e4ee8048c8a12e8838297bdc..eafb03fb972d8a5a08fceb26708664ce128c3de2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ba26e5ca717cfdb1855bac7a687a1300d232b735..ef021722c30651e02dd7b3d838e7edfeaf1a44d0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a8f2bac103b685980d4efd24c6473d68d87788c0..d74da30493cc50ac05cdef472081aeefc4ef33e3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c8be0442f212197b81f28840ec4024c62e91e4f9..9507298b8dcb707bd07360472a948d523ab79faf 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 540a232b99444118e2ccf0fc67c1d58bde1aeb92..5d194389b713767e0ed75b15cad2e360e89689c1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -39,6 +36,8 @@
 #include <mach/machine/vm_param.h>
 #include <assym.s>
 
+#define kernAccess 31
+
 ;
 ;
 ;                      General stuff what happens here:
 
 LEXT(AltivecAssist)
 
+                       mfmsr           r20                                                     ; Get the current MSR
                        li                      r10,emvr0                                       ; Point to the vector savearea
+                       oris            r20,r20,hi16(MASK(MSR_VEC))     ; Turn on vector
+                       mtmsr           r20                                                     ; Turn on vector
+                       isync
                        
                        li                      r11,emvr1                                       ; Another savearea
                        stvxl           v0,r10,r2                                       ; Save V0
index a24486c8d62610b1cdc0e67fec97452af1784f1e..ffa7e0f6481c252667d0034d63b8ebbc22c370dc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -57,6 +54,7 @@
 #include <ppc/mappings.h>
 #include <ppc/pmap.h>
 #include <ppc/mem.h>
+#include <ppc/pmap_internals.h>
 #include <ppc/savearea.h>
 #include <ppc/Diagnostics.h>
 #include <ppc/machine_cpu.h>
@@ -77,11 +75,8 @@ int diagCall(struct savearea *save) {
        } ttt, adj;
        natural_t tbu, tbu2, tbl;
        struct per_proc_info *per_proc;                                 /* Area for my per_proc address */
-       int cpu, ret;
+       int cpu;
        unsigned int tstrt, tend, temp, temp2;
-       addr64_t src, snk;
-       uint64_t scom, hid1, hid4, srrwrk, stat;
-       scomcomm sarea;
 
        if(!(dgWork.dgFlags & enaDiagSCs)) return 0;    /* If not enabled, cause an exception */
 
@@ -121,7 +116,7 @@ int diagCall(struct savearea *save) {
  */
                case dgLRA:
                
-                       save->save_r3 = pmap_find_phys(current_act()->map->pmap, save->save_r4);        /* Get read address */
+                       save->save_r3 = pmap_extract(current_act()->map->pmap, save->save_r4);  /* Get read address */
                        
                        return -1;                                                              /* Return no AST checking... */
                        
@@ -130,58 +125,11 @@ int diagCall(struct savearea *save) {
  */
                case dgpcpy:
                
-               
-#if 1
-                       src = (save->save_r4 << 32) | (0x00000000FFFFFFFFULL & save->save_r5);  /* Merge into 64-bit */
-                       snk = (save->save_r6 << 32) | (0x00000000FFFFFFFFULL & save->save_r7);  /* Merge into 64-bit */
-                       save->save_r3 = copypv(src, snk, save->save_r8, save->save_r9); /* Copy the physical page */
+#if 0
+                       save->save_r3 = copyp2v(save->save_r4, save->save_r5, save->save_r6);   /* Copy the physical page */
 #endif                 
                        return 1;                                                               /* Return and check for ASTs... */
                        
-/*
- *             Read/Write physical memory
- */
-               case dgprw:
-               
-                       src = (save->save_r5 << 32) | (0x00000000FFFFFFFFULL & save->save_r6);  /* Merge into 64-bit */
-                       
-                       switch(save->save_r4) {                                 /* Select the actual function */
-
-                               case 0:
-                                       save->save_r3 = (uint64_t)ml_phys_read_byte((unsigned int)src);
-                                       break;
-                       
-                               case 1:
-                                       save->save_r3 = (uint64_t)ml_phys_read_byte_64(src);
-                                       break;
-                               
-                               case 2:
-                                       save->save_r3 = (uint64_t)ml_phys_read((unsigned int)src);
-                                       break;
-                               
-                               case 3:
-                                       save->save_r3 = (uint64_t)ml_phys_read_64(src);
-                                       break;
-
-                               case 4:
-                                       ml_phys_write_byte((unsigned int)src, (unsigned int)save->save_r7);
-                                       break;
-                       
-                               case 5:
-                                       ml_phys_write_byte_64(src, (unsigned int)save->save_r7);
-                                       break;
-                               
-                               case 6:
-                                       ml_phys_write((unsigned int)src, (unsigned int)save->save_r7);
-                                       break;
-                               
-                               case 7:
-                                       ml_phys_write_64(src, (unsigned int)save->save_r7);
-                                       break;
-                       }
-
-                       return 1;                                                               /* Return and check for ASTs... */
-                       
                        
 /*
  *             Soft reset processor
@@ -211,7 +159,16 @@ int diagCall(struct savearea *save) {
  */
                case dgFlush:
                
+#if 1
                        cacheInit();                                                    /* Blow cache */
+#else
+                       asm volatile("  mftb %0" : "=r" (tstrt));
+                       tend = tstrt;                   
+                       while((tend - tstrt) < 0x000A2837) {
+                               asm volatile("  mftb %0" : "=r" (tend));
+                       }
+
+#endif
                        return 1;                                                               /* Return and check for ASTs... */
 
 /*
@@ -232,9 +189,9 @@ int diagCall(struct savearea *save) {
  *             parms - vaddr, paddr, size, prot, attributes
  */
                case dgBMphys:
-                                       
-                       pmap_map_block(current_act()->map->pmap, (addr64_t)save->save_r4,       /* Map in the block */ 
-                               save->save_r5, save->save_r6, save->save_r7, save->save_r8, 0);
+               
+                       pmap_map_block(current_act()->map->pmap, save->save_r4, save->save_r5, save->save_r6,   /* Map in the block */
+                               save->save_r7, save->save_r8, 0);
 
                        return 1;                                                               /* Return and check for ASTs... */
                
@@ -253,16 +210,28 @@ int diagCall(struct savearea *save) {
 /*
  *             Allows direct control of alignment handling.
  *
- *             The bottom bit of the parameter is used to set the control bit, enaNotifyEM.
+ *             The bottom two bits of the parameter are used to set the two control bits:
+ *             0b00 - !trapUnalignbit - !notifyUnalignbit - default - instruction is emulated
+ *             0b01 - !trapUnalignbit -  notifyUnalignbit - emulation is done, but traps afterwards
+ *             0b10 -  trapUnalignbit - !notifyUnalignbit - no emulation - causes exception
+ *             0b11 -  trapUnalignbit -  notifyUnalignbit - no emulation - causes exception
  */
                case dgAlign:
                
-                       temp = dgWork.dgFlags;                          /* Save the old values */
+                       temp = current_act()->mact.specFlags;   /* Save the old values */
                        
-                       temp2 = (save->save_r4 & 1) << (31 - enaNotifyEMb);     /* Move parms into flag format */
-                       dgWork.dgFlags = (temp & ~enaNotifyEM) | temp2; /* Set the flag */
-               
-                       save->save_r3 = (temp >> (31 - enaNotifyEMb)) & 1;      /* Return the original */
+                       temp = ((current_act()->mact.specFlags >> (31 - trapUnalignbit - 1))    /* Reformat them to pass back */
+                               | (current_act()->mact.specFlags >> (31 - notifyUnalignbit))) & 3;
+                               
+                       temp2 = ((save->save_r4 << (31 - trapUnalignbit - 1)) & trapUnalign)    /* Move parms into flag format */
+                               | ((save->save_r4 << (31 - notifyUnalignbit)) & notifyUnalign);
+
+                       current_act()->mact.specFlags &= ~(trapUnalign | notifyUnalign);                /* Clean the old ones */
+                       current_act()->mact.specFlags |= temp2;                                                                 /* Set the new ones */
+                       
+                       per_proc_info[cpu_number()].spcFlags = current_act()->mact.specFlags;
+                       
+                       save->save_r3 = temp;
                        
                        return 1;                                                               /* Return and check for ASTs... */
                        
@@ -271,102 +240,14 @@ int diagCall(struct savearea *save) {
  */
                case dgBootScreen:
                        
+#if 0
                        ml_set_interrupts_enabled(1);
                        (void)copyout((char *)&vinfo, (char *)save->save_r4, sizeof(struct vc_info));   /* Copy out the video info */
                        ml_set_interrupts_enabled(0);
+#endif
                        return 1;                                                               /* Return and check for ASTs... */
                        
-/*
- *             Don't return info for boot screen
- */
-               case dgCPNull:
-                       
-                       ml_set_interrupts_enabled(1);
-                       (void)copyout((char *)&vinfo, (char *)save->save_r4, 0);        /* Copy out nothing */
-                       ml_set_interrupts_enabled(0);
-                       return 1;                                                               /* Return and check for ASTs... */
-                       
-/*
- *             Test machine check handler - only on 64-bit machines
- */
-               case dgmck:
-                       if(!(per_proc_info[0].pf.Available & pf64Bit)) return 0;        /* Leave if not correct machine */
-
-                       fwEmMck(save->save_r4, save->save_r5, save->save_r6, save->save_r7, save->save_r8, save->save_r9);      /* Start injecting */ 
-
-                       return -1;                                                              /* Return and don't check for ASTs... */
-
-/*
- *             Set 64-bit on or off - only on 64-bit machines
- */
-               case dg64:
-                       if(!(per_proc_info[0].pf.Available & pf64Bit)) return 0;        /* Leave if not correct machine */
-
-                       srrwrk = save->save_srr1 >> 63;                 /* Save the old 64-bit bit */
-                       
-                       save->save_srr1 = (save->save_srr1 & 0x7FFFFFFFFFFFFFFFULL) | (save->save_r4 << 63);    /* Set the requested mode */
-                       save->save_r3 = srrwrk;                                 /* Return the old value */
-
-                       return -1;                                                              /* Return and don't check for ASTs... */
-               
-/*
- *             Test the probe read function
- */
-
-               case dgProbeRead:
-               
-                       src = (save->save_r4 << 32) | (0x00000000FFFFFFFFULL & save->save_r5);  /* Merge into 64-bit */
-                       save->save_r3 = ml_probe_read_64(src, &temp);   /* Try the address */
-                       save->save_r4 = temp;                                   /* Return the data */
-                       return -1;                                                              /* Regurn and don't check for ASTs */
-               
-/*
- *             Do perf monitor stuff
- */
-
-               case dgPerfMon:
                
-                       setPmon(save->save_r4, save->save_r5);  /* Go load up MMCR0 and MMCR1 */
-                       return -1;                                                              /* Regurn and don't check for ASTs */
-
-/*
- *             Map a page
- *             Don't bother to check for any errors.
- *             parms - vaddr, paddr, prot, attributes
- */
-               case dgMapPage:
-                                       
-                       (void)mapping_map(current_act()->map->pmap, /* Map in the page */ 
-                               (addr64_t)(((save->save_r5 & 0xFFFFFFFF) << 32) | (save->save_r5 & 0xFFFFFFFF)), save->save_r6, 0, 1, VM_PROT_READ|VM_PROT_WRITE);
-
-                       return -1;                                                              /* Return and check for ASTs... */
-               
-/*
- *             SCOM interface
- *             parms - pointer to scomcomm
- */
-               case dgScom:
-                                       
-                       ret = copyin((unsigned int)(save->save_r4), &sarea, sizeof(scomcomm));  /* Get the data */
-                       if(ret) return 0;                                               /* Copyin failed - return an exception */
-                       
-                       sarea.scomstat = 0xFFFFFFFFFFFFFFFFULL; /* Clear status */
-                       cpu = cpu_number();                                             /* Get us */
-                       
-                       if((sarea.scomcpu < NCPUS) && machine_slot[sarea.scomcpu].running) {
-                               if(sarea.scomcpu == cpu) fwSCOM(&sarea);        /* Do it if it is us */
-                               else {                                                                  /* Otherwise, tell the other processor */
-                                       (void)cpu_signal(sarea.scomcpu, SIGPcpureq, CPRQscom ,(unsigned int)&sarea);    /* Ask him to do this */
-                                       (void)hw_cpu_sync((unsigned long)&sarea.scomstat, LockTimeOut); /* Wait for the other processor to get its temperature */
-                               }
-                       }
-
-                       ret = copyout(&sarea, (unsigned int)(save->save_r4), sizeof(scomcomm)); /* Get the data */
-                       if(ret) return 0;                                               /* Copyin failed - return an exception */
-       
-                       return -1;                                                              /* Return and check for ASTs... */
-               
-
                default:                                                                        /* Handle invalid ones */
                        return 0;                                                               /* Return an exception */
                
index 979c256efa112a7c9f11943b772249e52f1b8823..6837f338f20d09efbd3189e2ca2a7d9c32a7e411 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -55,14 +52,6 @@ int diagCall(struct savearea *save);
 #define dgBootScreen 7
 #define dgFlush 8
 #define dgAlign 9
-#define dgprw 10
-#define dgmck 11
-#define dg64 12
-#define dgProbeRead 13
-#define dgCPNull 14
-#define dgPerfMon 15
-#define dgMapPage 16
-#define dgScom 17
 
 
 typedef struct diagWork {                      /* Diagnostic work area */
@@ -81,10 +70,6 @@ typedef struct diagWork {                    /* Diagnostic work area */
 #define enaDiagSDMb  27
 #define enaDiagEM  0x00000020
 #define enaDiagEMb  26
-#define enaDiagTrap  0x00000040
-#define enaDiagTrapb  25
-#define enaNotifyEM  0x00000080
-#define enaNotifyEMb  24
 /* Suppress lock checks */
 #define disLkType 0x80000000
 #define disLktypeb 0
@@ -104,16 +89,7 @@ typedef struct diagWork {                   /* Diagnostic work area */
 
 } diagWork;
 
-typedef struct scomcomm {
-       uint16_t        scomcpu;        /* CPU number */
-       uint16_t        scomfunc;       /* 0 = read; 1 = write */
-       uint32_t        scomreg;        /* SCOM register */
-       uint64_t        scomstat;       /* returned status */
-       uint64_t        scomdata;       /* input for write,  output for read */
-} scomcomm;
-
 extern diagWork dgWork;
-extern int diagTrap(struct savearea *, unsigned int);
 
 
 #endif /* _DIAGNOSTICS_H_ */
index f7037e6af6d556785105cdb8e56983d45540e204..419b24747393a5590855100cbd39d51700673fdf 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -39,6 +36,7 @@
 #include <mach/machine/vm_param.h>
 #include <assym.s>
 
+#define kernAccess 31
 #define traceInst 30
 #define dssAllDone 29
 
 
 LEXT(Emulate)
 
-                       bf--    pf64Bitb,emn64                                  ; Skip if not 64-bit
-                       b               EXT(Emulate64)                                  ; Jump to the 64-bit code...
                        
-emn64:         mfsprg  r31,0                                                   ; Get the per_proc
-                       lwz             r12,savesrr1+4(r13)                             ; Get the exception info
+                       mfsprg  r31,0                                                   ; Get the per_proc
+                       lis             r30,hi16(EXT(dgWork))                   ; Get the high half of diagnostic work area
+                       lwz             r12,savesrr1(r13)                               ; Get the exception info
+                       ori             r30,r30,lo16(EXT(dgWork))               ; And the low half
                        rlwinm. r0,r12,0,SRR1_PRG_ILL_INS_BIT,SRR1_PRG_ILL_INS_BIT      ; Emulation candidate?
-                       lwz             r30,dgFlags(0)                                  ; Get the flags
+                       lwz             r30,dgFlags(r30)                                ; Get the flags
                        beq+    eExit                                                   ; Nope, do not try to emulate...
 
                        rlwinm. r0,r30,0,enaDiagEMb,enaDiagEMb  ; Do we want to try to emulate something?
@@ -113,9 +111,9 @@ eNoVect:    bl              eIFetch                                                 ; Get the instruction image
                        cror    cr1_eq,cr1_eq,cr0_eq                    ; Remember
                        bne             cr1_eq,eNotIndex                                ; Go check non-index forms...
 
-                       rlwinm. r21,r10,19,24,28                                ; Extract index to rA to build EA
-                       rlwinm  r22,r10,24,24,28                                ; Extract index to rB
-                       addi    r24,r13,saver0+4                                ; Point to the start of registers
+                       rlwinm. r21,r10,18,25,29                                ; Extract index to rA to build EA
+                       rlwinm  r22,r10,23,25,29                                ; Extract index to rB
+                       addi    r24,r13,saver0                                  ; Point to the start of registers
                        li              r19,0                                                   ; Assume 0 base
                        beq             eZeroBase                                               ; Yes...
                        lwzx    r19,r24,r21                                             ; Get the base register value
@@ -130,15 +128,15 @@ eNotIndex:        cmplwi  r0,725                                                  ; stswi?
                        cror    cr1_eq,cr1_eq,cr0_eq                    ; Remember
                        bne             cr1,eExit                                               ; Not one we handle...
        
-                       rlwinm. r21,r10,19,24,28                                ; Extract index to rA to build EA
-                       addi    r24,r13,saver0+4                                ; Point to the start of registers
+                       rlwinm. r21,r10,18,25,29                                ; Extract index to rA to build EA
+                       addi    r24,r13,saver0                                  ; Point to the start of registers
                        li              r22,0                                                   ; Assume 0 base
                        beq             eFinishUp                                               ; Yes, it is...
                        lwzx    r22,r24,r21                                             ; Get the base register value
                        
 eFinishUp:     stw             r20,savedsisr(r13)                              ; Set the DSISR
                        li              r11,T_ALIGNMENT                                 ; Get the exception code
-                       stw             r22,savedar+4(r13)                              ; Save the DAR
+                       stw             r22,savedar(r13)                                ; Save the DAR
                        stw             r11,saveexception(r13)                  ; Set the exception code
                        b               EXT(AlignAssist)                                ; Go emulate the handler...
 
@@ -155,15 +153,20 @@ eExit:            b               EXT(EmulExit)                                   ; Just return for now...
 
                        .align  5
 
-eIFetch:       lwz             r23,savesrr1+4(r13)                             ; Get old MSR
+eIFetch:       lwz             r23,savesrr1(r13)                               ; Get old MSR
                        mflr    r28                                                             ; Save return
 
                        rlwinm. r22,r23,0,MSR_PR_BIT,MSR_PR_BIT ; Within kernel?
 
                        mfmsr   r30                                                             ; Save the MSR for now
-                       lwz             r23,savesrr0+4(r13)                             ; Get instruction address
+                       lwz             r23,savesrr0(r13)                               ; Get instruction address
+                       crmove  kernAccess,cr0_eq                               ; Remember if fault was in kernel
+                       li              r25,4                                                   ; Set access length
+                       or              r22,r22,r30                                             ; Add PR to access MSR
                        
-                       ori             r22,r30,lo16(MASK(MSR_DR)|MASK(MSR_RI))         ; Set RI and DR onto access MSR
+                       bfl+    kernAccess,aaSetSegs                    ; Go set SRs if we are in user and need to
+
+                       ori             r22,r22,lo16(MASK(MSR_DR)|MASK(MSR_RI))         ; Set RI onto access MSR
 
                        crset   cr0_eq                                                  ; Set this to see if we failed
                        mtmsr   r22                                                             ; Flip DR, RI, and maybe PR on
@@ -171,10 +174,15 @@ eIFetch:  lwz             r23,savesrr1+4(r13)                             ; Get old MSR
                        
                        lwz             r10,0(r23)                                              ; Fetch the instruction
                        
-                       mtmsr   r30                                                             ; Trans and RI off
-                       isync
+                       crmove  28,cr0_eq                                               ; Remember if we failed
+                       li              r0,loadMSR                                              ; Set the magic "get back to supervisor" SC
+                       mr              r3,r30                                                  ; Get MSR to load
+                       sc                                                                              ; Get back to supervisor state
+                       
+                       bfl+    kernAccess,aaUnSetSegs                  ; Go set SRs if we are in user and need to
                        
                        mtlr    r28                                                             ; Restore the LR
+                       crmove  cr0_eq,28                                               ; Set CR0_EQ if the fetch succeeded
                        blr                                                                             ; Return with instruction image in R10
 
 
@@ -183,14 +191,14 @@ eIFetch:  lwz             r23,savesrr1+4(r13)                             ; Get old MSR
 ;
 
 eRedriveAsISI:
-                       lwz             r6,savesrr1+4(r13)                              ; Get the srr1 value
+                       lwz             r6,savesrr1(r13)                                ; Get the srr1 value
                        lwz             r4,SAVflags(r13)                                ; Pick up the flags
                        li              r11,T_INSTRUCTION_ACCESS                ; Set failing instruction fetch code
                        rlwimi  r6,r1,0,0,4                                             ; Move the DSISR bits to the SRR1
                        oris    r4,r4,hi16(SAVredrive)                  ; Set the redrive bit
                        stw             r11,saveexception(r13)                  ; Set the replacement code
                        stw             r4,SAVflags(r13)                                ; Set redrive request
-                       stw             r6,savesrr1+4(r13)                              ; Set the srr1 value
+                       stw             r6,savesrr1(r13)                                ; Set the srr1 value
                        b               EXT(EmulExit)                                   ; Bail out to handle ISI...
 
 
@@ -217,40 +225,55 @@ eRedriveAsISI:
                        .globl  EXT(AlignAssist)
 
 LEXT(AlignAssist)
-                       bf--    pf64Bitb,aan64                                  ; Skip if not 64-bit
-                       b               EXT(AlignAssist64)                              ; Jump to the 64-bit code...
-                       
-aan64:         lwz             r20,savedsisr(r13)                              ; Get the DSISR
+
+#if 0
+                       b               EXT(EmulExit)                                   ; Just return for now...
+#endif
+
+
                        mfsprg  r31,0                                                   ; Get the per_proc
-                       mtcrf   0x10,r20                                                ; Put instruction ID in CR for later
+                       lwz             r20,savedsisr(r13)                              ; Get the DSISR
                        lwz             r21,spcFlags(r31)                               ; Grab the special flags
-                       mtcrf   0x08,r20                                                ; Put instruction ID in CR for later
+                       mtcrf   0x1C,r20                                                ; Put instruction ID in CR for later
                        rlwinm. r0,r21,0,runningVMbit,runningVMbit      ; Are we running a VM?
-                       mtcrf   0x04,r20                                                ; Put instruction ID in CR for later
-                       lwz             r22,savesrr1+4(r13)                             ; Get the SRR1
+                       lwz             r22,savesrr1(r13)                               ; Get the SRR1
                        bne-    aaPassAlong                                             ; We are in a VM, no emulation for alignment exceptions...
-                       lwz             r19,dgFlags(0)                                  ; Get the diagnostics flags
+                       rlwinm. r0,r21,0,trapUnalignbit,trapUnalignbit  ; Should we trap alignment exceptions?
                        crxor   iFloat,iOptype1,iOptype2                ; Set this to 0 if both bits are either 0 or 1
                        mr              r26,r20                                                 ; Save the DSISR
+                       bne-    aaPassAlong                                             ; No alignment exceptions allowed...
                        rlwinm. r0,r22,0,MSR_SE_BIT,MSR_SE_BIT  ; Were we single stepping?
-                       lwz             r23,savedar+4(r13)                              ; Pick up the address that we want to access
+                       lwz             r23,savedar(r13)                                ; Pick up the address that we want to access
                        crnot   traceInst,cr0_eq                                ; Remember if trace is on
-                       
-                       rlwinm. r0,r19,0,enaNotifyEMb,enaNotifyEMb      ; Should we notify that an alignment exception happened?
-                       mfmsr   r30                                                             ; Save the MSR for now
+                       rlwinm. r0,r21,0,notifyUnalignbit,notifyUnalignbit      ; Should we notify that an alignment exception happened?
+                       mfsprg  r28,2                                                   ; Get the processor features
                        crnot   iNotify,cr0_eq                                  ; Remember to tell someone we did this                          
+                       rlwinm. r22,r22,0,MSR_PR_BIT,MSR_PR_BIT ; Did we take the exception in the kernel and isolate PR?
+                       mfmsr   r30                                                             ; Save the MSR for now
                        li              r29,emfp0                                               ; Point to work area
                        crxor   iFloat,iFloat,iOptype3                  ; Set true if we have a floating point instruction
+                       or              r22,r22,r30                                             ; Add PR to access MSR
                        dcbz    r29,r31                                                 ; Clear and allocate a cache line for us to work in
-                       rlwinm  r24,r20,3,24,28                                 ; Get displacement to register to update if update form
+                       rlwinm  r24,r20,2,25,29                                 ; Get displacement to register to update if update form
                        rlwimi  r20,r20,24,28,28                                ; Move load/store indication to the bottom of index
-                       ori             r22,r30,lo16(MASK(MSR_DR)|MASK(MSR_RI))         ; Set RI onto access MSR
+                       ori             r22,r22,lo16(MASK(MSR_DR)|MASK(MSR_RI))         ; Set RI onto access MSR
+                       crmove  kernAccess,cr0_eq                               ; Remember if fault was in kernel
+                       rlwinm. r28,r28,0,pfAltivecb,pfAltivecb ; Do we have Altivec on this machine?
                        rlwimi  r20,r20,26,27,27                                ; Move single/double indication to just above the bottom
-                       lis             r29,hi16(EXT(aaFPopTable))              ; High part of FP branch table
+                       beq             aaNoVect                                                ; Nope, no Altivec...
+                       
+                       dssall                                                                  ; We need to kill streams because we are going to flip to problem state
+                       sync
+                       
+aaNoVect:      lis             r29,hi16(aaFPopTable)                   ; High part of FP branch table
                        bf-             iFloat,aaNotFloat                               ; This is not a floating point instruction...
-                       ori             r29,r29,lo16(EXT(aaFPopTable))  ; Low part of FP branch table
+                       li              r25,8                                                   ; Assume 8-byte access for now
+                       ori             r29,r29,lo16(aaFPopTable)               ; Low part of FP branch table
+                       bt              iDouble,aaFPis8                                 ; So far, we think we are a double...
+                       li              r25,4                                                   ; Set word access
                        
-                       rlwimi  r29,r20,0,22,28                                 ; Index into table based upon register||iDouble||iStore
+aaFPis8:       rlwimi  r29,r20,0,22,28                                 ; Index into table based upon register||iDouble||iStore
+                       ori             r0,r30,lo16(MASK(MSR_FP))               ; Turn on floating point
                        mtctr   r29                                                             ; Get set to call the function  
                        bt              iStore,aaFPstore                                ; This is an FP store...
                
@@ -258,8 +281,11 @@ aan64:             lwz             r20,savedsisr(r13)                              ; Get the DSISR
 ;                      Here we handle floating point loads
 ;                      
 
-aaFPload:      crset   cr0_eq                                                  ; Set this to see if we failed
-                       mtmsr   r22                                                             ; Flip DR, RI
+aaFPload:      bfl+    kernAccess,aaSetSegs                    ; Go set SRs if we are in user and need to
+
+                       crset   cr0_eq                                                  ; Set this to see if we failed
+                       ori             r3,r30,lo16(MASK(MSR_FP))               ; We will need FP on in a bit, so turn on when we ditch problem state
+                       mtmsr   r22                                                             ; Flip DR, RI, and maybe PR on
                        isync
                        
                        lwz             r10,0(r23)                                              ; Get the first word
@@ -268,9 +294,8 @@ aaFPload:   crset   cr0_eq                                                  ; Set this to see if we failed
                        lwz             r11,4(r23)                                              ; Get the second half
                        
 aaLdNotDbl:    mr              r4,r0                                                   ; Save the DAR if we failed the access
-                       
-                       mtmsr   r30                                                             ; Turn off translation again
-                       isync
+                       li              r0,loadMSR                                              ; Set the magic "get back to supervisor" SC
+                       sc                                                                              ; Get back to supervisor state and turn on FP
                        
                        bf-             cr0_eq,aaRedriveAsDSI                   ; Go redrive this as a DSI...   
                        
@@ -287,17 +312,24 @@ aaLdNotDbl:       mr              r4,r0                                                   ; Save the DAR if we failed the access
 
                        .align  5
 
-aaFPstore:     bctrl                                                                   ; Go save the source FP register
+aaFPstore:     mtmsr   r0                                                              ; We need floating point on for the first phase
+                       isync   
+                       
+                       bctrl                                                                   ; Go save the source FP register
                        
                        lwz             r10,emfp0(r31)                                  ; Get first word
                        crandc  iDouble,iDouble,iOptype4                ; Change to 4-byte access if stfiwx
                        lwz             r11,emfp0+4(r31)                                ; and the second
                        bf+             iOptype4,aaNotstfiwx                    ; This is not a stfiwx...
+                       li              r25,4                                                   ; Set this is a word
                        mr              r10,r11                                                 ; The stfiwx wants to store the second half
 
 aaNotstfiwx:
+                       bfl+    kernAccess,aaSetSegs                    ; Go set SRs if we are in user and need to
+                       
                        crset   cr0_eq                                                  ; Set this to see if we failed
-                       mtmsr   r22                                                             ; Flip DR, RI
+                       mr              r3,r30                                                  ; Set the normal MSR
+                       mtmsr   r22                                                             ; Flip DR, RI, and maybe PR on
                        isync
                        
                        stw             r10,0(r23)                                              ; Save the first word
@@ -306,26 +338,31 @@ aaNotstfiwx:
                        stw             r11,4(r23)                                              ; Save the second half
                        
 aaStNotDbl:    mr              r4,r0                                                   ; Save the DAR if we failed the access
-                       mtmsr   r30                                                             ; Turn off
-                       isync
+                       li              r0,loadMSR                                              ; Set the magic "get back to supervisor" SC
+                       sc                                                                              ; Get back to supervisor state
+                       
                        
                        bf-             cr0_eq,aaRedriveAsDSI                   ; Go redrive this as a DSI...
+                       
+                       
 
 ;
 ;                      Common exit routines
 ;
 
-aaComExit:     lwz             r10,savesrr0+4(r13)                             ; Get the failing instruction address
+aaComExit:     lwz             r10,savesrr0(r13)                               ; Get the failing instruction address
                        add             r24,r24,r13                                             ; Offset to update register
                        li              r11,T_IN_VAIN                                   ; Assume we are all done
                        addi    r10,r10,4                                               ; Step to the next instruction
                        bf              iUpdate,aaComExNU                               ; Skip if not an update form...
-                       stw             r23,saver0+4(r24)                               ; Update the target
+                       stw             r23,saver0(r24)                                 ; Update the target
                        
 aaComExNU:     lwz             r9,SAVflags(r13)                                ; Get the flags
-                       stw             r10,savesrr0+4(r13)                             ; Set new PC
+                       stw             r10,savesrr0(r13)                               ; Set new PC
                        bt-             traceInst,aaComExitrd                   ; We are tracing, go emulate trace...
                        bf+             iNotify,aaComExGo                               ; Nothing special here, go...
+
+                       bfl+    kernAccess,aaUnSetSegs                  ; Go set SRs if we are in user and need to
        
                        li              r11,T_ALIGNMENT                                 ; Set the we just did an alignment exception....
                        
@@ -356,7 +393,7 @@ aaNotFloat:
                        ori             r19,r19,lo16(aaEmTable)                 ; Low part of table address
                        blt-    aaPassAlong                                             ; We do not handle any of these (lwarx, stwcx., eciwx, ecowx)...
                        add             r19,r19,r3                                              ; Point to emulation routine
-                       rlwinm  r18,r26,30,24,28                                ; Get the target/source register displacement
+                       rlwinm  r18,r26,29,25,29                                ; Get the target/source register displacement
 
                        mtctr   r19                                                             ; Set the routine address
                        
@@ -398,12 +435,14 @@ aaEmTable:
                        .align  5
                                                
 aaLmwStmw:
-                       rlwinm  r17,r18,31,1,29                                 ; Convert doublword based index to words
+                       subfic  r25,r18,32*4                                    ; Calculate the length of the transfer
                        li              r28,0                                                   ; Set no extra bytes to move (used for string instructions)
-                       subfic  r17,r17,32*4                                    ; Calculate the length of the transfer
+                       mr              r17,r25                                                 ; Save the word transfer length here
 
-aaLSComm:      addi    r19,r13,saver0+4                                ; Offset to registers in savearea
+aaLSComm:      addi    r19,r13,saver0                                  ; Offset to registers in savearea
                        mr              r16,r23                                                 ; Make a hunk pointer
+
+                       bfl+    kernAccess,aaSetSegs                    ; Go set SRs if we are in user and need to
                        
                        bt              iUpdate,aaStmw                                  ; This is the stmw...
                        
@@ -416,7 +455,7 @@ aaLmwNxt:   cmplwi  cr1,r17,8*4                                             ; Is there enough to move 8?
                        subi    r17,r17,8*4                                             ; Back off for another hunk
                        
                        crset   cr0_eq                                                  ; Set this to see if we failed
-                       mtmsr   r22                                                             ; Flip DR, RI
+                       mtmsr   r22                                                             ; Flip DR, RI, and maybe PR on
                        isync
                
                        lwz             r2,0(r16)                                               ; Load word 0
@@ -436,37 +475,38 @@ aaLmwNxt: cmplwi  cr1,r17,8*4                                             ; Is there enough to move 8?
                        lwz             r9,28(r16)                                              ; Load word 7
                
 aaLmwB1:       mr              r4,r0                                                   ; Remember DAR, jus in case we failed the access
-                       mtmsr   r30                                                             ; Turn off DR, RI
-                       isync
+                       mr              r3,r30                                                  ; Set the normal MSR
+                       li              r0,loadMSR                                              ; Set the magic "get back to supervisor" SC
+                       sc                                                                              ; Get back to supervisor state
 
                        bf-             cr0_eq,aaRedriveAsDSI                   ; We failed, go redrive this as a DSI...
 
                        addi    r16,r16,8*4                                             ; Point up to next input aread
                
                        stwx    r2,r19,r18                                              ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
                        stwx    r15,r19,r18                                             ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
                        stwx    r14,r19,r18                                             ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
                        stwx    r5,r19,r18                                              ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
                        stwx    r6,r19,r18                                              ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
                        stwx    r7,r19,r18                                              ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
                        stwx    r8,r19,r18                                              ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
                        stwx    r9,r19,r18                                              ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
 
                        b               aaLmwNxt                                                ; Do the next hunk...
 
@@ -490,25 +530,26 @@ aaLmwNxtH:        cmplwi  cr1,r17,4*4                                             ; Do we have 4 left?
                        lwz             r5,12(r16)                                              ; Load word 3
                
 aaLmwB2:       mr              r4,r0                                                   ; Remember DAR, jus in case we failed the access
-                       mtmsr   r30                                                             ; Turn off DR, RI
-                       isync
+                       mr              r3,r30                                                  ; Set the normal MSR
+                       li              r0,loadMSR                                              ; Set the magic "get back to supervisor" SC
+                       sc                                                                              ; Get back to supervisor state
 
                        bf-             cr0_eq,aaRedriveAsDSI                   ; We failed, go redrive this as a DSI...
                
                        addi    r16,r16,4*4                                             ; Point up to next input aread
                        
                        stwx    r2,r19,r18                                              ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
                        stwx    r15,r19,r18                                             ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
                        stwx    r14,r19,r18                                             ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
                        stwx    r5,r19,r18                                              ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
 
 aaLmwL4:       or.             r5,r17,r28                                              ; Do we have anything left?
                        cmplwi  cr1,r17,(2*4)                                   ; Do we have one, two, or three full words left?
@@ -558,27 +599,26 @@ aaLmwDn:  rlwinm  r5,r5,24,0,7                                    ; Move first byte to top
                        cmplwi  cr1,r17,(2*4)                                   ; Do we have one, two, or three full words left?
                        mr              r3,r30                                                  ; Set the normal MSR
                        rlwimi  r5,r9,8,8,23                                    ; Move bytes 1 and 2 after 0
-
-                       mtmsr   r30                                                             ; Turn off DR, RI
-                       isync
+                       li              r0,loadMSR                                              ; Set the magic "get back to supervisor" SC
+                       sc                                                                              ; Get back to supervisor state
 
                        bf-             cr0_eq,aaRedriveAsDSI                   ; We failed, go redrive this as a DSI...
 
                        beq-    cr2,aaLmwCb                                             ; No full words, copy bytes...
 
                        stwx    r2,r19,r18                                              ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
                        blt             cr1,aaLmwCb                                             ; We only had one, we are done...
                        
                        stwx    r15,r19,r18                                             ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
                        beq             cr1,aaLmwCb                                             ; We had two, we are done...
 
                        stwx    r14,r19,r18                                             ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
 
 aaLmwCb:       mr.             r28,r28                                                 ; Any trailing bytes to do?
                        beq+    aaComExit                                               ; Nope, leave...
@@ -601,29 +641,29 @@ aaStmwNxt:        cmplwi  cr1,r17,8*4                                             ; Is there enough to move 8?
                        subi    r17,r17,8*4                                             ; Back off for another hunk
                
                        lwzx    r2,r19,r18                                              ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
                        lwzx    r15,r19,r18                                             ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
                        lwzx    r14,r19,r18                                             ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
                        lwzx    r5,r19,r18                                              ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
                        lwzx    r6,r19,r18                                              ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
                        lwzx    r7,r19,r18                                              ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
                        lwzx    r8,r19,r18                                              ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
                        lwzx    r9,r19,r18                                              ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
                        
                        crset   cr0_eq                                                  ; Set this to see if we failed
                        mtmsr   r22                                                             ; Flip DR, RI, and maybe PR on
@@ -649,8 +689,9 @@ aaStmwNxt:  cmplwi  cr1,r17,8*4                                             ; Is there enough to move 8?
                
                
 aaStmwB1:      mr              r4,r0                                                   ; Remember DAR, jus in case we failed the access
-                       mtmsr   r30                                                             ; Normal MSR
-                       isync
+                       mr              r3,r30                                                  ; Set the normal MSR
+                       li              r0,loadMSR                                              ; Set the magic "get back to supervisor" SC
+                       sc                                                                              ; Get back to supervisor state
 
                        bt-             cr0_eq,aaStmwNxt                                ; We have more to do and no failed access...
                        b               aaRedriveAsDSI                                  ; We failed, go redrive this as a DSI...
@@ -662,20 +703,20 @@ aaStmwNxtH:       cmplwi  cr1,r17,(4*4)                                   ; Do we have at least 4 left?
                        subi    r17,r17,4*4                                             ; Set count properly
 
                        lwzx    r2,r19,r18                                              ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
                        lwzx    r15,r19,r18                                             ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
                        lwzx    r14,r19,r18                                             ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
                        lwzx    r5,r19,r18                                              ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
                        
                        crset   cr0_eq                                                  ; Set this to see if we failed
-                       mtmsr   r22                                                             ; Flip DR, RI
+                       mtmsr   r22                                                             ; Flip DR, RI, and maybe PR on
                        isync
                
                        stw             r2,0(r16)                                               ; Store word 0
@@ -689,8 +730,9 @@ aaStmwNxtH: cmplwi  cr1,r17,(4*4)                                   ; Do we have at least 4 left?
                        addi    r16,r16,4*4                                             ; Point up to next input aread
                
 aaStmwB2:      mr              r4,r0                                                   ; Remember DAR, jus in case we failed the access
-                       mtmsr   r30                                                             ; Normal MSR
-                       isync
+                       mr              r3,r30                                                  ; Set the normal MSR
+                       li              r0,loadMSR                                              ; Set the magic "get back to supervisor" SC
+                       sc                                                                              ; Get back to supervisor state
 
                        bf-             cr0_eq,aaRedriveAsDSI                   ; We failed, go redrive this as a DSI...
 
@@ -702,18 +744,18 @@ aaStmwL4: or.             r5,r17,r28                                              ; Do we have anything left to do?
                        beq-    cr2,aaStmwBy1                                   ; No full words, check out bytes
 
                        lwzx    r2,r19,r18                                              ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
                        blt             cr1,aaStmwBy1                                   ; We only had one, go save it...
                        
                        lwzx    r15,r19,r18                                             ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
                        beq             cr1,aaStmwBy1                                   ; We had two, go save it...
                        
                        lwzx    r14,r19,r18                                             ; Store register
-                       addi    r18,r18,8                                               ; Next register
-                       rlwinm  r18,r18,0,24,28                                 ; Wrap back to 0 if needed
+                       addi    r18,r18,4                                               ; Next register
+                       rlwinm  r18,r18,0,25,29                                 ; Wrap back to 0 if needed
                        
 aaStmwBy1:     mr.             r28,r28                                                 ; Do we have any trailing bytes?
                        beq+    aaStmwSt                                                ; Nope...
@@ -721,23 +763,22 @@ aaStmwBy1:        mr.             r28,r28                                                 ; Do we have any trailing bytes?
                        lwzx    r5,r19,r18                                              ; Yes, pick up one extra register
                        
 aaStmwSt:      crset   cr0_eq                                                  ; Set this to see if we failed
-                       mtmsr   r22                                                             ; Flip DR, RI
+                       mtmsr   r22                                                             ; Flip DR, RI, and maybe PR on
                        isync
 
                        beq-    cr2,aaStmwBy2                                   ; No words, check trailing bytes...                                     
 
                        stw             r2,0(r16)                                               ; Save first word
-                       bf-             cr0_eq,aaStmwDn                                 ; Store failed, escape...
+                       bf-             cr0_eq,aaStmwDn                                 ; Read failed, escape...
                        addi    r16,r16,4                                               ; Bump sink
                        blt             cr1,aaStmwBy2                                   ; We only had one, we are done...
 
                        stw             r15,0(r16)                                              ; Save second word
-                       bf-             cr0_eq,aaStmwDn                                 ; Store failed, escape...
+                       bf-             cr0_eq,aaStmwDn                                 ; Read failed, escape...
                        addi    r16,r16,4                                               ; Bump sink
                        beq             cr1,aaStmwBy2                                   ; We had two, we are done...
 
                        stw             r14,0(r16)                                              ; Save third word
-                       bf-             cr0_eq,aaStmwDn                                 ; Store failed, escape...
                        addi    r16,r16,4                                               ; Bump sink
                                
 aaStmwBy2:     rlwinm  r2,r5,8,24,31                                   ; Get byte 0
@@ -760,8 +801,9 @@ aaStmwBy2:  rlwinm  r2,r5,8,24,31                                   ; Get byte 0
                        stb             r14,2(r16)                                              ; Save third byte
 
 aaStmwDn:      mr              r4,r0                                                   ; Remember DAR, jus in case we failed the access
-                       mtmsr   r30                                                             ; Normal MSR
-                       isync
+                       mr              r3,r30                                                  ; Set the normal MSR
+                       li              r0,loadMSR                                              ; Set the magic "get back to supervisor" SC
+                       sc                                                                              ; Get back to supervisor state
 
                        bf-             cr0_eq,aaRedriveAsDSI                   ; We failed, go redrive this as a DSI...
 
@@ -774,7 +816,7 @@ aaStmwDn:   mr              r4,r0                                                   ; Remember DAR, jus in case we failed the access
 
                        .align  5
                        
-aaLswx:                lwz             r17,savexer+4(r13)                              ; Pick up the XER
+aaLswx:                lwz             r17,savexer(r13)                                ; Pick up the XER
                        crclr   iUpdate                                                 ; Make sure we think this the load form
                        rlwinm. r25,r17,0,25,31                                 ; Get the number of bytes to load
                        rlwinm  r28,r17,0,30,31                                 ; Get the number of bytes past an even word
@@ -808,7 +850,7 @@ aaLswi:             mr              r9,r23                                                  ; Save the DAR
 
                        .align  5
 
-aaStswx:       lwz             r17,savexer+4(r13)                              ; Pick up the XER
+aaStswx:       lwz             r17,savexer(r13)                                ; Pick up the XER
                        crclr   iUpdate                                                 ; Make sure this is clear in case we have 0 length
                        rlwinm. r25,r17,0,25,31                                 ; Get the number of bytes to load
                        rlwinm  r28,r17,0,30,31                                 ; Get the number of bytes past an even word
@@ -846,24 +888,28 @@ aaStswi:  mr              r9,r23                                                  ; Save the DAR
 
 aaLwbrx:
                        add             r18,r18,r13                                             ; Index to source register
+                       li              r25,4                                                   ; Set the length
+
+                       bfl+    kernAccess,aaSetSegs                    ; Go set SRs if we are in user and need to
 
                        crset   cr0_eq                                                  ; Set this to see if we failed
+                       mr              r3,r30                                                  ; Set the normal MSR
                        mtmsr   r22                                                             ; Flip DR, RI, and maybe PR on
                        isync
                
                        lwz             r11,0(r23)                                              ; Load the word
                
                        mr              r4,r0                                                   ; Save the DAR if we failed the access
-                       mtmsr   r30                                                             ; Restore normal MSR
-                       isync
-                       
+                       li              r0,loadMSR                                              ; Set the magic "get back to supervisor" SC
+                       sc                                                                              ; Get back to supervisor state
+
                        bf-             cr0_eq,aaRedriveAsDSI                   ; We failed, go redrive this as a DSI...
                        
                        rlwinm  r10,r11,8,0,31                                  ; Get byte 0 to 3 and byte 2 to 1
                        rlwimi  r10,r11,24,16,23                                ; Move byte 1 to byte 2
                        rlwimi  r10,r11,24,0,7                                  ; Move byte 3 to byte 0
                
-                       stw             r10,saver0+4(r18)                               ; Set the register
+                       stw             r10,saver0(r18)                                 ; Set the register
 
                        b               aaComExit                                               ; All done, go exit...
 
@@ -877,22 +923,26 @@ aaLwbrx:
 
 aaStwbrx:
                        add             r18,r18,r13                                             ; Index to source register
-                       lwz             r11,saver0+4(r18)                               ; Get the register to store
+                       li              r25,4                                                   ; Set the length
+                       lwz             r11,saver0(r18)                                 ; Get the register to store
 
                        rlwinm  r10,r11,8,0,31                                  ; Get byte 0 to 3 and byte 2 to 1
                        rlwimi  r10,r11,24,16,23                                ; Move byte 1 to byte 2
                        rlwimi  r10,r11,24,0,7                                  ; Move byte 3 to byte 0
                        
+                       bfl+    kernAccess,aaSetSegs                    ; Go set SRs if we are in user and need to
+                       
                        crset   cr0_eq                                                  ; Set this to see if we failed
+                       mr              r3,r30                                                  ; Set the normal MSR
                        mtmsr   r22                                                             ; Flip DR, RI, and maybe PR on
                        isync
                
                        stw             r10,0(r23)                                              ; Store the reversed halfword
                
                        mr              r4,r0                                                   ; Save the DAR if we failed the access
-                       mtmsr   r30                                                             ; Restore normal MSR
-                       isync
-                       
+                       li              r0,loadMSR                                              ; Set the magic "get back to supervisor" SC
+                       sc                                                                              ; Get back to supervisor state
+
                        bt+             cr0_eq,aaComExit                                ; All done, go exit...
                        b               aaRedriveAsDSI                                  ; We failed, go redrive this as a DSI...        
 
@@ -906,23 +956,27 @@ aaStwbrx:
 
 aaLhbrx:
                        add             r18,r18,r13                                             ; Index to source register
+                       li              r25,2                                                   ; Set the length
+
+                       bfl+    kernAccess,aaSetSegs                    ; Go set SRs if we are in user and need to
 
                        crset   cr0_eq                                                  ; Set this to see if we failed
+                       mr              r3,r30                                                  ; Set the normal MSR
                        mtmsr   r22                                                             ; Flip DR, RI, and maybe PR on
                        isync
                
                        lhz             r11,0(r23)                                              ; Load the halfword
                
                        mr              r4,r0                                                   ; Save the DAR if we failed the access
-                       mtmsr   r30                                                             ; Restore normal MSR
-                       isync
+                       li              r0,loadMSR                                              ; Set the magic "get back to supervisor" SC
+                       sc                                                                              ; Get back to supervisor state
 
                        bf-             cr0_eq,aaRedriveAsDSI                   ; We failed, go redrive this as a DSI...
                        
                        rlwinm  r10,r11,8,16,23                                 ; Rotate bottom byte up one and clear everything else
                        rlwimi  r10,r11,24,24,31                                ; Put old second from bottom into bottom
                
-                       stw             r10,saver0+4(r18)                               ; Set the register
+                       stw             r10,saver0(r18)                                 ; Set the register
 
                        b               aaComExit                                               ; All done, go exit...
 
@@ -935,19 +989,23 @@ aaLhbrx:
 
 aaSthbrx:
                        add             r18,r18,r13                                             ; Index to source register
-                       lwz             r10,saver0+4(r18)                               ; Get the register to store
+                       li              r25,2                                                   ; Set the length
+                       lwz             r10,saver0(r18)                                 ; Get the register to store
                        rlwinm  r10,r10,8,0,31                                  ; Rotate bottom byte up one
                        rlwimi  r10,r10,16,24,31                                ; Put old second from bottom into bottom
                        
+                       bfl+    kernAccess,aaSetSegs                    ; Go set SRs if we are in user and need to
+                       
                        crset   cr0_eq                                                  ; Set this to see if we failed
+                       mr              r3,r30                                                  ; Set the normal MSR
                        mtmsr   r22                                                             ; Flip DR, RI, and maybe PR on
                        isync
                
                        sth             r10,0(r23)                                              ; Store the reversed halfword
                
                        mr              r4,r0                                                   ; Save the DAR if we failed the access
-                       mtmsr   r30                                                             ; Restore normal MSR
-                       isync
+                       li              r0,loadMSR                                              ; Set the magic "get back to supervisor" SC
+                       sc                                                                              ; Get back to supervisor state
 
                        bt+             cr0_eq,aaComExit                                ; All done, go exit...
                        b               aaRedriveAsDSI                                  ; We failed, go redrive this as a DSI...        
@@ -959,9 +1017,13 @@ aaSthbrx:
                        .align  5
 
 aaDcbz:
+                       li              r25,32                                                  ; Set the length
                        rlwinm  r23,r23,0,0,26                                  ; Round back to a 32-byte boundary
                        
+                       bfl+    kernAccess,aaSetSegs                    ; Go set SRs if we are in user and need to
+                       
                        crset   cr0_eq                                                  ; Set this to see if we failed
+                       mr              r3,r30                                                  ; Set the normal MSR
                        li              r0,0                                                    ; Clear this out
                        mtmsr   r22                                                             ; Flip DR, RI, and maybe PR on
                        isync
@@ -983,8 +1045,8 @@ aaDcbz:
                        stw             r0,28(r23)                                              ; Clear word            
                        
 aaDcbzXit:     mr              r4,r0                                                   ; Save the DAR if we failed the access
-                       mtmsr   r30                                                             ; Restore normal MSR
-                       isync
+                       li              r0,loadMSR                                              ; Set the magic "get back to supervisor" SC
+                       sc                                                                              ; Get back to supervisor state
 
                        crclr   iUpdate                                                 ; Make sure we do not think this is an update form
                        
@@ -996,6 +1058,10 @@ aaDcbzXit:        mr              r4,r0                                                   ; Save the DAR if we failed the access
 ;                      Unhandled alignment exception, pass it along
 ;
 
+aaPassAlongUnMap:
+                       bfl+    kernAccess,aaUnSetSegs                  ; Go set SRs if we are in user and need to
+
+
 aaPassAlong:
                        b               EXT(EmulExit)                                   
 
@@ -1009,6 +1075,7 @@ aaPassAlong:
                        .align  5
                        
 aaComExitrd:
+                       bfl+    kernAccess,aaUnSetSegs                  ; Go set SRs back if we need to because we are not going back to user yet
                        oris    r9,r9,hi16(SAVredrive)                  ; Set the redrive bit
                        li              r11,T_TRACE                                             ; Set trace interrupt
                        rlwinm  r12,r12,0,16,31                                 ; Clear top half of SRR1
@@ -1024,15 +1091,92 @@ aaComExitrd:
 aaRedriveAsDSI:
                        mr              r20,r1                                                  ; Save the DSISR
                        mr              r21,r4
+                       bfl+    kernAccess,aaUnSetSegs                  ; Go set SRs back if we need to because we are not going back to user yet
                        lwz             r4,SAVflags(r13)                                ; Pick up the flags
                        li              r11,T_DATA_ACCESS                               ; Set failing data access code
                        oris    r4,r4,hi16(SAVredrive)                  ; Set the redrive bit
                        stw             r20,savedsisr(r13)                              ; Set the DSISR of failed access
-                       stw             r21,savedar+4(r13)                              ; Set the address of the failed access
+                       stw             r21,savedar(r13)                                ; Set the address of the failed access
                        stw             r11,saveexception(r13)                  ; Set the replacement code
                        stw             r4,SAVflags(r13)                                ; Set redrive request
                        b               EXT(EmulExit)                                   ; Bail out to handle ISI...
 
+;
+;                      Set segment registers for user access.  Do not call this if we are trying to get
+;                      supervisor state memory.  We do not need this.
+;
+;                      Performance-wise, we will usually be setting one SR here. Most memory will be
+;                      allocated before the 1GB mark.  Since the kernel maps the first GB, the exception
+;                      handler always sets the SRs before we get here.  Therefore, we will usually 
+;                      have to remap it.
+;
+;                      Also, we need to un-do these mapping ONLY if we take a non-standard 
+;                      exit, e.g., emulate DSI, emulate trace exception, etc.  This is because
+;                      translation will never be turned on until we return and at that point,
+;                      normal exception exit code will restore the first 4 SRs if needed.
+;
+       
+                       .align  5
+
+                       .globl  EXT(aaSetSegsX)
+
+LEXT(aaSetSegsX)
+                       
+aaSetSegs:     addi    r3,r25,-1                                               ; Point at last accessed offset in range
+                       lwz             r7,PP_USERPMAP(r31)                             ; Get the current user pmap
+                       lis             r0,0x4000                                               ; This is the address of the first segment outside of the kernel
+                       rlwinm  r5,r23,6,26,29                                  ; Get index into pmap table
+                       add             r4,r23,r3                                               ; Point to the last byte accessed
+                       addi    r5,r5,PMAP_SEGS                                 ; Point to the segment slot
+                       cmplw   r23,r0                                                  ; See if first segment register needs to be reloaded
+                       cmplw   cr2,r4,r0                                               ; Do we need to set the second (if any) SR?
+                       xor             r0,r4,r23                                               ; See if we are in the same segment as first
+                       bge             aaSetS1ok                                               ; Nope, we are in a pure user range
+                       
+                       lwzx    r6,r5,r7                                                ; Get the user address space SR value
+                       mtsrin  r6,r23                                                  ; Load the corresponding SR register
+                       
+aaSetS1ok:     rlwinm. r0,r0,0,0,3                                             ; Any change in segment?
+                       bgelr-  cr2                                                             ; We are in user only space, we do not need to mess with SR
+                       rlwinm  r5,r4,6,26,29                                   ; Get index into pmap table
+                       beqlr+                                                                  ; No change in segment, we are done...
+
+                       lwzx    r6,r5,r7                                                ; Get the user address space SR value
+                       mtsrin  r6,r4                                                   ; Load the corresponding SR register
+                       blr                                                                             ; Leave...
+
+;
+;                      Unset segment registers for user access. Do not call unless we had a user access. 
+;
+       
+                       .align  5
+                       
+                       .globl  EXT(aaUnSetSegsX)
+                       
+LEXT(aaUnSetSegsX)
+                       
+aaUnSetSegs:   
+                       addi    r3,r25,-1                                               ; Point at last accessed offset in range
+                       lis             r0,0x4000                                               ; This is the address of the first segment outside of the kernel
+                       lis             r5,hi16(KERNEL_SEG_REG0_VALUE)  ; Get the high half of the kernel SR0 value 
+                       add             r4,r23,r3                                               ; Point to the last byte accessed
+                       cmplw   r23,r0                                                  ; See if first segment register needs to be reloaded
+                       rlwimi  r5,r23,24,8,11                                  ; Make the correct kernel segment
+                       cmplw   cr2,r4,r0                                               ; Do we need to set the second (if any) SR?
+                       xor             r0,r4,r23                                               ; See if we are in the same segment as first
+                       bge             aaUnSetS1ok                                             ; Nope, we are in a pure user range
+                       
+                       mtsrin  r5,r23                                                  ; Load the corresponding SR register
+                       
+aaUnSetS1ok:   
+                       rlwinm. r0,r0,0,0,3                                             ; Any change in segment?
+                       bgelr   cr2                                                             ; We are in user only space, we do not need to mess with SR
+                       rlwimi  r5,r4,24,8,11                                   ; Make the correct kernel segment
+                       beqlr+                                                                  ; No change in segment, we are done...
+
+                       mtsrin  r5,r4                                                   ; Load the corresponding SR register
+                       blr                                                                             ; Leave...
+
 
 
 ;
@@ -1045,9 +1189,8 @@ aaRedriveAsDSI:
 ;
 
                        .align  10                                                              ; Make sure we are on a 1k boundary
-                       .globl  EXT(aaFPopTable)
                        
-LEXT(aaFPopTable)
+aaFPopTable:
                        lfs             f0,emfp0(r31)                                   ; Load single variant
                        blr
 
diff --git a/osfmk/ppc/Emulate64.s b/osfmk/ppc/Emulate64.s
deleted file mode 100644 (file)
index fff72fe..0000000
+++ /dev/null
@@ -1,945 +0,0 @@
-/*
- * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */                                                                                                                                                                                    
-
-/* Emulate64.s
- *
- * Software emulation of instructions not handled in hw, on 64-bit machines.
- */
-#include <sys/appleapiopts.h>
-#include <cpus.h>
-#include <ppc/asm.h>
-#include <ppc/proc_reg.h>
-#include <ppc/exception.h>
-#include <mach/machine/vm_param.h>
-#include <ppc/cpu_capabilities.h>
-#include <assym.s>
-
-// CR bit set if the instruction is an "update" form (LFDU, STWU, etc):
-#define        kUpdate 25
-
-// CR bit set if interrupt occured in trace mode (ie, MSR_SE_BIT):
-#define kTrace 8
-
-// CR bit set if notification on alignment interrupts is requested (notifyUnalignbit in spcFlags):
-#define        kNotify 9
-
-// CR bit distinguishes between alignment and program exceptions:
-#define        kAlignment      10
-
-
-
-// *************************************
-// * P R O G R A M   I N T E R R U P T *
-// *************************************
-//
-// These are floating pt exceptions, illegal instructions, privileged mode violations,
-// and traps.  All we're interested in at this low level is illegal instructions.
-// The ones we "emulate" are:
-//             DCBA,  which is not implemented in the IBM 970.  The emulation is to ignore it,
-//                        as it is just a hint.
-//             MCRXR, which is not implemented on the IBM 970, but is in the PPC ISA.
-//
-// Additionally, to facilitate debugging the alignment handler, we recognize a special
-// diagnostic mode that is used to simulate alignment exceptions.  When in this mode,
-// if the instruction has opcode==0 and the extended opcode is one of the X-form
-// instructions that can take an alignment interrupt, then we change the opcode to
-// 31 and pretend it got an alignment interrupt.  This exercises paths that
-// are hard to drive or perhaps never driven on this particular CPU.
-
-        .text
-        .globl EXT(Emulate64)
-        .align 5
-LEXT(Emulate64)
-        crclr  kAlignment                                              // not an alignment exception
-        b              a64AlignAssistJoin                              // join alignment handler
-        
-        
-// Return from alignment handler with all the regs loaded for opcode emulation.
-        
-a64HandleProgramInt:
-        rlwinm.        r0,r29,0,SRR1_PRG_ILL_INS_BIT,SRR1_PRG_ILL_INS_BIT      // illegal opcode?
-        beq            a64PassAlong                                    // No, must have been trap or priv violation etc
-        rlwinm r3,r20,6,26,31                                  // right justify opcode field (bits 0-5)
-        rlwinm r4,r20,31,22,31                                 // right justify extended opcode field (bits 21-30)
-        cmpwi  cr0,r3,31                                               // X-form?
-        cmpwi  cr1,r4,758                                              // DCBA?
-        cmpwi  cr4,r4,512                                              // MCRXR?
-        crand  cr1_eq,cr0_eq,cr1_eq                    // merge the two tests for DCBA
-        crand  cr4_eq,cr0_eq,cr4_eq                    // and for MCRXR
-        beq++  cr1_eq,a64ExitEm                                // was DCBA, so ignore
-        bne--  cr4_eq,a64NotEmulated                   // skip if not MCRXR
-        
-// Was MCRXR, so emulate.
-
-        ld             r3,savexer(r13)                                 // get the XER
-        lwz            r4,savecr(r13)                                  // and the CR
-        rlwinm r5,r20,11,27,29                                 // get (CR# * 4) from instruction
-        rlwinm r6,r3,0,4,31                                    // zero XER[32-35] (also XER[0-31])
-        sld            r4,r4,r5                                                // move target CR field to bits 32-35
-        rlwimi r4,r3,0,0,3                                             // move XER[32-35] into CR field
-        stw            r6,savexer+4(r13)                               // update XER
-        srd            r4,r4,r5                                                // re-position CR
-        stw            r4,savecr(r13)                                  // update CR
-        b              a64ExitEm                                               // done
-
-// Not an opcode we normally emulate.  If in special diagnostic mode and opcode=0,
-// emulate as an alignment exception.  This special case is for test software.
-
-a64NotEmulated:
-        lwz            r30,dgFlags(0)                                  // Get the flags
-        rlwinm.        r0,r30,0,enaDiagEMb,enaDiagEMb  // Do we want to try to emulate something?
-        beq++  a64PassAlong                                    // No emulation allowed
-        cmpwi  r3,0                                                    // opcode==0 ?
-        bne            a64PassAlong                                    // not the special case
-        oris   r20,r20,0x7C00                                  // change opcode to 31
-        crset  kAlignment                                              // say we took alignment exception
-        rlwinm r5,r4,0,26+1,26-1                               // mask Update bit (32) out of extended opcode
-        rlwinm r5,r5,0,0,31                                    // Clean out leftover junk from rlwinm
-
-        cmpwi  r4,1014                                                 // dcbz/dcbz128 ?
-        crmove cr1_eq,cr0_eq
-        cmpwi  r5,21                                                   // ldx/ldux ?
-        cror   cr1_eq,cr0_eq,cr1_eq
-        cmpwi  r5,599                                                  // lfdx/lfdux ?
-        cror   cr1_eq,cr0_eq,cr1_eq
-        cmpwi  r5,535                                                  // lfsx/lfsux ?
-        cror   cr1_eq,cr0_eq,cr1_eq
-        cmpwi  r5,343                                                  // lhax/lhaux ?
-        cror   cr1_eq,cr0_eq,cr1_eq
-        cmpwi  r4,790                                                  // lhbrx ?
-        cror   cr1_eq,cr0_eq,cr1_eq
-        cmpwi  r5,279                                                  // lhzx/lhzux ?
-        cror   cr1_eq,cr0_eq,cr1_eq
-        cmpwi  r4,597                                                  // lswi ?
-        cror   cr1_eq,cr0_eq,cr1_eq
-        cmpwi  r4,533                                                  // lswx ?
-        cror   cr1_eq,cr0_eq,cr1_eq
-        cmpwi  r5,341                                                  // lwax/lwaux ?
-        cror   cr1_eq,cr0_eq,cr1_eq
-        cmpwi  r4,534                                                  // lwbrx ?
-        cror   cr1_eq,cr0_eq,cr1_eq
-        cmpwi  r5,23                                                   // lwz/lwzx ?
-        cror   cr1_eq,cr0_eq,cr1_eq
-        cmpwi  r5,149                                                  // stdx/stdux ?
-        cror   cr1_eq,cr0_eq,cr1_eq
-        cmpwi  r5,727                                                  // stfdx/stfdux ?
-        cror   cr1_eq,cr0_eq,cr1_eq
-        cmpwi  r4,983                                                  // stfiwx ?
-        cror   cr1_eq,cr0_eq,cr1_eq
-        cmpwi  r5,663                                                  // stfsx/stfsux ?
-        cror   cr1_eq,cr0_eq,cr1_eq
-        cmpwi  r4,918                                                  // sthbrx ?
-        cror   cr1_eq,cr0_eq,cr1_eq
-        cmpwi  r5,407                                                  // sthx/sthux ?
-        cror   cr1_eq,cr0_eq,cr1_eq
-        cmpwi  r4,725                                                  // stswi ?
-        cror   cr1_eq,cr0_eq,cr1_eq
-        cmpwi  r4,661                                                  // stswx ?
-        cror   cr1_eq,cr0_eq,cr1_eq
-        cmpwi  r4,662                                                  // stwbrx ?
-        cror   cr1_eq,cr0_eq,cr1_eq
-        cmpwi  r5,151                                                  // stwx/stwux ?
-        cror   cr1_eq,cr0_eq,cr1_eq
-        
-        beq++  cr1,a64GotInstruction                   // it was one of the X-forms we handle
-        crclr  kAlignment                                              // revert to program interrupt
-        b              a64PassAlong                                    // not recognized extended opcode
-        
-
-// *****************************************
-// * A L I G N M E N T   I N T E R R U P T *
-// *****************************************
-//
-// We get here in exception context, ie with interrupts disabled, translation off, and
-// in 64-bit mode, with:
-//             r13 = save-area pointer, with general context already saved in it
-//             cr6 = feature flags
-// We preserve r13 and cr6.  Other GPRs and CRs, the LR and CTR are used.
-//
-// Current 64-bit processors (GPUL) handle almost all misaligned operations in hardware,
-// so this routine usually isn't called very often.  Only floating pt ops that cross a page
-// boundary and are not word aligned, and LMW/STMW can take exceptions to cacheable memory.
-// However, in contrast to G3 and G4, any misaligned load/store will get an alignment
-// interrupt on uncached memory.
-//
-// We always emulate scalar ops with a series of byte load/stores.  Doing so is no slower
-// than LWZ/STW in cases where a scalar op gets an alignment exception.
-//
-// This routine supports all legal permutations of alignment interrupts occuring in user or
-// supervisor mode, 32 or 64-bit addressing, and translation on or off.  We do not emulate
-// instructions that go past the end of an address space, such as "LHZ -1(0)"; we just pass
-// along the alignment exception rather than wrap around to byte 0.  (Treatment of address
-// space wrap is a moot point in Mac OS X, since we do not map either the last page or
-// page 0.)
-//
-// First, check for a few special cases such as virtual machines, etc.
-
-        .globl EXT(AlignAssist64)
-        .align 5
-LEXT(AlignAssist64)
-        crset  kAlignment                                                              // mark as alignment interrupt
-
-a64AlignAssistJoin:                                                                            // join here from program interrupt handler
-        mfsprg r31,0                                                                   // get the per_proc data ptr
-        mcrf   cr3,cr6                                                                 // save feature flags here...
-        lwz            r21,spcFlags(r31)                                               // grab the special flags
-        ld             r29,savesrr1(r13)                                               // get the MSR etc at the fault
-        ld             r28,savesrr0(r13)                                               // get the EA of faulting instruction
-        mfmsr  r26                                                                             // save MSR at entry
-        rlwinm.        r0,r21,0,runningVMbit,runningVMbit              // Are we running a VM?
-        lwz            r19,dgFlags(0)                                                  // Get the diagnostics flags
-        bne--  a64PassAlong                                                    // yes, let the virtual machine monitor handle
-
-
-// Set up the MSR shadow regs.  We turn on FP in this routine, and usually set DR and RI
-// when accessing user space (the SLB is still set up with all the user space translations.)
-// However, if the interrupt occured in the kernel with DR off, we keep it off while
-// accessing the "target" address space.  If we set DR to access the target space, we also
-// set RI.  The RI bit tells the exception handlers to clear cr0 beq and return if we get an
-// exception accessing the user address space.  We are careful to test cr0 beq after every such
-// access.  We keep the following "shadows" of the MSR in global regs across this code:
-//             r25 = MSR at entry, plus FP and probably DR and RI (used to access target space)
-//             r26 = MSR at entry
-//             r27 = free
-//             r29 = SRR1 (ie, MSR at interrupt)
-// Note that EE and IR are always off, and SF is always on in this code.
-
-               rlwinm  r3,r29,0,MSR_DR_BIT,MSR_DR_BIT                  // was translation on at fault?
-        rlwimi r3,r3,32-MSR_RI_BIT+MSR_DR_BIT,MSR_RI_BIT,MSR_RI_BIT    // if DR was set, set RI too
-        or             r25,r26,r3                                                              // assemble MSR to use accessing target space
-        
-
-// Because the DSISR and DAR are either not set or are not to be trusted on some 64-bit
-// processors on an alignment interrupt, we must fetch the faulting instruction ourselves,
-// then decode/hash the opcode and reconstruct the EA manually.
-
-        mtmsr  r25                                     // turn on FP and (if it was on at fault) DR and RI
-        isync                                          // wait for it to happen
-               cmpw    r0,r0                           // turn on beq so we can check for DSIs
-        lwz            r20,0(r28)                      // fetch faulting instruction, probably with DR on
-        bne--  a64RedriveAsISI         // got a DSI trying to fetch it, pretend it was an ISI
-        mtmsr  r26                                     // turn DR back off
-        isync                                          // wait for it to happen
-
-
-// Set a few flags while we wait for the faulting instruction to arrive from cache.
-
-        rlwinm.        r0,r29,0,MSR_SE_BIT,MSR_SE_BIT                          // Were we single stepping?
-               stw             r20,savemisc2(r13)      // Save the instruction image in case we notify
-        crnot  kTrace,cr0_eq
-        rlwinm.        r0,r19,0,enaNotifyEMb,enaNotifyEMb                      // Should we notify?
-        crnot  kNotify,cr0_eq        
-
-
-// Hash the intruction into a 5-bit value "AAAAB" used to index the branch table, and a
-// 1-bit kUpdate flag, as follows:
-//  Â¥ for X-form instructions (with primary opcode 31):
-//       the "AAAA" bits are bits 21-24 of the instruction
-//       the "B" bit is the XOR of bits 29 and 30
-//       the update bit is instruction bit 25
-//     Â¥ for D and DS-form instructions (actually, any primary opcode except 31):
-//       the "AAAA" bits are bits 1-4 of the instruction
-//       the "B" bit is 0
-//       the update bit is instruction bit 5
-//
-// Just for fun (and perhaps a little speed on deep-pipe machines), we compute the hash,
-// update flag, and EA without branches and with ipc >= 2.
-//
-// When we "bctr" to the opcode-specific reoutine, the following are all set up:
-//             MSR = EE and IR off, SF and FP on
-//             r13 = save-area pointer (physical)
-//             r14 = ptr to saver0 in save-area (ie, to base of GPRs)
-//             r15 = 0x00000000FFFFFFFF if 32-bit mode fault, 0xFFFFFFFFFFFFFFFF if 64
-//             r16 = RA * 8 (ie, reg# not reg value)
-//             r17 = EA
-//             r18 = (RA|0) (reg value)
-//             r19 = -1 if X-form, 0 if D-form
-//             r20 = faulting instruction
-//             r21 = RT * 8 (ie, reg# not reg value)
-//             r22 = addr(aaFPopTable)+(RT*32), ie ptr to floating pt table for target register
-//             r25 = MSR at entrance, probably with DR and RI set (for access to target space)
-//             r26 = MSR at entrance
-//             r27 = free
-//             r28 = SRR0 (ie, EA of faulting instruction)
-//             r29 = SRR1 (ie, MSR at fault)
-//             r30 = scratch, usually user data
-//             r31 = per-proc pointer
-//             cr2 = kTrace, kNotify, and kAlignment flags
-//      cr3 = saved copy of feature flags used in lowmem vector code
-//             cr6 = bits 24-27 of CR are bits 24-27 of opcode if X-form, or bits 4-5 and 00 if D-form
-//                       bit 25 is the kUpdate flag, set for update form instructions
-//             cr7 = bits 28-31 of CR are bits 28-31 of opcode if X-form, or 0 if D-form
-
-a64GotInstruction:                                     // here from program interrupt with instruction in r20
-        rlwinm r21,r20,6+6,20,25       // move the primary opcode (bits 0-6) to bits 20-25
-        la             r14,saver0(r13)         // r14 <- base address of GPR registers
-        xori   r19,r21,0x07C0          // iff primary opcode is 31, set r19 to 0
-        rlwinm r16,r20,16+3,24,28      // r16 <- RA*8
-        subi   r19,r19,1                       // set bit 0 iff X-form (ie, if primary opcode is 31)
-        rlwinm r17,r20,21+3,24,28      // r17 <- RB*8 (if X-form)
-        sradi  r19,r19,63                      // r19 <- -1 if X-form, 0 if D-form
-        extsh  r22,r20                         // r22 <- displacement (if D-form)
-
-        ldx            r23,r14,r17                     // get (RB), if any
-        and            r15,r20,r19                     // instruction if X, 0 if D
-        andc   r17,r21,r19                     // primary opcode in bits 20-25 if D, 0 if X
-        ldx            r18,r14,r16                     // get (RA)
-        subi   r24,r16,1                       // set bit 0 iff RA==0
-        or             r21,r15,r17                     // r21 <- instruction if X, or bits 0-5 in bits 20-25 if D
-        sradi  r24,r24,63                      // r24 <- -1 if RA==0, 0 otherwise
-        rlwinm r17,r21,32-4,25,28      // shift opcode bits 21-24 to 25-28 (hash "AAAA" bits)
-        lis            r10,ha16(a64BranchTable)        // start to build up branch table address
-        rlwimi r17,r21,0,29,29         // move opcode bit 29 into hash as start of "B" bit
-        rlwinm r30,r21,1,29,29         // position opcode bit 30 in position 29
-        and            r12,r23,r19                     // RB if X-form, 0 if D-form
-        andc   r11,r22,r19                     // 0 if X-form, sign extended displacement if D-form
-        xor            r17,r17,r30                     // bit 29 ("B") of hash is xor(bit29,bit30)
-        addi   r10,r10,lo16(a64BranchTable)
-        or             r12,r12,r11                     // r12 <- (RB) or displacement, as appropriate
-        lwzx   r30,r10,r17                     // get address from branch table
-        mtcrf  0x01,r21                        // move opcode bits 28-31 to CR7
-        sradi  r15,r29,32                      // propogate SF bit from SRR1 (MSR_SF, which is bit 0)
-        andc   r18,r18,r24                     // r18 <- (RA|0)
-        mtcrf  0x02,r21                        // move opcode bits 24-27 to CR6 (kUpdate is bit 25)
-        add            r17,r18,r12                     // r17 <- EA, which might need to be clamped to 32 bits
-        mtctr  r30                                     // set up branch address
-        
-        oris   r15,r15,0xFFFF          // start to fill low word of r15 with 1s
-        rlwinm r21,r20,11+3,24,28      // r21 <- RT * 8
-        lis            r22,ha16(EXT(aaFPopTable))      // start to compute address of floating pt table
-        ori            r15,r15,0xFFFF          // now bits 32-63 of r15 are 1s
-        addi   r22,r22,lo16(EXT(aaFPopTable))
-        and            r17,r17,r15                     // clamp EA to 32 bits if necessary
-        rlwimi r22,r21,2,22,26         // move RT into aaFPopTable address (which is 1KB aligned)
-        
-        bf--   kAlignment,a64HandleProgramInt  // return to Program Interrupt handler
-        bctr                                           // if alignment interrupt, jump to opcode-specific routine
-        
-        
-// Floating-pt load single (lfs[u], lfsx[u])
-
-a64LfsLfsx:
-        bl             a64Load4Bytes           // get data in r30
-        mtctr  r22                                     // set up address of "lfs fRT,emfp0(r31)"
-        stw            r30,emfp0(r31)          // put word here for aaFPopTable routine
-        bctrl                                          // do the lfs
-        b              a64UpdateCheck          // update RA if necessary and exit
-        
-        
-// Floating-pt store single (stfs[u], stfsx[u])
-
-a64StfsStfsx:
-        ori            r22,r22,8                       // set dir==1 (ie, single store) in aaFPopTable
-        mtctr  r22                                     // set up address of "stfs fRT,emfp0(r31)"
-        bctrl                                          // execute the store into emfp0
-        lwz            r30,emfp0(r31)          // get the word
-        bl             a64Store4Bytes          // store r30 into user space
-        b              a64UpdateCheck          // update RA if necessary and exit
-        
-
-// Floating-pt store as integer word (stfiwx)
-
-a64Stfiwx:
-        ori            r22,r22,16+8            // set size=1, dir==1 (ie, double store) in aaFPopTable
-        mtctr  r22                                     // set up FP register table address
-        bctrl                                          // double precision store into emfp0
-        lwz            r30,emfp0+4(r31)        // get the low-order word
-        bl             a64Store4Bytes          // store r30 into user space
-        b              a64Exit                         // successfully emulated
-        
-
-// Floating-pt load double (lfd[u], lfdx[u])
-
-a64LfdLfdx:
-        ori            r22,r22,16                      // set Double bit in aaFPopTable address
-        bl             a64Load8Bytes           // get data in r30
-        mtctr  r22                                     // set up address of "lfd fRT,emfp0(r31)"
-        std            r30,emfp0(r31)          // put doubleword here for aaFPopTable routine
-        bctrl                                          // execute the load
-        b              a64UpdateCheck          // update RA if necessary and exit
-
-
-// Floating-pt store double (stfd[u], stfdx[u])
-
-a64StfdStfdx:
-        ori            r22,r22,16+8            // set size=1, dir==1 (ie, double store) in aaFPopTable address
-        mtctr  r22                                     // address of routine to stfd RT
-        bctrl                                          // store into emfp0
-        ld             r30,emfp0(r31)          // get the doubleword
-        bl             a64Store8Bytes          // store r30 into user space
-        b              a64UpdateCheck          // update RA if necessary and exit
-
-
-// Load halfword w 0-fill (lhz[u], lhzx[u])
-
-a64LhzLhzx:
-        bl             a64Load2Bytes           // load into r30 from user space (w 0-fill)
-        stdx   r30,r14,r21                     // store into RT slot in register file
-        b              a64UpdateCheck          // update RA if necessary and exit
-
-
-// Load halfword w sign fill (lha[u], lhax[u])
-
-a64LhaLhax:
-        bl             a64Load2Bytes           // load into r30 from user space (w 0-fill)
-        extsh  r30,r30                         // sign-extend
-        stdx   r30,r14,r21                     // store into RT slot in register file
-        b              a64UpdateCheck          // update RA if necessary and exit
-
-
-// Load halfword byte reversed (lhbrx)
-
-a64Lhbrx:
-        bl             a64Load2Bytes           // load into r30 from user space (w 0-fill)
-        rlwinm r3,r30,8,16,23          // reverse bytes into r3
-        rlwimi r3,r30,24,24,31
-        stdx   r3,r14,r21                      // store into RT slot in register file
-        b              a64Exit                         // successfully emulated
-
-
-// Store halfword (sth[u], sthx[u])
-
-a64SthSthx:
-        ldx            r30,r14,r21                     // get RT
-        bl             a64Store2Bytes          // store r30 into user space
-        b              a64UpdateCheck          // update RA if necessary and exit
-
-
-// Store halfword byte reversed (sthbrx)
-
-a64Sthbrx:
-        addi   r21,r21,6                       // point to low two bytes of RT
-        lhbrx  r30,r14,r21                     // load and reverse
-        bl             a64Store2Bytes          // store r30 into user space
-        b              a64Exit                         // successfully emulated
-
-
-// Load word w 0-fill (lwz[u], lwzx[u]), also lwarx.
-
-a64LwzLwzxLwarx:
-        andc   r3,r19,r20                      // light bit 30 of r3 iff lwarx
-        andi.  r0,r3,2                         // is it lwarx?
-        bne--  a64PassAlong            // yes, never try to emulate a lwarx
-        bl             a64Load4Bytes           // load 4 bytes from user space into r30 (0-filled)
-        stdx   r30,r14,r21                     // update register file
-        b              a64UpdateCheck          // update RA if necessary and exit
-        
-        
-// Load word w sign fill (lwa, lwax[u])
-
-a64Lwa:
-        crclr  kUpdate                         // no update form of lwa (its a reserved encoding)
-a64Lwax:
-        bl             a64Load4Bytes           // load 4 bytes from user space into r30 (0-filled)
-        extsw  r30,r30                         // sign extend
-        stdx   r30,r14,r21                     // update register file
-        b              a64UpdateCheck          // update RA if necessary and exit
-
-
-// Load word byte reversed (lwbrx)
-
-a64Lwbrx:
-        bl             a64Load4Bytes           // load 4 bytes from user space into r30 (0-filled)
-        rlwinm r3,r30,24,0,31          // flip bytes 1234 to 4123
-        rlwimi r3,r30,8,8,15           // r3 is now 4323
-        rlwimi r3,r30,8,24,31          // r3 is now 4321
-        stdx   r3,r14,r21                      // update register file
-        b              a64Exit                         // successfully emulated
-
-        
-// Store word (stw[u], stwx[u])
-
-a64StwStwx:
-        ldx            r30,r14,r21                     // get RT
-        bl             a64Store4Bytes          // store r30 into user space
-        b              a64UpdateCheck          // update RA if necessary and exit
-
-
-// Store word byte reversed (stwbrx)
-
-a64Stwbrx:
-        addi   r21,r21,4                       // point to low word of RT
-        lwbrx  r30,r14,r21                     // load and reverse
-        bl             a64Store4Bytes          // store r30 into user space
-        b              a64Exit                         // successfully emulated
-
-
-// Load doubleword (ld[u], ldx[u]), also lwa.
-
-a64LdLwa:                                                      // these are DS form: ld=0, ldu=1, and lwa=2
-        andi.  r0,r20,2                        // ld[u] or lwa? (test bit 30 of DS field)
-        rlwinm r3,r20,0,30,31          // must adjust EA by subtracting DS field
-        sub            r17,r17,r3
-        and            r17,r17,r15                     // re-clamp to 32 bits if necessary
-        bne            a64Lwa                          // handle lwa
-a64Ldx:
-        bl             a64Load8Bytes           // load 8 bytes from user space into r30
-        stdx   r30,r14,r21                     // update register file
-        b              a64UpdateCheck          // update RA if necessary and exit
-
-
-// Store doubleword (stdx[u], std[u])
-
-a64StdxStwcx:
-        bf--   30,a64PassAlong         // stwcx, so pass along alignment exception
-        b              a64Stdx                         // was stdx
-a64StdStfiwx:
-        bt             30,a64Stfiwx            // handle stfiwx
-        rlwinm.        r3,r20,0,30,31          // must adjust EA by subtracting DS field
-        sub            r17,r17,r3
-        and            r17,r17,r15                     // re-clamp to 32 bits if necessary
-a64Stdx:
-        ldx            r30,r14,r21                     // get RT
-        bl             a64Store8Bytes          // store RT into user space
-        b              a64UpdateCheck          // update RA if necessary and exit
-
-
-// Dcbz and Dcbz128 (bit 10 distinguishes the two forms)
-
-a64DcbzDcbz128:
-        andis. r0,r20,0x0020           // bit 10 set?
-        li             r3,0                            // get a 0 to store
-        li             r0,4                            // assume 32-bit version, store 8 bytes 4x
-        li             r4,_COMM_PAGE_BASE_ADDRESS
-        rldicr r17,r17,0,63-5          // 32-byte align EA
-        beq            a64DcbzSetup            // it was the 32-byte version
-        rldicr r17,r17,0,63-7          // zero low 7 bits of EA
-        li             r0,16                           // store 8 bytes 16x
-a64DcbzSetup:
-        xor            r4,r4,r28                       // was dcbz in the commpage(s)?
-        and            r4,r4,r15                       // mask off high-order bits if 32-bit mode
-        srdi.  r4,r4,12                        // check SRR0
-        bne            a64NotCommpage          // not in commpage
-        rlwinm.        r4,r29,0,MSR_PR_BIT,MSR_PR_BIT  // did fault occur in user mode?
-        beq--  a64NotCommpage          // do not zero cr7 if kernel got alignment exception
-        lwz            r4,savecr(r13)          // if we take a dcbz{128} in the commpage...
-        rlwinm r4,r4,0,0,27            // ...clear user's cr7...
-        stw            r4,savecr(r13)          // ...as a flag for _COMM_PAGE_BIGCOPY
-a64NotCommpage:
-        mtctr  r0
-        cmpw   r0,r0                           // turn cr0 beq on so we can check for DSIs
-        mtmsr  r25                                     // turn on DR and RI so we can address user space
-        isync                                          // wait for it to happen
-a64DcbzLoop:
-        std            r3,0(r17)                       // store into user space
-        bne--  a64RedriveAsDSI
-        addi   r17,r17,8
-        bdnz   a64DcbzLoop
-        
-        mtmsr  r26                                     // restore MSR
-        isync                                          // wait for it to happen
-        b              a64Exit
-
-
-// Load and store multiple (lmw, stmw), distinguished by bit 25
-
-a64LmwStmw:
-        subfic r22,r21,32*8            // how many regs to load or store?
-        srwi   r22,r22,1                       // get bytes to load/store
-        bf             25,a64LoadMultiple      // handle lmw
-        b              a64StoreMultiple        // it was stmw
-        
-        
-// Load string word immediate (lswi)
-
-a64Lswi:
-        rlwinm r22,r20,21,27,31        // get #bytes in r22
-        and            r17,r18,r15                     // recompute EA as (RA|0), and clamp
-        subi   r3,r22,1                        // r22==0?
-        rlwimi r22,r3,6,26,26          // map count of 0 to 32
-        b              a64LoadMultiple
-        
-        
-// Store string word immediate (stswi)
-
-a64Stswi:
-        rlwinm r22,r20,21,27,31        // get #bytes in r22
-        and            r17,r18,r15                     // recompute EA as (RA|0), and clamp
-        subi   r3,r22,1                        // r22==0?
-        rlwimi r22,r3,6,26,26          // map count of 0 to 32
-        b              a64StoreMultiple
-        
-        
-// Load string word indexed (lswx), also lwbrx
-
-a64LswxLwbrx:
-        bf             30,a64Lwbrx                     // was lwbrx
-        ld             r22,savexer(r13)        // get the xer
-        rlwinm r22,r22,0,25,31         // isolate the byte count
-        b              a64LoadMultiple         // join common code
-        
-        
-// Store string word indexed (stswx), also stwbrx
-
-a64StswxStwbrx:
-        bf             30,a64Stwbrx            // was stwbrx
-        ld             r22,savexer(r13)        // get the xer
-        rlwinm r22,r22,0,25,31         // isolate the byte count
-        b              a64StoreMultiple        // join common code
-
-
-// Load multiple words.  This handles lmw, lswi, and lswx.
-
-a64LoadMultiple:                                       // r22 = byte count, may be 0
-        subic. r3,r22,1                        // get (#bytes-1)
-        blt            a64Exit                         // done if 0
-        add            r4,r17,r3                       // get EA of last operand byte
-        and            r4,r4,r15                       // clamp
-        cmpld  r4,r17                          // address space wrap?
-        blt--  a64PassAlong            // pass along exception if so
-        srwi.  r4,r22,2                        // get # full words to load
-        rlwinm r22,r22,0,30,31         // r22 <- leftover byte count
-        cmpwi  cr1,r22,0                       // leftover bytes?
-        beq            a64Lm3                          // no words
-        mtctr  r4                                      // set up word count
-        cmpw   r0,r0                           // set beq for DSI test
-a64Lm2:
-        mtmsr  r25                                     // turn on DR and RI
-        isync                                          // wait for it to happen
-        lbz            r3,0(r17)
-        bne--  a64RedriveAsDSI         // got a DSI
-        lbz            r4,1(r17)
-        bne--  a64RedriveAsDSI         // got a DSI
-        lbz            r5,2(r17)
-        bne--  a64RedriveAsDSI         // got a DSI
-        lbz            r6,3(r17)
-        bne--  a64RedriveAsDSI         // got a DSI
-        rlwinm r30,r3,24,0,7           // pack bytes into r30
-        rldimi r30,r4,16,40
-        rldimi r30,r5,8,48
-        rldimi r30,r6,0,56
-        mtmsr  r26                                     // turn DR back off so we can store into register file
-        isync
-        addi   r17,r17,4                       // bump EA
-        stdx   r30,r14,r21                     // pack into register file
-        addi   r21,r21,8                       // bump register file offset
-        rlwinm r21,r21,0,24,28         // wrap around to 0
-        bdnz   a64Lm2
-a64Lm3:                                                                // cr1/r22 = leftover bytes (0-3), cr0 beq set
-        beq            cr1,a64Exit                     // no leftover bytes
-        mtctr  r22
-        mtmsr  r25                                     // turn on DR so we can access user space
-        isync
-        lbz            r3,0(r17)                       // get 1st leftover byte
-        bne--  a64RedriveAsDSI         // got a DSI
-        rlwinm r30,r3,24,0,7           // position in byte 4 of r30 (and clear rest of r30)
-        bdz            a64Lm4                          // only 1 byte leftover
-        lbz            r3,1(r17)                       // get 2nd byte
-        bne--  a64RedriveAsDSI         // got a DSI
-        rldimi r30,r3,16,40            // insert into byte 5 of r30
-        bdz            a64Lm4                          // only 2 bytes leftover
-        lbz            r3,2(r17)                       // get 3rd byte
-        bne--  a64RedriveAsDSI         // got a DSI
-        rldimi r30,r3,8,48                     // insert into byte 6
-a64Lm4:
-        mtmsr  r26                                     // turn DR back off so we can store into register file
-        isync
-        stdx   r30,r14,r21                     // pack partially-filled word into register file
-        b              a64Exit
-
-
-// Store multiple words.  This handles stmw, stswi, and stswx.
-
-a64StoreMultiple:                                      // r22 = byte count, may be 0
-        subic. r3,r22,1                        // get (#bytes-1)
-        blt            a64Exit                         // done if 0
-        add            r4,r17,r3                       // get EA of last operand byte
-        and            r4,r4,r15                       // clamp
-        cmpld  r4,r17                          // address space wrap?
-        blt--  a64PassAlong            // pass along exception if so
-        srwi.  r4,r22,2                        // get # full words to load
-        rlwinm r22,r22,0,30,31         // r22 <- leftover byte count
-        cmpwi  cr1,r22,0                       // leftover bytes?
-        beq            a64Sm3                          // no words
-        mtctr  r4                                      // set up word count
-        cmpw   r0,r0                           // turn on beq so we can check for DSIs
-a64Sm2:
-        ldx            r30,r14,r21                     // get next register
-        addi   r21,r21,8                       // bump register file offset
-        rlwinm r21,r21,0,24,28         // wrap around to 0
-        srwi   r3,r30,24                       // shift the four bytes into position
-        srwi   r4,r30,16
-        srwi   r5,r30,8
-        mtmsr  r25                                     // turn on DR so we can access user space
-        isync                                          // wait for it to happen
-        stb            r3,0(r17)
-        bne--  a64RedriveAsDSI         // got a DSI
-        stb            r4,1(r17)
-        bne--  a64RedriveAsDSI         // got a DSI
-        stb            r5,2(r17)
-        bne--  a64RedriveAsDSI         // got a DSI
-        stb            r30,3(r17)
-        bne--  a64RedriveAsDSI         // got a DSI
-        mtmsr  r26                                     // turn DR back off
-        isync
-        addi   r17,r17,4                       // bump EA
-        bdnz   a64Sm2
-a64Sm3:                                                                // r22 = 0-3, cr1 set on r22, cr0 beq set
-        beq            cr1,a64Exit                     // no leftover bytes
-        ldx            r30,r14,r21                     // get last register
-        mtctr  r22
-        mtmsr  r25                                     // turn on DR so we can access user space
-        isync                                          // wait for it to happen
-a64Sm4:
-        rlwinm r30,r30,8,0,31          // position next byte
-        stb            r30,0(r17)                      // pack into user space
-        addi   r17,r17,1                       // bump user space ptr
-        bne--  a64RedriveAsDSI         // got a DSI
-        bdnz   a64Sm4
-        mtmsr  r26                                     // turn DR back off
-        isync
-        b              a64Exit
-
-
-// Subroutines to load bytes from user space.
-
-a64Load2Bytes:                                         // load 2 bytes right-justified into r30
-        addi   r7,r17,1                        // get EA of last byte
-        and            r7,r7,r15                       // clamp
-        cmpld  r7,r17                          // address wrap?
-        blt--  a64PassAlong            // yes
-        mtmsr  r25                                     // turn on DR so we can access user space
-        isync                                          // wait for it to happen
-        sub.   r30,r30,r30                     // 0-fill dest and set beq
-        b              a64Load2                        // jump into routine
-a64Load4Bytes:                                         // load 4 bytes right-justified into r30 (ie, low order word)
-        addi   r7,r17,3                        // get EA of last byte
-        and            r7,r7,r15                       // clamp
-        cmpld  r7,r17                          // address wrap?
-        blt--  a64PassAlong            // yes
-        mtmsr  r25                                     // turn on DR so we can access user space
-        isync                                          // wait for it to happen
-        sub.   r30,r30,r30                     // 0-fill dest and set beq
-        b              a64Load4                        // jump into routine
-a64Load8Bytes:                                         // load 8 bytes into r30
-        addi   r7,r17,7                        // get EA of last byte
-        and            r7,r7,r15                       // clamp
-        cmpld  r7,r17                          // address wrap?
-        blt--  a64PassAlong            // yes
-        mtmsr  r25                                     // turn on DR so we can access user space
-        isync                                          // wait for it to happen
-        sub.   r30,r30,r30                     // 0-fill dest and set beq
-        lbz            r3,-7(r7)                       // get byte 0
-        bne--  a64RedriveAsDSI         // got a DSI
-        lbz            r4,-6(r7)                       // and byte 1, etc
-        bne--  a64RedriveAsDSI         // got a DSI
-        lbz            r5,-5(r7)
-        bne--  a64RedriveAsDSI         // got a DSI
-        lbz            r6,-4(r7)
-        bne--  a64RedriveAsDSI         // got a DSI
-        rldimi r30,r3,56,0                     // position bytes in upper word
-        rldimi r30,r4,48,8
-        rldimi r30,r5,40,16
-        rldimi r30,r6,32,24
-a64Load4:
-        lbz            r3,-3(r7)
-        bne--  a64RedriveAsDSI         // got a DSI
-        lbz            r4,-2(r7)
-        bne--  a64RedriveAsDSI         // got a DSI
-        rldimi r30,r3,24,32            // insert bytes 4 and 5 into r30
-        rldimi r30,r4,16,40
-a64Load2:
-        lbz            r3,-1(r7)
-        bne--  a64RedriveAsDSI         // got a DSI
-        lbz            r4,0(r7)
-        bne--  a64RedriveAsDSI         // got a DSI
-        mtmsr  r26                                     // turn DR back off
-        isync
-        rldimi r30,r3,8,48                     // insert bytes 6 and 7 into r30
-        rldimi r30,r4,0,56
-        blr
-        
-        
-// Subroutines to store bytes into user space.
-
-a64Store2Bytes:                                                // store bytes 6 and 7 of r30
-        addi   r7,r17,1                        // get EA of last byte
-        and            r7,r7,r15                       // clamp
-        cmpld  r7,r17                          // address wrap?
-        blt--  a64PassAlong            // yes
-        mtmsr  r25                                     // turn on DR so we can access user space
-        isync                                          // wait for it to happen
-        cmpw   r0,r0                           // set beq so we can check for DSI
-        b              a64Store2                       // jump into routine
-a64Store4Bytes:                                                // store bytes 4-7 of r30 (ie, low order word)
-        addi   r7,r17,3                        // get EA of last byte
-        and            r7,r7,r15                       // clamp
-        cmpld  r7,r17                          // address wrap?
-        blt--  a64PassAlong            // yes
-        mtmsr  r25                                     // turn on DR so we can access user space
-        isync                                          // wait for it to happen
-        cmpw   r0,r0                           // set beq so we can check for DSI
-        b              a64Store4                       // jump into routine
-a64Store8Bytes:                                                // r30 = bytes
-        addi   r7,r17,7                        // get EA of last byte
-        and            r7,r7,r15                       // clamp
-        cmpld  r7,r17                          // address wrap?
-        blt--  a64PassAlong            // yes
-        mtmsr  r25                                     // turn on DR so we can access user space
-        isync                                          // wait for it to happen
-        cmpw   r0,r0                           // set beq so we can check for DSI
-        rotldi r3,r30,8                        // shift byte 0 into position
-        rotldi r4,r30,16                       // and byte 1
-        rotldi r5,r30,24                       // and byte 2
-        rotldi r6,r30,32                       // and byte 3
-        stb            r3,-7(r7)                       // store byte 0
-        bne--  a64RedriveAsDSI         // got a DSI
-        stb            r4,-6(r7)                       // and byte 1 etc...
-        bne--  a64RedriveAsDSI         // got a DSI
-        stb            r5,-5(r7)
-        bne--  a64RedriveAsDSI         // got a DSI
-        stb            r6,-4(r7)
-        bne--  a64RedriveAsDSI         // got a DSI
-a64Store4:
-        rotldi r3,r30,40                       // shift byte 4 into position
-        rotldi r4,r30,48                       // and byte 5
-        stb            r3,-3(r7)
-        bne--  a64RedriveAsDSI         // got a DSI
-        stb            r4,-2(r7)
-        bne--  a64RedriveAsDSI         // got a DSI
-a64Store2:
-        rotldi r3,r30,56                       // shift byte 6 into position
-        stb            r3,-1(r7)                       // store byte 6
-        bne--  a64RedriveAsDSI         // got a DSI
-        stb            r30,0(r7)                       // store byte 7, which is already positioned
-        bne--  a64RedriveAsDSI         // got a DSI
-        mtmsr  r26                                     // turn off DR
-        isync
-        blr
-        
-                
-// Exit routines.
-
-a64ExitEm:
-               li              r30,T_EMULATE                   // Change exception code to emulate
-               stw             r30,saveexception(r13)  // Save it
-               b               a64Exit                                 // Join standard exit routine...
-
-a64PassAlong:                                                  // unhandled exception, just pass it along
-        crset  kNotify                                 // return T_ALIGNMENT or T_PROGRAM
-        crclr  kTrace                                  // not a trace interrupt
-        b              a64Exit1
-a64UpdateCheck:                                                        // successfully emulated, may be update form
-        bf             kUpdate,a64Exit                 // update?
-        stdx   r17,r14,r16                             // yes, store EA into RA
-a64Exit:                                                               // instruction successfully emulated
-        addi   r28,r28,4                               // bump SRR0 past the emulated instruction
-        li             r30,T_IN_VAIN                   // eat the interrupt since we emulated it
-        and            r28,r28,r15                             // clamp to address space size (32 vs 64)
-        std            r28,savesrr0(r13)               // save, so we return to next instruction
-a64Exit1:
-        bt--   kTrace,a64Trace                 // were we in single-step at fault?
-        bt--   kNotify,a64Notify               // should we say T_ALIGNMENT anyway?
-a64Exit2:
-        mcrf   cr6,cr3                                 // restore feature flags
-        mr             r11,r30                                 // pass back exception code (T_IN_VAIN etc) in r11
-        b              EXT(EmulExit)                   // return to exception processing
-
-
-// Notification requested: pass exception upstairs even though it might have been emulated.
-
-a64Notify:
-        li             r30,T_ALIGNMENT                 // somebody wants to know about it (but don't redrive)
-        bt             kAlignment,a64Exit2             // was an alignment exception
-        li             r30,T_PROGRAM                   // was an emulated instruction
-        b              a64Exit2
-
-
-// Emulate a trace interrupt after handling alignment interrupt.
-
-a64Trace:
-        lwz            r9,SAVflags(r13)                // get the save-area flags
-        li             r30,T_TRACE
-        oris   r9,r9,hi16(SAVredrive)  // Set the redrive bit
-        stw            r30,saveexception(r13)  // Set the exception code
-        stw            r9,SAVflags(r13)                // Set the flags
-        b              a64Exit2                                // Exit and do trace interrupt...
-
-
-// Got a DSI accessing user space.  Redrive.  One way this can happen is if another
-// processor removes a mapping while we are emulating.
-
-a64RedriveAsISI:                                               // this DSI happened fetching the opcode (r1==DSISR  r4==DAR)
-        mtmsr  r26                                             // turn DR back off
-        isync                                                  // wait for it to happen
-        li             r30,T_INSTRUCTION_ACCESS
-        rlwimi r29,r1,0,0,4                    // insert the fault type from DSI's DSISR
-        std            r29,savesrr1(r13)               // update SRR1 to look like an ISI
-        b              a64Redrive
-
-a64RedriveAsDSI:                                               // r0==DAR  r1==DSISR
-        mtmsr  r26                                             // turn DR back off
-        isync                                                  // wait for it to happen
-        stw            r1,savedsisr(r13)               // Set the DSISR of failed access
-        std            r0,savedar(r13)                 // Set the address of the failed access
-        li             r30,T_DATA_ACCESS               // Set failing data access code
-a64Redrive:
-        lwz            r9,SAVflags(r13)                // Pick up the flags
-        stw            r30,saveexception(r13)  // Set the replacement code
-        oris   r9,r9,hi16(SAVredrive)  // Set the redrive bit
-        stw            r9,SAVflags(r13)                // Set redrive request
-        crclr  kTrace                                  // don't take a trace interrupt
-        crclr  kNotify                                 // don't pass alignment exception
-        b              a64Exit2                                // done
-        
-
-// This is the branch table, indexed by the "AAAAB" opcode hash.
-
-a64BranchTable:
-        .long  a64LwzLwzxLwarx         // 00000  lwz[u], lwzx[u], lwarx
-        .long  a64Ldx                          // 00001  ldx[u]
-        .long  a64PassAlong            // 00010  ldarx         (never emulate these)
-        .long  a64PassAlong            // 00011
-        .long  a64StwStwx                      // 00100  stw[u], stwx[u]
-        .long  a64StdxStwcx            // 00101  stdx[u], stwcx
-        .long  a64PassAlong            // 00110
-        .long  a64PassAlong            // 00111  stdcx         (never emulate these)
-        .long  a64LhzLhzx                      // 01000  lhz[u], lhzx[u]
-        .long  a64PassAlong            // 01001
-        .long  a64LhaLhax                      // 01010  lha[u], lhax[u]
-        .long  a64Lwax                         // 01011  lwax[u]
-        .long  a64SthSthx                      // 01100  sth[u], sthx[u]
-        .long  a64PassAlong            // 01101
-        .long  a64LmwStmw                      // 01110  lmw, stmw
-        .long  a64PassAlong            // 01111
-        .long  a64LfsLfsx                      // 10000  lfs[u], lfsx[u]
-        .long  a64LswxLwbrx            // 10001  lswx, lwbrx
-        .long  a64LfdLfdx                      // 10010  lfd[u], lfdx[u]
-        .long  a64Lswi                         // 10011  lswi
-        .long  a64StfsStfsx            // 10100  stfs[u], stfsx[u]
-        .long  a64StswxStwbrx          // 10101  stswx, stwbrx
-        .long  a64StfdStfdx            // 10110  stfd[u], stfdx[u]
-        .long  a64Stswi                        // 10111  stswi
-        .long  a64PassAlong            // 11000
-        .long  a64Lhbrx                        // 11001  lhbrx
-        .long  a64LdLwa                        // 11010  ld[u], lwa
-        .long  a64PassAlong            // 11011
-        .long  a64PassAlong            // 11100
-        .long  a64Sthbrx                       // 11101  sthbrx
-        .long  a64StdStfiwx            // 11110  std[u], stfiwx
-        .long  a64DcbzDcbz128          // 11111  dcbz, dcbz128
-
-
index a3b93c6c766a74d6bc086e134ac9bbd9d6191989..23b25171f3b7b6fe19991889485599f5af834d07 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -41,9 +38,6 @@
 #error This file is only useful on PowerPC.
 #endif
 
-#include <mach/vm_types.h>
-#include <ppc/Diagnostics.h>
-
 /*
  *     This routine is used to write debug output to either the modem or printer port.
  *     parm 1 is printer (0) or modem (1); parm 2 is ID (printed directly); parm 3 converted to hex
@@ -54,18 +48,14 @@ void dbgLog(unsigned int d0, unsigned int d1, unsigned int d2, unsigned int d3);
 void dbgLog2(unsigned int type, unsigned int p1, unsigned int p2);
 void dbgDispLL(unsigned int port, unsigned int id, unsigned int data);
 void fwSCCinit(unsigned int port);
-void fwEmMck(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int);      /* Start injecting */ 
-void fwSCOM(scomcomm *);       /* Read/Write SCOM */ 
-void setPmon(unsigned int, unsigned int);      /* Set perf mon stuff */ 
 
-extern void dbgTrace(unsigned int item1, unsigned int item2, unsigned int item3, unsigned int item4);
+extern void dbgTrace(unsigned int item1, unsigned int item2, unsigned int item3);
 #if 0          /* (TEST/DEBUG) - eliminate inline */
-extern __inline__ void dbgTrace(unsigned int item1, unsigned int item2, unsigned int item3, unsigned int item4) {
+extern __inline__ void dbgTrace(unsigned int item1, unsigned int item2, unsigned int item3) {
  
                __asm__ volatile("mr   r3,%0" : : "r" (item1) : "r3");
                __asm__ volatile("mr   r4,%0" : : "r" (item2) : "r4");
                __asm__ volatile("mr   r5,%0" : : "r" (item3) : "r5");
-               __asm__ volatile("mr   r6,%0" : : "r" (item3) : "r6");
         __asm__ volatile("lis  r0,hi16(CutTrace)" : : : "r0");
         __asm__ volatile("ori  r0,r0,lo16(CutTrace)" : : : "r0");
         __asm__ volatile("sc");
@@ -117,7 +107,7 @@ extern __inline__ void ChokeSys(unsigned int ercd) {
 typedef struct Boot_Video bootBumbleC;
 
 extern void StoreReal(unsigned int val, unsigned int addr);
-extern void ReadReal(addr64_t raddr, unsigned int *vaddr);
+extern void ReadReal(unsigned int raddr, unsigned int *vaddr);
 extern void ClearReal(unsigned int addr, unsigned int lgn);
 extern void LoadDBATs(unsigned int *bat);
 extern void LoadIBATs(unsigned int *bat);
@@ -129,7 +119,6 @@ extern void GratefulDebInit(bootBumbleC *boot_video_info);
 extern void GratefulDebDisp(unsigned int coord, unsigned int data);
 extern void checkNMI(void);
 
-#pragma pack(1)                                                        /* Make sure the structure stays as we defined it */
 typedef struct GDWorkArea {                    /* Grateful Deb work area one per processor */
 
 /*     Note that a lot of info is duplicated for each processor */
@@ -155,7 +144,6 @@ typedef struct GDWorkArea {                 /* Grateful Deb work area one per processor */
        unsigned int GDrowbuf2[128];    /* Buffer to an 8 character row */
 
 } GDWorkArea;
-#pragma pack()
 #define GDfontsize 16
 #define GDdispcols 2
 
index 21743295a41658a9927bdf4c1ca365076f2e5cd8..3c16dd1dfbc330ed82f0a438222e6562d7fe0c43 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -43,6 +40,7 @@
 #include <ppc/asm.h>
 #include <ppc/proc_reg.h>
 #include <ppc/spec_reg.h>
+#include <ppc/POWERMAC/mp/MPPlugIn.h>
 #include <ppc/exception.h>
 #include <mach/machine/vm_param.h>
 #include <assym.s>
@@ -82,57 +80,54 @@ EXT(FWtable):
  *                     R3 is as passed in by the user.  All others must be gotten from the save area
  */
 
-
-                       .align  5
-                       .globl  EXT(FirmwareCall)
-
-LEXT(FirmwareCall)
+ENTRY(FirmwareCall, TAG_NO_FRAME_USED)
                
                        rlwinm  r1,r0,2,1,29                                    /* Clear out bit 0 and multiply by 4 */
                        lis             r12,HIGH_ADDR(EXT(FWtable))             /* Get the high part of the firmware call table */
                        cmplwi  r1,EXT(FirmwareCnt)*4                   /* Is it a valid firmware call number */
+                       mflr    r11                                                             /* Save the return */
                        ori             r12,r12,LOW_ADDR(EXT(FWtable))  /* Now the low part */
                        ble+    goodCall                                                /* Yeah, it is... */
                        
                        li              r3,T_SYSTEM_CALL                                /* Tell the vector handler that we know nothing */
-                       b               EXT(FCReturn)                                   ; Bye dudes...
+                       blr                                                                             /* Return for errors... */
                        
 goodCall:      mfsprg  r10,0                                                   /* Make sure about the per_proc block */
                        lwzx    r1,r1,r12                                               /* Pick up the address of the routine */
-                       lwz             r4,saver4+4(r13)                                /* Pass in caller's R4 */
-                       lwz             r5,saver5+4(r13)                                /* Pass in caller's R5 */
+                       lwz             r4,saver4(r13)                                  /* Pass in caller's R4 */
+                       lwz             r5,saver5(r13)                                  /* Pass in caller's R5 */
                        rlwinm. r1,r1,0,0,29                                    /* Make sure the flag bits are clear */
+                       stw             r11,PP_TEMPWORK1(r10)                   /* Save our return point */
 
                        mtlr    r1                                                              /* Put it in the LR */
                        beq-    callUnimp                                               /* This one was unimplimented... */
 
                        blrl                                                                    /* Call the routine... */
 
-                       stw             r3,saver3+4(r13)                                /* Pass back the return code to caller */
+                       mfsprg  r10,0                                                   /* Make sure about the per_proc again */
+                       stw             r3,saver3(r13)                                  /* Pass back the return code to caller */
+                       lwz             r11,PP_TEMPWORK1(r10)                   /* Get our return point */
                        li              r3,T_IN_VAIN                                    /* Tell the vector handler that we took care of it */
-                       b               EXT(FCReturn)                                   ; Bye dudes...
+                       mtlr    r11                                                             /* Set the return */
+                       blr                                                                             /* Bye, dudes... */
        
-callUnimp:     li              r3,T_SYSTEM_CALL                                /* Tell the vector handler that we know nothing */
-                       b               EXT(FCReturn)                                   ; Bye dudes...
+callUnimp:     lwz             r11,PP_TEMPWORK1(r10)                   /* Restore the return address */
+                       li              r3,T_SYSTEM_CALL                                /* Tell the vector handler that we know nothing */
+                       mtlr    r11                                                             /* Restore the LR */
+                       blr                                                                             /* Return for errors... */
 
 /*
  *                     This routine is used to store using a real address. It stores parmeter1 at parameter2.
  */
 
-                       .align  5
-                       .globl  EXT(StoreReal)
-
-LEXT(StoreReal)
+ENTRY(StoreReal, TAG_NO_FRAME_USED)
 
                        lis             r0,HIGH_ADDR(StoreRealCall)             /* Get the top part of the SC number */
                        ori             r0,r0,LOW_ADDR(StoreRealCall)   /* and the bottom part */
                        sc                                                                              /* Do it to it */
                        blr                                                                             /* Bye bye, Birdie... */
                        
-                       .align  5
-                       .globl  EXT(StoreRealLL)
-
-LEXT(StoreRealLL)
+ENTRY(StoreRealLL, TAG_NO_FRAME_USED)
 
                        stw             r3,0(r4)                                                /* Store the word */
                        blr                                                                             /* Leave... */
@@ -140,22 +135,15 @@ LEXT(StoreRealLL)
 /*
  *                     This routine is used to clear a range of physical pages.
  */
-                       
-                       .align  5
-                       .globl  EXT(ClearReal)
 
-LEXT(ClearReal)
+ENTRY(ClearReal, TAG_NO_FRAME_USED)
 
                        lis             r0,HIGH_ADDR(ClearRealCall)             /* Get the top part of the SC number */
                        ori             r0,r0,LOW_ADDR(ClearRealCall)   /* and the bottom part */
                        sc                                                                              /* Do it to it */
                        blr                                                                             /* Bye bye, Birdie... */
                        
-                       
-                       .align  5
-                       .globl  EXT(ClearRealLL)
-
-LEXT(ClearRealLL)
+ENTRY(ClearRealLL, TAG_NO_FRAME_USED)
 
 /*
  *                     We take the first parameter as a physical address.  The second is the length in bytes.
@@ -184,56 +172,30 @@ clrloop:  subi    r4,r4,32                                                /* Back off a cache line */
 /*
  *                     This routine will read in 32 byte of real storage.
  */
-                       
-                       .align  5
-                       .globl  EXT(ReadReal)
-
-LEXT(ReadReal)
-
-                       mfsprg  r9,2                                                    ; Get the features
-                       mfmsr   r0                                                              ; Get the MSR 
-                       li              r8,lo16(MASK(MSR_DR))                   ; Get the DR bit
-                       rlwinm. r9,r9,0,pf64Bitb,pf64Bitb               ; Are we 64-bit?
-                       ori             r8,r8,lo16(MASK(MSR_EE))                ; Add in the EE bit
-                       li              r7,1                                                    ; Get set for it
-                       andc    r8,r0,r8                                                ; Turn off EE and DR
-                       bt--    cr0_eq,rr32a                                    ; Yes, we are...
-                       
-                       rldimi  r8,r7,63,MSR_SF_BIT                             ; Set SF bit (bit 0)
-                       sldi    r3,r3,32                                                ; Slide on over for true 64-bit address
-                       mtmsrd  r8
-                       isync
-                       or              r3,r3,r4                                                ; Join top and bottom of address
-                       mr              r4,r5                                                   ; Set destination address
-                       b               rrJoina                                                 ; Join on up...
-                       
-rr32a:         mr              r3,r4                                                   ; Position bottom of long long
-                       mr              r4,r5                                                   ; Set destination address
-                       mtmsr   r8                                                              /* Disable EE and DR */
+ENTRY(ReadReal, TAG_NO_FRAME_USED)
+
+                       mfmsr   r0                                                              /* Get the MSR */
+                       rlwinm  r5,r0,0,28,26                                   /* Clear DR bit */
+                       rlwinm  r5,r5,0,17,15                                   /* Clear EE bit */
+                       mtmsr   r5                                                              /* Disable EE and DR */
                        isync                                                                   /* Just make sure about it */
                        
-rrJoina:       lwz             r5,0(r3)                                                /* Get word 0 */
+                       lwz             r5,0(r3)                                                /* Get word 0 */
                        lwz             r6,4(r3)                                                /* Get word 1 */
                        lwz             r7,8(r3)                                                /* Get word 2 */
                        lwz             r8,12(r3)                                               /* Get word 3 */
-                       lis             r2,hi16(MASK(MSR_VEC))                  ; Get the vector enable 
+                       rlwinm  r0,r0,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
                        lwz             r9,16(r3)                                               /* Get word 4 */
-                       ori             r2,r2,lo16(MASK(MSR_FP))                ; Get the FP enable 
                        lwz             r10,20(r3)                                              /* Get word 5 */
-                       andc    r0,r0,r2                                                ; Clear VEC and FP enables
+                       rlwinm  r0,r0,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
                        lwz             r11,24(r3)                                              /* Get word 6 */
                        lwz             r12,28(r3)                                              /* Get word 7 */
                        
-                       bt--    cr0_eq,rr32b                                    ; We are not 64-bit...
-
-                       mtmsrd  r0
-                       isync
-                       b               rrJoinb                                                 ; Join on up...
-
-rr32b:         mtmsr   r0                                                              /* Restore original machine state */
+                       mtmsr   r0                                                              /* Restore original machine state */
                        isync                                                                   /* Insure goodness */
                        
-rrJoinb:       stw             r5,0(r4)                                                /* Set word 0 */
+                       stw             r5,0(r4)                                                /* Set word 0 */
                        stw             r6,4(r4)                                                /* Set word 1 */
                        stw             r7,8(r4)                                                /* Set word 2 */
                        stw             r8,12(r4)                                               /* Set word 3 */
@@ -248,12 +210,8 @@ rrJoinb:   stw             r5,0(r4)                                                /* Set word 0 */
 /*
  *                     This routine is used to load all 4 DBATs.
  */
-                       
-                       .align  5
-                       .globl  EXT(LoadDBATs)
-
-LEXT(LoadDBATs)
 
+ENTRY(LoadDBATs, TAG_NO_FRAME_USED)
 
                        lis             r0,HIGH_ADDR(LoadDBATsCall)             /* Top half of LoadDBATsCall firmware call number */
                        ori             r0,r0,LOW_ADDR(LoadDBATsCall)   /* Bottom half */
@@ -261,11 +219,7 @@ LEXT(LoadDBATs)
 
                        blr                                                                             /* Bye bye, Birdie... */
                        
-                       
-                       .align  5
-                       .globl  EXT(xLoadDBATsLL)
-
-LEXT(xLoadDBATsLL)
+ENTRY(xLoadDBATsLL, TAG_NO_FRAME_USED)
 
                        lwz             r4,0(r3)                                                /* Get DBAT 0 high */
                        lwz             r5,4(r3)                                                /* Get DBAT 0 low */
@@ -294,21 +248,14 @@ LEXT(xLoadDBATsLL)
  *                     This routine is used to load all 4 IBATs.
  */
 
-                       .align  5
-                       .globl  EXT(LoadIBATs)
-
-LEXT(LoadIBATs)
-
+ENTRY(LoadIBATs, TAG_NO_FRAME_USED)
 
                        lis             r0,HIGH_ADDR(LoadIBATsCall)             /* Top half of LoadIBATsCall firmware call number */
                        ori             r0,r0,LOW_ADDR(LoadIBATsCall)   /* Bottom half */
                        sc                                                                              /* Do it to it */
                        blr                                                                             /* Bye bye, Birdie... */
                        
-                       .align  5
-                       .globl  EXT(xLoadIBATsLL)
-
-LEXT(xLoadIBATsLL)
+ENTRY(xLoadIBATsLL, TAG_NO_FRAME_USED)
 
                        lwz             r4,0(r3)                                                /* Get IBAT 0 high */
                        lwz             r5,4(r3)                                                /* Get IBAT 0 low */
@@ -337,11 +284,8 @@ LEXT(xLoadIBATsLL)
 /*
  *                     This is the glue to call the CutTrace firmware call
  */
-                       
-                       .align  5
-                       .globl  EXT(dbgTrace)
-
-LEXT(dbgTrace)
+ENTRY(dbgTrace, TAG_NO_FRAME_USED)
                        
                        lis             r0,HIGH_ADDR(CutTrace)                  /* Top half of CreateFakeIO firmware call number */
                        ori             r0,r0,LOW_ADDR(CutTrace)                /* Bottom half */
@@ -351,11 +295,8 @@ LEXT(dbgTrace)
 /*
  *                     This is the glue to create a fake I/O interruption
  */
-                       
-                       .align  5
-                       .globl  EXT(CreateFakeIO)
-
-LEXT(CreateFakeIO)
+ENTRY(CreateFakeIO, TAG_NO_FRAME_USED)
                        
                        lis             r0,HIGH_ADDR(CreateFakeIOCall)  /* Top half of CreateFakeIO firmware call number */
                        ori             r0,r0,LOW_ADDR(CreateFakeIOCall)        /* Bottom half */
@@ -365,18 +306,14 @@ LEXT(CreateFakeIO)
 /*
  *                     This is the glue to create a fake Dec interruption
  */
-                       
-                       .align  5
-                       .globl  EXT(CreateFakeDEC)
-
-LEXT(CreateFakeDEC)
+ENTRY(CreateFakeDEC, TAG_NO_FRAME_USED)
                        
 #if 0
                        mflr    r4                                                              ; (TEST/DEBUG)
                        bl              EXT(ml_sense_nmi)                               ; (TEST/DEBUG)
                        mtlr    r4                                                              ; (TEST/DEBUG)
-#endif                 
-                       
+#endif
                        lis             r0,HIGH_ADDR(CreateFakeDECCall) /* Top half of CreateFakeDEC firmware call number */
                        ori             r0,r0,LOW_ADDR(CreateFakeDECCall)       /* Bottom half */
                        sc                                                                              /* Do it to it */
@@ -387,10 +324,7 @@ LEXT(CreateFakeDEC)
  *                     This is the glue to create a shutdown context
  */
  
-                       .align  5
-                       .globl  EXT(CreateShutdownCTX)
-
-LEXT(CreateShutdownCTX)
+ENTRY(CreateShutdownCTX, TAG_NO_FRAME_USED)
                        
                        lis             r0,HIGH_ADDR(CreateShutdownCTXCall)     /* Top half of CreateFakeIO firmware call number */
                        ori             r0,r0,LOW_ADDR(CreateShutdownCTXCall)   /* Bottom half */
@@ -400,11 +334,8 @@ LEXT(CreateShutdownCTX)
 /*
  *                     This is the glue to choke system
  */
-  
-                       .align  5
-                       .globl  EXT(ChokeSys)
-
-LEXT(ChokeSys)
+ENTRY(ChokeSys, TAG_NO_FRAME_USED)
                        
                        lis             r0,HIGH_ADDR(Choke)                             /* Top half of Choke firmware call number */
                        ori             r0,r0,LOW_ADDR(Choke)                   /* Bottom half */
@@ -415,11 +346,8 @@ LEXT(ChokeSys)
  *                     Used to initialize the SCC for debugging output
  */
 
-  
-                       .align  5
-                       .globl  EXT(fwSCCinit)
 
-LEXT(fwSCCinit)
+ENTRY(fwSCCinit, TAG_NO_FRAME_USED)
                
                        mfmsr   r8                                                                              /* Save the MSR */
                        mr.             r3,r3                                                                   /* See if printer or modem */
@@ -704,11 +632,8 @@ wSCCrdy:   eieio                                                                                   /* Barricade it */
  *                     This routine is used to write debug output to either the modem or printer port.
  *                     parm 1 is printer (0) or modem (1); parm 2 is ID (printed directly); parm 3 converted to hex
  */
-  
-                       .align  5
-                       .globl  EXT(dbgDisp)
 
-LEXT(dbgDisp)
+ENTRY(dbgDisp, TAG_NO_FRAME_USED)
 
                        mr              r12,r0                                                                  /* Keep R0 pristene */
                        lis             r0,HIGH_ADDR(dbgDispCall)                               /* Top half of dbgDispCall firmware call number */
@@ -721,10 +646,7 @@ LEXT(dbgDisp)
                        
 /*                     Here's the low-level part of dbgDisp                    */
 
-                       .align  5
-                       .globl  EXT(dbgDispLL)
-
-LEXT(dbgDispLL)
+ENTRY(dbgDispLL, TAG_NO_FRAME_USED)
 
 dbgDispInt:    mfmsr   r8                                                                              /* Save the MSR */
 
@@ -1107,22 +1029,21 @@ hexTab:         STRINGD "0123456789ABCDEF"                                              /* Convert hex numbers to printable hex
  */
  
 
-                       .align  5
-                       .globl  EXT(dbgRegsLL)
-
-LEXT(dbgRegsLL)
+ENTRY(dbgRegsLL, TAG_NO_FRAME_USED)
 
-                       b               EXT(FCReturn)                                   ; Bye dudes...
-#if 0
                        li              r3,0                                                                    /* ? */
                        bl              dbgRegsCm                                                               /* Join on up... */
-                       b               EXT(FCReturn)                                   ; Bye dudes...
-                       
-                       
-                       .align  5
-                       .globl  EXT(dbgRegs)
 
-LEXT(dbgRegs)
+/*
+ *                     Note that we bypass the normal return 'cause we don't wanna mess up R3
+ */
+                       mfsprg  r11,0                                                                   /* Get the per_proc */
+                       lwz             r11,PP_TEMPWORK1(r11)                                   /* Get our return point */
+                       li              r3,T_IN_VAIN                                                    /* Tell the vector handler that we took care of it */
+                       mtlr    r11                                                                             /* Set the return */
+                       blr                                                                                             /* Bye, dudes... */
+                       
+ENTRY(dbgRegs, TAG_NO_FRAME_USED)
 
 dbgRegsCm:     mfmsr   r8                                                                              /* Save the MSR */
                        mr.             r3,r3                                                                   /* ? */
@@ -1507,17 +1428,14 @@ ddwait1:        lwarx   r5,0,r3                                                                 /* Get the lock */
                        mtmsr   r8                                                                              /* Restore the MSR */
                        isync                                                                                   /* Wait for it */
                        blr                                                                                             /* Leave... */
-#endif                 
+                       
                        
 /*
  *                     Used for debugging to leave stuff in 0x380-0x3FF (128 bytes).
  *                     Mapping is V=R.  Stores and loads are real.
  */
-                       
-                       .align  5
-                       .globl  EXT(dbgCkpt)
 
-LEXT(dbgCkpt)
+ENTRY(dbgCkpt, TAG_NO_FRAME_USED)
 
                        mr              r12,r0                                                                  /* Keep R0 pristene */
                        lis             r0,HIGH_ADDR(dbgCkptCall)                               /* Top half of dbgCkptCall firmware call number */
@@ -1530,11 +1448,7 @@ LEXT(dbgCkpt)
                        
 /*                     Here's the low-level part of dbgCkpt                    */
 
-                       .align  5
-                       .globl  EXT(dbgCkptLL)
-
-LEXT(dbgCkptLL)
-
+ENTRY(dbgCkptLL, TAG_NO_FRAME_USED)
 
                        li              r12,0x380                                                               /* Point to output area */
                        li              r1,32                                                                   /* Get line size */
@@ -1639,14 +1553,14 @@ LEXT(dbgCkptLL)
  *                     Do Preemption.  Forces a T_PREEMPT trap to allow a preemption to occur.
  */
 
-                       .align  5
-                       .globl  EXT(DoPreemptLL)
-
-LEXT(DoPreemptLL)
+ENTRY(DoPreemptLL, TAG_NO_FRAME_USED)
 
+                       mfsprg  r11,0                                                   /* Get the per_proc address */
+                       lwz             r11,PP_TEMPWORK1(r11)                   /* Restore the return address */
                        li              r3,T_PREEMPT                                    /* Set preemption interrupt value */
+                       mtlr    r11                                                             /* Restore the LR */
                        stw             r3,saveexception(r13)                   /* Modify the exception type to preemption */
-                       b               EXT(FCReturn)                                   ; Bye dudes...
+                       blr                                                                             /* Return to interrupt handler */
 
                        
 /*
@@ -1656,14 +1570,14 @@ LEXT(DoPreemptLL)
  *                     Forces a T_CSWITCH
  */
 
-                       .align  5
-                       .globl  EXT(SwitchContextLL)
-
-LEXT(SwitchContextLL)
+ENTRY(SwitchContextLL, TAG_NO_FRAME_USED)
 
+                       mfsprg  r11,0                                                   /* Get the per_proc address */
+                       lwz             r11,PP_TEMPWORK1(r11)                   /* Restore the return address */
                        li              r3,T_CSWITCH                                    /* Set context switch value */
+                       mtlr    r11                                                             /* Restore the LR */
                        stw             r3,saveexception(r13)                   /* Modify the exception type to switch context */
-                       b               EXT(FCReturn)                                   ; Bye dudes...
+                       blr                                                                             /* Return to interrupt handler */
 
                        
 /*
@@ -1671,106 +1585,92 @@ LEXT(SwitchContextLL)
  *                     Forces a T_INTERRUPT trap to pretend that an actual I/O interrupt occurred.
  */
 
-                       .align  5
-                       .globl  EXT(CreateFakeIOLL)
-
-LEXT(CreateFakeIOLL)
+ENTRY(CreateFakeIOLL, TAG_NO_FRAME_USED)
 
+                       mfsprg  r11,0                                                   /* Get the per_proc address */
+                       lwz             r11,PP_TEMPWORK1(r11)                   /* Restore the return address */
                        li              r3,T_INTERRUPT                                  /* Set external interrupt value */
+                       mtlr    r11                                                             /* Restore the LR */
                        stw             r3,saveexception(r13)                   /* Modify the exception type to external */
-                       b               EXT(FCReturn)                                   ; Bye dudes...
+                       blr                                                                             /* Return to interrupt handler */
                        
 /*
  *                     Create a shutdown context
  *                     Forces a T_SHUTDOWN trap.
  */
 
-                       .align  5
-                       .globl  EXT(CreateShutdownCTXLL)
-
-LEXT(CreateShutdownCTXLL)
+ENTRY(CreateShutdownCTXLL, TAG_NO_FRAME_USED)
 
+                       mfsprg  r11,0                                                   /* Get the per_proc address */
+                       lwz             r11,PP_TEMPWORK1(r11)                   /* Restore the return address */
                        li              r3,T_SHUTDOWN                                   /* Set external interrupt value */
+                       mtlr    r11                                                             /* Restore the LR */
                        stw             r3,saveexception(r13)                   /* Modify the exception type to external */
-                       b               EXT(FCReturn)                                   ; Bye dudes...
+                       blr                                                                             /* Return to interrupt handler */
                        
 /*
  *                     Create a fake decrementer 'rupt.  
  *                     Forces a T_DECREMENTER trap to pretend that an actual decrementer interrupt occurred.
  */
 
-                       .align  5
-                       .globl  EXT(CreateFakeDECLL)
-
-LEXT(CreateFakeDECLL)
+ENTRY(CreateFakeDECLL, TAG_NO_FRAME_USED)
 
+                       mfsprg  r11,0                                                   /* Get the per_proc address */
+                       lwz             r11,PP_TEMPWORK1(r11)                   /* Restore the return address */
                        li              r3,T_DECREMENTER                                /* Set decrementer interrupt value */
+                       mtlr    r11                                                             /* Restore the LR */
                        stw             r3,saveexception(r13)                   /* Modify the exception type to external */
-                       b               EXT(FCReturn)                                   ; Bye dudes...
+                       blr                                                                             /* Return to interrupt handler */
 
 /*
  *                     Choke the system.  
  */
 
-                       .align  5
-                       .globl  EXT(DoChokeLL)
-
-LEXT(DoChokeLL)
+ENTRY(DoChokeLL, TAG_NO_FRAME_USED)
 
+                       mfsprg  r11,0                                                   ; Get the per_proc address 
+                       lwz             r11,PP_TEMPWORK1(r11)                   ; Restore the return address 
                        li              r3,T_CHOKE                                              ; Set external interrupt value
+                       mtlr    r11                                                             ; Restore the LR 
                        stw             r3,saveexception(r13)                   ; Modify the exception type to external
-                       b               EXT(FCReturn)                                   ; Bye dudes...
-
+                       blr                                                                             ; Return to interrupt handler 
+                       
 /*
- *                     Null firmware call 
+ *                     Set the low level trace flags 
  */
+ENTRY(LLTraceSet, TAG_NO_FRAME_USED)
 
-                       .align  5
-                       .globl  EXT(NullLL)
-
-LEXT(NullLL)
-
-                       li              r3,T_IN_VAIN                                    ; Set to just ignore this one
-                       b               EXT(FCReturn)                                   ; Bye dudes...
-
-;
-;                      Null firmware call 
-;
-
-                       .align  5
-                       .globl  EXT(iNullLL)
-
-LEXT(iNullLL)
+                       mfsprg  r6,2                                                    ; Get feature flags 
+                       mfmsr   r12                                                             /* Get the MSR */
+                       mr              r4,r3                                                   /* Save the new value */
+                       andi.   r3,r12,0x01C0                                   /* Clear interrupts and translation */
+                       mtcrf   0x04,r6                                                 ; Set the features                      
+                       bt              pfNoMSRirb,ltsNoMSR                             ; Use MSR...
 
-                       mfspr   r4,pmc1                                                 ; Get stamp
-                       stw             r4,0x6100+(9*16)+0x0(0)                 ; Save it
-#if 1
-                       mfspr   r4,pmc2                                                 ; Get stamp
-                       stw             r4,0x6100+(9*16)+0x4(0)                 ; Save it
-                       mfspr   r4,pmc3                                                 ; Get stamp
-                       stw             r4,0x6100+(9*16)+0x8(0)                 ; Save it
-                       mfspr   r4,pmc4                                                 ; Get stamp
-                       stw             r4,0x6100+(9*16)+0xC(0)                 ; Save it
-#endif
-                       li              r3,T_IN_VAIN                                    ; Set to just ignore this one
-                       b               EXT(FCReturn)                                   ; Bye dudes...
+                       mtmsr   r3                                                              ; Translation and all off
+                       isync                                                                   ; Toss prefetch
+                       b               ltsNoMSRx
                        
-;
-;                      Set the low level trace flags 
-;
-                       .align  5
-                       .globl  EXT(LLTraceSet)
+ltsNoMSR:      li              r0,loadMSR                                              ; Get the MSR setter SC
+                       sc                                                                              ; Set it
 
-LEXT(LLTraceSet)
-
-                       mr              r4,r3                                                   ; Save the new value 
+ltsNoMSRx:
+                       
+                       lis             r5,hi16(EXT(trcWork))                   ; Get trace area
+                       rlwinm  r12,r12,0,MSR_FP_BIT+1,MSR_FP_BIT-1     ; Force floating point off
+                       ori             r5,r5,lo16(EXT(trcWork))                ; again
+                       
+                       lwz             r3,traceMask(r5)                                /* Get the old trace flags to pass back */
+                       rlwinm  r12,r12,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1   ; Force vectors off
+                       stw             r4,traceMask(r5)                                /* Replace with the new ones */
+                       
+                       mtmsr   r12                                                             /* Restore the MSR */
+                       isync
                        
-                       lwz             r3,traceMask(0)                                 ; Get the old trace flags to pass back 
-                       stw             r4,traceMask(0)                                 ; Replace with the new ones
-                       blr                                                                             ; Leave... 
+                       blr                                                                             /* Leave... */
 
-#if 0
+#if 1
        
 /*
 ; ***************************************************************************
@@ -1795,11 +1695,7 @@ LEXT(LLTraceSet)
 #define GDfromright 20
 #define GDfontsize 16
 
-                       .align  5
-                       .globl  EXT(GratefulDeb)
-
-LEXT(GratefulDeb)
-
+ENTRY(GratefulDeb,TAG_NO_FRAME_USED)
                        mfspr   r6,pir                                                  /* Get the PIR */
                        lis             r5,HIGH_ADDR(EXT(GratefulDebWork))      /* Point to our work area */
                        rlwinm  r6,r6,8,23,23                                   /* Get part of the offset to our processors area */
@@ -1929,10 +1825,7 @@ GDbailout:       mr              r1,r31                                                  /* Move the workarea base */
  */
 
 
-                       .align  5
-                       .globl  EXT(GratefulDebDisp)
-
-LEXT(GratefulDebDisp)
+ENTRY(GratefulDebDisp,TAG_NO_FRAME_USED)
 
                        mfmsr   r9                                                              /* Save the current MSR */
                        mflr    r7                                                              /* Save the return */
@@ -1953,26 +1846,22 @@ LEXT(GratefulDebDisp)
  */
 
 
-                       .align  5
-                       .globl  EXT(checkNMI)
-
-LEXT(checkNMI)
+ENTRY(checkNMI,TAG_NO_FRAME_USED)
                
                        mfmsr   r9                                                              /* Save it */
                        andi.   r8,r9,0x7FCF                                    /* Clear it */
                        mtmsr   r8                                                              /* Disable it */
                        isync                                                                   /* Fence it */
                        lis             r7,0xF300                                               /* Find it */
-                       lis             r2,hi16(MASK(MSR_VEC))                  ; Get the vector enable 
                        ori             r7,r7,0x0020                                    /* Find it */
-                       ori             r2,r2,lo16(MASK(MSR_FP))                ; Get the FP enable 
                        dcbi    0,r7                                                    /* Toss it */
                        sync                                                                    /* Sync it */
-                       andc    r9,r9,r2                                                ; Clear VEC and FP enables
+                       rlwinm  r9,r9,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
                        eieio                                                                   /* Get it */
                        lwz             r6,0x000C(r7)                                   /* Check it */
                        eieio                                                                   /* Fence it */
                        dcbi    0,r7                                                    /* Toss it */
+                       rlwinm  r9,r9,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
                        rlwinm. r4,r6,0,19,19                                   /* Check it */
                        rlwinm  r6,r6,0,20,18                                   /* Clear it */
                        sync                                                                    /* Sync it */
@@ -1995,6 +1884,193 @@ xnonmi:                                                                                         /* Label it */
                        isync                                                                   /* Hold it */
                        blr                                                                             /* Return from it */
 
+
+/*
+ *                     Early debug code
+ */
+dumpr7:                lis             r9,HIGH_ADDR(hexTab)    /* (TEST/DEBUG) */
+                       li              r5,8                                    /* (TEST/DEBUG) */
+                       ori             r9,r9,LOW_ADDR(hexTab)  /* (TEST/DEBUG) */
+
+dumpr7n:       rlwinm  r7,r7,4,0,31            /* (TEST/DEBUG) */
+                       mr              r6,r7                           /* (TEST/DEBUG) */
+                       andi.   r6,r6,15                        /* (TEST/DEBUG) */
+                       lbzx    r6,r9,r6                        /* (TEST/DEBUG) */
+                       lis             r10,0xF301                      /* (TEST/DEBUG) */
+                       ori             r10,r10,0x2000          /* (TEST/DEBUG) */
+
+#if 0
+xqrw2:         eieio                                           /* (TEST/DEBUG) */
+                       lbz             r7,0(r10)                       /* (TEST/DEBUG) */
+                       dcbi    0,r10                           /* (TEST/DEBUG) */
+                       sync                                            /* (TEST/DEBUG) */
+                       andi.   r7,r7,0x04                      /* (TEST/DEBUG) */
+                       beq             xqrw2                           /* (TEST/DEBUG) */
+#endif
+                       
+                       dcbf    0,r10                           /* (TEST/DEBUG) */
+                       sync                                            /* (TEST/DEBUG) */
+                       dcbi    0,r10                           /* (TEST/DEBUG) */
+                       eieio                                           /* (TEST/DEBUG) */
+                       stb             r6,4(r10)                       /* (TEST/DEBUG) */
+                       
+                       lis             r6,10                           /* (TEST/DEBUG) */
+dumpr7d:       addi    r6,r6,-1                        /* (TEST/DEBUG) */
+                       mr.             r6,r6                           /* (TEST/DEBUG) */
+                       bne-    dumpr7d                         /* (TEST/DEBUG) */
+                       dcbf    0,r10                           /* (TEST/DEBUG) */
+                       sync                                            /* (TEST/DEBUG) */
+                       dcbi    0,r10                           /* (TEST/DEBUG) */
+                       eieio                                           /* (TEST/DEBUG) */
+               
+                       addic.  r5,r5,-1                        /* (TEST/DEBUG) */
+                       bne+    dumpr7n                         /* (TEST/DEBUG) */
+
+                       blr                                                     /* (TEST/DEBUG) */
+
+;                      
+;                      Log a special entry in physical memory.
+;                      This assumes that memory size has been significantly lowered using
+;                      the maxmem boot option. The buffer starts just after the end of mem_size.
+;
+;                      This is absolutely for special tracing cases. Do not ever leave in...
+;
+
+ENTRY(dbgLog,TAG_NO_FRAME_USED)
+
+                       li              r11,0                           ; Clear callers callers callers return
+                       li              r10,0                           ; Clear callers callers callers callers return
+                       li              r9,0                            ; Clear callers callers callers callers callers return
+                       lwz             r2,0(r1)                        ; Get callers callers stack frame
+                       lis             r0,0x4000                       ; First invalid address
+                       lwz             r12,8(r2)                       ; Get our callers return
+                       lwz             r2,0(r2)                        ; Back chain
+
+                       mr.             r2,r2                           ; End of chain?
+                       cmplw   cr1,r2,r0                       ; Valid kernel address?
+                       beq-    nosavehere                      ; Yes, end of chain...
+                       bge-    cr1,nosavehere          ; No...
+                       lwz             r11,8(r2)                       ; Get our callers return
+                       lwz             r2,0(r2)                        ; Back chain
+
+                       mr.             r2,r2                           ; End of chain?
+                       cmplw   cr1,r2,r0                       ; Valid kernel address?
+                       beq-    nosavehere                      ; Yes, end of chain...
+                       bge-    cr1,nosavehere          ; No...
+                       lwz             r10,8(r2)                       ; Get our callers return
+                       lwz             r2,0(r2)                        ; Back chain
+
+                       mr.             r2,r2                           ; End of chain?
+                       cmplw   cr1,r2,r0                       ; Valid kernel address?
+                       beq-    nosavehere                      ; Yes, end of chain...
+                       bge-    cr1,nosavehere          ; No...
+                       lwz             r9,8(r2)                        ; Get our callers return
+
+nosavehere:    mfmsr   r8                                      ; Get the MSR   
+                       lis             r2,hi16(EXT(DebugWork)) ; High part of area
+                       lis             r7,hi16(EXT(mem_actual))        ; High part of actual
+                       andi.   r0,r8,0x7FCF            ; Interrupts and translation off
+                       ori             r2,r2,lo16(EXT(DebugWork))      ; Get the entry
+                       mtmsr   r0                                      ; Turn stuff off
+                       ori             r7,r7,lo16(EXT(mem_actual))     ; Get the actual
+                       isync
+               
+                       lwz             r0,4(r2)                        ; Get the flag
+                       mr.             r0,r0                           ; Should we log?
+                       lwz             r0,0(r7)                        ; Get the end of memory
+                       lwz             r7,0(r2)                        ; Get the position
+                       bne-    waytoofar                       ; No logging...
+                       mr.             r7,r7                           ; Is this the first? 
+                       bne+    gotspot                         ; Nope...
+                       
+                       lis             r7,hi16(EXT(mem_size))  ; High part of defined memory
+                       ori             r7,r7,lo16(EXT(mem_size))       ; Low part of defined memory
+                       lwz             r7,0(r7)                        ; Make it end of defined
+                       
+gotspot:       cmplw   r7,r0                           ; Do we fit in memory
+                       addi    r0,r7,0x0020            ; Next slot
+                       bge-    waytoofar                       ; No fit...
+                       
+                       stw             r0,0(r2)                        ; Set next time slot
+                       dcbz    0,r7                            ; Zap it
+                       
+                       stw             r3,0(r7)                        ; First data
+                       li              r3,32                           ; Disp to next line
+                       stw             r4,4(r7)                        ; Second data
+                       dcbz    r3,r7                           ; Zap it
+                       stw             r5,8(r7)                        ; Third data
+                       stw             r6,12(r7)                       ; Fourth data
+                       
+                       stw             r12,16(r7)                      ; Callers callers
+                       stw             r11,20(r7)                      ; Callers callers caller
+                       stw             r10,24(r7)                      ; Callers callers callers caller
+                       stw             r9,28(r7)                       ; Callers callers callers callers caller
+
+waytoofar:     mtmsr   r8                                      ; Back to normal
+                       isync
+                       blr
+
+;
+;                      Same as the other, but no traceback and 16 byte entry
+;                      Trashes R0, R2, R10, R12
+;
+
+                       .align  5
+                       .globl  EXT(dbgLog2)
+
+LEXT(dbgLog2)
+
+
+                       mfmsr   r10                                     ; Get the MSR   
+                       lis             r2,hi16(EXT(DebugWork)) ; High part of area
+                       lis             r12,hi16(EXT(mem_actual))       ; High part of actual
+                       andi.   r0,r10,0x7FCF           ; Interrupts and translation off
+                       ori             r2,r2,lo16(EXT(DebugWork))      ; Get the entry
+                       mtmsr   r0                                      ; Turn stuff off
+                       ori             r12,r12,lo16(EXT(mem_actual))   ; Get the actual
+                       isync
+               
+                       lwz             r0,4(r2)                        ; Get the flag
+                       mr.             r0,r0                           ; Should we log?
+                       lwz             r0,0(r12)                       ; Get the end of memory
+                       lwz             r12,0(r2)                       ; Get the position
+                       bne-    waytoofar2                      ; No logging...
+                       mr.             r12,r12                         ; Is this the first? 
+                       bne+    gotspot2                        ; Nope...
+                       
+                       lis             r12,hi16(EXT(mem_size)) ; High part of defined memory
+                       ori             r12,r12,lo16(EXT(mem_size))     ; Low part of defined memory
+                       lwz             r12,0(r12)                      ; Make it end of defined
+                       
+gotspot2:      cmplw   cr1,r12,r0                      ; Do we fit in memory
+                       rlwinm. r0,r12,0,27,27          ; Are we on a new line?
+                       bge-    cr1,waytoofar2          ; No fit...
+                       addi    r0,r12,0x0010           ; Next slot
+                       
+                       bne+    nonewline                       ; Not on a new line...
+                       dcbz    br0,r12                         ; Clear it so we do not fetch it
+                       
+nonewline:     cmplwi  r3,68                           ; Special place for time stamp?
+                       
+                       stw             r0,0(r2)                        ; Set next time slot
+                       bne+    nospcts                         ; Nope...
+
+                       lwz             r0,0x17C(br0)           ; Get special saved time stamp
+                       b               nospctt                         ; Skip...
+                       
+nospcts:       mftb    r0                                      ; Get the current time
+                                               
+nospctt:       stw             r3,4(r12)                       ; First data
+                       stw             r4,8(r12)                       ; Second data
+                       stw             r5,12(r12)                      ; Third data
+                       stw             r0,0(r12)                       ; Time stamp
+
+waytoofar2:    mtmsr   r10                                     ; Back to normal
+                       isync
+                       blr
+
+
 ;
 ;                      Saves floating point registers
 ;
@@ -2004,19 +2080,13 @@ xnonmi:                                                                                         /* Label it */
 
 LEXT(stFloat)
 
-                       lis             r2,hi16(MASK(MSR_VEC))                  ; Get the vector enable 
-                       li              r4,0
-                       ori             r2,r2,lo16(MASK(MSR_FP))                ; Get the FP enable 
-                       ori             r4,r4,lo16(MASK(MSR_EE))                ; Get the EE bit
-
-                       mfmsr   r0                                                              ; Save the MSR
-
-                       andc    r4,r0,r4                                                ; Clear EE
-                       ori             r4,r4,lo16(MASK(MSR_FP))                ; Enable floating point
+                       mfmsr   r0                                      ; Save the MSR
+                       rlwinm  r0,r0,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r0,r0,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r4,r0,0,MSR_EE_BIT,MSR_EE_BIT   ; Turn off interruptions
+                       ori             r4,r4,lo16(MASK(MSR_FP))        ; Enable floating point
                        mtmsr   r4
                        isync
-
-                       andc    r0,r0,r2                                                ; Clear VEC and FP enables
                        
                        stfd    f0,0x00(r3)
                        stfd    f1,0x08(r3)
@@ -2067,10 +2137,6 @@ LEXT(stFloat)
 
 LEXT(stVectors)
 
-                       lis             r2,hi16(MASK(MSR_VEC))                  ; Get the vector enable 
-                       li              r4,0
-                       ori             r2,r2,lo16(MASK(MSR_FP))                ; Get the FP enable 
-                       ori             r4,r4,lo16(MASK(MSR_EE))                ; Get the EE bit
                        
                        mfsprg  r6,2                            ; Get features
                        mr              r5,r3                           ; Save area address
@@ -2079,15 +2145,13 @@ LEXT(stVectors)
                        beqlr-                                          ; No...
                        
                        mfmsr   r0                                      ; Save the MSR
-       
-                       andc    r4,r0,r4                        ; Clear EE
-
+                       rlwinm  r0,r0,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r0,r0,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r4,r0,0,MSR_EE_BIT,MSR_EE_BIT   ; Turn off interruptions
                        oris    r4,r4,hi16(MASK(MSR_VEC))       ; Enable vectors
                        mtmsr   r4
                        isync
                        
-                       andc    r0,r0,r2                        ; Clear FP and VEC
-                       
                        stvxl   v0,0,r5
                        addi    r5,r5,16
                        stvxl   v1,0,r5
@@ -2171,16 +2235,10 @@ LEXT(stVectors)
 
 LEXT(stSpecrs)
 
-
-                       lis             r2,hi16(MASK(MSR_VEC))                  ; Get the vector enable 
-                       li              r4,0
-                       ori             r2,r2,lo16(MASK(MSR_FP))                ; Get the FP enable 
-                       ori             r4,r4,lo16(MASK(MSR_EE))                ; Get the EE bit
-
-
                        mfmsr   r0                                      ; Save the MSR
-                       andc    r0,r0,r2                        ; Turn of VEC and FP
-                       andc    r4,r0,r4                        ; And EE
+                       rlwinm  r0,r0,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r0,r0,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r4,r0,0,MSR_EE_BIT,MSR_EE_BIT   ; Turn off interruptions
                        mtmsr   r4
                        isync
                        
@@ -2244,6 +2302,9 @@ stSnsr:           mfsrin  r6,r5
                        addi    r4,r4,4
                        bne+    stSnsr
 
+                       cmplwi  cr1,r12,PROCESSOR_VERSION_604e          
+                       cmplwi  cr5,r12,PROCESSOR_VERSION_604ev
+                       cror    cr1_eq,cr1_eq,cr5_eq                    ; Set if 604 type
                        cmplwi  r12,PROCESSOR_VERSION_750
                        mfspr   r4,hid0
                        stw             r4,(39*4)(r3)
@@ -2252,13 +2313,15 @@ stSnsr:         mfsrin  r6,r5
                        li              r5,0
                        li              r6,0
                        li              r7,0
+                       beq-    cr1,before750
+                       blt-    before750
                        
                        mfspr   r4,hid1
                        mfspr   r5,l2cr
                        mfspr   r6,msscr0
                        mfspr   r7,msscr1
 
-                       stw             r4,(40*4)(r3)
+before750:     stw             r4,(40*4)(r3)
                        stw             r6,(42*4)(r3)
                        stw             r5,(41*4)(r3)
                        stw             r7,(43*4)(r3)
@@ -2273,6 +2336,7 @@ isis750:  stw             r4,0(r3)
                        li              r5,0
                        li              r6,0
                        li              r7,0
+                       beq-    cr1,b4750
                        blt-    b4750
                        
                        mfspr   r4,thrm1
@@ -2286,11 +2350,9 @@ b4750:           stw             r4,(44*4)(r3)
                        stw             r7,(47*4)(r3)
                        
                        li              r4,0
-                       li              r6,0
                        cmplwi  r12,PROCESSOR_VERSION_7400
                        bne             nnmax
                        
-                       mfspr   r6,dabr
                        mfpvr   r5
                        rlwinm  r5,r5,0,16,31
                        cmplwi  r5,0x1101
@@ -2301,167 +2363,8 @@ b4750:          stw             r4,(44*4)(r3)
 gnmax:         mfspr   r4,1016
 
 nnmax:         stw             r4,(48*4)(r3)
-                       stw             r6,(49*4)(r3)
                        
                        mtmsr   r0
                        isync
 
                        blr
-
-
-;
-;                      fwEmMck - this forces the hardware to emulate machine checks
-;                      Only valid on 64-bit machines
-;                      Note: we want interruptions disabled here
-;
-
-                       .globl  EXT(fwEmMck)
-                       
-                       .align  5
-
-LEXT(fwEmMck)
-
-
-                       rlwinm  r3,r3,0,1,0                                             ; Copy low of high high - scomd
-                       rlwinm  r5,r5,0,1,0                                             ; Copy low of high high - hid1
-                       rlwinm  r7,r7,0,1,0                                             ; Copy low of high high - hid4
-                       rlwimi  r3,r4,0,0,31                                    ; Copy low of low low
-                       rlwimi  r5,r6,0,0,31                                    ; Copy low of low low
-                       rlwimi  r7,r8,0,0,31                                    ; Copy low of low low
-
-                       lis             r9,3                                                    ; Start forming hid1 error inject mask
-                       lis             r10,hi16(0x01084083)                    ; Start formaing hid4 error inject mask
-                       ori             r9,r9,0xC000                                    ; Next bit
-                       ori             r10,r10,lo16(0x01084083)                ; Next part
-                       sldi    r9,r9,32                                                ; Shift up high
-                       sldi    r10,r10,8                                               ; Shift into position
-                       
-                       mfspr   r0,hid1                                                 ; Get hid1
-                       mfspr   r2,hid4                                                 ; and hid4
-                       
-                       and             r5,r5,r9                                                ; Keep only error inject controls - hid1
-                       and             r7,r7,r10                                               ; Keep only error inject controls - hid4
-                       
-                       andc    r0,r0,r9                                                ; Clear error inject controls hid1
-                       andc    r2,r2,r10                                               ; Clear error inject controls hid4
-                       
-                       or              r0,r0,r5                                                ; Add in the new controls hid1
-                       or              r2,r2,r7                                                ; Add in the new controls hid4
-                       
-/* ? */
-#if 0
-                       lis             r12,CoreErrI                                    ; Get the error inject controls
-                       sync
-
-                       mtspr   scomd,r3                                                ; Set the error inject controls
-                       mtspr   scomc,r12                                               ; Request error inject
-                       mfspr   r11,scomc                                               ; Get back the status (we just ignore it)
-#endif
-                       sync
-                       isync                                                   
-                       
-                       mtspr   hid1,r0                                                 ; Move in hid1 controls
-                       mtspr   hid1,r0                                                 ; We need to do it twice
-                       isync
-                       
-                       sync
-                       mtspr   hid4,r2                                                 ; Move in hid4 controls
-                       isync
-                       
-                       blr                                                                             ; Leave...
-
-;
-;                      fwSCOMrd - read/write SCOM
-;
-                       .align  5
-                       .globl  EXT(fwSCOM)
-
-LEXT(fwSCOM)
-
-                       lhz             r12,scomfunc(r3)                                ; Get the function
-                       lwz             r4,scomreg(r3)                                  ; Get the register
-                       rldicr  r4,r4,8,47                                              ; Position for SCOM
-
-                       mr.             r12,r12                                                 ; See if read or write
-                       bne             fwSCwrite                                               ; Go do a write
-
-                       mfsprg  r0,2                                                    ; Get the feature flags
-                       ori             r4,r4,0x8000                                    ; Set to read data
-                       rlwinm. r0,r0,pfSCOMFixUpb+1,31,31              ; Set shift if we need a fix me up
-                       sync
-
-                       mtspr   scomc,r4                                                ; Request the register
-                       mfspr   r11,scomd                                               ; Get the register contents
-                       mfspr   r10,scomc                                               ; Get back the status
-                       sync
-                       isync                                                   
-
-                       sld             r11,r11,r0                                              ; Fix up if needed
-                       
-                       std             r11,scomdata(r3)                                ; Save result
-                       eieio
-                       std             r10,scomstat(r3)                                ; Save status
-
-                       blr
-
-fwSCwrite:     ld              r5,scomdata(r3)                                 ; Get the data
-                       
-                       sync
-
-                       mtspr   scomd,r5                                                ; Set the data
-                       mtspr   scomc,r4                                                ; Set it
-                       mfspr   r10,scomc                                               ; Get back the status
-                       sync
-                       isync                                                   
-
-                       std             r10,scomstat(r3)                                ; Save status
-                       
-                       blr
-
-;
-;                      diagTrap - this is used to trigger checks from user space
-;                      any "twi 31,r31,0xFFFx" will come here (x = 0 to F).
-;                      On entry R3 points to savearea.
-;                      R4 is the "x" from instruction;
-;                      Pass back 1 to no-op twi and return to user
-;                      Pass back 0 to treat as normal twi.
-;
-
-                       .globl  EXT(diagTrap)
-                       
-                       .align  5
-
-LEXT(diagTrap)
-
-                       li              r3,0                                                    ; Ignore TWI
-                       blr                                                                             ; Leave...
-
-
-
-
-;
-;                      setPmon - this is used to manipulate MMCR0 and MMCR1
-
-                       .globl  EXT(setPmon)
-                       
-                       .align  5
-
-LEXT(setPmon)
-
-                       li              r0,0
-                       isync
-                       mtspr   mmcr0,r0                                                ; Clear MMCR0
-                       mtspr   mmcr1,r0                                                ; Clear MMCR1
-                       mtspr   pmc1,r0
-                       mtspr   pmc2,r0
-                       mtspr   pmc3,r0
-                       mtspr   pmc4,r0
-
-                       isync
-
-                       mtspr   mmcr0,r3                                                ; Set MMCR0
-                       mtspr   mmcr1,r4                                                ; Set MMCR1
-                       isync
-                       blr                                                                             ; Leave...
-
-
index a2e9bd5f3cfcb62fda88a048e48b0e3b6ddc1efc..a8b7355e098442b9752ff2a178073d9a5003c183 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #include <ppc/proc_reg.h>
 #include <ppc/mem.h>
 #include <ppc/pmap.h>
+#include <ppc/pmap_internals.h>
 #include <ppc/new_screen.h>
 #include <ppc/Firmware.h>
 #include <ppc/mappings.h>
+//#include <pexpert/ppc/powermac.h>
 #include <pexpert/pexpert.h>
 #include <ddb/db_output.h>
 
@@ -266,11 +265,11 @@ void GratefulDebInit(bootBumbleC *boot_video_info) {      /* Initialize the video deb
                GratefulDebWork[i].GDdepth = boot_video_info->v_depth;
                GratefulDebWork[i].GDcollgn = nrmlgn;
        
-//             RuptCtrs[(48*i)+47].timed = gPEClockFrequencyInfo.timebase_frequency_hz >> 4;   /* (Update every 16th of a second (16 fps) */
-               RuptCtrs[(48*i)+47].timed = gPEClockFrequencyInfo.timebase_frequency_hz >> 3;   /* (Update every 8th of a second (8 fps) */
-//             RuptCtrs[(48*i)+47].timed = gPEClockFrequencyInfo.timebase_frequency_hz >> 2;   /* (Update every 4th of a second (4 fps) */
-//             RuptCtrs[(48*i)+47].timed = gPEClockFrequencyInfo.timebase_frequency_hz >> 1;   /* (Update every 2th of a second (2 fps) */
-//             RuptCtrs[(48*i)+47].timed = gPEClockFrequencyInfo.timebase_frequency_hz >> 0;   /* (Update every 1 second (1 fps) */
+//             RuptCtrs[(48*i)+47].timed = gPEClockFrequencyInfo.bus_clock_rate_hz >> 6;       /* (Update every 16th of a second (16 fps) */
+               RuptCtrs[(48*i)+47].timed = gPEClockFrequencyInfo.bus_clock_rate_hz >> 5;       /* (Update every 8th of a second (8 fps) */
+//             RuptCtrs[(48*i)+47].timed = gPEClockFrequencyInfo.bus_clock_rate_hz >> 4;       /* (Update every 4th of a second (4 fps) */
+//             RuptCtrs[(48*i)+47].timed = gPEClockFrequencyInfo.bus_clock_rate_hz >> 3;       /* (Update every 2th of a second (2 fps) */
+//             RuptCtrs[(48*i)+47].timed = gPEClockFrequencyInfo.bus_clock_rate_hz >> 2;       /* (Update every 1 second (1 fps) */
                
                sync();
                
@@ -279,7 +278,4 @@ void GratefulDebInit(bootBumbleC *boot_video_info) {        /* Initialize the video deb
 
 }
 
-void debugNoop(void);
-void debugNoop(void) {                                                         /* This does absolutely nothing */
-       return;
-}
+
index e404ade790bf6fc4b19077e83da83faa27542ce3..61fdb6b521ddf1ba787aa4b0ec71ebb63d6cb3e7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -63,8 +60,9 @@
                        fwCallEnt(dbgRegsCall, dbgRegsLL)                               /* Dumps all registers */
                        fwCallEnt(CreateFakeDECCall, CreateFakeDECLL)   /* Make a fake decrementer interruption */
                        fwCallEnt(CreateShutdownCTXCall, CreateShutdownCTXLL)   /* create a shutdown context */
-                       fwCallEnt(NullCall, NullLL)                                             /* Null Firmware call */
-                       fwCallEnt(iNullCall, iNullLL)                                   /* Instrumented null Firmware call */
+#if PERF_HIST
+                       fwCallEnt(PerfCtlCall, PerfCtlLL)                               /* Control performance monitor */
+#endif
 
 #endif /* _FIRMWARECALLS_H_ */
 
index b428d1129fa1379c7df5e325286ab0eb09339e8e..56bc2b5103bcd547105a01308d3277b959b0bbc6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index fbef39c9cf7e4235d253a273d9f88cab6b6d0a00..e9bdc475860ede7f5c43d8f3fd7fb94d3be031cc 100644 (file)
@@ -8,22 +8,24 @@ include $(MakeInc_cmd)
 include $(MakeInc_def)
 
 
+DATAFILES = \
+       asm.h machlimits.h 
+
 EXPORT_ONLY_FILES =            \
        asm.h                   \
-       cpu_capabilities.h      \
        cpu_number.h            \
        lock.h                  \
        hw_lock_types.h         \
        io_map_entries.h        \
        proc_reg.h              \
-       machine_routines.h      \
+       machine_routines.h              \
        Diagnostics.h           \
        savearea.h              \
        mappings.h
 
-INSTALL_MD_DIR = ppc
+INSTALL_MD_LIST = ${DATAFILES}
 
-INSTALL_MD_LCL_LIST = cpu_capabilities.h
+INSTALL_MD_DIR = ppc
 
 EXPORT_MD_LIST = ${EXPORT_ONLY_FILES}
 
index 8d7101b2cebd6906eb912a4f99c95de020bf53a3..224fe15fce6780057a4cf56fc2f70aae2b9c4a1d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b1d88470abadabe30880752edc1c71f4444fb3cb..7cf4d8358c0e55126677f16b8b535eb3b98edfd7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
diff --git a/osfmk/ppc/POWERMAC/mp/MPPlugIn.h b/osfmk/ppc/POWERMAC/mp/MPPlugIn.h
new file mode 100644 (file)
index 0000000..07cf468
--- /dev/null
@@ -0,0 +1,346 @@
+/*
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*
+ * @OSF_FREE_COPYRIGHT@
+ */
+/*
+ * @APPLE_FREE_COPYRIGHT@
+ */
+
+/*
+       MPPlugIn.h
+
+       Herein we find all the global MP plugin stuff
+
+       Lovingly crafted by Bill Angell using traditional methods
+
+*/
+
+
+/*
+ *     External hook completion codes
+ *
+ *     The MP plugin's external interrupt hook returns one of these codes
+ */
+
+#define kMPVainInterrupt 0                                                     /* Interruption in vain -- ignore it */
+#define kMPIOInterruptPending 1                                                /* This is an I/O interruption -- handle it */
+#define kMPSignalPending 2                                                     /* This is a pending signal -- handle it */
+
+
+/* ***********************************************************************
+ * Entry point jump table entry numbers
+ * *********************************************************************** */
+
+#define kCountProcessors               0
+#define kStartProcessor                1                                       /* ->cpu address, ->start address, ->pass-thru parm */
+#define kResumeProcessor               2                                       /* ->cpu address */
+#define kStopProcessor                         3                                       /* ->cpu address */
+#define kResetProcessor                4                                       /* ->cpu address */
+#define kSignalProcessor               5                                       /* ->cpu address */
+#define kStoreProcessorStatus  6                                       /* ->cpu address, ->status area address */
+#define kSynchClock                    7                                       /* ->cpu address */
+#define kExternalHook                  8                                       /* no parms */
+#define kProcessorState                9                                       /* ->cpu address */
+#define kRunSIGPRun                    10                                      /* no parms */
+#define kPhoneyFirmware                        11                                      /* Dummy kernel for alternate processors */
+       
+#define kMPPlugInMaxCall               11                                      /* set MPPlugInMaxCall to the highest-numbered call */
+
+
+/* ***********************************************************************
+ *     MP Plug-In specification
+ *
+ *     The address of this area is passed to the MP plugin by the initialization code. If the
+ *     version ID and the installed hardware match the MP plugin, it returns its memory
+ *     requirements and a table of offsets to its entry points.
+ * *********************************************************************** */
+
+#define kMPPlugInVersionID             1
+
+#define kSIGPUninitializedState        0
+#define kSIGPResetState                        1
+#define kSIGPStoppedState              2
+#define kSIGPOperatingState            3
+#define kSIGPErrorState                        4
+
+#define kSIGPnoErr                             0
+#define kSIGPInvalidStateErr   -3999
+#define kSIGPInterfaceBusyErr  -3998
+#define kSIGPPrivilegeErr              -3997
+#define kSIGPNoPlugInErr               -3996
+#define kTimeBaseSynchronizationErr            -3995
+#define kSIGPTargetAddrErr             -3994
+#define kSIGPInvalidStatusErr  -3993
+
+#define kMPPlugInInstallFailed -4999
+#define kMPPlugInInternalError -4998
+
+/* 
+ * ***********************************************************************
+ *     Signal processor request codes
+ * ***********************************************************************
+ */
+
+#define SIGPast                                        0                                       /* Requests an ast on target processor */
+#define SIGPptlb                               1                                       /* Requests a total purge of the TLB */
+#define SIGPkdb                                        2                                       /* Requests a KDB entry */
+
+/* 
+ * ***********************************************************************
+ *     Temporary debugging error codes (well, at least as temporary as the income tax)
+ * ***********************************************************************
+ */
+#define kMPPHairyPalms                 -10002
+#define kMPPOffline                            -10003
+#define kMPPBadState                   -10004
+#define kMPPInvalCPU                   -10005
+#define kMPPCantLock                   -10006
+#define kMPPNotReady                   -10007
+#define kMPPNotStopped                 -10008
+#define kMPPBadCPU                             -10009
+#define kMPPOnly1CPU                   -10010
+#define kMPPBadVers                            -10011
+#define kMPPNotRunning                 -10012
+#define kMPPTimeOut                            -10013
+#define kMPPInitTO1                            -10014
+#define kMPPInitTO2                            -10015
+#define kMPPInitTO3                            -10016
+
+
+/* 
+ * ***********************************************************************
+ *     Let's define some hardware stuff
+ * ***********************************************************************
+ */
+#define Bandit1                        0xF2000000
+#define PCI1AdrReg             0xF2800000
+#define GrandCentral   0xF3000000
+#define EtherNetROM            0xF3019000
+#define HammerHead             0xF8000000
+#define ArbConfig              0x0090
+#define TwoCPU                 0x02
+#define WhoAmI                 0x00B0
+#define PriCPU                 0x10
+#define SecCPU                 0x08
+#define IntReg                 0x00C0
+#define SecInt                 0x80
+
+
+/* 
+ * ***********************************************************************
+ *     Let's define the flags for MPPInterface
+ * ***********************************************************************
+ */
+
+#define SpinTimeOut            30000000
+
+#define MPPICmsgp              0xc0000000                                      /* Message pending (busy + pass) */
+#define MPPICBusy              0x80000000                                      /* Processor area busy, i.e., locked */
+#define MPPICPass              0x40000000                                      /* Busy lock passed to receiving processor */
+#define MPPICOnline            0x20000000                                      /* Processor is online */
+#define MPPICReady             0x10000000                                      /* Processor is ready, i.e., started, not reset */
+#define MPPICStop              0x08000000                                      /* Processor is stopped */
+#define MPPICBset              0x000000FF                                      /* Processor that owns busy, i.e., the ID of */
+                                                                                                       /*   whomever set busy. When a busy is passed, */
+                                                                                                       /*   this is the requestor of the function. */
+#define MPPICfunc              0x0000FF00                                      /* Current function */
+#define MPPICfIdle             0x00                                            /* No function pending */
+#define MPPICfStrt             0x01                                            /* Start the processor, physical address in  */
+                                                                                                       /*   MPPIParm0 */
+#define MPPICfResm             0x02                                            /* Resume a stopped processor */
+#define MPPICfStop             0x03                                            /* Stop a processor */
+#define MPPICfSigp             0x04                                            /* Signal a processor */
+#define MPPICfStat             0x05                                            /* Store the processor machine state -  */
+                                                                                                       /*   physical address of response in MPPIParm0 */
+#define MPPICfTBsy             0x06                                            /* Synchronize timebase - */
+                                                                                                       /*   TB image in MPPIParm0 and MPPIParm1 */
+#define MPPICfReset            0x07                                            /* Reset the processor */
+#define MPPICfTBsy1            0x81                                            /* TB sync, phase 1 */
+#define MPPICfTBsy2            0x82                                            /* TB sync, phase 2 */
+#define MPPICSigp              0x80000000                                      /* Processor has signal pending (keep signal status when stopped) */
+#define MPPICXRun              0x40000000                                      /* Explicit SIGP run call */
+
+
+                       
+#ifndef __ASSEMBLER__
+
+typedef unsigned char  CPUState;
+typedef unsigned int   CPUNotification;
+
+struct MPPlugInSpec {                                                          /* This is MPSxxxx for assembler */
+               unsigned int            versionID;                              /* Version ID, must match */
+               unsigned int            *areaAddr;                              /* Virtual address of area to be */
+                                                                                                       /*  relocated to physical memory */
+               unsigned int            areaSize;                               /* Size of area to be relocated */
+               unsigned int            *offsetTableAddr;               /* Virtual address of table of entry offsets */
+               unsigned int            *baseAddr;                              /* Common base area - used for debugging */
+               unsigned int            *dataArea;                              /* Pointer to the MP workarea - used for debugging */
+               unsigned int            *CPUArea;                               /* Pointer to the CPU workarea - used for debugging */
+               unsigned int            *SIGPhandler;                   /* Physical address of signal interrupt filter */
+};
+
+typedef struct MPPlugInSpec MPPlugInSpec;
+typedef MPPlugInSpec *MPPlugInSpecPtr;
+
+struct MPEntryPts {    
+               unsigned int            EntAddr[kMPPlugInMaxCall+1];    /* Real addresses of all plugin entry points */
+};
+
+typedef struct MPEntryPts MPEntryPts;
+
+struct SystemRegister {
+               unsigned int            regno;
+               unsigned int            contents;
+};
+
+typedef struct SystemRegister SystemRegister;
+
+typedef struct FPRegs {
+               unsigned int            lo;
+               unsigned int            hi;
+} FPRegs;
+
+struct BATregs {
+               unsigned int            upper;
+               unsigned int            lower;
+};
+
+typedef struct BATregs BATregs;
+
+
+#define kSysRegCount 16
+               
+struct CPUStatusArea {                                                         /*  0000 This is CSAxxxxx for assembler */
+
+/*
+ *             Note that this guy always has to be in one-to-one mapped area contiguously
+ */
+               CPUState                        state;                                  /*  0000 */
+               unsigned char           regsAreValid;                   /*  0001 */
+               unsigned char           filler[2];                              /*  0002 */
+               unsigned int            gpr[32];                                /*  0004 */
+               FPRegs                          fpr[32];                                /*  0084 */
+               unsigned int            cr;                                             /*  0184 */
+               unsigned int            fpscr;                                  /*  0188 */
+               unsigned int            xer;                                    /*  018C */
+               unsigned int            lr;                                             /*  0190 */
+               unsigned int            ctr;                                    /*  0194 */
+               unsigned int            tbu;                                    /*  0198 This is rtcu on 601. */
+               unsigned int            tbl;                                    /*  019C This is rtcl on 601. */
+               unsigned int            pvr;                                    /*  01A0 */
+               BATregs                         ibat[4];                                /*  01A4 */
+               BATregs                         dbat[4];                                /*  01E4 */
+               unsigned int            sdr1;                                   /*  0224 */
+               unsigned int            sr[16];                                 /*  0228 */
+               unsigned int            dar;                                    /*  0268 */
+               unsigned int            dsisr;                                  /*  026C */
+               unsigned int            sprg[4];                                /*  0270 */
+               unsigned int            srr0;                                   /*  0280 */
+               unsigned int            srr1;                                   /*  0284 */
+               unsigned int            dec;                                    /*  0288 */
+               unsigned int            dabr;                                   /*  028C */
+               unsigned int            iabr;                                   /*  0290 */
+               unsigned int            ear;                                    /*  0294 */
+               unsigned int            hid[16];                                /*  0298 */
+               unsigned int            mmcr[2];                                /*  02D8 */
+               unsigned int            pmc[4];                                 /*  02E0 */
+               unsigned int            pir;                                    /*  02F0 */
+               unsigned int            sda;                                    /*  02F4 */
+               unsigned int            sia;                                    /*  02F8 */
+               unsigned int            mq;                                             /*  02FC */
+               
+               unsigned int            msr;                                    /*  0300 */
+               unsigned int            pc;                                             /*  0304 */
+               
+               SystemRegister          sysregs[kSysRegCount];  /*  0308 */
+               
+               unsigned int            filler2[6];                             /*  0388  Always pad up to 32-byte boundary */
+                                                                                                       /*  03A0 */
+};
+
+typedef struct CPUStatusArea CPUStatusArea;
+typedef CPUStatusArea *CPUStatusAreaPtr;
+
+extern CPUStatusArea CSA[NCPUS];
+
+struct SenseInfo {
+       CPUNotification         notification;
+       CPUState                        state;
+};
+
+typedef struct SenseInfo SenseInfo;
+typedef SenseInfo *SenseInfoPtr;
+
+
+struct MPPInterface {
+
+       unsigned int                    MPPICStat;                                              /* Processor status (interlocked update for this one) */
+       unsigned int                    MPPICParm0;                     /* SIGP parm 0 */
+       unsigned int                    MPPICParm1;                     /* SIGP parm 1 */
+       unsigned int                    MPPICParm2;                     /* SIGP parm 2 */
+       unsigned int                    MPPICspare0;            /* unused */
+       unsigned int                    MPPICspare1;            /* unused */
+       unsigned int                    MPPICParm0BU;           /* Parm 0 backed up here at 'rupt time for safe keeping */
+       unsigned int                    MPPICPriv;                      /* Processor status (interlocked update for this one) */
+};
+
+typedef struct MPPInterface MPPInterface;
+typedef MPPInterface *MPPInterfacePtr;
+
+extern MPPInterface MPPICPUs[];
+
+
+/* ***********************************************************************
+ *     Function prototypes and data areas
+ * *********************************************************************** */
+
+extern unsigned int    MPgetProcCount  (void);
+extern unsigned int    MPstart                 (unsigned int cpu, unsigned int sadr, unsigned int parm);
+extern unsigned int    MPexternalHook  (void);
+extern unsigned int    MPsignal                (unsigned int cpu, unsigned int SIGPparm);
+extern unsigned int    MPstop                  (unsigned int cpu);
+#if 0
+extern unsigned int    MPCPUAddress    (void);
+extern unsigned int    MPresume                (unsigned int cpu);
+extern unsigned int    MPreset                 (unsigned int cpu);
+extern unsigned int    MPSense                 (unsigned int cpu, unsigned int *info);
+extern unsigned int    MPstoreStatus   (unsigned int cpu, unsigned int *statusArea);
+extern unsigned int    MPSetStatus             (unsigned int cpu, unsigned int *statusArea);
+extern unsigned int    MPgetSignal             (void);
+extern unsigned int    MPsyncTB                (void);
+extern unsigned int    MPcheckPending  (void);
+#endif
+extern int MPinstall           (unsigned int physAddr, unsigned int band1, unsigned int hammerh, unsigned int grandc,
+                                                               unsigned int pci1ar, unsigned int enetr);
+extern unsigned int MPprobe    (MPPlugInSpecPtr spec, unsigned int hammerh);
+
+extern void start_secondary    (void);
+extern void mp_intr    (void);
+
+
+extern MPPlugInSpec    MPspec;                                                 /* An area for the MP interfaces */
+extern MPEntryPts      MPEntries;                                              /* Real addresses of plugin routines */
+
+#endif /* ndef __ASSEMBLER */
diff --git a/osfmk/ppc/POWERMAC/mp/MP_2p.s b/osfmk/ppc/POWERMAC/mp/MP_2p.s
new file mode 100644 (file)
index 0000000..73c54e0
--- /dev/null
@@ -0,0 +1,2409 @@
+/*
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*
+ * @OSF_COPYRIGHT_INTERNAL_USE_ONLY@
+ */
+
+/*                                                                                                                                                                                     
+       MP_2p.s 
+
+       MP low-level signaling, configuration, et all.  This is for a and Apple/Daystar 2p board
+
+       Lovingly crafted by Bill Angell using traditional methods
+
+*/
+
+#include <ppc/asm.h>
+#include <ppc/proc_reg.h>
+#include <ppc/POWERMAC/mp/MPPlugIn.h>
+#include <assym.s>
+#include <mach/machine/vm_param.h>
+
+
+
+                       .set    MPPlugInVersion,0                                               /* Current version code */
+
+/* */
+/*                     Interfaces to hardware */
+/* */
+
+                       .set    PCI1ARdisp,             0x00800000                              /* Displacement from Bandit to PCI1 address configuiration register */
+                       .set    GrandCdisp,             0x01000000                              /* Displacement from Bandit to Grand Central */
+                       .set    EventsReg,              0x20                                    /* Interruption events register (latched) */
+                       .set    LevelsReg,              0x2C                                    /* Interruption levels register (unlatched) */
+                       .set    MaskReg,                0x24                                    /* Interruption mask register */
+                       .set    ClearReg,               0x28                                    /* Interruption clear register */
+                       .set    TicksPerMic,    11                                              /* We'll use 11 ticks per ÂµS - 120MHz is really 10, 180MHz is 11.24 */
+                       .set    EtherNRdisp,    0x01019000                              /* Displacement into bandit of EtherNet ROM */
+
+#ifdef __ELF__
+                       .section ".data"
+#else
+                       .data
+#endif
+
+                       .align  5                                                                       /* Get us out to the end */
+
+                       .globl MPPIwork
+#ifdef __ELF__
+                       .type  MPPIwork,@function
+#endif
+
+MPPIwork:
+MPPIstatus:    .byte   0                                                                       /* Global MP board status */
+                       .set    MPPIinit,       0x80                                    /* Global initialization complete */
+                       .set    MPPI2Pv2,       0x40                                    /* Second rev of 2P board (no watchdog and different state machine) */
+                       .byte   0                                                                       /* Reserved */
+MPPIinst:      .byte   0                                                                       /* Mask of CPUs installed */
+MPPIonline:    .byte   0                                                                       /* Mask of CPUs online (i.e., initialized) */
+MPPIlogCPU:    .long   0                                                                       /* Used to configure CPU addresses */
+MPPITBsync:    .long   0                                                                       /* Used to sync time bases */
+                       .long   0
+MPPIHammer:    .long   0                                                                       /* Address of HammerHead */
+MPPIGrandC:    .long   0                                                                       /* Address of GrandCentral */
+MPPIPCI1Adr: .long     0                                                                       /* Address of PCI1's config reg addr */
+MPPIEther:     .long   0                                                                       /* Address of EtherNet ROM */
+                       
+                       .align  5
+MPPISncFght: .fill     4,4,0                                                           /* Space for 9 passes of a TB sync fight + 1 guard pass */
+                       .fill   4,4,0
+                       .fill   4,4,0
+                       .fill   4,4,0
+                       .fill   4,4,0
+                       .fill   4,4,0
+                       .fill   4,4,0
+                       .fill   4,4,0
+                       .fill   4,4,0
+                       .fill   4,4,0
+                       .align  7                                                                       /* Point to the start of the CPU status */
+
+                       .globl EXT(MPPICPUs)
+#ifdef __ELF__
+                       .type  EXT(MPPICPUs),@function
+#endif
+EXT(MPPICPUs):                                                                                         /* Start of Processor specific areas */
+/*                     There are 8 of these indexed by processor number */
+
+
+MPPICPU0:      .fill   8,4,0                                                                   /* First processor */
+MPPICPU1:      .fill   8,4,0                                                                   /* Second processor */
+MPPICPU2:      .fill   8,4,0                                                                   /* Third processor */
+MPPICPU3:      .fill   8,4,0                                                                   /* Fourth processor */
+                       .set    MPPIMaxCPU, (.-EXT(MPPICPUs)-32)/32                     /* Get the maximum CPU address */
+
+
+                       .text
+
+/******************************************************************************************************** */
+/******************************************************************************************************** */
+/* */
+/*                     Here starteth ye stuff */
+/* */
+/******************************************************************************************************** */
+/******************************************************************************************************** */
+
+/******************************************************************************************************** */
+/* */
+/*                     Validate that the hardware matches with our code.  At this point, we cannot check */
+/*                     for anything other than the possibility of this working.  There's no version code */
+/*                     or nothin'.  So, if we have a second processor and are a 604 or 604e, we'll say */
+/*                     we're capable.  Also we'll check version codes for our code. */
+/* */
+/*                     When we get here, DDAT and IDAT are both on, 'rupts are disabled. */
+/*  */
+/*                     We're called like this:  */
+/*                             OSStatus MP_probe(MPPlugInSpecPtr spec, UInt32 HammerheadAddr); */
+/* */
+/******************************************************************************************************** */
+
+ENTRY(MPprobe, TAG_NO_FRAME_USED)
+
+                       
+MPPIbase:      mfpvr   r7                                                                      /* Get the processor version */
+                       rlwinm  r7,r7,16,16,31                                          /* Isolate the processor type */
+
+                       lbz             r5,ArbConfig(r4)                                        /* See if there is another processor */
+                       
+                       andi.   r5,r5,TwoCPU                                            /* Are we a real live two processor? */
+                       beq             OneWay                                                          /* Nope, we be gone... */
+                       
+                       cmplwi  cr0,r7,4                                                        /* Are we a 604? */
+                       beq             SeemsOK                                                         /* Yeah, we're cool... */
+                       cmplwi  cr0,r7,9                                                        /* Are we a 604E? */
+                       beq             SeemsOK                                                         /* Yeah, go finish up... */
+                       
+OneWay:                li              r3,0                                                            /* Say we can't find the proper CPU */
+                       blr                                                                                     /* Leave... */
+                       
+SeemsOK:       mr              r10,r3                                                          /* Save the parameter list */
+                       
+                       lwz             r4,MPSversionID(r10)                            /* Get the version ID */
+                       cmplwi  cr0,r4,kMPPlugInVersionID                       /* Correct version? */
+                       beq             IsOK                                                            /* Yeah, we think we're ok... */
+                       
+                       li              r3,0                                                            /* Set bad version' */
+                       blr                                                                                     /* Leave... */
+                       
+IsOK:          mflr    r11                                                                     /* Save the LR */
+                       lis             r9,HIGH_ADDR(MPPIwork)                          /* Get the top half of the data area */
+                       bl              SetBase1                                                        /* Jump to the next instruction */
+SetBase1:      mflr    r12                                                                     /* Get the base register */
+                       ori             r9,r9,LOW_ADDR(MPPIwork)                        /* Get the bottom half of the data area */
+                       addi    r12,r12,LOW_ADDR(MPPIbase-SetBase1)     /* Adjust to the start of all our code */
+                       
+                       stw             r12,MPSbaseAddr(r10)                            /* Save off the common base for all functions */
+                       
+                       la              r5,LOW_ADDR(MPPIFunctions-MPPIbase)(r12)        /* Point to the base of all functions */
+                       stw             r5,MPSareaAddr(r10)                                     /* Pass back the code address */
+                       
+                       la              r5,LOW_ADDR(MPPIFuncOffs-MPPIbase)(r12) /* Point to the function offset table */
+                       stw             r5,MPSoffsetTableAddr(r10)                      /* Pass back the pointer to the offset table */
+                       
+                       li              r5,LOW_ADDR(MPPISize-MPPIFunctions)     /* Get our size without data area */
+                       stw             r5,MPSareaSize(r10)                                     /* Save it */
+                       
+                       stw             r9,MPSdataArea(r10)                                     /* Save it */
+                       
+                       la              r5,LOW_ADDR(EXT(MPPICPUs)-MPPIwork)(r9) /* Point to the CPU area base */
+                       stw             r5,MPSCPUArea(r10)                                      /* Save it */
+                       
+                       mtlr    r11                                                                     /* Restore that return address */
+                       li              r3,1                                                            /* Set no error */
+                       blr                                                                                     /* Leave, we're all done... */
+
+/******************************************************************************************************** */
+/******************************************************************************************************** */
+/* */
+/*                     Here starteth ye code that starteth up ye second prothether. */
+/*                     Yea, though ye prothether executeth asynchronously, it appears unto men */
+/*                     in ye shape of a synchronous process.  By ye instruction of He who gave it */
+/*                     form and being, it stopeth to worship and praise its Lord, to joyously  */
+/*                     receive His blessings and teachings, to guide its way along the path to */
+/*                     righteous execution. */
+/* */
+/******************************************************************************************************** */
+/******************************************************************************************************** */
+
+
+/******************************************************************************************************** */
+/* */
+/*                     Initialize the MP hardware.  This will bring the other processor online. */
+/* */
+/*                     First we will tick the board to its 5th state the "TBEN off" state. */
+/* */
+/*                     Just for giggles, here's the states: */
+/* */
+/*                     1) 1st ROM                      - This state exists after motherboard reset */
+/*                     2) Open Firmware        - Transitions here when the SecInt line is first asserted */
+/*                                                               Open Firmware attempts to execute some code on the secondary */
+/*                                                               processor to obtain the PVR register.  It's got some problems */
+/*                                                               and hangs the secondary disabled. */
+/*                     3) Reset (my name)      - Entered when the SecInt line is deasserted. A timer starts and */
+/*                                                               468µS later the reset line is pulled.  I may have this wrong here, */
+/*                                                               it may be that the reset line is held for 468µS.  Either way, */
+/*                                                               this state is invisible to us. */
+/*                     4) 2nd ROM                      - This state exists when the secondary processor begins executing */
+/*                                                               after the reset. */
+/*                     5) TBEN off                     - We transition here when SecInt is asserted in the 2nd ROM state. */
+/*                                                               In this state, the TBEN pin is set to disable the timebase from  */
+/*                                                               running on all processors, thus freezing time. (Performace analysis */
+/*                                                               note: here would be the best time to run stats, all tests would */
+/*                                                               run in 0 time giving us infinite speed.) Also the "primary arbitration" */
+/*                                                               mode is set.  This mode causes the CPU board to arbitrate both processors */
+/*                                                               using a single bus master.  This gets us around the L2 cache dumbness. */
+/*                                                               We should also note that because of this, there is now no way to  */
+/*                                                               tell if we are on the secondary processor, the WhoAmI register will */
+/*                                                               always indicate the primary processor.  We need to have sewn */
+/*                                                               name tags into our underwear before now. */
+/*                                                               Finally, this state is the only way we can tell if we are executing */
+/*                                                               on the older version of the 2-way board.  When it is in this state */
+/*                                                               "primary arbitration" has not been enabled yet.  The WhoAmI register */
+/*                                                               will indicate if we are on the secondary processor on not.  We should */
+/*                                                               check this because we need to do signals differently. */
+/*                     6) TBEN on                      - The next assertion of SecInt brings us to our final destination.  For */
+/*                                                               those of you who will be deplaning, please remember that timebases */
+/*                                                               are running and primary arbitration is enabled.  Always remember: */
+/*                                                               buckle up for safety and if you're tired pull over for a rest. */
+/* */
+/******************************************************************************************************** */
+
+ENTRY(MPinstall, TAG_NO_FRAME_USED)
+
+/*                     int MP_install(unsigned int *physAddr, unsigned int band1, unsigned int hammerh, unsigned int grandc,
+ *                     unsigned int pci1ar, unsigned int enetr);
+ */
+       
+                       lis             r11,HIGH_ADDR(MPPIwork)                         /* Get the top half of the data area */
+                       mflr    r0                                                                      /* Save the LR */
+                       ori             r11,r11,LOW_ADDR(MPPIwork)                      /* Get the bottom half of the data area */
+                       
+                       stw             r5,MPPIHammer-MPPIwork(r11)                     /* Save the HammerHead address for later */
+                       stw             r6,MPPIGrandC-MPPIwork(r11)                     /* Save address of Grand Central */
+                       stw             r7,MPPIPCI1Adr-MPPIwork(r11)            /* Save the PCI1 address register address */
+                       stw             r8,MPPIEther-MPPIwork(r11)                      /* Save Ethernet ROM address */
+
+                       li              r4,LOW_ADDR(0xC080)                                     /* Set CPU 0&1 installed, CPU 0 online */
+                       lis             r10,(MPPICOnline+MPPICReady)>>16        /* Set CPU 0 online and ready */
+                       
+                       mfspr   r6,pir                                                          /* Get the PIR contents */
+                       
+                       sth             r4,MPPIinst-MPPIwork(r11)                       /* Set 'em for later */
+                       rlwinm  r6,r6,0,0,27                                            /* Clear to use processor 0 */
+                       stw             r10,EXT(MPPICPUs)-MPPIwork(r11)         /* Preset CPU 0 online and ready */
+
+                       mtspr   pir,r6                                                          /* Set our PIR */
+
+/* */
+/*                     Ok, ok, enough of this.  Let's really start 'em up. */
+/* */
+
+                       lis             r9,HIGH_ADDR(CPUInit)                           /* Top of init code */
+                       li              r6,1                                                            /* Get the other guy's CPU address               */
+                       ori             r9,r9,LOW_ADDR(CPUInit)                         /* Get physical address of init code */
+               
+                       mfmsr   r8                                                                      /* Get the MSR */
+
+                       stw             r6,MPPIlogCPU-MPPIwork(r11)                     /* Set the logical CPU address to assign */
+                                               
+                       rlwinm  r6,r8,0,17,15                                           /* Turn off interruptions */
+                       sync                                                                            /* Make sure the work area is updated */
+                       mtmsr   r6                                                                      /* Flip the EE bit off */
+                       isync                                                                           /* Chill a bit */
+                       
+                       stw             r9,0(r7)                                                        /* Pass the initialization code address to our friend */
+                       sync                                                                            /* Fence off the pig */
+                       
+                       li              r6,0                                                            /* Clear this out */
+                       stb             r6,IntReg(r5)                                           /* Kick the other processor */
+                       eieio                                                                           /* Pig in the sty */
+
+/*                     At this point we should be in the "TBEN off" state.  The second processor should be starting */
+/*                     to come up. */
+
+/*                     Note that we are assuming that the secondary processor will reset the interrupt request. */
+/*                     If we are on one of the old boards, we will die in about 256µS if it is not reset, 'cause */
+/*                     of that silly watchchihuahua timer.  We can't use the TB or decrimenter here to set a  */
+/*                     timeout because when we are in "TBEN off" state these guys don't run. */
+
+                       lis             r4,HIGH_ADDR(SpinTimeOut)                       /* Get about 1 second at 200MHz */
+                                                                                                               /* At 120 MHz this is 1.66 seconds, at 400MHz it is .5 */
+                                                                                                               /* All these are more than enough time for this handshake */
+                       ori             r4,r4,LOW_ADDR(SpinTimeOut)                     /* Get the bottom part */
+
+WaitReady:     lwz             r9,0(r7)                                                        /* Get this back */
+                       mr.             r9,r9                                                           /* The other processor will set to 0 */
+                                                                                                               /*    when it is ready for the work area address */
+                       beq             CodeUp                                                          /* The code is up on the other side */
+                       subi    r4,r4,1                                                         /* Count the try */
+                       mr.             r4,r4                                                           /* Did we timeout? */
+                       bne+    WaitReady                                                       /* Nope... */
+                       
+                       li              r3,kMPPInitTO1                                          /* Set that we timed out with initial code bringup */
+                       mtmsr   r8                                                                      /* Restore the interrupt state */
+                       mtlr    r0                                                                      /* Restore the return addess */
+                       blr                                                                                     /* Return a failure... */
+
+CodeUp:                isync                                                                           /* Make sure we don't prefetch past here */
+                       
+/*                     Timebase is stopped here, no need for the funky "get time base right" loop */
+
+                       mftbu   r4                                                                      /* Get upper timebase half */
+                       mftb    r9                                                                      /* Get bottom  */
+                       stw             r4,MPPITBsync-MPPIwork(r11)                     /* Save the top */
+                       stw             r9,MPPITBsync+4-MPPIwork(r11)           /* Save the second half */
+                       sync                                                                            /* Be very sure it's there */
+                       
+                       stw             r11,0(r7)                                                       /* Set the PCI1 adr reg non-zero - this releases the spin */
+                                                                                                               /*      loop and allows the timebase to be set. */
+                       eieio
+
+                       lis             r9,HIGH_ADDR(SpinTimeOut)                       /* Get the spin time */
+                       ori             r9,r9,LOW_ADDR(SpinTimeOut)                     /* Get the bottom part */
+                       
+WaitTBset:     lwz             r4,0(r7)                                                        /* Get this back */
+                       mr.             r4,r4                                                           /* When zero, the other guy's TB is set up */
+                       beq-    TBSetUp                                                         /* She's'a all done... */
+                       subi    r9,r9,1                                                         /* Count the try */
+                       mr.             r9,r9                                                           /* Did we timeout? */
+                       bne+    WaitTBset                                                       /* Nope... */
+                       
+                       li              r3,kMPPInitTO3                                          /* Set that we timed out setting clock */
+                       mtmsr   r8                                                                      /* Restore the interrupt state */
+                       isync
+                       mtlr    r0                                                                      /* Restore the return addess */
+                       blr                                                                                     /* Return a failure... */
+
+TBSetUp:       stb             r6,IntReg(r5)                                           /* Kick the other processor again */
+                                                                                                               /* This will tick us to the next state */
+                       eieio
+                                               
+SpinDelay:     addi    r6,r6,1                                                         /* Bump spin count (we finally are trashing R6) */
+                       cmplwi  cr0,r6,4096                                                     /* Spun enough? */
+                       ble+    SpinDelay                                                       /* Nope... */
+                       
+                       li              r6,SecInt                                                       /* Set the interrupt bit */
+                       stb             r6,IntReg(r5)                                           /* Deassert the external signal */
+/* */
+/*                     Ok, the other processor should be online in a spin waiting for a start signal from */
+/*                     us.  It should be in the reset state with no external interruptions pending.  There may */
+/*                     be a decrimenter pop waiting in the wings though. */
+/* */
+                       
+                       lwz             r7,MPPIGrandC-MPPIwork(r11)                     /* Point to GrandCentral */
+                       lwz             r4,MaskReg(r7)                                          /* Get the grand central mask register (note that this */
+                                                                                                               /* is a little-endian area, but I'm too lazy to access it that way */
+                                                                                                               /* so I'll document what it really should be, but, probably, it would */
+                                                                                                               /* have been much, much easier just to code up the lwbrx and be done */
+                                                                                                               /* with it rather than producing this monograph describing my alternate */
+                                                                                                               /* access method that I really don't explain anyway. */
+                       ori             r4,r4,0x0040                                            /* Flip on bit 30 (hah, figure that one out).  This enables the */
+                                                                                                               /* Ext10 interrupt which is connected to the MACE ethernet chip's */
+                                                                                                               /* chip-select pin. */
+                       stw             r4,MaskReg(r7)                                          /* Stick it on back */
+                       eieio
+                       
+                       mtlr    r0                                                                      /* Get back the original LR */
+                       sync                                                                            /* Make sure all storage ops are done */
+                       mtmsr   r8                                                                      /* Restore the MSR */
+                       isync
+                       li              r3,kSIGPnoErr                                           /* Set that we worked jest fine and dandy */
+                       blr                                                                                     /* Bye now... */
+
+                       .align  5
+/******************************************************************************************************** */
+/******************************************************************************************************** */
+/* */
+/*                     This is where the individual SIGP function calls reside.  */
+/*                     Also, it is where we cram the second processor's initialization code wo'w we */
+/*                     can use physical addressing. */
+/* */
+/******************************************************************************************************** */
+/******************************************************************************************************** */
+
+MPPIFunctions:                                                                                 /* Start of all externally called functions and interrupt handling code */
+
+
+/******************************************************************************************************** */
+/* */
+/*                     Count the number of processors.  This hardwires to 2 (or 1 if no secondary) */
+/* */
+/******************************************************************************************************** */
+
+CountProcessors:
+                       lis             r12,HIGH_ADDR(MPPIwork)                         /* Get the top half of the data area */
+                       mfmsr   r9                                                                      /* Get the MSR */
+                       ori             r12,r12,LOW_ADDR(MPPIwork)                      /* Get the bottom half of the data area */
+                       
+                       ori             r10,r9,0x0010                                           /* Turn on DDAT */
+                       
+                       lwz             r8,MPPIHammer-MPPIwork(r12)                     /* Point to the HammerHead controller */
+                       
+                       mtmsr   r10                                                                     /* Turn on DDAT */
+                       isync                                                                           /* Kill speculation */
+
+                       li              r3,2                                                            /* Assume we have them all */
+                       lbz             r5,ArbConfig(r8)                                        /* Check if we've seen a second processor */
+                       andi.   r5,r5,TwoCPU                                            /* Are we a real live two processor? */
+                       mtmsr   r9                                                                      /* Put back the DDAT */
+                       isync
+                       
+                       bnelr+                                                                          /* Yeah... */
+                       li              r3,1                                                            /* Nope, set a count of 1 */
+                       blr                                                                                     /* Leave, we're inadequate... */
+
+/******************************************************************************************************** */
+/* */
+/*                     Start up the selected processor (R3=processor; R4=physical start address; R5=pass-thru parm) */
+/* */
+/******************************************************************************************************** */
+                       
+StartProcessor:
+
+                       mr              r7,r5                                                           /* Copy pass-thru parameter */
+                       mfspr   r10,pir                                                         /* Get our processor number */
+                       rlwinm  r9,r3,5,23,26                                           /* Get index into CPU array */
+                       cmplw   cr0,r3,r10                                                      /* Trying to start ourselves? */
+                       lis             r12,HIGH_ADDR(MPPIwork)                         /* Get the top half of the data area */
+                       cmplwi  cr1,r3,MPPIMaxCPU                                       /* See if we are bigger than max */
+                       li              r3,kMPPHairyPalms                                       /* Set trying to do it to ourselves */
+                       beqlr-                                                                          /* Self abuse... */
+                       li              r3,kSIGPTargetAddrErr                           /* CPU number is too big */
+                       bgtlr-  cr1                                                                     /* Sure are... (Get our address also) */
+                       ori             r12,r12,LOW_ADDR(MPPIwork)                      /* Get the bottom half of the data area */
+                       la              r9,EXT(MPPICPUs)-MPPIwork(r9)                   /* Point into the proccessor control area */
+                       mflr    r11                                                                     /* Save the return address */
+                       add             r9,r9,r12                                                       /* Point right at the entry */
+                       
+SPretry:       lwarx   r5,0,r9                                                         /* Pick up the status flags (MPPICStat) and reserve it */
+                       li              r3,kSIGPInterfaceBusyErr                        /* Fill dead space and get busy return code */
+                       rlwinm. r0,r5,0,0,0                                                     /* Are we marked as busy? */
+                       lis             r6,MPPICOnline>>16                                      /* Get the online flag */
+                       bne-    ErrorReturn                                                     /* Yeah, go leave, don't bother me now... */
+                       and.    r0,r5,r6                                                        /* Are we online */
+                       li              r3,kMPPOffline                                          /* Set offline */
+                       beq-    ErrorReturn                                                     /* Ain't online, ain't ready, buzz off... */
+                       li              r3,kMPPBadState                                         /* Set bad state */
+                       oris    r5,r5,(MPPICBusy>>16)&0x0000FFFF        /* Turn on the busy bit */
+                       
+                       stwcx.  r5,0,r9                                                         /* Try to set busy */
+                       bne-    SPretry                                                         
+                       
+                       ori             r6,r10,MPPICfStrt<<8                            /* Put the Start function in front of the processor ID */
+                       rlwimi  r5,r6,0,16,31                                           /* Put these behind the status flags */
+                       stw             r4,MPPICParm0(r9)                                       /* Set the starting physical address parameter */
+                       stw             r7,MPPICParm2(r9)                                       /* Set pass-thru parameter */
+                       
+                       sync                                                                            /* Make sure it's all out there */
+                       b               KickAndGo                                                       /* We're done now... */
+
+/******************************************************************************************************** */
+/* */
+/*                     Reset the selected processor (R3=processor).  You can't reset yourself or the primary. */
+/*                     We're gonna try, try real hard...  This is not for the faint-of-heart. */
+/*                     If there's ever any way to yank a reset line, we'll do it here. */
+/* */
+/******************************************************************************************************** */
+                       
+ResetProcessor:
+                       mfspr   r10,pir                                                         /* Get our processor number */
+                       rlwinm  r9,r3,5,23,26                                           /* Get index into CPU array */
+                       rlwinm  r10,r10,0,28,31                                         /* Clean up the PIR */
+                       cmplw   cr0,r3,r10                                                      /* Trying to start ourselves? */
+                       cmplwi  cr1,r3,MPPIMaxCPU                                       /* See if we are bigger than max */
+                       li              r3,kMPPHairyPalms                                       /* Set trying to do it to ourselves */
+                       beqlr-                                                                          /* Self abuse... */
+                       mr.             r9,r9                                                           /* Trying to reset the primary?!?  Dude, that's insubordination!!!! */
+                       lis             r12,HIGH_ADDR(MPPIwork)                         /* Get the top half of the data area */
+                       li              r3,kMPPInvalCPU                                         /* Say that that's a major offense */
+                       beqlr-                                                                          /* Bye now... */
+                       li              r3,kSIGPTargetAddrErr                           /* CPU number is too big */
+                       bgtlr-  cr1                                                                     /* Sure are... (Get our address also) */
+                       ori             r12,r12,LOW_ADDR(MPPIwork)                      /* Get the bottom half of the data area */
+                       
+                       la              r9,EXT(MPPICPUs)-MPPIwork(r9)           /* Point into the proccessor control area                */
+                       mflr    r11                                                                     /* Save the return address */
+                       add             r9,r9,r12                                                       /* Point right at the entry */
+                       
+                       li              r4,16                                                           /* Try for 16 times to get the busy lock */
+
+RSlockS:       mftb    r6                                                                      /* Time stamp start */
+
+RSlock:                lwarx   r5,0,r9                                                         /* Pick up the status flags (MPPICStat) and reserve it */
+                       rlwinm. r0,r5,0,2,2                                                     /* Are we online */
+                       li              r3,kMPPOffline                                          /* Set offline */
+                       cmplwi  cr1,r5,0                                                        /* Check for busy */
+                       beq-    ErrorReturn                                                     /* Ain't online, ain't ready, buzz off... */
+                       bge+    cr1,RSnotBusy                                           /* Not busy, make it so... */
+                       
+                       mftb    r7                                                                      /* Stamp the time */
+                       sub             r7,r7,r6                                                        /* Get elapsed time */
+                       rlwinm. r7,r7,16,16,31                                          /* Divide ticks by microseconds (this is pretty darn "kinda-in-the-ballpark") */
+                       cmplwi  cr0,r7,TicksPerMic                                      /* See if we hit 65536µS yet */
+                       blt+    RSlock                                                          /* Not yet... */
+                       
+RSatmtCnt:     subi    r4,r4,1                                                         /* Count the retries */
+                       mr.             r4,r4                                                           /* Are we done yet? */
+                       bgt+    RSlockS                                                         /* Start the lock attempt again... */
+                       
+                       li              r3,kMPPCantLock                                         /* Say we can't get the lock */
+                       b               ErrorReturn                                                     /* Bye, dude... */
+                       
+RSnotBusy:     rlwinm  r5,r5,0,0,15                                            /* Clear out the function and requestor */
+                       oris    r5,r5,(MPPICBusy>>16)&0x0000FFFF        /* Set busy */
+                       or              r5,r10,r5                                                       /* Add in our processor */
+                       ori             r5,r5,MPPICfReset<<8                            /* Set the reset function */
+                       stwcx.  r5,0,r9                                                         /* Cram it back */
+                       bne-    RSatmtCnt                                                       /* We lost the reservation... */
+                       b               KickAndGo                                                       /* Try to send it across... */
+                       
+
+/******************************************************************************************************** */
+/* */
+/*                     Here we will try to resume execution of a stopped processor (R3=processor). */
+/* */
+/******************************************************************************************************** */
+                       
+ResumeProcessor:
+                       mfspr   r10,pir                                                         /* Get our processor number */
+                       rlwinm  r9,r3,5,23,26                                           /* Get index into CPU array */
+                       cmplw   cr0,r3,r10                                                      /* Trying to resume ourselves? */
+                       cmplwi  cr1,r3,MPPIMaxCPU                                       /* See if we are bigger than max */
+                       li              r3,kMPPHairyPalms                                       /* Set trying to do it to ourselves */
+                       beqlr-                                                                          /* Self abuse... */
+                       li              r3,kSIGPTargetAddrErr                           /* CPU number is too big */
+                       bgtlr-  cr1                                                                     /* Sure are... (Get our address also) */
+                       lis             r12,HIGH_ADDR(MPPIwork)                         /* Get the top half of the data area */
+                       la              r9,EXT(MPPICPUs)-MPPIwork(r9)                   /* Point into the proccessor control area */
+                       ori             r12,r12,LOW_ADDR(MPPIwork)                      /* Get the bottom half of the data area */
+                       mflr    r11                                                                     /* Save the link register */
+                       add             r9,r9,r12                                                       /* Point right at the entry */
+                       
+RPretry:       lwarx   r5,0,r9                                                         /* Pick up the status flags (MPPICStat) and reserve it */
+                       li              r3,kSIGPInterfaceBusyErr                        /* Fill dead space and get busy return code */
+                       rlwinm. r0,r5,0,0,0                                                     /* Are we marked as busy? */
+                       lis             r6,MPPICOnline>>16                                      /* Get the online flag */
+                       bne-    ErrorReturn                                                     /* Yeah, go leave, don't bother me now... */
+                       and.    r0,r5,r6                                                        /* Are we online */
+                       li              r3,kMPPOffline                                          /* Set offline */
+                       lis             r6,MPPICReady>>16                                       /* Get the ready bit */
+                       beq-    ErrorReturn                                                     /* Ain't online, ain't ready, buzz off... */
+                       and.    r0,r5,r6                                                        /* Are we ready? */
+                       li              r3,kMPPNotReady                                         /* Set not ready */
+                       lis             r6,MPPICStop>>16                                        /* Get the stopped bit */
+                       beq-    ErrorReturn                                                     /* Ain't ready, buzz off... */
+                       and.    r0,r5,r6                                                        /* Are we stopped? */
+                       li              r3,kMPPNotStopped                                       /* Set not stopped */
+                       oris    r5,r5,(MPPICBusy>>16)&0x0000FFFF        /* Turn on the busy bit */
+                       beq-    ErrorReturn                                                     /* Nope, not stopped, so how do we resume? */
+                       
+                       stwcx.  r5,0,r9                                                         /* Try to set busy */
+                       bne-    RPretry
+                       
+                       ori             r6,r10,MPPICfResm<<8                            /* Put the resume function in front of the processor ID */
+                       rlwimi  r5,r6,0,16,31                                           /* Put these behind the status flags */
+                       b               KickAndGo                                                       /* We're done now... */
+
+
+
+/******************************************************************************************************** */
+/* */
+/*                     Here we will try to stop execution of a running processor (R3=processor). */
+/* */
+/******************************************************************************************************** */
+                       
+StopProcessor:
+                       mfspr   r10,pir                                                         /* Get our processor number */
+                       rlwinm  r9,r3,5,23,26                                           /* Get index into CPU array */
+                       cmplw   cr0,r3,r10                                                      /* Are we doing ourselves? */
+                       cmplwi  cr1,r3,MPPIMaxCPU                                       /* See if we are bigger than max */
+                       li              r3,kMPPHairyPalms                                       /* Set trying to do it to ourselves */
+                       beqlr-                                                                          /* Self abuse... */
+                       li              r3,kSIGPTargetAddrErr                           /* CPU number is too big */
+                       bgtlr-  cr1                                                                     /* Sure are... (Get our address also) */
+                       lis             r12,HIGH_ADDR(MPPIwork)                         /* Get the top half of the data area */
+                       la              r9,EXT(MPPICPUs)-MPPIwork(r9)                   /* Point into the proccessor control area */
+                       ori             r12,r12,LOW_ADDR(MPPIwork)                      /* Get the bottom half of the data area */
+                       mflr    r11                                                                     /* Save the link register */
+                       add             r9,r9,r12                                                       /* Point right at the entry */
+                       
+PPretry:       lwarx   r5,0,r9                                                         /* Pick up the status flags (MPPICStat) and reserve it */
+                       li              r3,kSIGPInterfaceBusyErr                        /* Fill dead space and get busy return code */
+                       rlwinm. r0,r5,0,0,0                                                     /* Are we marked as busy? */
+                       lis             r6,MPPICOnline>>16                                      /* Get the online flag */
+                       bne-    ErrorReturn                                                     /* Yeah, go leave, don't bother me now... */
+                       and.    r0,r5,r6                                                        /* Are we online */
+                       li              r3,kMPPOffline                                          /* Set offline */
+                       lis             r6,MPPICReady>>16                                       /* Get the ready bit */
+                       beq-    ErrorReturn                                                     /* Ain't online, ain't ready, buzz off... */
+                       and.    r0,r5,r6                                                        /* Are we ready? */
+                       li              r3,kMPPNotReady                                         /* Set not ready */
+                       lis             r6,MPPICStop>>16                                        /* Get the stopped bit */
+                       beq-    ErrorReturn                                                     /* Ain't ready, buzz off... */
+                       and.    r0,r5,r6                                                        /* Are we stopped? */
+                       li              r3,kMPPNotRunning                                       /* Set not running */
+                       oris    r5,r5,(MPPICBusy>>16)&0x0000FFFF        /* Turn on the busy bit */
+                       bne-    ErrorReturn                                                     /* Nope, already stopped, so how do we stop? */
+                       
+                       stwcx.  r5,0,r9                                                         /* Try to set busy */
+                       ori             r10,r10,MPPICfStop<<8                           /* Put the stop function in front of the processor ID */
+                       bne-    PPretry
+                       
+                       rlwimi  r5,r10,0,16,31                                          /* Put these behind the status flags */
+                       b               KickAndGo                                                       /* We're done now... */
+
+
+/******************************************************************************************************** */
+/* */
+/*                     Here we will try to signal a running processor (R3=processor). */
+/*                     Note that this should have good performace.  Well, actually, seeing as how slow we really are, it */
+/*                     probably is moot anyhow. */
+/*                     Another note: this function (and all most others as well) will return a timeout when the  */
+/*                     second processor tries to do itself on the old version of the board.  This happens because */
+/*                     In order to keep the watchchihuahua from popping (just imagine the scene: that little runt-dog just so */
+/*                     excited that its veins and eyes bulge and then explode) signaling to the secondary  */
+/*                     is done syncronously and disabled.  If the secondary signals the secondary, it will never enable so */
+/*                     it will never see the 'rupt, so it will never clear it, so it will time out, so there... */
+/* */
+/******************************************************************************************************** */
+                       
+SignalProcessor:
+                       mfspr   r10,pir                                                         /* Get our processor number */
+                       rlwinm  r9,r3,5,23,26                                           /* Get index into CPU array */
+                       lis             r12,HIGH_ADDR(MPPIwork)                         /* Get the top half of the data area */
+                       cmplwi  cr1,r3,MPPIMaxCPU                                       /* See if we are bigger than max */
+                       li              r3,kSIGPTargetAddrErr                           /* CPU number is too big */
+                       bgtlr-  cr1                                                                     /* Sure are... (Get our address also) */
+                       la              r9,EXT(MPPICPUs)-MPPIwork(r9)                   /* Point into the proccessor control area */
+                       ori             r12,r12,LOW_ADDR(MPPIwork)                      /* Get the bottom half of the data area */
+                       mflr    r11                                                                     /* Save the link register */
+                       add             r9,r9,r12                                                       /* Point right at the entry */
+                       
+SiPretry:      lwarx   r5,0,r9                                                         /* Pick up the status flags (MPPICStat) and reserve it */
+                       li              r3,kSIGPInterfaceBusyErr                        /* Fill dead space and get busy return code */
+                       rlwinm. r0,r5,0,0,0                                                     /* Are we marked as busy? */
+                       lis             r6,MPPICOnline>>16                                      /* Get the online flag */
+                       bne-    ErrorReturn                                                     /* Yeah, go leave, don't bother me now... */
+                       and.    r0,r5,r6                                                        /* Are we online */
+                       li              r3,kMPPOffline                                          /* Set offline */
+                       lis             r6,MPPICReady>>16                                       /* Get the ready bit */
+                       beq-    ErrorReturn                                                     /* Ain't online, ain't ready, buzz off... */
+                       and.    r0,r5,r6                                                        /* Are we ready? */
+                       li              r3,kMPPNotReady                                         /* Set not ready */
+                       oris    r5,r5,(MPPICBusy>>16)&0x0000FFFF        /* Turn on the busy bit */
+                       beq-    ErrorReturn                                                     /* Ain't ready, buzz off... */
+                       
+                       stwcx.  r5,0,r9                                                         /* Try to set busy */
+                       ori             r10,r10,MPPICfSigp<<8                           /* Put the SIGP function in front of the processor ID */
+                       bne-    SiPretry
+                       
+                       stw             r4,MPPICParm0(r9)                                       /* Pass along the SIGP parameter */
+                       
+                       rlwimi  r5,r10,0,16,31                                          /* Put these behind the status flags */
+                       b               KickAndGo                                                       /* We're done now... */
+
+
+/******************************************************************************************************** */
+/* */
+/*                     Here we will store the state of a processor (R3=processor; R4=status area). */
+/*                     Self abuse will store the state as is, is not asynchronous, and grows hair on your palms. */
+/* */
+/******************************************************************************************************** */
+                       
+StoreProcessorStatus:
+                       mfspr   r10,pir                                                         /* Get our processor number */
+                       rlwinm  r9,r3,5,23,26                                           /* Get index into CPU array */
+                       cmplw   cr0,r3,r10                                                      /* Saving our own state???  Abusing oneself??? */
+                       cmplwi  cr1,r3,MPPIMaxCPU                                       /* See if we are bigger than max */
+                       li              r3,kSIGPTargetAddrErr                           /* CPU number is too big */
+                       mflr    r11                                                                     /* Save the link register */
+                       beq             Flagellant                                                      /* Oh baby, oh baby... */
+                       bgtlr-  cr1                                                                     /* Sure are... (Get our address also) */
+                       lis             r12,HIGH_ADDR(MPPIwork)                         /* Get the top half of the data area */
+                       la              r9,EXT(MPPICPUs)-MPPIwork(r9)                   /* Point into the proccessor control area */
+                       ori             r12,r12,LOW_ADDR(MPPIwork)                      /* Get the bottom half of the data area */
+                       add             r9,r9,r12                                                       /* Point right at the entry */
+                       
+SSretry:       lwarx   r5,0,r9                                                         /* Pick up the status flags (MPPICStat) and reserve it */
+                       li              r3,kSIGPInterfaceBusyErr                        /* Fill dead space and get busy return code */
+                       rlwinm. r0,r5,0,0,0                                                     /* Are we marked as busy? */
+                       lis             r6,MPPICOnline>>16                                      /* Get the online flag */
+                       bne-    ErrorReturn                                                     /* Yeah, go leave, don't bother me now... */
+                       and.    r0,r5,r6                                                        /* Are we online */
+                       li              r3,kMPPOffline                                          /* Set offline */
+                       beq-    ErrorReturn                                                     /* Ain't online, buzz off... */
+                       oris    r5,r5,(MPPICBusy>>16)&0x0000FFFF        /* Turn on the busy bit */
+                       
+                       stwcx.  r5,0,r9                                                         /* Try to set busy */
+                       ori             r10,r10,MPPICfStat<<8                           /* Put the store status function in front of the processor ID */
+                       bne-    SSretry                                                         /* Lost reservation, return busy... */
+                       
+                       li              r0,0                                                            /* Get false */
+                       stb             r0,CSAregsAreValid(r4)                          /* Set that the registers ain't valid */
+                       stw             r4,MPPICParm0(r9)                                       /* Set the status area physical address parameter */
+                       
+                       rlwimi  r5,r10,0,16,31                                          /* Put these behind the status flags */
+                       b               KickAndGo                                                       /* We're done now... */
+                       
+/*                     Spill one's seed upon the soil */
+
+Flagellant:    bl              StoreStatus                                                     /* Go store off all the registers 'n' stuff */
+                       mtlr    r11                                                                     /* Restore the return address */
+                       li              r3,kSIGPnoErr                                           /* Return no error */
+                       blr                                                                                     /* Leave... */
+
+
+/******************************************************************************************************** */
+/* */
+/*                     Here we will attempt to syncronize clocks (R3=processor). */
+/*                     Self abuse will just return with an all-ok code. */
+/* */
+/******************************************************************************************************** */
+                       
+SynchClock:
+                       mfspr   r10,pir                                                         /* Get our processor number */
+                       rlwinm  r9,r3,5,23,26                                           /* Get index into CPU array */
+                       cmplw   cr0,r3,r10                                                      /* Cleaning our own clock?? */
+                       cmplwi  cr1,r3,MPPIMaxCPU                                       /* See if we are bigger than max */
+                       lis             r12,HIGH_ADDR(MPPIwork)                         /* Get the top half of the data area */
+                       li              r3,kSIGPnoErr                                           /* Assume self-cleaning clock */
+                       beqlr                                                                           /* Oh baby, oh baby... */
+                       li              r3,kSIGPTargetAddrErr                           /* CPU number is too big */
+                       bgtlr-  cr1                                                                     /* Sure are... (Get our address also) */
+                       ori             r12,r12,LOW_ADDR(MPPIwork)                      /* Get the bottom half of the data area */
+                       la              r9,EXT(MPPICPUs)-MPPIwork(r9)                   /* Point into the proccessor control area */
+                       mflr    r11                                                                     /* Save the link register */
+                       add             r9,r9,r12                                                       /* Point right at the entry */
+                       
+SyCretry:      lwarx   r5,0,r9                                                         /* Pick up the status flags (MPPICStat) and reserve it */
+                       li              r3,kSIGPInterfaceBusyErr                        /* Fill dead space and get busy return code */
+                       rlwinm. r0,r5,0,0,0                                                     /* Are we marked as busy? */
+                       lis             r6,MPPICOnline>>16                                      /* Get the online flag */
+                       bne-    ErrorReturn                                                     /* Yeah, go leave, don't bother me now... */
+                       and.    r0,r5,r6                                                        /* Are we online */
+                       li              r3,kMPPOffline                                          /* Set offline */
+                       beq-    ErrorReturn                                                     /* Ain't online, ain't ready, buzz off... */
+                       oris    r5,r5,(MPPICBusy>>16)&0x0000FFFF        /* Turn on the busy bit */
+                       li              r0,0                                                            /* Clear this */
+                       
+                       stwcx.  r5,0,r9                                                         /* Try to set busy */
+                       ori             r10,r10,MPPICfTBsy<<8                           /* Put the timebase sync function in front of the processor ID */
+                       bne-    SyCretry                                                        /* Lost reservation, return busy... */
+
+                       stw             r0,MPPITBsync+4-MPPIwork(r12)           /* Make sure the parm area is 0 */
+                       mr              r0,r11                                                          /* Save the LR */
+                       bl              SyCbase                                                         /* Get a base register */
+SyCbase:       rlwimi  r5,r10,0,16,31                                          /* Put these behind the status flags */
+                       mflr    r11                                                                     /* Get the base */
+                       la              r11,(4*4)(r11)                                          /* DON'T MESS WITH THESE INSTRUCTIONS Make up the return point */
+                       b               KickAndGo                                                       /* Go signal the other side */
+
+SyCKrtrn:      mr              r11,r0                                                          /* Restore the return */
+
+/* */
+/*                     Start sync'ing 'er up */
+/* */
+               
+                       mftb    r4                                                                      /* Take a timeout stamp (don't need top half, we have at least 13 hours) */
+
+SyCInP0:       lwz             r5,0(r9)                                                        /* Get the CPU status word */
+                       rlwinm  r5,r5,24,24,31                                          /* Isolate the command byte */
+                       cmplwi  cr0,r5,MPPICfTBsy1                                      /* Have we reached time base sync phase 1 yet? */
+                       beq             SyCInP1                                                         /* Yeah, we're in phase 1... */
+                       mftb    r5                                                                      /* Get the bottom half of the timer again */
+                       sub             r5,r5,r4                                                        /* How long we been messin' around? */
+                       cmplwi  cr0,r5,1000*TicksPerMic                         /* Don't try more'n' a 1000µS */
+                       blt+    SyCInP0                                                         /* We haven't, so wait some more... */
+                       li              r3,kMPPTimeOut                                          /* Signal timeout */
+                       b               ErrorReturn                                                     /* By dude... */
+                       
+/* */
+/*                     Here we make sure there is enough time to sync the clocks before the lower part of the TB ticks */
+/*                     up into the high part.  This eliminates the need for any funky  */
+/*                     "get-the-top-then-get-the-bottom-then-get-the-top-again-to-see-if-it-changed" stuff.  That would */
+/*                     only make the sync harder to do. */
+/*                      */
+/*                     Also, because we use the lower TB value for the signal, we also need to make sure we do not have */
+/*                     a value of 0, we would be ever-so-sorry if it was. */
+/* */
+
+SyCInP1:       li              r4,lo16(0xC000)                                         /* Get the minimum time left on clock before tick ('bout 1 1/4 ms) */
+                       li              r8,0                                                            /* Get a 0 constant */
+                       
+SyCdelay:      mftb    r5                                                                      /* Get the time left */
+                       cmplw   cr0,r5,r4                                                       /* See if there is sufficient time before carry into high clock */
+                       bgt-    SyCdelay                                                        /* Nope, hang until it is... */
+                       mr.             r5,r5                                                           /* Did we just tick, however? */
+                       beq-    SyCdelay                                                        /* Yeah, wait until it is at least 1... */
+                       
+                       mftbu   r4                                                                      /* Get the upper */
+                       stw             r4,MPPITBsync-MPPIwork(r12)                     /* Make sure the top half is set */
+                       sync                                                                            /* Wait until it is done */
+                       
+                       mftb    r5                                                                      /* Get the lower timebase now */
+                       stw             r5,MPPITBsync+4-MPPIwork(r12)           /* Shove it out for the other processor */
+
+                       la              r6,MPPISncFght-MPPIwork(r12)            /* Point to the courtroom area */
+                       li              r5,0                                                            /* Point to the first line */
+
+SyCclear:      dcbz    r5,r6                                                           /* Clear the court */
+                       addi    r5,r5,32                                                        /* Point to the next line */
+                       cmplwi  cr0,r5,10*2*32                                          /* Enough for 9 iterations, 2 chunks at a time */
+                       blt+    SyCclear                                                        /* Clear the whole smear... */
+                       sync                                                                            /* Make sure everyone's out */
+
+                       mftb    r5                                                                      /* Get the lower timebase now */
+               
+SyCWait:       lwz             r7,MPPITBsync+4-MPPIwork(r12)           /* Get it back */
+                       mftb    r6                                                                      /* Get the bottom half again */
+                       mr.             r7,r7                                                           /* Have they set their clock yet? */
+                       sub             r0,r6,r5                                                        /* See if we're hung up */
+                       beq-    SyCdonesync                                                     /* Clock is set */
+                       cmplwi  cr0,r0,1000*TicksPerMic                         /* Timeout if we spend more than 1000µS doing this */
+                       blt+    SyCWait                                                         /* No timeout, wait some more... */
+                       li              r3,kMPPTimeOut                                          /* Set timeout */
+                       b               ErrorReturn                                                     /* Leave... */
+                       
+/* */
+/*                     Ok, so now we have set a preliminary TB value on the second processor.  It's close, but only */
+/*                     within handgranade range.   */
+/* */
+/*                     What we will do now is to let the processors (starting with the other guy) argue about the time for */
+/*                     a while (10 passes-we use the middle 8).  We'll look at the results and try to adjust the other processor's */
+/*                     time such that the timing windows are overlapping evenly. This should put the TBs close enough together */
+/*                     (0-2 ticks) that the difference is undetectable. */
+/* */
+
+
+                       
+SyCdonesync:
+                       li              r4,0                                                            /* Clear this */
+                       la              r5,MPPISncFght-MPPIwork(r12)            /* Point to the squared circle */
+
+SyCWtArg:      
+                       dcbf    0,r5                                                            /* Make sure of it */
+                       sync                                                                            /* Doubly shure */
+                       lwz             r6,0(r5)                                                        /* Listen for the defence argument */
+
+                       mr.             r6,r6                                                           /* See if they are done */
+                       beq+    SyCWtArg                                                        /* Nope, still going... */
+
+                       mftb    r7                                                                      /* They're done, time for rebuttal */
+                       stw             r7,32(r5)                                                       /* Make rebuttle */
+       
+                       addi    r4,r4,1                                                         /* Count rounds */
+
+                       cmplwi  cr0,r4,10                                                       /* See if we've gone 8 rounds plus an extra one */
+                       addi    r5,r5,64                                                        /* Point to the next round areas */
+
+                       blt+    SyCWtArg                                                        /* Not yet, come out of your corners fighting... */
+                       
+                       mftb    r5                                                                      /* Stamp the wait */
+                       
+SyCWadj:       lwz             r7,MPPITBsync+4-MPPIwork(r12)           /* Get adjustment flag */
+                       mftb    r6                                                                      /* Get timebase again */
+                       
+                       mr.             r7,r7                                                           /* Have they set their timebase with adjusted time yet? */
+                       sub             r6,r6,r5                                                        /* Get elapsed time */
+                       bne+    SyCdone                                                         /* They say it, sync done... */
+                       cmplwi  cr0,r6,1000*TicksPerMic                         /* Timeout if we spend more than 1000µS doing this */
+                       blt+    SyCWadj                                                         /* Still time, wait until adjustment is done... */
+                       
+                       li              r3,kMPPTimeOut                                          /* Set timeout */
+                       b               ErrorReturn                                                     /* Pass it back... */
+                       
+SyCdone:       li              r3,kSIGPnoErr                                           /* No errors */
+                       mtlr    r11                                                                     /* Restore LR */
+                       blr                                                                                     /* Leave... */
+
+
+/******************************************************************************************************** */
+/* */
+/*                     Here we will get the physical address of the interrupt handler. */
+/* */
+/******************************************************************************************************** */
+                       
+GetExtHandlerAddress:
+                       mflr    r11                                                                     /* Save our return */
+                       bl              GEXbase                                                         /* Make a base address */
+GEXbase:       mflr    r3                                                                      /* Get address into our base */
+                       addi    r3,r3,LOW_ADDR(GotSignal-GEXbase)       /* Get the logical address of the 'rupt handler */
+
+                       mtlr    r11                                                                     /* Restore LR */
+                       blr
+
+
+/******************************************************************************************************** */
+/* */
+/*                     Here we will get a snapshot of the processor's current signaling state (R3=processor). */
+/* */
+/******************************************************************************************************** */
+                       
+ProcessorState:
+                       lis             r12,HIGH_ADDR(MPPIwork)                         /* Get the top half of the data area */
+                       rlwinm  r9,r3,5,23,26                                           /* Get index into CPU array */
+                       cmplwi  cr1,r3,MPPIMaxCPU                                       /* See if we are bigger than max */
+                       li              r3,kSIGPTargetAddrErr                           /* CPU number is too big */
+                       bgtlr-  cr1                                                                     /* Sure are... (Get our address also) */
+                       la              r9,EXT(MPPICPUs)-MPPIwork(r9)                   /* Point into the proccessor control area */
+                       ori             r12,r12,LOW_ADDR(MPPIwork)                      /* Get the bottom half of the data area */
+                       add             r9,r9,r12                                                       /* Point right at the entry */
+                       lwz             r4,MPPICStat(r9)                                        /* Get the status word */
+                       li              r3,kSIGPnoErr                                           /* Set no errors */
+                       rlwinm. r4,r4,0,0,0                                                     /* Test for busy status */
+                       beqlr                                                                           /* Return kSIGPnoErr if not busy */
+                       li              r3,kSIGPInterfaceBusyErr                        /* Otherwise, return busy */
+                       blr                                                                                     /* Return it */
+
+/******************************************************************************************************** */
+/* */
+/*                     Here we will try to handle any pending messages (just as if an interruption occurred). */
+/*                     The purpose of this function is to assure the message passing system runs even */
+/*                     though external interrupts are disabled. Lacking a separate physical signalling */
+/*                     class, we have to share the external interrupt signal. Unfortunately, there are */
+/*                     times when disabled loops occur (in spin locks, in the debugger, etc.), and when they */
+/*                     happen, a low level message sent to a processor will not get processed, hence this */
+/*                     function exists to be called from those disabled loops. Since the calls are often */
+/*                     from disabled code, all that can be done is to process any pending *message*. Any */
+/*                     pending notification interruption (referred to throughtout this code as a SIGP */
+/*                     interruption) must remain pending. */
+/* */
+/******************************************************************************************************** */
+                       
+RunSIGPRun:
+                       lis             r12,HIGH_ADDR(MPPIwork)                         /* Get the top half of the data area */
+                       mfspr   r3,pir                                                          /* Get our CPU address */
+                       rlwinm  r9,r3,5,23,26                                           /* Get index into CPU array */
+                       ori             r12,r12,LOW_ADDR(MPPIwork)                      /* Get the bottom half of the data area */
+                       la              r9,EXT(MPPICPUs)-MPPIwork(r9)                   /* Point into the proccessor control area */
+                       mflr    r11                                                                     /* Save the link register */
+                       add             r9,r9,r12                                                       /* Point right at our entry */
+                       lwz             r3,MPPICPriv(r9)                                        /* Get our privates */
+                       cmplw   cr1,r11,r11                                                     /* Make sure IdleWait doesn't try to clear 'rupt request */
+                       oris    r3,r3,MPPICXRun>>16                                     /* Diddle with them and show we entered here */
+                       stw             r3,MPPICPriv(r9)                                        /* Put away our privates */
+                       b               IdleWait                                                        /* Go pretend there was an interrupt... */
+
+/******************************************************************************************************** */
+/* */
+/*                     Error return.  We only need this when we leave with a reservation.  We really SHOULD clear it... */
+/* */
+/******************************************************************************************************** */
+
+ErrorReturn:
+                       mtlr    r11                                                                     /* Restore LR */
+                       blr                                                                                     
+
+/******************************************************************************************************** */
+/* */
+/*                     Kick the target processor.  Note that we won't set the passing bit until we are ready to exit. */
+/*                     The reason for this is that we have the silly, old watchchihuahua board to deal with.  Because  */
+/*                     we can't just set the interrupt and leave, we gotta wait for it to be seen on the other side. */
+/*                     This means that there could be a timeout and if so, we need to back off the function request else */
+/*                     we'd see busy when they tried to redrive it.  We'll have to deal with a tad of spin on the secondary side. */
+/*                     note that this just applies to a primary to secondary function on the old board. */
+/* */
+/******************************************************************************************************** */
+       
+KickAndGo:
+                       la              r8,MPPICPU0-MPPIwork(r12)                       /* Get the primary work area address */
+                       mtlr    r11                                                                     /* Restore the link register */
+                       cmplw   cr0,r8,r9                                                       /* Which is target?  primary or secondary? */
+                       mfmsr   r11                                                                     /* Save off the MSR */
+                       oris    r5,r5,MPPICPass>>16                                     /* Set the passing bit on */
+                       stw             r5,MPPICStat(r9)                                        /* Store the pass and let the other processor go on */
+                       
+                       beq             KickPrimary                                                     /* The target is the primary... */
+                       
+                       ori             r3,r11,0x0010                                           /* Turn on DDAT bit */
+                       lbz             r4,MPPIstatus-MPPIwork(r12)                     /* Load up the global status byte */
+                       lwz             r8,MPPIHammer-MPPIwork(r12)                     /* Point to the Hammerhead area */
+       
+                       mtmsr   r3                                                                      /* Turn on DDAT */
+                       isync
+                       
+                       andi.   r4,r4,MPPI2Pv2                                          /* Are we on the new or old board? */
+                       li              r3,0                                                            /* Set the bit for an interrupt request */
+                       beq             KickOld                                                         /* Ok, it's the old board... */
+                       
+                       sync                                                                            /* Make sure this is out there */
+                       stb             r3,IntReg(r8)                                           /* Set the interruption signal */
+                       eieio
+       
+                       mtmsr   r11                                                                     /* Set DDAT back to what it was */
+                       isync
+                       li              r3,kSIGPnoErr                                           /* Set no errors */
+                       blr                                                                                     /* Leave... */
+                       
+KickOld:       li              r4,8                                                            /* Set the number of tries */
+
+KickAgain:     mftb    r6                                                                      /* Stamp the bottom half of time base */
+                       stb             r3,IntReg(r8)                                           /* Stick the interrupt */
+                       eieio                                                                           /* Fence me in */
+                       
+CheckKick:     lbz             r10,IntReg(r8)                                          /* Get the interrupt request back again */
+                       mr.             r10,r10                                                         /* Yes? Got it? */
+                       bne             FinalDelay                                                      /* Yeah, do the final delay and then go away... */
+                       
+                       mftb    r7                                                                      /* Get the time again */
+                       sub             r7,r7,r6                                                        /* Get time-so-far */
+                       cmplwi  cr0,r7,75*TicksPerMic                           /* Hold it for 75µS (average disable is supposed to be 100µS or so) */
+                       blt+    CheckKick                                                       /* Keep waiting the whole time... */
+                       
+                       li              r10,SecInt                                                      /* Set the deassert bit */
+                       mftb    r6                                                                      /* Stamp start of deassert time */
+                       stb             r10,IntReg(r8)                                          /* Deassert the interrupt request */
+                       eieio
+                       
+DeassertWT:    mftb    r7                                                                      /* Stamp out the time */
+                       sub             r7,r7,r6                                                        /* Get elapsed */
+                       cmplwi  cr0,r7,16*TicksPerMic                           /* Hold off 16µS (minimum is 12µS) */
+                       blt+    DeassertWT                                                      /* Keep spinning... */
+                       
+                       subi    r4,r4,1                                                         /* See if we have another retry we can do */
+                       mr.             r4,r4                                                           /* Are we there yet? */
+                       blt+    KickAgain                                                       /* Retry one more time... */
+                       
+                       rlwinm  r5,r5,0,2,31                                            /* Clear busy and passing bits */
+                       rlwinm  r5,r5,0,24,15                                           /* Clear the function request to idle */
+                       
+                       mtmsr   r11                                                                     /* Restore DDAT stuff */
+                       isync
+
+                       stw             r5,MPPICStat(r9)                                        /* Rescind the request */
+                       li              r3,kMPPTimeOut                                          /* Set timeout */
+                       blr                                                                                     /* Leave... */
+                       
+FinalDelay:    mftb    r6                                                                      /* Stamp the start of the final delay */
+
+FinalDelayW:
+                       mftb    r7                                                                      /* Stamp out the time */
+                       sub             r7,r7,r6                                                        /* Get elapsed */
+                       cmplwi  cr0,r7,16*TicksPerMic                           /* Hold off 16µS (minimum is 12µS) */
+                       blt+    FinalDelayW                                                     /* Keep spinning... */
+
+                       mtmsr   r11                                                                     /* Restore DDAT stuff */
+                       isync
+                       li              r3,kSIGPnoErr                                           /* Set no errors */
+                       blr                                                                                     /* Leave... */
+                       
+KickPrimary:
+                       ori             r3,r11,0x0010                                           /* Turn on the DDAT bit */
+                       lwz             r8,MPPIEther-MPPIwork(r12)                      /* Get the address of the ethernet ROM */
+                       
+                       mtmsr   r3                                                                      /* Turn on DDAT */
+                       isync
+
+                       li              r4,4                                                            /* Get flip count */
+                       
+                       sync                                                                            /* Make sure the status word is out there */
+
+FlipOff:       lbz             r3,0(r8)                                                        /* Reference ethernet ROM to get chip select twiddled */
+                       eieio                                                                           /* Make sure of this (Hmm, this is chip select, not memory-mapped */
+                                                                                                               /* storage.  Do we even need the eieio?) */
+                                                                                                               
+                       addic.  r4,r4,-1                                                        /* Have we flipped them off enough? */
+                       bgt+    FlipOff                                                         /* Not yet, they deserve more... */
+                       
+                       mtmsr   r11                                                                     /* Restore DDAT stuff */
+                       isync
+                       li              r3,kSIGPnoErr                                           /* Set no errors */
+                       blr                                                                                     /* Return... */
+
+/******************************************************************************************************** */
+/* */
+/*                     This is the code for the secondary processor */
+/* */
+/******************************************************************************************************** */
+
+/*                     Note that none of this code needs locks because there's kind of a synchronization */
+/*                     shuffle going on. */
+
+/* */
+/*                     First, we need to do a bit of initialization of the processor. */
+/* */
+
+
+CPUInit:       
+                       li              r27,0x3040                                                      /* Set floating point and machine checks on, IP to 0xFFF0xxxx */
+                       mtmsr   r27                                                                     /* Load 'em on in */
+                       isync
+                       
+                       lis             r28,-32768                                                      /* Turn on machine checks */
+                                                                                                               /* should be 0x8000 */
+                       ori             r28,r28,0xCC84                                          /* Enable caches, clear them,  */
+                                                                                                               /* disable serial execution and turn BHT on */
+                       sync
+                       mtspr   HID0,r28                                                        /* Start the cache clear */
+                       sync
+
+/* */
+/*                     Clear out the TLB.  They be garbage after hard reset. */
+/* */
+
+                       li              r0,512                                                          /* Get number of TLB entries (FIX THIS) */
+                       li              r3,0                                                            /* Start at 0 */
+                       mtctr   r0                                                                      /* Set the CTR */
+                       
+purgeTLB:      tlbie   r3                                                                      /* Purge this entry */
+                       addi    r3,r3,4096                                                      /* Next page */
+                       bdnz    purgeTLB                                                        /* Do 'em all... */
+                                       
+                       sync                                                                            /* Make sure all TLB purges are done */
+                       tlbsync                                                                         /* Make sure on other processors also */
+                       sync                                                                            /* Make sure the TLBSYNC is done */
+
+/* */
+/*                     Clear out the BATs.  They are garbage after hard reset. */
+/* */
+
+                       li              r3,0                                                            /* Clear a register */
+                       
+                       mtspr   DBAT0L,r3                                                       /* Clear BAT */
+                       mtspr   DBAT0U,r3                                                       /* Clear BAT */
+                       mtspr   DBAT1L,r3                                                       /* Clear BAT */
+                       mtspr   DBAT1U,r3                                                       /* Clear BAT */
+                       mtspr   DBAT2L,r3                                                       /* Clear BAT */
+                       mtspr   DBAT2U,r3                                                       /* Clear BAT */
+                       mtspr   DBAT3L,r3                                                       /* Clear BAT */
+                       mtspr   DBAT3U,r3                                                       /* Clear BAT */
+                       
+                       mtspr   IBAT0L,r3                                                       /* Clear BAT */
+                       mtspr   IBAT0U,r3                                                       /* Clear BAT */
+                       mtspr   IBAT1L,r3                                                       /* Clear BAT */
+                       mtspr   IBAT1U,r3                                                       /* Clear BAT */
+                       mtspr   IBAT2L,r3                                                       /* Clear BAT */
+                       mtspr   IBAT2U,r3                                                       /* Clear BAT */
+                       mtspr   IBAT3L,r3                                                       /* Clear BAT */
+                       mtspr   IBAT3U,r3                                                       /* Clear BAT */
+
+/* */
+/*                     Map 0xF0000000 to 0xFFFFFFFF for I/O; make it R/W non-cacheable */
+/*                     Map     0x00000000 to 0x0FFFFFFF for mainstore; make it R/W cachable */
+/* */
+
+                       lis             r6,0xF000                                                       /* Set RPN to last segment */
+                       ori             r6,r6,0x1FFF                                            /* Set up upper BAT for 256M, access both */
+                       
+                       lis             r7,0xF000                                                       /* Set RPN to last segment */
+                       ori             r7,r7,0x0032                                            /* Set up lower BAT for 256M, access both, non-cachable */
+               
+                       mtspr   DBAT0L,r7                                                       /* Setup ROM and I/O mapped areas */
+                       mtspr   DBAT0U,r6                                                       /* Now do the upper DBAT */
+                       sync
+       
+                       li              r6,0x1FFF                                                       /* Set up upper BAT for 256M, access both */
+                       li              r7,0x0012                                                       /* Set up lower BAT for r/w access */
+                       
+                       mtspr   DBAT1L,r7                                                       /* Set up an initial view of mainstore */
+                       mtspr   DBAT1U,r6                                                       /* Now do the upper DBAT */
+                       sync
+
+/* */
+/*                     Clean up SDR and segment registers */
+/* */
+
+                       li              r3,0                                                            /* Clear a register */
+                       mtspr   SDR1,r3                                                         /* Clear SDR1 */
+                       
+                       li              r4,0                                                            /* Clear index for segment registers */
+                       lis             r5,0x1000                                                       /* Set the segment indexer */
+                       
+clearSR:       mtsrin  r3,r4                                                           /* Zero out the SR */
+                       add.    r4,r4,r5                                                        /* Point to the next segment */
+                       bne-    clearSR                                                         /* Keep going until we wrap back to 0 */
+                       
+                       lis             r5,HIGH_ADDR(EXT(FloatInit))            /* Get top of floating point init value */
+                       ori             r5,r5,LOW_ADDR(EXT(FloatInit))          /* Slam bottom */
+                       lfd             f0,0(r5)                                                        /* Initialize FP0 */
+                       fmr             f1,f0                                                           /* Ours in not */                                       
+                       fmr             f2,f0                                                           /* to wonder why, */
+                       fmr             f3,f0                                                           /* ours is but to */
+                       fmr             f4,f0                                                           /* do or die! */
+                       fmr             f5,f0                                           
+                       fmr             f6,f0                                           
+                       fmr             f7,f0                                           
+                       fmr             f8,f0                                           
+                       fmr             f9,f0                                           
+                       fmr             f10,f0                                          
+                       fmr             f11,f0                                          
+                       fmr             f12,f0                                          
+                       fmr             f13,f0                                          
+                       fmr             f14,f0                                          
+                       fmr             f15,f0                                          
+                       fmr             f16,f0                                          
+                       fmr             f17,f0                                          
+                       fmr             f18,f0                                          
+                       fmr             f19,f0                                          
+                       fmr             f20,f0                                          
+                       fmr             f21,f0                                          
+                       fmr             f22,f0                                          
+                       fmr             f23,f0                                          
+                       fmr             f24,f0                                          
+                       fmr             f25,f0                                          
+                       fmr             f26,f0                                          
+                       fmr             f27,f0                                          
+                       fmr             f28,f0                                          
+                       fmr             f29,f0                                          
+                       fmr             f30,f0                                          
+                       fmr             f31,f0                                          
+                       
+/* */
+/*                     Whew, that was like, work, man!  What a cleaning job, I should be neater */
+/*                     when I reset. */
+/* */
+/*                     Finally we can get some data DAT turned on and we can reset the interrupt */
+/*                     (which may have been done before we get here) and get into the bring up */
+/*                     handshakes. */
+/*              */
+/*                     Note that here we need to use the actual V=R addresses for HammerHead */
+/*                     and PCI1 adr.  There are no virtual mappings set up on this processor. */
+/*                     We need to switch once the firmware is initialized.  Also, we don't know */
+/*                     where our control block is yet. */
+/* */
+               
+                       lis             r12,HIGH_ADDR(MPPIwork)                         /* Get the top half of the data area */
+                       ori             r12,r12,LOW_ADDR(MPPIwork)                      /* Get the bottom half of the data area */
+
+                       mfmsr   r3                                                                      /* Get the MSR */
+                       ori             r3,r3,0x0010                                            /* Turn data DAT on */
+                       mtmsr   r3                                                                      /* DAT is on (well, almost) */
+                       isync                                                                           /* Now it is for sure */
+               
+                       lis             r8,HammerHead>>16                                       /* Point to the HammerHead controller */
+                       li              r7,SecInt                                                       /* Get value to reset */
+                       stb             r7,IntReg(r8)                                           /* Reset the interrupt */
+                       eieio                                                                           /* Fence it off */
+               
+/* */
+/*                     Now we can plant and harvest some bits. */
+/* */
+               
+                       lwz             r6,MPPIlogCPU-MPPIwork(r12)                     /* Get the logical CPU address to assign */
+                       mfspr   r7,pir                                                          /* Get the old PIR */
+                       rlwimi  r7,r6,0,27,31                                           /* Copy all of the reserved parts */
+                       mtspr   pir,r7                                                          /* Set it */
+                       
+/* */
+/*                     This little piece of code here determines if we are on the first or second version */
+/*                     of the two processor board.  The old one shouldn't ever be shipped (well, maybe by  */
+/*                     DayStar) but there are some around here. */
+/* */
+/*                     The newer version of the 2P board has a different state machine than the older one. */
+/*                     When we are in the board state we're in now, primary arbitration is turned on while */
+/*                     it is not until the next state in the old board.  By checking the our bus address */
+/*                     (WhoAmI) we can tell. */
+/* */
+
+                       lbz             r7,WhoAmI(r8)                                           /* Get the current bus master ID */
+                       andi.   r7,r7,PriCPU                                            /* Do we think we're the primary? */
+                       beq             On2Pv1                                                          /* No, that means we're on the old 2P board */
+                       
+                       lbz             r7,MPPIstatus-MPPIwork(r12)                     /* Get the status byte */
+                       ori             r7,r7,MPPI2Pv2                                          /* Show we're on the new board */
+                       stb             r7,MPPIstatus-MPPIwork(r12)                     /* Set the board version */
+                       
+On2Pv1:                rlwinm  r9,r6,5,23,26                                           /* Get index into the CPU specific area */
+                               
+                       la              r9,EXT(MPPICPUs)-MPPIwork(r9)                   /* Index to processor */
+                       add             r9,r9,r12                                                       /* Get a base for our CPU specific area */
+                       
+                       oris    r6,r6,((MPPICBusy+MPPICOnline+MPPICStop)>>16)&0x0000FFFF        /* Set CPU busy, online, stopped,  */
+                                                                                                                                                               /*   and busy set by himself */
+                       stw             r6,MPPICStat(r9)                                        /* Save the whole status word */
+                       
+                       li              r4,0x80                                                         /* Get beginnings of a CPU address mask */
+                       lhz             r11,MPPIinst-MPPIwork(r12)                      /* Get the installed and online status flags */
+                       srw             r4,r4,r6                                                        /* Make a mask */
+                       rlwimi  r4,r4,8,16,23                                           /* Double up the mask for both flags */
+                       or              r11,r11,r4                                                      /* Set that we are installed and online */
+                       sync                                                                            /* Make sure the main processor sees the rest of the stuff */
+                       
+                       sth             r11,MPPIinst-MPPIwork(r12)                      /* We're almost done, just need to set the TB */
+                       
+                       lis             r5,PCI1AdrReg>>16                                       /* Point to the PCI1 address register            */
+                       li              r4,0                                                            /* Clear this out */
+                       stw             r4,0(r5)                                                        /* Set PCI register to 0 to show we're ready for TB sync */
+                       eieio                                                                           /* Fence it off */
+
+Wait4TB:       lwz             r7,0(r5)                                                        /* Get the PCI1 reg to see if time to set time */
+                       mr.             r7,r7                                                           /* Is it ready yet? */
+                       beq             Wait4TB                                                         /* Nope, wait for it... */
+                       isync                                                                           /* No peeking... */
+                       
+                       lwz             r3,MPPITBsync-MPPIwork(r12)                     /* Get the high word of TB */
+                       lwz             r4,MPPITBsync+4-MPPIwork(r12)           /* Get the low word */
+                       
+/*                     Note that we need no TB magic here 'cause they ain't running */
+
+                       mttbu   r3                                                                      /* Set the high part */
+                       mttbl   r4                                                                      /* Set the low part */
+                       
+                       rlwinm  r6,r6,0,2,31                                            /* Clear the busy bit and passed */
+                       stw             r6,MPPICStat(r9)                                        /* Store the status word */
+                       
+                       sync                                                                            /* Make sure all is right with the world */
+                       
+                       li              r3,0                                                            /* Set the init done signal */
+                       stw             r3,0(r5)                                                        /* Feed the dog and let him out */
+                       sync                                                                            /* Make sure this is pushed on out */
+
+                       li              r27,0x3040                                                      /* Make MSR the way we likes it */
+                       mtmsr   r27                                                                     /* Load 'em on in */
+                       isync
+
+/* */
+/*                     Jump on to the idle wait loop.  We're online and ready, but we're */
+/*                     still in the reset state.  We need to wait until we see a start signal. */
+/* */
+/*                     Note that the idle loop expects R9 to be our CPU-specific work area; */
+/*                     R12 is the base of the code and global work area  */
+/* */
+
+                       cmplw   cr1,r11,r12                                                     /* Make sure IdleWait knows to clear 'rupt request */
+                       b               IdleWait
+
+
+/******************************************************************************************************** */
+/******************************************************************************************************** */
+/* */
+/*                     Here is the interruption handler. */
+/* */
+/*                     What we'll do here is to get our registers into a standard state and figure out which */
+/*                     which processor we are on.  The processors have pretty much the same code.  The primary */
+/*                     will reset the the secondary to primary interruption bit and the secondary will reset the SecInt */
+/*                     flags. */
+/* */
+/*                     The primary to secondary interrupt is an exception interruption contolled by a bit in the  */
+/*                     Hammerhead IntReg.  The only bit in here is SecInt which is active low.  Writing a 0 into the */
+/*                     bit (bit 0) yanks on the external pin on the secondary.  Note that it is the only external */
+/*                     connected on the secondary.  SecInt must be set to 1 to clear the interruption.  On the old */
+/*                     2P board, asserting the external interrupt causes a watchdog timer to start which expires unless */
+/*                     the interrupt request is withdrawn. On a 180Mhz system the time to expire is about 256µS,  */
+/*                     not very long.  So, what we need to do is to time the assertion and if it has not been reset */
+/*                     reset, do it ourself.  Unfortunatelty we need to keep it deasserted for at least 12µS or the  */
+/*                     watchdog will not stop.  This leads to another problem: even if the secondary processor sees */
+/*                     the interrupt and deasserts the request itself,  we cannot reassert before the 12µS limit, */
+/*                     else havoc will be wrought.  We just gotta make sure. */
+/* */
+/*                     So, the secondary to primary interrupt is megafunky.  The mother board is wired with the  */
+/*                     MACE ethernet chip's chip-select pin wired to Grand Centeral's external interrrupt #10 pin. */
+/*                     This causes a transient interrupt whenever MACE is diddled. GC latches the interrupt into the */
+/*                     events register where we can see it and clear it. */
+/* */
+/******************************************************************************************************** */
+/******************************************************************************************************** */
+
+GotSignal:     mfspr   r9,pir                                                          /* Get our processor ID */
+                       lis             r12,HIGH_ADDR(MPPIwork)                         /* Get the top half of the data area */
+                       rlwinm  r9,r9,5,23,26                                           /* Clean this up */
+                       ori             r12,r12,LOW_ADDR(MPPIwork)                      /* Get the bottom half of the data area */
+                       la              r9,EXT(MPPICPUs)-MPPIwork(r9)                   /* Point into the proccessor control area */
+                       mflr    r11                                                                     /* Save our return */
+                       add             r9,r9,r12                                                       /* Point right at the entry */
+
+/*                     We'll come in here if we're stopped and found the 'rupt via polling */
+/*                     or we were kicked off by the PollSIGP call.  We  need */
+/*                     to wipe out the interrupt request no matter how we got here. */
+
+SimRupt:       mfmsr   r4                                                                      /* Get the MSR */
+
+                       la              r8,MPPICPU0-MPPIwork(r12)                       /* Get address of main processor's work area */
+                       ori             r5,r4,0x0010                                            /* Turn on the DDAT bit */
+                       cmplw   cr0,r8,r9                                                       /* Are we on the main? */
+                       cmplw   cr1,r4,r4                                                       /* Set CR1 to indicate we've cleared any 'rupts */
+                       bne             SecondarySig                                            /* Go if we are not on main processor... */
+
+/* */
+/*                     Handle the secondary to primary signal */
+/* */
+
+PrimarySig:
+
+                       lwz             r8,MPPIGrandC-MPPIwork(r12)                     /* Get the address of the Grand Central area base */
+                       mtmsr   r5                                                                      /* Turn on DDAT */
+                       isync                                                                           /* Now don't be usin' dem speculative executions */
+                       li              r7,EventsReg                                            /* Get address of the interrupt events register */
+                       lwbrx   r6,r7,r8                                                        /* Grab the interruption events */
+
+                       lis             r5,0x4000                                                       /* Get the mask for the Ext10 pin */
+                       and.    r0,r6,r5                                                        /* See if our bit is on */
+                       li              r7,ClearReg                                                     /* Point to the interruption clear register */
+               
+                       beq+    SkpClr                                                          /* Skip the clear 'cause it's supposed to be soooo slow... */
+                       
+                       stwbrx  r5,r7,r8                                                        /* Reset the interrupt latch */
+                       eieio                                                                           /* Fence off the last 'rupt */
+
+SkpClr:                mtmsr   r4                                                                      /* Set MSR to entry state */
+                       isync                                                                           /* Make sure we ain't gunked up no future storage references */
+               
+                       bne+    IdleWait                                                        /* Go join up and decode the function... */
+                       
+                       mtlr    r11                                                                     /* Restore return address */
+                       andc.   r0,r6,r5                                                        /* Any other bits on? */
+                       li              r3,kMPVainInterrupt                                     /* Assume we got nothing */
+                       beqlr                                                                           /* We got nothing, tell 'em to eat 'rupt... */
+                       li              r3,kMPIOInterruptPending                        /* Tell them to process an I/O 'rupt */
+                       blr                                                                                     /* Ignore the interrupt... */
+
+/* */
+/*                     Handle the primary to secondary signal */
+/* */
+
+SecondarySig:
+                       lwz             r3,MPPICStat(r9)                                        /* Pick up our status word */
+                       lis             r8,HammerHead>>16                                       /* Get the address of the hammerhead (used during INIT on non-main processor) */
+                       rlwinm. r3,r3,0,3,3                                                     /* Check if we are already "in-the-know" (all started up) */
+                       beq-    UseAltAddr                                                      /* Nope, use hardcoded Hammerhead address */
+                       lwz             r8,MPPIHammer-MPPIwork(r12)                     /* Get the kernel's HammerHead area */
+
+UseAltAddr:    mtmsr   r5                                                                      /* Turn on DDAT */
+                       isync                                                                           /* Now don't be usin' dem speculative executions */
+                       li              r0,SecInt                                                       /* Get the Secondary interrupt bit */
+                       stb             r0,IntReg(r8)                                           /* Reset the interrupt request */
+                       mtmsr   r4                                                                      /* Set MSR to entry state */
+                       eieio                                                                           /* Fence me in */
+                       isync                                                                           /* Make sure we ain't gunked up no future storage references */
+                       
+                       b               IdleWait                                                        /* Go decode this request... */
+                       
+/******************************************************************************************************** */
+/******************************************************************************************************** */
+/* */
+/*                     This is the idle wait.   */
+/* */
+/*                     We're stuck in here so long as we are stopped or reset. */
+/*                     All functions except for "start" pass back through here.  Start is weird because */
+/*                     it is an initial thing, i.e., we can't have gotten here via any kind of exception, */
+/*                     so there is no state to restore.  The "started" code is expected to require no know */
+/*                     state and will take care of all initialization/fixup required. */
+/* */
+/******************************************************************************************************** */
+/******************************************************************************************************** */
+
+BadRuptState:                                                                                  /* We don't do anything special yet for a bad state, just eat request */
+KillBusy:      rlwinm  r3, r3, 0, 2, 31                                        /* Remove the message pending flags. */
+                       rlwinm  r3, r3, 0, 24, 16                                       /* Set the function to idle. */
+                       stw             r3,MPPICStat(r9)                                        /* Update/unlock the status word. */
+
+ReenterWait: cmplwi    cr1,r9,0                                                        /* Turn off the 'rupt cleared flag */
+
+IdleWait:      lis             r4,MPPICBusy>>16                                        /* Get busy status */
+
+SpinIdle:                              
+                       lwz             r3,MPPICStat(r9)                                        /* Pick up our status word */
+               
+                       and.    r5,r3,r4                                                        /* Isolate the busy bit */
+                       lis             r6,MPPICPass>>16                                        /* Get the passed busy flag */
+                       bne             TooBusy                                                         /* Work, work, work, that's all we do is work... */
+                       
+                       rlwinm. r5,r3,0,4,4                                                     /* See if we are stopped */
+                       lwz             r8,MPPICPriv(r9)                                        /* Pick up our private flags */
+                       bne-    SpinIdle                                                        /* Yeah, keep spinning... */
+                       
+                       
+/* */
+/*                     Restore the state and get outta here.  Now, we shouldn't be in a reset state and not be stopped, */
+/*                     so we can go ahead and safely return up a level because it exists.  If we are reset, no state exists */
+/*                     and we should always be stopped. */
+/* */
+                       
+                       rlwinm  r4, r8, 1, 0, 0                                         /* Get the explicit run bit, shifted left one. */
+                       rlwinm. r5, r8, 0, 0, 0                                         /* See if there is a SIGP signal pending */
+                       and             r4, r8, r4                                                      /* Turn off the SIGP pending bit if this was not an explicit run */
+                                                                                                               /* Also the explicit run bit is cleared */
+                       mtlr    r11                                                                     /* Restore the return point */
+                       li              r3,kMPVainInterrupt                                     /* Tell the interrupt handler to ignore the interrupt */
+                       stw             r4,MPPICPriv(r9)                                        /* Set that flag back for later */
+                       beqlr                                                                           /* Time to leave if we ate the 'rupt... */
+
+                       li              r3,kMPSignalPending                                     /* Set that there is a SIGP interruption pending */
+                       
+                       blr                                                                                     /* Go away, let our caller handle this thing... QED!!!!!!!!! */
+
+/* */
+/*           QQQQQ       EEEEEEEEEE    DDDDDDDDD */
+/*         QQQQQQQQQ     EEEEEEEEEE    DDDDDDDDDDD */
+/*        QQQQ   QQQQ    EEEE          DDD     DDD */
+/*       QQQQ     QQQQ   EEEEEEEEEE    DDD     DDD */
+/*       QQQQ   Q QQQQ   EEEEEEEEEE    DDD     DDD */
+/*        QQQQ  QQQQQ    EEEE          DDD     DDD */
+/*         QQQQQQQQQQQ   EEEEEEEEEE    DDDDDDDDDDD */
+/*           QQQQQ QQQ   EEEEEEEEEE    DDDDDDDDD */
+/* */
+/*                     (I finished here) */
+/* */
+
+                       
+/* */
+/*                     This is where we decode the function and do what's right. */
+/*                     First we need to check if it's really time to do something. */
+/* */
+
+TooBusy:       and.    r5,r3,r6                                                        /* See if the passed flag is on */
+                       beq             SpinIdle                                                        /* No, not yet, try the whole smear again... */
+                       
+                       beq+    cr1,KeepRupt                                            /* Don't clear 'rupt if we already did (or entered via RunSIGRun) */
+
+                       lwz             r5,MPPICPriv(r9)                                        /* Get the private flags */
+                       rlwinm. r5, r5, 0, 1, 1                                         /* Did we enter via RunSIGPRun? */
+                       beq             SimRupt                                                         /* Nope, 's'ok, go clear physical 'rupt... */
+                       
+KeepRupt:
+                       bl              GetOurBase                                                      /* Get our address */
+GetOurBase:    rlwinm  r4,r3,26,22,29                                          /* Get the opcode index * 4 */
+                       mflr    r12                                                                     /* Get the base address */
+                       la              r7,LOW_ADDR(IFuncTable-GetOurBase)(r12)         /* Point to the function table */
+                       
+                       cmplwi  cr0,r4,7*4                                                      /* See if they sent us some bogus junk */
+                                                                                                               /* Change 7 if we add more functions */
+                       add             r7,r7,r4                                                        /* Point right at the entry */
+                       bgt-    KillBusy                                                        /* Bad request code, reset busy and eat it... */
+                       
+                       mtlr    r7                                                                      /* Set up the LR */
+                       
+                       blr                                                                                     /* Go execute the function... */
+       
+IFuncTable:
+                       b               KillBusy                                                        /* This handles the signal in vain... */
+                       b               IStart                                                          /* This handles the start function */
+                       b               IResume                                                         /* This handles the resume function */
+                       b               IStop                                                           /* This handles the stop function */
+                       b               ISIGP                                                           /* This handles the SIGP function */
+                       b               IStatus                                                         /* This handles the store status function */
+                       b               ITBsync                                                         /* This handles the synchronize timer base function */
+                       b               IReset                                                          /* This handles the reset function */
+
+/******************************************************************************************************** */
+/******************************************************************************************************** */
+/* */
+/*                     Here are the functions handled at interrupt time */
+/* */
+/******************************************************************************************************** */
+/******************************************************************************************************** */
+
+/******************************************************************************************************** */
+/* */
+/*                     The Start function.  This guy requires that the processor be in the reset and online state. */
+/* */
+/******************************************************************************************************** */
+
+IStart:                lis             r4,MPPICOnline>>16                                      /* Get bits required to be on */
+                       isync                                                                           /* Make sure we haven't gone past here */
+                       and             r6,r3,r4                                                        /* See if they are on */
+                       cmplw   cr1,r6,r4                                                       /* Are they all on? */
+                       lwz             r4,MPPICParm0(r9)                                       /* Get the physical address of the code to go to */
+                       bne-    cr1,BadRuptState                                        /* Some required state bits are off */
+                       rlwinm  r3,r3,0,2,31                                            /* Kill the busy bits */
+                       rlwinm  r3,r3,0,24,15                                           /* Set the function to idle */
+                       oris    r3,r3,MPPICReady>>16                            /* Set ready state */
+                       rlwinm  r3,r3,0,5,3                                                     /* Clear out the stop bit */
+                       mtlr    r4                                                                      /* Set the LR */
+                       stw             r3,MPPICStat(r9)                                        /* Clear out the status flags */
+                       lwz             r3,MPPICParm2(r9)                                       /* Get pass-thru parameter */
+                       blrl                                                                            /* Start up the code... */
+/* */
+/*                     The rules for coming back here via BLR are just opposite the normal way:  you can trash R0-R3 and */
+/*                     R13-R31, all the CRs; don't touch SPRG1 or SPRG3, the MSR, the SRs or BATs 0 and 1. */
+/*                     Follow these simple rules and you allowed back; don't follow them and die. */
+/*                     We only come back here if there is some kind of startup failure so's we can try again later */
+/* */
+
+                       lwz             r3,MPPICStat(r9)                                        /* Get back the status word */
+                       cmplw   cr1,r4,r4                                                       /* Show that we have already taken care of the 'rupt */
+                       rlwinm  r3,r3,0,4,2                                                     /* Reset the ready bit */
+                       b               KillBusy                                                        /* Back into the fold... */
+
+/******************************************************************************************************** */
+/* */
+/*                     The Resume function.  This guy requires that the processor be online and ready. */
+/* */
+/******************************************************************************************************** */
+
+IResume:       lis             r4,(MPPICOnline+MPPICReady)>>16         /* Get states required to be set */
+                       and             r6,r3,r4                                                        /* See if they are on */
+                       cmplw   cr0,r6,r4                                                       /* Are they all on? */
+                       bne-    BadRuptState                                            /* Some required off state bits are on */
+                       rlwinm  r3,r3,0,5,3                                                     /* Clear out the stop bit */
+                       b               KillBusy                                                        /* Get going... */
+
+/******************************************************************************************************** */
+/* */
+/*                     The Stop function.  All we care about here is that the guy is online. */
+/* */
+/******************************************************************************************************** */
+
+IStop:         lis             r4,MPPICOnline>>16                                      /* All we care about is if we are online or not */
+                       and.    r6,r3,r4                                                        /* See if we are online */
+                       beq-    BadRuptState                                            /* Some required off state bits are on */
+                       oris    r3,r3,MPPICStop>>16                                     /* Set the stop bit */
+                       b               KillBusy                                                        /* Get stopped... */
+
+
+/******************************************************************************************************** */
+/* */
+/*                     The SIGP function.  All we care about here is that the guy is online. */
+/* */
+/******************************************************************************************************** */
+
+ISIGP:         lis             r4,(MPPICOnline+MPPICReady)>>16         /* Get states required to be set */
+                       and             r6,r3,r4                                                        /* See if they are on */
+                       lwz             r7,MPPICPriv(r9)                                        /* Get the private flags */
+                       cmplw   cr0,r6,r4                                                       /* Are they all on? */
+                       oris    r6,r7,(MPPICSigp>>16)&0x0000FFFF        /* Set the SIGP pending bit */
+                       bne-    BadRuptState                                            /* Some required off state bits are on */
+                       lwz             r4,MPPICParm0(r9)                                       /* Get the SIGP parameter */
+                       stw             r6,MPPICPriv(r9)                                        /* Stick the pending bit back */
+                       stw             r4,MPPICParm0BU(r9)                                     /* Back up parm 0 so it is safe once we unlock */
+                       b               KillBusy                                                        /* Get stopped... */
+
+/******************************************************************************************************** */
+/* */
+/*                     The store status function.  This guy requires that the processor be in the stopped state. */
+/* */
+/******************************************************************************************************** */
+
+IStatus:       lis             r4,MPPICOnline>>16                                      /* All we care about is if we are online or not */
+                       and.    r6,r3,r4                                                        /* See if we are online */
+                       isync                                                                           /* Make sure we havn't gone past here */
+                       beq-    BadRuptState                                            /* Some required off state bits are on */
+                       lwz             r4,MPPICParm0(r9)                                       /* Get the status area physical address */
+                       rlwinm. r6,r3,0,3,3                                                     /* Test processor ready */
+                       
+                       beq             INotReady                                                       /* Not ready, don't assume valid exception save area */
+                       bl              StoreStatus                                                     /* Go store off all the registers 'n' stuff */
+                       b               KillBusy                                                        /* All done... */
+                       
+INotReady:
+                       lis             r7,0xDEAD                                                       /* Get 0xDEAD + 1 */
+                       ori             r7,r7,0xF1D0                                            /* Get 0xDEADF1D0 */
+                       stw             r7,CSAgpr+(0*4)(r4)                                     /* Store invalid R0 */
+                       stw             r7,CSAgpr+(1*4)(r4)                                     /* Store invalid R1 */
+                       stw             r7,CSAgpr+(2*4)(r4)                                     /* Store invalid R2 */
+                       stw             r7,CSAgpr+(3*4)(r4)                                     /* Store invalid R3 */
+                       stw             r7,CSAgpr+(4*4)(r4)                                     /* Store invalid R4 */
+                       stw             r7,CSAgpr+(5*4)(r4)                                     /* Store invalid R5 */
+                       stw             r7,CSAgpr+(6*4)(r4)                                     /* Store invalid R6 */
+                       stw             r7,CSAgpr+(7*4)(r4)                                     /* Store invalid R7 */
+                       stw             r7,CSAgpr+(8*4)(r4)                                     /* Store invalid R8 */
+                       stw             r7,CSAgpr+(9*4)(r4)                                     /* Store invalid R9 */
+                       stw             r7,CSAgpr+(10*4)(r4)                            /* Store invalid R10 */
+                       stw             r7,CSAgpr+(11*4)(r4)                            /* Store invalid R11 */
+                       stw             r7,CSAgpr+(12*4)(r4)                            /* Store invalid R12 */
+                       stw             r13,CSAgpr+(13*4)(r4)                           /* Save general registers */
+                       stw             r14,CSAgpr+(14*4)(r4)                           /* Save general registers */
+                       stw             r15,CSAgpr+(15*4)(r4)                           /* Save general registers */
+                       stw             r16,CSAgpr+(16*4)(r4)                           /* Save general registers */
+                       stw             r17,CSAgpr+(17*4)(r4)                           /* Save general registers */
+                       stw             r18,CSAgpr+(18*4)(r4)                           /* Save general registers */
+                       stw             r19,CSAgpr+(19*4)(r4)                           /* Save general registers */
+                       stw             r20,CSAgpr+(20*4)(r4)                           /* Save general registers */
+                       stw             r21,CSAgpr+(21*4)(r4)                           /* Save general registers */
+                       stw             r22,CSAgpr+(22*4)(r4)                           /* Save general registers */
+                       stw             r23,CSAgpr+(23*4)(r4)                           /* Save general registers */
+                       stw             r24,CSAgpr+(24*4)(r4)                           /* Save general registers */
+                       stw             r25,CSAgpr+(25*4)(r4)                           /* Save general registers */
+                       stw             r26,CSAgpr+(26*4)(r4)                           /* Save general registers */
+                       stw             r27,CSAgpr+(27*4)(r4)                           /* Save general registers */
+                       stw             r28,CSAgpr+(28*4)(r4)                           /* Save general registers */
+                       stw             r29,CSAgpr+(29*4)(r4)                           /* Save general registers */
+                       stw             r30,CSAgpr+(30*4)(r4)                           /* Save general registers */
+                       stw             r31,CSAgpr+(31*4)(r4)                           /* Save general registers */
+                       bl              StoreLiveStatus
+                       b               KillBusy
+
+/* */
+/*                     Save the whole status.  Lot's of busy work. */
+/*                     Anything marked unclean is of the devil and should be shunned.  Actually, it depends upon  */
+/*                     knowledge of firmware control areas and is no good for a plug in.  But, we've sacrificed the */
+/*                     white ram and are standing within a circle made of his skin, so we can dance with the devil */
+/*                     safely. */
+/* */
+
+StoreStatus:
+                       mfspr   r10,sprg0                                                       /* Get the pointer to the exception save area (unclean) */
+                       
+                       lwz             r5,saver0(r13)                                          /* Get R0 (unclean) */
+                       lwz             r6,saver1(r13)                                          /* Get R1 (unclean) */
+                       lwz             r7,saver2(r13)                                          /* Get R2 (unclean) */
+                       stw             r5,CSAgpr+(0*4)(r4)                                     /* Save R0 */
+                       stw             r6,CSAgpr+(1*4)(r4)                                     /* Save R1 */
+                       stw             r7,CSAgpr+(2*4)(r4)                                     /* Save R2 */
+                       lwz             r5,saver3(r13)                                          /* Get R3 (unclean) */
+                       lwz             r6,saver4(r13)                                          /* Get R4 (unclean) */
+                       lwz             r7,saver5(r13)                                          /* Get R5 (unclean) */
+                       stw             r5,CSAgpr+(3*4)(r4)                                     /* Save R3 */
+                       stw             r6,CSAgpr+(4*4)(r4)                                     /* Save R4 */
+                       stw             r7,CSAgpr+(5*4)(r4)                                     /* Save R5 */
+                       lwz             r5,saver6(r13)                                          /* Get R6 (unclean) */
+                       lwz             r6,saver7(r13)                                          /* Get R7 (unclean) */
+                       lwz             r7,saver8(r13)                                          /* Get R8 (unclean) */
+                       stw             r5,CSAgpr+(6*4)(r4)                                     /* Save R6 */
+                       stw             r6,CSAgpr+(7*4)(r4)                                     /* Save R7 */
+                       stw             r7,CSAgpr+(8*4)(r4)                                     /* Save R8 */
+                       lwz             r5,saver9(r13)                                          /* Get R9 (unclean) */
+                       lwz             r6,saver10(r13)                                         /* Get R10 (unclean) */
+                       lwz             r7,saver11(r13)                                         /* Get R11 (unclean) */
+                       stw             r5,CSAgpr+(9*4)(r4)                                     /* Save R9 */
+                       stw             r6,CSAgpr+(10*4)(r4)                            /* Save R10 */
+                       lwz             r5,saver12(r13)                                         /* Get R12 (unclean) */
+                       stw             r7,CSAgpr+(11*4)(r4)                            /* Save R11 */
+                       stw             r5,CSAgpr+(12*4)(r4)                            /* Save R12 */
+                       
+                       lwz             r5,saver13(r13)                                         /* Get R13 (unclean) */
+                       lwz             r6,saver14(r13)                                         /* Get R14 (unclean) */
+                       lwz             r7,saver15(r13)                                         /* Get R15 (unclean) */
+                       stw             r5,CSAgpr+(13*4)(r4)                            /* Save R13 */
+                       stw             r6,CSAgpr+(14*4)(r4)                            /* Save R14 */
+                       stw             r7,CSAgpr+(15*4)(r4)                            /* Save R15 */
+                       lwz             r5,saver16(r13)                                         /* Get R16 (unclean) */
+                       lwz             r6,saver17(r13)                                         /* Get R17 (unclean) */
+                       lwz             r7,saver18(r13)                                         /* Get R18 (unclean) */
+                       stw             r5,CSAgpr+(16*4)(r4)                            /* Save R16 */
+                       stw             r6,CSAgpr+(17*4)(r4)                            /* Save R17 */
+                       stw             r7,CSAgpr+(18*4)(r4)                            /* Save R18 */
+                       lwz             r5,saver19(r13)                                         /* Get R19 (unclean) */
+                       lwz             r6,saver20(r13)                                         /* Get R20 (unclean) */
+                       lwz             r7,saver21(r13)                                         /* Get R21 (unclean) */
+                       stw             r5,CSAgpr+(19*4)(r4)                            /* Save R19 */
+                       stw             r6,CSAgpr+(20*4)(r4)                            /* Save R20 */
+                       stw             r7,CSAgpr+(21*4)(r4)                            /* Save R21 */
+                       lwz             r5,saver22(r13)                                         /* Get R22 (unclean) */
+                       lwz             r6,saver23(r13)                                         /* Get R23 (unclean) */
+                       lwz             r7,saver24(r13)                                         /* Get R24 (unclean) */
+                       stw             r5,CSAgpr+(22*4)(r4)                            /* Save R22 */
+                       stw             r6,CSAgpr+(23*4)(r4)                            /* Save R23*/
+                       stw             r7,CSAgpr+(24*4)(r4)                            /* Save R24 */
+                       lwz             r5,saver25(r13)                                         /* Get R25 (unclean) */
+                       lwz             r6,saver26(r13)                                         /* Get R26 (unclean) */
+                       lwz             r7,saver27(r13)                                         /* Get R27 (unclean) */
+                       stw             r5,CSAgpr+(25*4)(r4)                            /* Save R25 */
+                       stw             r6,CSAgpr+(26*4)(r4)                            /* Save R26 */
+                       stw             r7,CSAgpr+(27*4)(r4)                            /* Save R27 */
+
+                       lwz             r5,saver28(r13)                                         /* Get R28 (unclean) */
+                       lwz             r6,saver29(r13)                                         /* Get R29 (unclean) */
+                       lwz             r7,saver30(r13)                                         /* Get R30 (unclean) */
+                       stw             r5,CSAgpr+(28*4)(r4)                            /* Save R28 */
+                       lwz             r5,saver31(r13)                                         /* Get R31(unclean) */
+                       stw             r6,CSAgpr+(29*4)(r4)                            /* Save R29 */
+                       stw             r7,CSAgpr+(30*4)(r4)                            /* Save R30 */
+                       stw             r5,CSAgpr+(31*4)(r4)                            /* Save R31 */
+
+StoreLiveStatus:
+                       mfmsr   r5                                                                      /* Get the current MSR */
+                       ori             r6,r5,0x2000                                            /* Turn on floating point instructions */
+                       mtmsr   r6                                                                      /* Turn them on */
+                       isync                                                                           /* Make sure they're on */
+                       
+                       stfd    f0,CSAfpr+(0*8)(r4)                                     /* Save floating point registers */
+                       stfd    f1,CSAfpr+(1*8)(r4)                                     /* Save floating point registers */
+                       stfd    f2,CSAfpr+(2*8)(r4)                                     /* Save floating point registers */
+                       stfd    f3,CSAfpr+(3*8)(r4)                                     /* Save floating point registers */
+                       stfd    f4,CSAfpr+(4*8)(r4)                                     /* Save floating point registers */
+                       stfd    f5,CSAfpr+(5*8)(r4)                                     /* Save floating point registers */
+                       stfd    f6,CSAfpr+(6*8)(r4)                                     /* Save floating point registers */
+                       stfd    f7,CSAfpr+(7*8)(r4)                                     /* Save floating point registers */
+                       stfd    f8,CSAfpr+(8*8)(r4)                                     /* Save floating point registers */
+                       stfd    f9,CSAfpr+(9*8)(r4)                                     /* Save floating point registers */
+                       stfd    f10,CSAfpr+(10*8)(r4)                           /* Save floating point registers */
+                       stfd    f11,CSAfpr+(11*8)(r4)                           /* Save floating point registers */
+                       stfd    f12,CSAfpr+(12*8)(r4)                           /* Save floating point registers */
+                       stfd    f13,CSAfpr+(13*8)(r4)                           /* Save floating point registers */
+                       stfd    f14,CSAfpr+(14*8)(r4)                           /* Save floating point registers */
+                       stfd    f15,CSAfpr+(15*8)(r4)                           /* Save floating point registers */
+                       stfd    f16,CSAfpr+(16*8)(r4)                           /* Save floating point registers */
+                       stfd    f17,CSAfpr+(17*8)(r4)                           /* Save floating point registers */
+                       stfd    f18,CSAfpr+(18*8)(r4)                           /* Save floating point registers */
+                       stfd    f19,CSAfpr+(19*8)(r4)                           /* Save floating point registers */
+                       stfd    f20,CSAfpr+(20*8)(r4)                           /* Save floating point registers */
+                       stfd    f21,CSAfpr+(21*8)(r4)                           /* Save floating point registers */
+                       stfd    f22,CSAfpr+(22*8)(r4)                           /* Save floating point registers */
+                       stfd    f23,CSAfpr+(23*8)(r4)                           /* Save floating point registers */
+                       stfd    f24,CSAfpr+(24*8)(r4)                           /* Save floating point registers */
+                       stfd    f25,CSAfpr+(25*8)(r4)                           /* Save floating point registers */
+                       stfd    f26,CSAfpr+(26*8)(r4)                           /* Save floating point registers */
+                       stfd    f27,CSAfpr+(27*8)(r4)                           /* Save floating point registers */
+                       stfd    f28,CSAfpr+(28*8)(r4)                           /* Save floating point registers */
+                       stfd    f29,CSAfpr+(29*8)(r4)                           /* Save floating point registers */
+                       stfd    f30,CSAfpr+(30*8)(r4)                           /* Save floating point registers */
+                       stfd    f31,CSAfpr+(31*8)(r4)                           /* Save floating point registers */
+                       
+                       mffs    f1                                                                      /* Get the FPSCR */
+                       stfd    f1,CSAfpscr-4(r4)                                       /* Save the whole thing (we'll overlay the first half with CR later) */
+                       
+                       lfd             f1,CSAfpr+(1*4)(r4)                                     /* Restore F1 */
+                       
+                       mtmsr   r5                                                                      /* Put the floating point back to what it was before */
+                       isync                                                                           /* Wait for it */
+                       
+                       lwz             r6,savecr(r13)                                          /* Get the old CR (unclean) */
+                       stw             r6,CSAcr(r4)                                            /* Save the CR */
+                       
+                       mfxer   r6                                                                      /* Get the XER */
+                       stw             r6,CSAxer(r4)                                           /* Save the XER */
+                       
+                       lwz             r6,savelr(r13)                                          /* Get the old LR (unclean) */
+                       stw             r6,CSAlr(r4)                                            /* Save the LR */
+                       
+                       mfctr   r6                                                                      /* Get the CTR */
+                       stw             r6,CSActr(r4)                                           /* Save the CTR */
+                       
+STtbase:       mftbu   r5                                                                      /* Get the upper timebase */
+                       mftb    r6                                                                      /* Get the lower */
+                       mftbu   r7                                                                      /* Get the top again */
+                       cmplw   cr0,r5,r7                                                       /* Did it tick? */
+                       bne-    STtbase                                                         /* Yeah, do it again... */
+                       
+                       mfdec   r7                                                                      /* Get the decrimenter (make it at about the same time as the TB) */
+                       stw             r7,CSAdec(r4)                                           /* Save the decrimenter */
+                       
+                       
+                       stw             r5,CSAtbu(r4)                                           /* Stash the top part */
+                       stw             r6,CSAtbl(r4)                                           /* Stash the lower part */
+                       
+                       lwz             r5,savesrr1(r13)                                        /* SRR1 at exception is as close as we get to the MSR (unclean) */
+                       lwz             r6,savesrr0(r13)                                        /* Get SRR0 also */
+                       stw             r5,CSAmsr(r4)                                           /* Save the MSR */
+                       stw             r6,CSApc(r4)                                            /* Save the PC */
+                       stw             r5,CSAsrr1(r4)                                          /* Set SRR1 also */
+                       stw             r6,CSAsrr0(r4)                                          /* Save SRR0 */
+                       
+                       mfpvr   r5                                                                      /* Get the PVR */
+                       stw             r5,CSApvr(r4)                                           /* Save the PVR */
+                       
+                       mfspr   r5,pir                                                          /* Get the PIR */
+                       stw             r5,CSApir(r4)                                           /* Save the PIR */
+                       
+                       mfspr   r5,ibat0u                                                       /* Get the upper IBAT0 */
+                       mfspr   r6,ibat0l                                                       /* Get the lower IBAT0 */
+                       stw             r5,CSAibat+(0*8+0)(r4)                          /* Save the upper IBAT0 */
+                       stw             r6,CSAibat+(0*8+4)(r4)                          /* Save the upper IBAT0 */
+
+                       mfspr   r5,ibat1u                                                       /* Get the upper IBAT1 */
+                       mfspr   r6,ibat1l                                                       /* Get the lower IBAT1 */
+                       stw             r5,CSAibat+(1*8+0)(r4)                          /* Save the upper IBAT1 */
+                       stw             r6,CSAibat+(1*8+4)(r4)                          /* Save the upper IBAT1 */
+
+                       mfspr   r5,ibat2u                                                       /* Get the upper IBAT2 */
+                       mfspr   r6,ibat2l                                                       /* Get the lower IBAT2 */
+                       stw             r5,CSAibat+(2*8+0)(r4)                          /* Save the upper IBAT2 */
+                       stw             r6,CSAibat+(2*8+4)(r4)                          /* Save the upper IBAT2 */
+
+                       mfspr   r5,ibat3u                                                       /* Get the upper IBAT3 */
+                       mfspr   r6,ibat3l                                                       /* Get the lower IBAT3 */
+                       stw             r5,CSAibat+(3*8+0)(r4)                          /* Save the upper IBAT3 */
+                       stw             r6,CSAibat+(3*8+4)(r4)                          /* Save the upper IBAT3 */
+
+                       mfspr   r5,dbat0u                                                       /* Get the upper DBAT0 */
+                       mfspr   r6,dbat0l                                                       /* Get the lower DBAT0 */
+                       stw             r5,CSAdbat+(0*8+0)(r4)                          /* Save the upper DBAT0 */
+                       stw             r6,CSAdbat+(0*8+4)(r4)                          /* Save the upper DBAT0 */
+
+                       mfspr   r5,dbat1u                                                       /* Get the upper DBAT1 */
+                       mfspr   r6,dbat1l                                                       /* Get the lower DBAT1 */
+                       stw             r5,CSAdbat+(1*8+0)(r4)                          /* Save the upper DBAT1 */
+                       stw             r6,CSAdbat+(1*8+4)(r4)                          /* Save the upper DBAT1 */
+
+                       mfspr   r5,dbat2u                                                       /* Get the upper DBAT2 */
+                       mfspr   r6,dbat2l                                                       /* Get the lower DBAT2 */
+                       stw             r5,CSAdbat+(2*8+0)(r4)                          /* Save the upper DBAT2 */
+                       stw             r6,CSAdbat+(2*8+4)(r4)                          /* Save the upper DBAT2 */
+
+                       mfspr   r5,dbat3u                                                       /* Get the upper DBAT3 */
+                       mfspr   r6,dbat3l                                                       /* Get the lower DBAT3 */
+                       stw             r5,CSAdbat+(3*8+0)(r4)                          /* Save the upper DBAT3 */
+                       stw             r6,CSAdbat+(3*8+4)(r4)                          /* Save the upper DBAT3 */
+                       
+                       mfsdr1  r5                                                                      /* Get the SDR1 */
+                       stw             r5,CSAsdr1(r4)                                          /* Save the SDR1 */
+                       
+                       mfsr    r5,sr0                                                          /* Get SR 0 */
+                       mfsr    r6,sr1                                                          /* Get SR 1 */
+                       mfsr    r7,sr2                                                          /* Get SR 2 */
+                       stw             r5,CSAsr+(0*4)(r4)                                      /* Save SR 0 */
+                       stw             r6,CSAsr+(1*4)(r4)                                      /* Save SR 1 */
+                       mfsr    r5,sr3                                                          /* Get SR 3 */
+                       mfsr    r6,sr4                                                          /* Get SR 4 */
+                       stw             r7,CSAsr+(2*4)(r4)                                      /* Save SR 2 */
+                       mfsr    r7,sr5                                                          /* Get SR 5 */
+                       stw             r5,CSAsr+(3*4)(r4)                                      /* Save SR 3 */
+                       stw             r6,CSAsr+(4*4)(r4)                                      /* Save SR 4 */
+                       mfsr    r5,sr6                                                          /* Get SR 6 */
+                       mfsr    r6,sr7                                                          /* Get SR 7 */
+                       stw             r7,CSAsr+(5*4)(r4)                                      /* Save SR 5 */
+                       mfsr    r7,sr8                                                          /* Get SR 8 */
+                       stw             r5,CSAsr+(6*4)(r4)                                      /* Save SR 6 */
+                       stw             r6,CSAsr+(7*4)(r4)                                      /* Save SR 7 */
+                       mfsr    r5,sr9                                                          /* Get SR 9 */
+                       mfsr    r6,sr10                                                         /* Get SR 11 */
+                       stw             r7,CSAsr+(8*4)(r4)                                      /* Save SR 8 */
+                       mfsr    r7,sr11                                                         /* Get SR 11 */
+                       stw             r5,CSAsr+(9*4)(r4)                                      /* Save SR 9 */
+                       stw             r6,CSAsr+(10*4)(r4)                                     /* Save SR 10 */
+                       mfsr    r5,sr12                                                         /* Get SR 12 */
+                       mfsr    r6,sr13                                                         /* Get SR 13 */
+                       stw             r7,CSAsr+(11*4)(r4)                                     /* Save SR 11 */
+                       mfsr    r7,sr14                                                         /* Get SR 14 */
+                       stw             r5,CSAsr+(12*4)(r4)                                     /* Save SR 12 */
+                       stw             r6,CSAsr+(13*4)(r4)                                     /* Save SR 13 */
+                       mfsr    r5,sr15                                                         /* Get SR 15 */
+                       stw             r7,CSAsr+(14*4)(r4)                                     /* Save SR 14 */
+                       stw             r5,CSAsr+(15*4)(r4)                                     /* Save SR 15 */
+                       
+                       mfdar   r6                                                                      /* Get the DAR */
+                       stw             r6,CSAdar(r4)                                           /* Save it */
+                       
+                       mfdsisr r5                                                                      /* Get the DSISR */
+                       stw             r5,CSAdsisr(r4)                                         /* Save it */
+                       
+                       stw             r10,CSAsprg+(1*4)(r4)                           /* Save SPRG1 */
+                       mfspr   r7,sprg0                                                        /* Get SPRG0 */
+                       mfspr   r6,sprg2                                                        /* Get SPRG2 */
+                       stw             r7,CSAsprg+(0*4)(r4)                            /* Save SPRG0 */
+                       mfspr   r5,sprg3                                                        /* Get SPRG3 */
+                       stw             r6,CSAsprg+(2*4)(r4)                            /* Save SPRG2 */
+                       stw             r5,CSAsprg+(3*4)(r4)                            /* Save SPRG4 */
+                       
+                       mfspr   r6,1013                                                         /* Get the DABR */
+                       mfspr   r7,1010                                                         /* Get the IABR */
+                       stw             r6,CSAdabr(r4)                                          /* Save the DABR */
+                       stw             r7,CSAiabr(r4)                                          /* Save the IABR */
+                       
+                       mfspr   r5,282                                                          /* Get the EAR */
+                       stw             r5,CSAear(r4)                                           /* Save the EAR */
+                       
+                       lis             r7,0xDEAD                                                       /* Get 0xDEAD */
+                       ori             r7,r7,0xF1D0                                            /* Get 0xDEADF1D0 */
+                       
+                       mfpvr   r5                                                                      /* Get the processor type */
+                       rlwinm  r5,r5,16,16,31                                          /* Isolate the processor */
+                       cmplwi  cr1,r5,4                                                        /* Set CR1_EQ if this is a plain 604, something else if it's a 604E */
+                       
+                       mfspr   r6,hid0                                                         /* Get HID0 */
+                       mr              r5,r7                                                           /* Assume 604 */
+                       beq             cr1,NoHID1                                                      /* It is... */
+                       mfspr   r5,hid1                                                         /* Get the HID1 */
+
+NoHID1:                stw             r6,CSAhid+(0*4)(r4)                                     /* Save HID0 */
+                       stw             r5,CSAhid+(1*4)(r4)                                     /* Save HID1 */
+                       stw             r7,CSAhid+(2*4)(r4)                                     /* Save HID2 */
+                       stw             r7,CSAhid+(3*4)(r4)                                     /* Save HID3 */
+                       stw             r7,CSAhid+(4*4)(r4)                                     /* Save HID4 */
+                       stw             r7,CSAhid+(5*4)(r4)                                     /* Save HID5 */
+                       stw             r7,CSAhid+(6*4)(r4)                                     /* Save HID6 */
+                       stw             r7,CSAhid+(7*4)(r4)                                     /* Save HID7 */
+                       stw             r7,CSAhid+(8*4)(r4)                                     /* Save HID8 */
+                       stw             r7,CSAhid+(9*4)(r4)                                     /* Save HID9 */
+                       stw             r7,CSAhid+(10*4)(r4)                            /* Save HID10 */
+                       stw             r7,CSAhid+(11*4)(r4)                            /* Save HID11 */
+                       stw             r7,CSAhid+(12*4)(r4)                            /* Save HID12 */
+                       stw             r7,CSAhid+(13*4)(r4)                            /* Save HID13 */
+                       stw             r7,CSAhid+(14*4)(r4)                            /* Save HID14 */
+                       stw             r7,CSAhid+(15*4)(r4)                            /* Save HID15 */
+                       
+                       mfspr   r6,952                                                          /* Get MMCR0 */
+                       mr              r5,r7                                                           /* Assume 604 */
+                       beq             NoMMCR1                                                         /* It is... */
+                       mfspr   r5,956                                                          /* Get the MMCR1 */
+
+NoMMCR1:       stw             r6,CSAmmcr+(0*4)(r4)                            /* Save MMCR0 */
+                       stw             r5,CSAmmcr+(1*4)(r4)                            /* Save MMCR1 */
+                       
+                       mfspr   r6,953                                                          /* Get PMC1 */
+                       mfspr   r5,954                                                          /* Get PMC2 */
+                       stw             r6,CSApmc+(0*4)(r4)                                     /* Save PMC1 */
+                       stw             r5,CSApmc+(1*4)(r4)                                     /* Save PMC2 */
+                       
+                       mr              r6,r7                                                           /* Assume 604 */
+                       mr              r5,r7                                                           /* Assume 604 */
+                       beq             NoPMC3                                                          /* Yeah... */
+                       mfspr   r6,957                                                          /* Get the PMC3 for a 604E */
+                       mfspr   r5,958                                                          /* Get the PMC4 for a 604E */
+                       
+NoPMC3:                stw             r6,CSApmc+(2*4)(r4)                                     /* Save PMC3 */
+                       stw             r5,CSApmc+(3*4)(r4)                                     /* Save PMC4 */
+
+                       mfspr   r6,955                                                          /* Get SIA */
+                       mfspr   r5,959                                                          /* Get SDA */
+                       stw             r6,CSAsia(r4)                                           /* Save the SIA */
+                       stw             r5,CSAsda(r4)                                           /* Save the SDA */
+                       
+                       stw             r7,CSAmq(r4)                                            /* There is no MQ on either the 604 or 604E */
+                       
+                       
+                       lwz             r6,MPPICStat(r9)                                        /* Get the status of this processor */
+                       lis             r10,MPPICReady>>16                                      /* Get the flag for reset or not */
+                       li              r5,kSIGPResetState                                      /* Assume we're operating */
+                       and.    r0,r6,r10                                                       /* See if the ready bit is set */
+                       lis             r10,MPPICStop>>16                                       /* Get the flag for stopped or not */
+                       beq             SetStateInf                                                     /* Go set that we are reset... */
+                       and.    r0,r6,r10                                                       /* Are we stopped? */
+                       li              r5,kSIGPStoppedState                            /* Assume we area */
+                       bne             SetStateInf                                                     /* We are, go set it... */
+                       li              r5,kSIGPOperatingState                          /* Not stopped, so we're going */
+                       
+SetStateInf: stb               r5,CSAstate(r4)                                 /* Set the state byte */
+                       
+                       li              r0,1                                                            /* Set the truth */
+                       sync                                                                            /* Make sure it's stored */
+                       
+                       stb             r0,CSAregsAreValid(r4)                          /* Set that the status is valid */
+
+                       blr                                                                                     /* We're done here... */
+                       
+
+/******************************************************************************************************** */
+/* */
+/*                     The synchronize time base function.  No state requirements for this one. */
+/* */
+/******************************************************************************************************** */
+
+ITBsync:                                                                                               /* This handles the synchronize time base function */
+                       lis             r12,HIGH_ADDR(MPPIwork)                         /* Get the top of work area */
+                       li              r0,MPPICfTBsy1                                          /* Get the flag for TB sync state 1 */
+                       li              r7,0                                                            /* Get a 0 */
+                       ori             r12,r12,LOW_ADDR(MPPIwork)                      /* Get low part of work area */
+                       mttbl   r7                                                                      /* Clear the bottom of the TB so's there's noupper ticks */
+                       mttbu   r7                                                                      /* Clear the top part, just 'cause I wanna */
+                       
+                       sync                                                                            /* Make sure all is saved */
+                       stb             r0,MPPICStat+2(r9)                                      /* Tell the main dude to tell us the time */
+                       isync                                                                           /* Make sure we don't go nowhere's */
+
+/* */
+/*                     Remember that the sync'ing processor insures that the TB won't tick the high part for at least */
+/*                     16k ticks.  That should be way longer than we need for the whole process here */
+/* */
+
+WaitTBLower: lwz       r5,MPPITBsync+4-MPPIwork(r12)           /* Get the lower part of the TB */
+                       mttbl   r5                                                                      /* Put it in just in case it's set now */
+                       mr.             r5,r5                                                           /* Was it actually? */
+                       beq+    WaitTBLower                                                     /* Nope, go check again... */
+                       lwz             r4,MPPITBsync-MPPIwork(r12)                     /* Get the high order part */
+                       mttbu   r4                                                                      /* Set the top half also */
+
+                       stw             r7,MPPITBsync+4-MPPIwork(r12)           /* Tell 'em we've got it */
+                       
+                       sync
+                       
+                       li              r4,0                                                            /* Clear this */
+                       la              r5,MPPISncFght-32-MPPIwork(r12)         /* Point to the squared circle (our corner) */
+
+                       b               TB1stPnch                                                       /* Go take the first punch... */
+
+TBSargue:      
+                       dcbf    0,r5                                                            /* *** Fix cache coherency (data integrity) HW bug *** */
+                       sync                                                                            /* *** Fix cache coherency (data integrity) HW bug *** */
+                       lwz             r6,0(r5)                                                        /* Listen for the procecution's argument */
+                       mr.             r6,r6                                                           /* See if they are done */
+                       beq+    TBSargue                                                        /* Nope, still going... */
+                       
+TB1stPnch:     mftb    r7                                                                      /* They're done, time for rebuttal */
+                       stw             r7,32(r5)                                                       /* Make rebuttle */
+       
+                       addi    r4,r4,1                                                         /* Count rounds */
+
+                       cmplwi  cr0,r4,10                                                       /* See if we've gone 9 more rounds */
+                       addi    r5,r5,64                                                        /* Point to the next round areas */
+               
+                       blt+    TBSargue                                                        /* Not yet, come out of your corners fighting... */
+                       
+/* */
+/*                     We'll set the latest-up-to-datest from the other processor now */
+/* */
+TBSetTB:               
+                       dcbf    0,r5                                                            /* *** Fix cache coherency (data integrity) HW bug *** */
+                       sync                                                                            /* *** Fix cache coherency (data integrity) HW bug *** */
+                       lwz             r6,0(r5)                                                        /* Listen for the procecution's argument */
+                       mttbl   r6                                                                      /* Set it just in case it's ok */
+                       mr.             r6,r6                                                           /* See if they are done */
+                       beq+    TBSetTB                                                         /* Nope, still going... */
+
+/* */
+/*                     Get average duration for each processor.  We skip the first pass on the asumption */
+/*                     that the caches were not warmed up and it would take longer.  In proctice this */
+/*                     is what was seen. */
+/* */
+
+                       mr              r0,r11                                                          /* Move return address to a safe register */
+
+                       li              r4,0                                                            /* Clear a counter */
+                       li              r3,0                                                            /* Clear accumulator for duration */
+                       li              r10,0                                                           /* Clear start time accumulator top half */
+                       li              r11,0                                                           /* Clear start time accumulator bottom half */
+                       li              r1,0                                                            /* Clear start time accumulator top half */
+                       li              r2,0                                                            /* Clear start time accumulator bottom half */
+                       li              r10,0                                                           /* Clear accumulator for durations */
+                       la              r5,MPPISncFght+64-MPPIwork(r12)         /* Get second round start time address */
+               
+TBSaccumU:     lwz             r6,0(r5)                                                        /* Get start time */
+                       lwz             r11,32(r5)                                                      /* Get the other processor's start time */
+                       lwz             r7,64(r5)                                                       /* Get end time */
+                       lwz             r8,96(r5)                                                       /* Other proc's end time */
+                       sub             r7,r7,r6                                                        /* Get duration */
+                       sub             r8,r8,r11                                                       /* Get other side's duration */
+                       addi    r4,r4,1                                                         /* Count arguments */
+                       add             r3,r3,r7                                                        /* Accumulate durations */
+                       add             r2,r2,r7                                                        /* Accumulate other side's durations */
+                       cmplwi  cr0,r4,8                                                        /* Have we gotten them all yet? */
+                       addi    r5,r5,64                                                        /* Step to the next argument */
+                       blt+    TBSaccumU                                                       /* We're not done yet... */
+
+                       add             r7,r2,r3                                                        /* Sum the two differences */
+                       addi    r7,r7,0x10                                                      /* Round up */
+                       rlwinm  r7,r7,27,5,31                                           /* Get the average difference divided in half */
+
+                       mftb    r8                                                                      /* Get the time now */
+                       add             r8,r8,r7                                                        /* Slide the window */
+                       mttbl   r8                                                                      /* Set the time */
+                       
+                       stw             r12,MPPITBsync+4-MPPIwork(r12)          /* Show that we are done */
+                       
+                       lwz             r3,MPPICStat(r9)                                        /* Get back our status */
+                       mr              r11,r0                                                          /* Restore the return register */
+                       b               KillBusy                                                        /* We're all done now, done for it, c'est la vie... */
+                       
+
+/******************************************************************************************************** */
+/* */
+/*                     The reset function.  No state requirements for this one. */
+/*                     This suicides the processor. Our caller is never returned to (good english).  The only way out of  */
+/*                     this is a start function subsequently.  So, we give a flying f**k about the registers 'n' sutff. */
+/* */
+/******************************************************************************************************** */
+
+IReset:                lis             r28,0x8000                                                      /* Turn on machine checks */
+                       
+                       ori             r28,r28,0xCC84                                          /* Enable caches, clear them,  */
+                                                                                                               /* disable serial execution and turn BHT on */
+                       sync
+                       mtspr   HID0,r28                                                        /* Start the cache clear */
+                       sync
+
+/* */
+/*                     Clear out the TLB.  They be garbage after hard reset. */
+/* */
+
+                       li              r0,512                                                          /* Get number of TLB entries (FIX THIS) */
+                       li              r3,0                                                            /* Start at 0 */
+                       mtctr   r0                                                                      /* Set the CTR */
+                       
+IRpurgeTLB:    tlbie   r3                                                                      /* Purge this entry */
+                       addi    r3,r3,4096                                                      /* Next page */
+                       bdnz    IRpurgeTLB                                                      /* Do 'em all... */
+                       
+                       sync                                                                            /* Make sure all TLB purges are done */
+                       tlbsync                                                                         /* Make sure on other processors also */
+                       sync                                                                            /* Make sure the TLBSYNC is done */
+
+/* */
+/*                     Clear out the BATs. */
+/* */
+
+                       li              r3,0                                                            /* Clear a register */
+                       
+                       mtspr   DBAT0L,r3                                                       /* Clear BAT */
+                       mtspr   DBAT0U,r3                                                       /* Clear BAT */
+                       mtspr   DBAT1L,r3                                                       /* Clear BAT */
+                       mtspr   DBAT1U,r3                                                       /* Clear BAT */
+                       mtspr   DBAT2L,r3                                                       /* Clear BAT */
+                       mtspr   DBAT2U,r3                                                       /* Clear BAT */
+                       mtspr   DBAT3L,r3                                                       /* Clear BAT */
+                       mtspr   DBAT3U,r3                                                       /* Clear BAT */
+                       
+                       mtspr   IBAT0L,r3                                                       /* Clear BAT */
+                       mtspr   IBAT0U,r3                                                       /* Clear BAT */
+                       mtspr   IBAT1L,r3                                                       /* Clear BAT */
+                       mtspr   IBAT1U,r3                                                       /* Clear BAT */
+                       mtspr   IBAT2L,r3                                                       /* Clear BAT */
+                       mtspr   IBAT2U,r3                                                       /* Clear BAT */
+                       mtspr   IBAT3L,r3                                                       /* Clear BAT */
+                       mtspr   IBAT3U,r3                                                       /* Clear BAT */
+
+/* */
+/*                     Map 0xF0000000 to 0xFFFFFFFF for I/O; make it R/W non-cacheable */
+/*                     Map     0x00000000 to 0x0FFFFFFF for mainstore; make it R/W cachable */
+/* */
+
+                       lis             r6,0xF000                                                       /* Set RPN to last segment */
+                       ori             r6,r6,0x1FFF                                            /* Set up upper BAT for 256M, access both */
+                       
+                       lis             r7,0xF000                                                       /* Set RPN to last segment */
+                       ori             r7,r7,0x0032                                            /* Set up lower BAT for 256M, access both, non-cachable */
+               
+                       mtspr   DBAT0L,r7                                                       /* Setup ROM and I/O mapped areas */
+                       mtspr   DBAT0U,r6                                                       /* Now do the upper DBAT */
+                       sync
+       
+                       li              r6,0x1FFF                                                       /* Set up upper BAT for 256M, access both */
+                       li              r7,0x0012                                                       /* Set up lower BAT for r/w access */
+                       
+                       mtspr   DBAT1L,r7                                                       /* Set up an initial view of mainstore */
+                       mtspr   DBAT1U,r6                                                       /* Now do the upper DBAT */
+                       sync
+
+/* */
+/*                     Clean up SDR and segment registers */
+/* */
+
+                       li              r3,0                                                            /* Clear a register */
+                       mtspr   SDR1,r3                                                         /* Clear SDR1 */
+                       
+                       li              r4,0                                                            /* Clear index for segment registers */
+                       lis             r5,0x1000                                                       /* Set the segment indexer */
+                       
+IRclearSR:     mtsrin  r3,r4                                                           /* Zero out the SR */
+                       add.    r4,r4,r5                                                        /* Point to the next segment */
+                       bne-    IRclearSR                                                       /* Keep going until we wrap back to 0 */
+                       
+                       lis             r3,(MPPICOnline+MPPICStop)>>16          /* Set the reset/online state flags */
+                       b               KillBusy                                                        /* Go wipe out the busy flags... */
+
+/*     (TEST/DEBUG) (TEST/DEBUG) (TEST/DEBUG) (TEST/DEBUG) (TEST/DEBUG) (TEST/DEBUG) (TEST/DEBUG) (TEST/DEBUG) (TEST/DEBUG)  */
+/* */
+/*                     Here lies the Phoney Firmware used to test SIGPs.  Take this out later. */
+/* */
+/*     (TEST/DEBUG) (TEST/DEBUG) (TEST/DEBUG) (TEST/DEBUG) (TEST/DEBUG) (TEST/DEBUG) (TEST/DEBUG) (TEST/DEBUG) (TEST/DEBUG)  */
+
+mp_PhoneyFirmware:
+
+                       li              r27,0x3040                                                      /* Set floating point and machine checks on, IP to 0xFFF0xxxx */
+                       mtmsr   r27                                                                     /* Load 'em on in */
+                       isync
+                       
+                       bl              PhoneyBase                                                      /* Make a base register */
+PhoneyBase:    mflr    r26                                                                     /* Get it */
+                       addi    r26,r26,LOW_ADDR(MPPIbase-PhoneyBase)   /* Adjust it back */
+
+                       la              r20,LOW_ADDR(rupttab-MPPIbase)(r26)             /* Get the address of the interrupt table */
+                       la              r21,LOW_ADDR(rupttabend-MPPIbase)(r26)  /* Get the end of the table */
+                       
+relocate:      lwz             r22,0(r20)                                                      /* Get the displacement to routine */
+                       add             r22,r22,r12                                                     /* Relocate to the physical address */
+                       stw             r22,0(r20)                                                      /* Stick it back */
+                       addi    r20,r20,4                                                       /* Point to the next one */
+                       cmplw   cr0,r20,r21                                                     /* Still in table? */
+                       ble+    cr0,relocate                                            /* Yeah... */
+                       
+                       la              r20,LOW_ADDR(rupttab-MPPIbase)(r26)     /* Get the interrupt table back again */
+                       mtsprg  3,r20                                                           /* Activate the phoney Rupt table */
+                       
+                       lis             r24,hi16(HammerHead)                            /* Get the actual hammerhead address */
+                       ori             r24,r24,0x0032                                          /* Make R/W non-cachable */
+                       lwz             r23,MPPIHammer-MPPIwork(r12)            /* Get the address mapped on the main processor */
+                       ori             r23,r23,0x0003                                          /* Set both super and user valid for 128KB */
+                       
+                       mtspr   DBAT0L,r24                                                      /* Setup hammerhead's real address */
+                       mtspr   DBAT0U,r23                                                      /* Map hammerhead to the same virtual address as on the main processor */
+                       sync                                                                            /* Make sure it is done */
+
+                       la              r25,MPPICPU2-MPPIwork(r12)                      /* Point to a phoney register save area */
+                       mtsprg  1,r25                                                           /* Phoney up initialized processor state */
+
+                       lis             r24,0xFEED                                                      /* Get 0xFEED */
+                       ori             r24,r24,0xF1D0                                          /* Get 0xFEEDF1D0 */
+                       
+                       stw             r24,CSAgpr+(0*4)(r25)                           /* Store invalid R0 */
+                       stw             r24,CSAgpr+(1*4)(r25)                           /* Store invalid R1 */
+                       stw             r24,CSAgpr+(2*4)(r25)                           /* Store invalid R2 */
+                       stw             r24,CSAgpr+(3*4)(r25)                           /* Store invalid R3 */
+                       stw             r24,CSAgpr+(4*4)(r25)                           /* Store invalid r4 */
+                       stw             r24,CSAgpr+(5*4)(r25)                           /* Store invalid R5 */
+                       stw             r24,CSAgpr+(6*4)(r25)                           /* Store invalid R6 */
+                       stw             r24,CSAgpr+(7*4)(r25)                           /* Store invalid r7 */
+                       stw             r24,CSAgpr+(8*4)(r25)                           /* Store invalid R8 */
+                       stw             r24,CSAgpr+(9*4)(r25)                           /* Store invalid R9 */
+                       stw             r24,CSAgpr+(10*4)(r25)                          /* Store invalid R10 */
+                       stw             r24,CSAgpr+(11*4)(r25)                          /* Store invalid R11 */
+                       stw             r24,CSAgpr+(12*4)(r25)                          /* Store invalid R12 */
+                       
+waititout:     lwz             r25,0x30(br0)                                           /* Get wait count */
+                       mfmsr   r24                                                                     /* Get the MSR */
+                       addi    r25,r25,1                                                       /* Bounce it up */
+                       ori             r24,r24,0x8000                                          /* Turn on external interruptions */
+                       stw             r25,0x30(br0)                                           /* Save back the count */
+                       mtmsr   r24                                                                     /* Set it */
+                       isync                                                                           /* Stop until we're here */
+                       b               waititout                                                       /* Loop forever... */
+                       
+/* */
+/*                     Phoney interrupt handlers */
+/* */
+
+pexternal:     mflr    r29                                                                     /* Get the LR value */
+                       lwz             r29,0(r29)                                                      /* Get the rupt code */
+                       stw             r29,0x0B0(br0)                                          /* Save the code */
+                       bl              GotSignal                                                       /* Call the signal handler */
+                       oris    r3,r3,0x8000                                            /* Turn on high bit so we see a code 0 */
+                       stw             r3,0xA8(br0)                                            /* Save return code in debug area */
+                       
+ignorerupt:    mflr    r29                                                                     /* Get the LR value */
+                       lwz             r29,0(r29)                                                      /* Get the rupt code */
+                       stw             r29,0x0B0(br0)                                          /* Save the code */
+                       rfi                                                                                     /* Bail to from whence we commest... */
+                       .long   0                       
+                       .long   0                       
+                       .long   0                       
+                       .long   0                       
+                       .long   0                       
+                       .long   0                       
+                       .long   0                       
+
+rupttab:       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   pexternal                                                       /* Phoney external handler */
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+                       .long   ignorerupt
+rupttabend:    .long   ignorerupt
+
+/*     (TEST/DEBUG) (TEST/DEBUG) (TEST/DEBUG) (TEST/DEBUG) (TEST/DEBUG) (TEST/DEBUG) (TEST/DEBUG) (TEST/DEBUG) (TEST/DEBUG)  */
+/* */
+/*                     Here lies the end of the Phoney Firmware used to test SIGPs.  Take this out later. */
+/* */
+/*     (TEST/DEBUG) (TEST/DEBUG) (TEST/DEBUG) (TEST/DEBUG) (TEST/DEBUG) (TEST/DEBUG) (TEST/DEBUG) (TEST/DEBUG) (TEST/DEBUG)  */
+
+
+/* */
+/*                     Table of function offsets */
+/* */
+
+MPPIFuncOffs:
+
+                       .long   CountProcessors-MPPIFunctions                                   /* Offset to routine */
+                       .long   StartProcessor-MPPIFunctions                                    /* Offset to routine */
+                       .long   ResumeProcessor-MPPIFunctions                                   /* Offset to routine */
+                       .long   StopProcessor-MPPIFunctions                                             /* Offset to routine */
+                       .long   ResetProcessor-MPPIFunctions                                    /* Offset to routine */
+                       .long   SignalProcessor-MPPIFunctions                                   /* Offset to routine */
+                       .long   StoreProcessorStatus-MPPIFunctions                              /* Offset to routine */
+                       .long   SynchClock-MPPIFunctions                                                /* Offset to routine */
+                       .long   GetExtHandlerAddress-MPPIFunctions                              /* Offset to routine */
+                       .long   GotSignal-MPPIFunctions                                                 /* Offset to routine */
+                       .long   ProcessorState-MPPIFunctions                                    /* Offset to routine */
+                       .long   RunSIGPRun-MPPIFunctions                                                /* Offset to routine */
+                       .long   mp_PhoneyFirmware-MPPIFunctions                                 /* (TEST/DEBUG) */
+
+MPPISize:
+       
diff --git a/osfmk/ppc/POWERMAC/mp/mp.c b/osfmk/ppc/POWERMAC/mp/mp.c
new file mode 100644 (file)
index 0000000..b75296d
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*
+ * @OSF_FREE_COPYRIGHT@
+ */
+/*
+ * @APPLE_FREE_COPYRIGHT@
+ */
+#include <cpus.h>
+#include <ppc/POWERMAC/mp/MPPlugIn.h>
+
+MPPlugInSpec   MPspec;         /* An area for the MP interfaces */
+MPEntryPts     MPEntries;      /* Real addresses of plugin routines */
diff --git a/osfmk/ppc/POWERMAC/mp/mp.h b/osfmk/ppc/POWERMAC/mp/mp.h
new file mode 100644 (file)
index 0000000..9dd6ec6
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*
+ * @OSF_COPYRIGHT@
+ */
+
+#ifndef        _PPC_POWERMAC_MP_MP_H_
+#define _PPC_POWERMAC_MP_MP_H_
+
+#include <cpus.h>
+
+#if    NCPUS > 1
+
+#ifndef        ASSEMBLER
+#include <kern/lock.h>
+extern int real_ncpus;                         /* real number of cpus */
+extern int wncpu;                              /* wanted number of cpus */
+decl_simple_lock_data(extern, debugger_lock)   /* debugger lock */
+
+extern int debugger_cpu;                               /* current cpu running debugger */
+extern int debugger_debug;
+extern int debugger_is_slave[];
+extern int debugger_active[];
+#endif /* ASSEMBLER */
+
+#endif /* NCPUS > 1 */
+
+#endif /* _PPC_POWERMAC_MP_MP_H_ */
index 709fd8bda68a1798331407522406966cc3687427..868e649df29a35fadf8a550d9ccf30c1c9480c20 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index fbc152f40b29dd878e87253740327a3e6a61b804..f5dd3c576b85dbf518bef332adccfab911ee768b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -102,9 +99,7 @@ struct scc_tty scc_tty[NSCC_LINE];
 extern unsigned int disableSerialOuput;
 
 int    serial_initted = 0;
-unsigned int scc_parm_done = 0;
-
-extern unsigned int serialmode;
+unsigned int scc_parm_done = 0;                                /* (TEST/DEBUG) */
 
 static struct scc_byte {
        unsigned char   reg;
@@ -145,19 +140,46 @@ enum scc_error {SCC_ERR_NONE, SCC_ERR_PARITY, SCC_ERR_BREAK, SCC_ERR_OVERRUN};
  *     BRGconstant =   ---------------------------  -  2
  *                           BaudRate
  */
+
 #define SERIAL_CLOCK_FREQUENCY (115200*2) /* Power Mac value */
 #define        convert_baud_rate(rate) ((((SERIAL_CLOCK_FREQUENCY) + (rate)) / (2 * (rate))) - 2)
 
 #define DEFAULT_SPEED 57600
-#define DEFAULT_PORT0_SPEED 1200
 #define DEFAULT_FLAGS (TF_LITOUT|TF_ECHO)
 
 int    scc_param(struct scc_tty *tp);
 
+
 struct scc_softc       scc_softc[NSCC];
 caddr_t        scc_std[NSCC] = { (caddr_t) 0};
 
-decl_simple_lock_data(,scc_stomp)
+
+#define SCC_RR1_ERRS (SCC_RR1_FRAME_ERR|SCC_RR1_RX_OVERRUN|SCC_RR1_PARITY_ERR)
+#define SCC_RR3_ALL (SCC_RR3_RX_IP_A|SCC_RR3_TX_IP_A|SCC_RR3_EXT_IP_A|\
+                     SCC_RR3_RX_IP_B|SCC_RR3_TX_IP_B|SCC_RR3_EXT_IP_B)
+
+#define DEBUG_SCC
+#undef  DEBUG_SCC
+
+#ifdef DEBUG_SCC
+static int total_chars, total_ints, total_overruns, total_errors, num_ints, max_chars;
+static int chars_received[8];
+static int __SCC_STATS = 0;
+static int max_in_q = 0;
+static int max_out_q = 0;
+#endif
+
+DECL_FUNNEL(, scc_funnel)      /* funnel to serialize the SCC driver */
+boolean_t scc_funnel_initted = FALSE;
+#define SCC_FUNNEL             scc_funnel
+#define SCC_FUNNEL_INITTED     scc_funnel_initted
+
+
+/*
+ * Adapt/Probe/Attach functions
+ */
+boolean_t      scc_uses_modem_control = FALSE;/* patch this with adb */
+decl_simple_lock_data(,scc_stomp)                      /* (TEST/DEBUG) */
 
 /* This is called VERY early on in the init and therefore has to have
  * hardcoded addresses of the serial hardware control registers. The
@@ -170,13 +192,22 @@ initialize_serial( caddr_t scc_phys_base )
 {
        int i, chan, bits;
        scc_regmap_t    regs;
+       DECL_FUNNEL_VARS
 
        assert( scc_phys_base );
 
-       if (serial_initted)
+       if (!SCC_FUNNEL_INITTED) {
+               FUNNEL_INIT(&SCC_FUNNEL, master_processor);
+               SCC_FUNNEL_INITTED = TRUE;
+       }
+       FUNNEL_ENTER(&SCC_FUNNEL);
+
+       if (serial_initted) {
+               FUNNEL_EXIT(&SCC_FUNNEL);
                return;
+       }
 
-       simple_lock_init(&scc_stomp, FALSE);
+       simple_lock_init(&scc_stomp, FALSE);                            /* (TEST/DEBUG) */
        
        scc_softc[0].full_modem = TRUE;
 
@@ -205,10 +236,12 @@ initialize_serial( caddr_t scc_phys_base )
 
                        scc_read_reg_zero(regs, 0, bits);/* Clear the status */
                }
-                scc_parm_done = 1;
+                scc_parm_done = 1;                     /* (TEST/DEBUG) */
        }
 
        serial_initted = TRUE;
+
+       FUNNEL_EXIT(&SCC_FUNNEL);
        return;
 }
 
@@ -219,11 +252,26 @@ scc_probe(void)
        register int    val, i;
        register scc_regmap_t   regs;
        spl_t   s;
+       DECL_FUNNEL_VARS
+
+       if (!SCC_FUNNEL_INITTED) {
+               FUNNEL_INIT(&SCC_FUNNEL, master_processor);
+               SCC_FUNNEL_INITTED = TRUE;
+       }
+       FUNNEL_ENTER(&SCC_FUNNEL);
+
+       /* Readjust the I/O address to handling 
+        * new memory mappings.
+        */
+
+//     scc_std[0] = POWERMAC_IO(scc_std[0]);
 
        regs = (scc_regmap_t)scc_std[0];
 
-       if (regs == (scc_regmap_t) 0)
+       if (regs == (scc_regmap_t) 0) {
+               FUNNEL_EXIT(&SCC_FUNNEL);
                return 0;
+       }
 
        scc = &scc_softc[0];
        scc->regs = regs;
@@ -238,13 +286,8 @@ scc_probe(void)
                   open but are needed if the port will be used
                   independently of the Mach interfaces, e.g., for
                   gdb or for a serial console.  */
-               if (i == 0) {
-                 tp->t_ispeed = DEFAULT_PORT0_SPEED;
-                 tp->t_ospeed = DEFAULT_PORT0_SPEED;
-               } else {
-                 tp->t_ispeed = DEFAULT_SPEED;
-                 tp->t_ospeed = DEFAULT_SPEED;
-               }
+               tp->t_ispeed = DEFAULT_SPEED;
+               tp->t_ospeed = DEFAULT_SPEED;
                tp->t_flags = DEFAULT_FLAGS;
                scc->softr[i].speed = -1;
 
@@ -255,6 +298,8 @@ scc_probe(void)
        }
 
        splx(s);
+
+       FUNNEL_EXIT(&SCC_FUNNEL);
        return 1;
 }
 
@@ -271,12 +316,16 @@ scc_getc(int unit, int line, boolean_t wait, boolean_t raw)
        unsigned char   c, value;
        int             rcvalue, from_line;
        spl_t           s = splhigh();
+       DECL_FUNNEL_VARS
 
-       simple_lock(&scc_stomp);
+       FUNNEL_ENTER(&SCC_FUNNEL);
+
+       simple_lock(&scc_stomp);                                        /* (TEST/DEBUG) */
        regs = scc_softc[0].regs;
 
        /*
         * wait till something available
+        *
         */
 again:
        rcvalue = 0;
@@ -287,8 +336,9 @@ again:
                        break;
 
                if (!wait) {
-                       simple_unlock(&scc_stomp);
+                       simple_unlock(&scc_stomp);                      /* (TEST/DEBUG) */
                        splx(s);
+                       FUNNEL_EXIT(&SCC_FUNNEL);
                        return -1;
                }
        }
@@ -304,16 +354,16 @@ again:
        if (console_is_serial() &&
            c == ('_' & 0x1f)) {
                /* Drop into the debugger */
-               simple_unlock(&scc_stomp);
+               simple_unlock(&scc_stomp);                              /* (TEST/DEBUG) */
                Debugger("Serial Line Request");
-               simple_lock(&scc_stomp);
+               simple_lock(&scc_stomp);                                /* (TEST/DEBUG) */
                scc_write_reg(regs, line, SCC_RR0, SCC_RESET_HIGHEST_IUS);
                if (wait) {
                        goto again;
                }
-               sync();
-               simple_unlock(&scc_stomp);
+               simple_unlock(&scc_stomp);                              /* (TEST/DEBUG) */
                splx(s);
+               FUNNEL_EXIT(&SCC_FUNNEL);
                return -1;
        }
 #endif /* MACH_KDB */
@@ -329,11 +379,13 @@ again:
                        goto again;
                }
        }
+
        scc_write_reg(regs, line, SCC_RR0, SCC_RESET_HIGHEST_IUS);
 
-       sync();
-       simple_unlock(&scc_stomp);
+       simple_unlock(&scc_stomp);                                      /* (TEST/DEBUG) */
        splx(s);
+
+       FUNNEL_EXIT(&SCC_FUNNEL);
        return c;
 }
 
@@ -348,12 +400,14 @@ scc_putc(int unit, int line, int c)
        scc_regmap_t    regs;
        spl_t            s;
        unsigned char    value;
+       DECL_FUNNEL_VARS
 
        if (disableSerialOuput)
                return 0;
 
        s = splhigh();
-       simple_lock(&scc_stomp);
+       FUNNEL_ENTER(&SCC_FUNNEL);
+       simple_lock(&scc_stomp);                                /* (TEST/DEBUG) */
 
        regs = scc_softc[0].regs;
 
@@ -373,10 +427,11 @@ scc_putc(int unit, int line, int c)
                        break;
        } while (1);
        scc_write_reg(regs, line, SCC_RR0, SCC_RESET_HIGHEST_IUS);
+       simple_unlock(&scc_stomp);                              /* (TEST/DEBUG) */
 
-       sync();
-       simple_unlock(&scc_stomp);
        splx(s);
+
+       FUNNEL_EXIT(&SCC_FUNNEL);
        return 0;
 }
 
@@ -386,8 +441,12 @@ powermac_scc_set_datum(scc_regmap_t regs, unsigned int offset, unsigned char val
 {
        volatile unsigned char *address = (unsigned char *) regs + offset;
   
+       assert(FUNNEL_IN_USE(&SCC_FUNNEL));
+
        *address = value;
        eieio();
+
+       assert(FUNNEL_IN_USE(&SCC_FUNNEL));
 }
   
 unsigned char
@@ -396,9 +455,12 @@ powermac_scc_get_datum(scc_regmap_t regs, unsigned int offset)
        volatile unsigned char *address = (unsigned char *) regs + offset;
        unsigned char   value;
   
-       value = *address; 
-       eieio();
+       assert(FUNNEL_IN_USE(&SCC_FUNNEL));
+
+       value = *address; eieio();
        return value;
+
+       assert(FUNNEL_IN_USE(&SCC_FUNNEL));
 }
 
 int
@@ -412,8 +474,10 @@ scc_param(struct scc_tty *tp)
        struct scc_softreg      *sr;
        scc_softc_t     scc;
 
+       assert(FUNNEL_IN_USE(&SCC_FUNNEL));
+       
        s = splhigh();
-       simple_lock(&scc_stomp);
+       simple_lock(&scc_stomp);                                /* (TEST/DEBUG) */
 
        chan = scc_chan(tp->t_dev);
        scc = &scc_softc[0];
@@ -424,30 +488,30 @@ scc_param(struct scc_tty *tp)
        /* Do a quick check to see if the hardware needs to change */
        if ((sr->flags & (TF_ODDP|TF_EVENP)) == (tp->t_flags & (TF_ODDP|TF_EVENP))
            && sr->speed == tp->t_ispeed) {
-               simple_unlock(&scc_stomp);
-               splx(s);
-               return 0;
+               assert(FUNNEL_IN_USE(&SCC_FUNNEL));
+               simple_unlock(&scc_stomp);                                      /* (TEST/DEBUG) */
+               splx(s);                                                                                        /* (TEST/DEBUG) */
+               return 0;                                                                                       /* (TEST/DEBUG) */
        }
 
        if(scc_parm_done)       {                                                               
                
-               scc_write_reg(regs,  chan,  3, SCC_WR3_RX_8_BITS|SCC_WR3_RX_ENABLE);
-               sr->wr1 = SCC_WR1_RXI_FIRST_CHAR | SCC_WR1_EXT_IE;
-               scc_write_reg(regs,  chan,  1, sr->wr1);
-               scc_write_reg(regs,  chan, 15, SCC_WR15_ENABLE_ESCC);
-               scc_write_reg(regs,  chan,  7, SCC_WR7P_RX_FIFO);
-               scc_write_reg(regs,  chan,  0, SCC_IE_NEXT_CHAR);
-               scc_write_reg(regs,  chan,  0, SCC_RESET_EXT_IP);
-               scc_write_reg(regs,  chan,  0, SCC_RESET_EXT_IP);
-               scc_write_reg(regs,  chan,  9, SCC_WR9_MASTER_IE|SCC_WR9_NV);
-               scc_read_reg_zero(regs, 0, bits);
-               sr->wr1 = SCC_WR1_RXI_FIRST_CHAR | SCC_WR1_EXT_IE;
-               scc_write_reg(regs,  chan,  1, sr->wr1);
-               scc_write_reg(regs,  chan,  0, SCC_IE_NEXT_CHAR);
-               sync();
-               simple_unlock(&scc_stomp);
-               splx(s);
-               return 0;
+               scc_write_reg(regs,  chan,  3, SCC_WR3_RX_8_BITS|SCC_WR3_RX_ENABLE);    /* (TEST/DEBUG) */
+               sr->wr1 = SCC_WR1_RXI_FIRST_CHAR | SCC_WR1_EXT_IE;      /* (TEST/DEBUG) */
+               scc_write_reg(regs,  chan,  1, sr->wr1);                        /* (TEST/DEBUG) */
+               scc_write_reg(regs,  chan, 15, SCC_WR15_ENABLE_ESCC);   /* (TEST/DEBUG) */
+               scc_write_reg(regs,  chan,  7, SCC_WR7P_RX_FIFO);       /* (TEST/DEBUG) */
+               scc_write_reg(regs,  chan,  0, SCC_IE_NEXT_CHAR);       /* (TEST/DEBUG) */
+               scc_write_reg(regs,  chan,  0, SCC_RESET_EXT_IP);       /* (TEST/DEBUG) */
+               scc_write_reg(regs,  chan,  0, SCC_RESET_EXT_IP);       /* (TEST/DEBUG) */
+               scc_write_reg(regs,  chan,  9, SCC_WR9_MASTER_IE|SCC_WR9_NV);   /* (TEST/DEBUG) */
+               scc_read_reg_zero(regs, 0, bits);                                       /* (TEST/DEBUG) */
+               sr->wr1 = SCC_WR1_RXI_FIRST_CHAR | SCC_WR1_EXT_IE;      /* (TEST/DEBUG) */
+               scc_write_reg(regs,  chan,  1, sr->wr1);                        /* (TEST/DEBUG) */
+               scc_write_reg(regs,  chan,  0, SCC_IE_NEXT_CHAR);       /* (TEST/DEBUG) */
+               simple_unlock(&scc_stomp);                                                      /* (TEST/DEBUG) */
+               splx(s);                                                                                        /* (TEST/DEBUG) */
+               return 0;                                                                                       /* (TEST/DEBUG) */
        }
        
        sr->flags = tp->t_flags;
@@ -457,9 +521,10 @@ scc_param(struct scc_tty *tp)
        if (tp->t_ispeed == 0) {
                sr->wr5 &= ~SCC_WR5_DTR;
                scc_write_reg(regs,  chan, 5, sr->wr5);
-               sync();
-               simple_unlock(&scc_stomp);
+               simple_unlock(&scc_stomp);                                                      /* (TEST/DEBUG) */
                splx(s);
+
+               assert(FUNNEL_IN_USE(&SCC_FUNNEL));
                return 0;
        }
        
@@ -562,59 +627,12 @@ scc_param(struct scc_tty *tp)
        sr->wr5 |= SCC_WR5_TX_ENABLE;
        scc_write_reg(regs,  chan,  5, sr->wr5);
 
-       sync();
-       simple_unlock(&scc_stomp);
+       simple_unlock(&scc_stomp);                      /* (TEST/DEBUG) */
        splx(s);
-       return 0;
-
-}
 
-/*
- *  This routine will start a thread that polls the serial port, listening for
- *  characters that have been typed.
- */
-
-void
-serial_keyboard_init(void)
-{
-
-       if(!(serialmode & 2)) return;           /* Leave if we do not want a serial console */
-
-       kprintf("Serial keyboard started\n");
-       kernel_thread_with_priority(kernel_task, MAXPRI_STANDARD, serial_keyboard_start, TRUE, TRUE);
-       return;
-}
-
-void
-serial_keyboard_start(void)
-{
-       thread_t cthread;
-
-       cthread = current_thread();             /* Just who the heck are we anyway? */
-       stack_privilege(cthread);               /* Make sure we don't lose our stack */
-       serial_keyboard_poll();                 /* Go see if there are any characters pending now */
-       panic("serial_keyboard_start: we can't get back here\n");
-}
-
-void
-serial_keyboard_poll(void)
-{
-       int chr;
-       uint64_t next;
-       extern void cons_cinput(char ch);       /* The BSD routine that gets characters */
-
-       while(1) {                              /* Do this for a while */
-               chr = scc_getc(0, 1, 0, 1);     /* Get a character if there is one */
-               if(chr < 0) break;              /* The serial buffer is empty */
-               cons_cinput((char)chr);         /* Buffer up the character */
-       }
-
-       clock_interval_to_deadline(16, 1000000, &next); /* Get time of pop */
+       assert(FUNNEL_IN_USE(&SCC_FUNNEL));
+       return 0;
 
-       assert_wait((event_t)serial_keyboard_poll, THREAD_INTERRUPTIBLE);       /* Show we are "waiting" */
-       thread_set_timer_deadline(next);        /* Set the next time to check */
-       thread_block(serial_keyboard_poll);     /* Wait for it */
-       panic("serial_keyboard_poll: Shouldn't never ever get here...\n");
 }
 
 #endif /* NSCC > 0 */
index c48c5750ced85a9b20649fa1fffd46f2f304103b..a1f9979d9741d85396d044bd01049498e1e082c2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -127,10 +124,19 @@ extern int                switch_to_video_console(
 extern void            switch_to_old_console(
                                int                     old_console);
 
-void serial_keyboard_init(void);
-void serial_keyboard_start(void);
-void serial_keyboard_poll(void);
 
+/*
+ * JMM - We are not really going to support this driver in SMP (barely
+ * support it now - so just pick up the stubbed out versions.
+ */
+#define DECL_FUNNEL(class,f)
+#define DECL_FUNNEL_VARS
+#define FUNNEL_INIT(f,p)
+#define FUNNEL_ENTER(f)
+#define FUNNEL_EXIT(f)
+#define FUNNEL_ESCAPE(f)               (1)
+#define FUNNEL_REENTER(f,count)
+#define FUNNEL_IN_USE(f)               (TRUE)
 
 /*
  * Flags
index 4c5f529896a0633cd5a94100e1618d784f0fa95d..61a510e9789083d25b8249aca7ef46c64243a41c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #include <kern/time_out.h>
 #include <kern/lock.h>
 #include <kern/debug.h>
-#include <mach/vm_param.h>
-#include <vm/vm_kern.h>
-#include <vm/vm_map.h>
-#include <vm/vm_page.h>
-#include <ppc/pmap.h>
 
 #include <kdp/kdp_udp.h>
 
@@ -2841,82 +2833,23 @@ static void vc_clear_screen( void )
     reversecursor();
 };
 
-
-unsigned int lastVideoPhys = 0;
-unsigned int lastVideoVirt = 0;
-unsigned int lastVideoSize = 0;
-
 void
 initialize_screen(Boot_Video * boot_vinfo, unsigned int op)
 {
-       
-       unsigned int fbsize;
-       unsigned int newVideoVirt;
-       ppnum_t fbppage;
-
        if( boot_vinfo) {
             bcopy( (const void *) boot_vinfo,
                     (void *) &boot_video_info,
                     sizeof( boot_video_info));
-/* 
- *                     First, check if we are changing the size and/or location of the framebuffer
- */
-
 
             vinfo.v_name[0] = 0;
             vinfo.v_width = boot_vinfo->v_width;
             vinfo.v_height = boot_vinfo->v_height;
             vinfo.v_depth = boot_vinfo->v_depth;
             vinfo.v_rowbytes = boot_vinfo->v_rowBytes;
-            vinfo.v_physaddr = boot_vinfo->v_baseAddr;         /* Get the physical address */
-                       
-                       kprintf("initialize_screen: b=%08X, w=%08X, h=%08X, r=%08X\n",                          /* (BRINGUP) */
-                               vinfo.v_physaddr, vinfo.v_width,  vinfo.v_height,  vinfo.v_rowbytes);   /* (BRINGUP) */
-
-                       if(!vinfo.v_physaddr) {                                                 /* Check to see if we have a framebuffer */
-                               kprintf("initialize_screen: No video - forcing serial mode\n");         /* (BRINGUP) */
-                               (void)switch_to_serial_console();                       /* Switch into serial mode */
-                               vc_graphics_mode = FALSE;                                       /* Say we are not in graphics mode */
-                               disableConsoleOutput = FALSE;                           /* Allow printfs to happen */
-                               vc_acquired = TRUE;
-                               return;                                                                         /* Nothing more to do here */
-                       }
-
-
-/*                     Note that for the first time only, boot_vinfo->v_baseAddr is physical */
-
-                       if(kernel_map != VM_MAP_NULL) {                                 /* If VM is up, we are given a virtual address */
-                               fbppage = pmap_find_phys(kernel_pmap, boot_vinfo->v_baseAddr);  /* Get the physical address of frame buffer */
-                               if(!fbppage) {                                                          /* Did we find it? */
-                                       panic("initialize_screen: Strange framebuffer - addr = %08X\n", boot_vinfo->v_baseAddr);
-                               }
-                               vinfo.v_physaddr = fbppage << 12;                       /* Get the physical address */
-                       }
-                       
+            vinfo.v_physaddr = boot_vinfo->v_baseAddr;
+            vinfo.v_baseaddr = vinfo.v_physaddr;
             vinfo.v_type = 0;
 
-                       fbsize = round_page_32(vinfo.v_height * vinfo.v_rowbytes);      /* Remember size */
-
-                       if((lastVideoPhys != vinfo.v_physaddr) || (fbsize > lastVideoSize)) {   /* Did framebuffer change location or get bigger? */
-
-                               newVideoVirt = io_map_spec((vm_offset_t)vinfo.v_physaddr, fbsize);      /* Allocate address space for framebuffer */
-
-                               if(lastVideoVirt) {                                                     /* Was the framebuffer mapped before? */
-                                       if(lastVideoVirt > vm_last_addr) {              /* Was this a special pre-VM mapping? */
-                                               pmap_remove(kernel_pmap, (addr64_t)lastVideoVirt, (addr64_t)(lastVideoVirt + lastVideoSize));   /* Toss mappings */
-                                       }
-                                       else {                                                                  /* This was not special boot-time allocation */
-                                               kmem_free(kernel_map, lastVideoVirt, lastVideoSize);    /* Toss kernel addresses */
-                                       }
-                               }
-                               
-                               lastVideoPhys = vinfo.v_physaddr;                       /* Remember the framebuffer address */
-                               lastVideoSize = fbsize;                                         /* Remember the size */
-                               lastVideoVirt = newVideoVirt;                           /* Remember the virtual framebuffer address */
-                       }
-           
-            vinfo.v_baseaddr = lastVideoVirt;                          /* Set the new framebuffer address */
-
             vc_initialize();
 #if 0
             GratefulDebInit((bootBumbleC *)boot_vinfo);        /* Re-initialize GratefulDeb */
@@ -2926,58 +2859,58 @@ initialize_screen(Boot_Video * boot_vinfo, unsigned int op)
        switch( op ) {
 
            case kPEGraphicsMode:
-                       vc_graphics_mode = TRUE;
-                       disableConsoleOutput = TRUE;
-                       vc_acquired = TRUE;
-                       break;
+               vc_graphics_mode = TRUE;
+               disableConsoleOutput = TRUE;
+               vc_acquired = TRUE;
+               break;
 
            case kPETextMode:
-                       vc_graphics_mode = FALSE;
-                       disableConsoleOutput = FALSE;
-                       vc_acquired = TRUE;
-                       vc_clear_screen();
-                       break;
+               vc_graphics_mode = FALSE;
+               disableConsoleOutput = FALSE;
+               vc_acquired = TRUE;
+               vc_clear_screen();
+               break;
 
            case kPETextScreen:
-                       vc_progress_set( FALSE, 0 );
-                       disableConsoleOutput = FALSE;
-                       if( vc_need_clear) {
-                               vc_need_clear = FALSE;
-                               vc_clear_screen();
-                       }
-                       break;
+               vc_progress_set( FALSE, 0 );
+               disableConsoleOutput = FALSE;
+               if( vc_need_clear) {
+                   vc_need_clear = FALSE;
+                    vc_clear_screen();
+               }
+               break;
 
-               case kPEEnableScreen:
-                       if( vc_acquired) {
-                               if( vc_graphics_mode)
-                               vc_progress_set( TRUE, vc_progress_tick );
-                               else
-                               vc_clear_screen();
-                       }
-                       break;
+            case kPEEnableScreen:
+               if( vc_acquired) {
+                    if( vc_graphics_mode)
+                        vc_progress_set( TRUE, vc_progress_tick );
+                    else
+                        vc_clear_screen();
+               }
+               break;
 
-               case kPEDisableScreen:
-                       vc_progress_set( FALSE, 0 );
-                       break;
+            case kPEDisableScreen:
+               vc_progress_set( FALSE, 0 );
+               break;
 
            case kPEAcquireScreen:
-                       vc_need_clear = (FALSE == vc_acquired);
-                       vc_acquired = TRUE;
-                       vc_progress_set( vc_graphics_mode, vc_need_clear ? 2 * hz : 0 );
-                       disableConsoleOutput = vc_graphics_mode;
-                       if( vc_need_clear && !vc_graphics_mode) {
-                               vc_need_clear = FALSE;
-                               vc_clear_screen();
-                       }
-                       break;
+               vc_need_clear = (FALSE == vc_acquired);
+               vc_acquired = TRUE;
+               vc_progress_set( vc_graphics_mode, vc_need_clear ? 2 * hz : 0 );
+               disableConsoleOutput = vc_graphics_mode;
+               if( vc_need_clear && !vc_graphics_mode) {
+                   vc_need_clear = FALSE;
+                    vc_clear_screen();
+               }
+               break;
 
            case kPEReleaseScreen:
-                       vc_acquired = FALSE;
-                       vc_progress_set( FALSE, 0 );
-                       vc_clut8 = NULL;
-                       disableConsoleOutput = TRUE;
+               vc_acquired = FALSE;
+               vc_progress_set( FALSE, 0 );
+                vc_clut8 = NULL;
+               disableConsoleOutput = TRUE;
 #if 0
-                       GratefulDebInit(0);                                             /* Stop grateful debugger */
+               GratefulDebInit(0);                                             /* Stop grateful debugger */
 #endif
                break;
        }
index 54b3591f28c16cf2bff733b68ff2ef971e9398dc..083712b084a98e3ccb4495d30299dbee2f7659c9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index afdf214cc37210bdd158ff31030b2d24a6851550..08835890551abe4c066870f93a9a2d7f1a4e7a6f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1a9095e18fc6c0a6b91313f9d3e4152419dc5bb5..c7931c150672b86f62361838afb54de6d0e5e030 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 
 ENTRY(video_scroll_up, TAG_NO_FRAME_USED)
 
-
-                       lis             r8,hi16(MASK(MSR_VEC))                  ; Get the vector flag
-                       mfmsr   r0                                                              ; Get the MSR 
-                       ori             r8,r8,lo16(MASK(MSR_FP))                ; Add the FP flag
-                       mflr    r6                                                              ; Get the LR
-                       andc    r0,r0,r8                                                ; Clear VEC and FP
-                       ori             r7,r8,lo16(MASK(MSR_EE))                ; Drop EE and DR
-                       andc    r7,r0,r7                                                ; Clear VEC, FP, and EE
-                       ori             r7,r7,MASK(MSR_FP)                              ; Turn floating point back on
-                       stwu    r1,-(FM_SIZE+16)(r1)                    ; Get space for a couple of registers on stack
-                       stw             r6,(FM_SIZE+16+FM_LR_SAVE)(r1)  ; Save the return
+                       mfmsr   r0                                                                      /* Get the MSR */
+                       rlwinm  r0,r0,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r0,r0,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       mflr    r6                                                                      /* Get the LR */
+                       ori             r7,r0,1<<(31-MSR_FP_BIT)                        /* Turn on floating point */
+                       stwu    r1,-(FM_SIZE+16)(r1)                            /* Get space for a couple of registers on stack */
+                       rlwinm  r7,r7,0,MSR_EE_BIT+1,MSR_EE_BIT-1       /* Turn off interrupts */
+                       stw             r6,(FM_SIZE+16+FM_LR_SAVE)(r1)          /* Save the return */
                        
-                       mtmsr   r7                                                              ; Turn on FPU
-                       isync                                                                   ; Wait for it 
+                       mtmsr   r7                                                                      /* Turn on FPU */
+                       isync                                                                           /* Wait for it */
                        
-vsufpuon1:     stfd    f0,(FM_SIZE+0)(r1)                              ; Save one register
-                       stfd    f1,(FM_SIZE+8)(r1)                              ; and the second
+vsufpuon1:     stfd    f0,(FM_SIZE+0)(r1)                                      /* Save one register */
+                       stfd    f1,(FM_SIZE+8)(r1)                                      /* and the second */
 
 /* ok, now we can use the FPU registers to do some fast copying
  */
@@ -101,23 +95,20 @@ ENTRY(video_scroll_down, TAG_NO_FRAME_USED)
         */
        
 
-                       lis             r8,hi16(MASK(MSR_VEC))                  ; Get the vector flag
-                       mfmsr   r0                                                              ; Get the MSR 
-                       ori             r8,r8,lo16(MASK(MSR_FP))                ; Add the FP flag
-                       mflr    r6                                                              ; Get the LR
-                       andc    r0,r0,r8                                                ; Clear VEC and FP
-                       ori             r7,r8,lo16(MASK(MSR_EE))                ; Drop EE and DR
-                       andc    r7,r0,r7                                                ; Clear VEC, FP, DR, and EE
-                       ori             r7,r7,MASK(MSR_FP)                              ; Turn on floating point 
-                       stwu    r1,-(FM_SIZE+16)(r1)                    ; Get space for a couple of registers on stack
-                       stw             r6,(FM_SIZE+16+FM_LR_SAVE)(r1)  ; Save the return
+                       mfmsr   r0                                                                      /* Get the MSR */
+                       rlwinm  r0,r0,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r0,r0,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       mflr    r6                                                                      /* Get the LR */
+                       ori             r7,r0,1<<(31-MSR_FP_BIT)                        /* Turn on floating point */
+                       stwu    r1,-(FM_SIZE+16)(r1)                            /* Get space for a couple of registers on stack */
+                       rlwinm  r7,r7,0,MSR_EE_BIT+1,MSR_EE_BIT-1       /* Turn off interrupts */
+                       stw             r6,(FM_SIZE+16+FM_LR_SAVE)(r1)          /* Save the return */
                        
-                       mtmsr   r7                                                              ; Turn on FPU
-                       isync                                                                   ; Wait for it 
+                       mtmsr   r7                                                                      /* Turn on FPU */
+                       isync                                                                           /* Wait for it */
                        
-vsdfpuon1:     stfd    f0,(FM_SIZE+0)(r1)                              ; Save one register
-                       stfd    f1,(FM_SIZE+8)(r1)                              ; and the second
-
+vsdfpuon1:     stfd    f0,(FM_SIZE+0)(r1)                                      /* Save one register */
+                       stfd    f1,(FM_SIZE+8)(r1)                                      /* and the second */
 
 /* ok, now we can use the FPU registers to do some fast copying         */
 
index 27ed40e7ef8b4656de134e9ba72bb55685acfa4d..1460c10bed862b15d9fe06f4f4161beae90bff03 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -32,8 +29,6 @@
 #include <ppc/Diagnostics.h>
 #include <ppc/vmachmon.h>
 #include <ppc/PseudoKernel.h>
-#include <ppc/misc_protos.h>
-#include <ppc/hw_perfmon.h>
 
 /*
  *     To add a new entry:
index bc03373e36e6d581a5d63508aead8ff829de25ff..bab0f34f23c233e357bca8a3d592d0396587de71 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -54,28 +51,12 @@ PPCcallEnt  PPCcalls[] = {
 
        PPCcall(dis),                                   /* 0x6009 CHUD Interface hook */
        
-       PPCcall(ppcNull),                               /* 0x600A Null PPC syscall */
-       PPCcall(perfmon_control),               /* 0x600B performance monitor */
-       PPCcall(ppcNullinst),                   /* 0x600C Instrumented Null PPC syscall */
+       PPCcall(dis),                                   /* 0x600A disabled */
+       PPCcall(dis),                                   /* 0x600B disabled */
+       PPCcall(dis),                                   /* 0x600C disabled */
        PPCcall(dis),                                   /* 0x600D disabled */
        PPCcall(dis),                                   /* 0x600E disabled */
        PPCcall(dis),                                   /* 0x600F disabled */
-       PPCcall(dis),                                   /* 0x6010 disabled */
-       PPCcall(dis),                                   /* 0x6011 disabled */
-       PPCcall(dis),                                   /* 0x6012 disabled */
-       PPCcall(dis),                                   /* 0x6013 disabled */
-       PPCcall(dis),                                   /* 0x6014 disabled */
-       PPCcall(dis),                                   /* 0x6015 disabled */
-       PPCcall(dis),                                   /* 0x6016 disabled */
-       PPCcall(dis),                                   /* 0x6017 disabled */
-       PPCcall(dis),                                   /* 0x6018 disabled */
-       PPCcall(dis),                                   /* 0x6019 disabled */
-       PPCcall(dis),                                   /* 0x601A disabled */
-       PPCcall(dis),                                   /* 0x601B disabled */
-       PPCcall(dis),                                   /* 0x601C disabled */
-       PPCcall(dis),                                   /* 0x601D disabled */
-       PPCcall(dis),                                   /* 0x601E disabled */
-       PPCcall(dis),                                   /* 0x601F disabled */
 };
 
 #undef dis
index 0b94b34f35b91a5d4b05e60f304b8b3ea0228ef6..b06f1f0189c62278c860279b9fa7f386a39ddc5e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 39cdbf1cc4751063a4aae9a5f89117c05c7c9a13..d3c11e922a023fc5c1eb43837eed57698ce4f5c6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -38,6 +35,7 @@
 
 #include <ppc/asm.h>
 #include <ppc/proc_reg.h>
+#include <ppc/POWERMAC/mp/MPPlugIn.h>
 #include <ppc/exception.h>
 #include <ppc/Performance.h>
 #include <mach/machine/vm_param.h>
index b41b1352c25bac93335b4909c7b36f452d84f043..ce31867cfbd6717433b8c96cc916203fe4b41222 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -170,11 +167,11 @@ void bbSetRupt(ReturnHandler *rh, thread_act_t act) {
                        bttd->InterruptControlWord = (bttd->InterruptControlWord & ~kInterruptStateMask) | 
                                (kInPseudoKernel << kInterruptStateShift);
                                
-                       bttd->exceptionInfo.srr0 = (unsigned int)sv->save_srr0;         /* Save the current PC */
-                       sv->save_srr0 = (uint64_t)bttd->InterruptVector;        /* Set the new PC */
-                       bttd->exceptionInfo.sprg1 = (unsigned int)sv->save_r1;          /* Save the original R1 */
-                       sv->save_r1 = (uint64_t)bttd->exceptionInfo.sprg0;      /* Set the new R1 */
-                       bttd->exceptionInfo.srr1 = (unsigned int)sv->save_srr1;         /* Save the original MSR */
+                       bttd->exceptionInfo.srr0 = sv->save_srr0;               /* Save the current PC */
+                       sv->save_srr0 = bttd->InterruptVector;                  /* Set the new PC */
+                       bttd->exceptionInfo.sprg1 = sv->save_r1;                /* Save the original R1 */
+                       sv->save_r1 = bttd->exceptionInfo.sprg0;                /* Set the new R1 */
+                       bttd->exceptionInfo.srr1 = sv->save_srr1;               /* Save the original MSR */
                        sv->save_srr1 &= ~(MASK(MSR_BE)|MASK(MSR_SE));  /* Clear SE|BE bits in MSR */
                        act->mact.specFlags &= ~bbNoMachSC;                             /* reactivate Mach SCs */ 
                        disable_preemption();                                                   /* Don't move us around */
@@ -215,9 +212,8 @@ kern_return_t enable_bluebox(
         ) {
        
        thread_t                th;
-       vm_offset_t             kerndescaddr, origdescoffset;
+       vm_offset_t             kerndescaddr, physdescaddr, origdescoffset;
        kern_return_t   ret;
-       ppnum_t                 physdescpage;
        
        th = current_thread();                                                                  /* Get our thread */                                    
 
@@ -243,8 +239,8 @@ kern_return_t enable_bluebox(
                return KERN_FAILURE;    
        }
                
-       physdescpage =                                                                                  /* Get the physical page number of the page */
-               pmap_find_phys(th->top_act->map->pmap, (addr64_t)Desc_TableStart);
+       physdescaddr =                                                                                  /* Get the physical address of the page */
+               pmap_extract(th->top_act->map->pmap, (vm_offset_t) Desc_TableStart);
 
        ret =  kmem_alloc_pageable(kernel_map, &kerndescaddr, PAGE_SIZE);       /* Find a virtual address to use */
        if(ret != KERN_SUCCESS) {                                                               /* Could we get an address? */
@@ -256,7 +252,7 @@ kern_return_t enable_bluebox(
        }
        
        (void) pmap_enter(kernel_pmap,                                                  /* Map this into the kernel */
-               kerndescaddr, physdescpage, VM_PROT_READ|VM_PROT_WRITE, 
+               kerndescaddr, physdescaddr, VM_PROT_READ|VM_PROT_WRITE, 
                VM_WIMG_USE_DEFAULT, TRUE);
        
        th->top_act->mact.bbDescAddr = (unsigned int)kerndescaddr+origdescoffset;       /* Set kernel address of the table */
@@ -396,7 +392,7 @@ int bb_settaskenv( struct savearea *save )
        act->mact.bbTaskEnv = save->save_r4;
        if(act == current_act()) {                                              /* Are we setting our own? */
                disable_preemption();                                           /* Don't move us around */
-               per_proc_info[cpu_number()].ppbbTaskEnv = act->mact.bbTaskEnv;  /* Remember the environment */
+               per_proc_info[cpu_number()].spcFlags = act->mact.specFlags;     /* Copy the flags */
                enable_preemption();                                            /* Ok to move us around */
        }
 
index ccbbc242546b0b80d4661bce1a18a86285bdb5c5..ca3722b2c69514543d4026ae8e3fd0faf15d574b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9cf5fe7d3921e1cfc2b44aca9b6156eb8f438c6a..c8a40b93dd7bd625989e671c50d1b353311df250 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a1c091cd928afac1e62c5b4680bddbb864e0e41c..be7a239ef00a9be1fa3b328afb215c7f35230def 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -49,8 +46,6 @@
 #include <cpus.h>
 #include <ppc/asm.h>
 #include <ppc/proc_reg.h>
-#include <ppc/spec_reg.h>
-#include <mach/ppc/vm_param.h>
 #include <assym.s>
 
 ;
 
                        .data
 
-/*             4096-byte aligned areas */
+/*             1024-byte aligned areas */
 
                .globl  EXT(per_proc_info)
-               .align  12
+               .align  10
 EXT(per_proc_info):                                                                    ; Per processor data area
-               .space  (ppSize*NCPUS),0                                ; (filled with 0s)
+               .fill   (ppSize*NCPUS)/4,4,0                            ; (filled with 0s)
 
 /*             512-byte aligned areas */
 
                .globl  EXT(kernel_pmap_store)                          ; This is the kernel_pmap
                .align  8
 EXT(kernel_pmap_store):
-               .set    .,.+pmapSize
+               .set    .,.+PMAP_SIZE
 
 
 /*             256-byte aligned areas */
@@ -88,6 +83,11 @@ EXT(GratefulDebWork):                                                                ; Enough for 2 rows of 8 chars of 16-pixel wide 32-
 debstash:
                .set    .,.+256
 
+               .globl  EXT(hw_counts)                                          ; Counter banks per processor
+               .align  8
+EXT(hw_counts):
+               .set    .,.+(NCPUS*256)
+
 #if PREEMPTSTACK
 
 ;
@@ -103,11 +103,37 @@ EXT(DBGpreempt):
 
 /*             128-byte aligned areas */
 
+               .globl  EXT(saveanchor)
+               .align  7
+EXT(saveanchor):
+               .set    .,.+SVsize
+
                .globl  EXT(mapCtl)
                .align  7
 EXT(mapCtl):
                .set    .,.+mapcsize
 
+               .globl  EXT(trcWork)
+               .align  7
+EXT(trcWork):
+               .long   EXT(traceTableBeg)                                      ; The next trace entry to use
+#if DEBUG
+/*             .long   0x02000000      */                                              /* Only alignment exceptions enabled */
+               .long   0xFFFFFFFF                                                      /* All enabled */
+/*             .long   0xFBBFFFFF      */                                              /* EXT and DEC disabled */
+/*             .long   0xFFBFFFFF      */                                              /* DEC disabled */
+#else
+               .long   0x00000000                                                      ; All disabled on non-debug systems
+#endif
+               .long   EXT(traceTableBeg)                                      ; Start of the trace table
+               .long   EXT(traceTableEnd)                                      ; End (wrap point) of the trace
+               .long   0                                                                       ; Saved mask while in debugger
+
+               .long   0
+               .long   0
+               .long   0
+               
+               
                .globl  fwdisplock
                .align  7
 fwdisplock:
@@ -168,6 +194,19 @@ EXT(QNaNbarbarian):
                .long   0x7FFFDEAD                                                      /* This is a quiet not-a-number which is a "known" debug value */
                .long   0x7FFFDEAD                                                      /* This is a quiet not-a-number which is a "known" debug value */
 
+               .globl  EXT(dgWork)
+               .align  5
+EXT(dgWork):
+               .long   0
+               .long   0
+               .long   0
+               .long   0
+               .long   0
+               .long   0
+               .long   0
+               .long   0
+
+
 /*             8-byte aligned areas */
 
        .globl  EXT(FloatInit)
@@ -197,41 +236,3 @@ EXT(dbfloats):
                .align  3
 EXT(dbspecrs):
                .set    .,.+(80*4)
-
-/*
- *             Interrupt and debug stacks go here
- */
-       
-               .align  PPC_PGSHIFT
-       .globl  EXT(FixedStackStart)
-EXT(FixedStackStart):
-     
-               .globl  EXT(intstack)
-EXT(intstack):
-               .set    .,.+INTSTACK_SIZE*NCPUS
-       
-/* Debugger stack - used by the debugger if present */
-/* NOTE!!! Keep the debugger stack right after the interrupt stack */
-
-       .globl  EXT(debstack)
-EXT(debstack):
-               .set    ., .+KERNEL_STACK_SIZE*NCPUS
-     
-                .globl  EXT(FixedStackEnd)
-EXT(FixedStackEnd):
-
-               .align  ALIGN
-               .globl  EXT(intstack_top_ss)
-EXT(intstack_top_ss):
-               .long   EXT(intstack)+INTSTACK_SIZE-FM_SIZE                     /* intstack_top_ss points to the top of interrupt stack */
-
-               .align  ALIGN
-               .globl  EXT(debstack_top_ss)    
-EXT(debstack_top_ss):
-
-               .long   EXT(debstack)+KERNEL_STACK_SIZE-FM_SIZE         /* debstack_top_ss points to the top of debug stack */
-
-       .globl  EXT(debstackptr)
-EXT(debstackptr):      
-               .long   EXT(debstack)+KERNEL_STACK_SIZE-FM_SIZE
-
index 23e865444fa6f522dd81004554347a72acd55b48..e12d9bfe1274f11665d4c9375deb923acc34bbe9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -68,8 +65,6 @@
 #define sprg1  273
 #define sprg2  274
 #define sprg3  275
-#define scomc  276
-#define scomd  277
 #define pvr            287
 
 #define IBAT0U 528
 #define dbat3l 543
 
 #define ummcr2 928             /* Performance monitor control */
-#define upmc5   929     /* Performance monitor counter */
-#define upmc6   930     /* Performance monitor counter */
 #define ubamr  935             /* Performance monitor mask */
 #define ummcr0 936             /* Performance monitor control */
 #define upmc1  937             /* Performance monitor counter */
 #define upmc4  942             /* Performance monitor counter */
 #define usda   943             /* User sampled data address */
 #define mmcr2  944             /* Performance monitor control */
-#define pmc5    945     /* Performance monitor counter */
-#define pmc6    946     /* Performance monitor counter */
 #define bamr   951             /* Performance monitor mask */
 #define mmcr0  952
 #define pmc1   953
 #define        pmc4    958
 #define        sda             959             /* Sampled data address */
 #define dmiss  976             /* ea that missed */
-#define trig0  976             
 #define dcmp   977             /* compare value for the va that missed */
-#define trig1  977             
 #define hash1  978             /* pointer to first hash pteg */
-#define trig2  978             
 #define        hash2   979             /* pointer to second hash pteg */
 #define imiss  980             /* ea that missed */
 #define tlbmiss        980             /* ea that missed */
 #define hid0   1008    /* Checkstop and misc enables */
 #define HID1   1009    /* Clock configuration */
 #define hid1   1009    /* Clock configuration */
-#define HID2   1016    /* Other processor controls */
-#define hid2   1016    /* Other processor controls */
 #define iabr   1010    /* Instruction address breakpoint register */
 #define ictrl  1011    /* Instruction Cache Control */
 #define ldstdb 1012    /* Load/Store Debug */
-#define hid4   1012    /* Misc stuff */
 #define dabr   1013    /* Data address breakpoint register */
 #define msscr0 1014    /* Memory subsystem control */
-#define hid5   1014    /* Misc stuff */
 #define msscr1 1015    /* Memory subsystem debug */
 #define msssr0 1015    /* Memory Subsystem Status */
 #define ldstcr 1016    /* Load/Store Status/Control */
 #define thrm3  1022    /* Thermal management 3 */
 #define pir            1023    /* Processor ID Register */
 
-
-/* SPR registers (64-bit, PPC970 specific) */
-
-#define scomc_gp       276
-#define scomd_gp       277
-
-#define hsprg0         304
-#define hsprg1         305
-#define hdec           310
-#define hior           311
-#define rmor           312
-#define hrmor          313
-#define hsrr0          314
-#define hsrr1          315
-#define lpcr           318
-#define lpidr          319
-
-#define ummcra_gp      770
-#define upmc1_gp       771
-#define upmc2_gp       772
-#define upmc3_gp       773
-#define upmc4_gp       774
-#define upmc5_gp       775
-#define upmc6_gp       776
-#define upmc7_gp       777
-#define upmc8_gp       778
-#define ummcr0_gp      779
-#define usiar_gp       780
-#define usdar_gp       781
-#define ummcr1_gp      782
-#define uimc_gp                783
-
-#define mmcra_gp       786
-#define pmc1_gp                787
-#define pmc2_gp                788
-#define pmc3_gp                789
-#define pmc4_gp                790
-#define pmc5_gp                791
-#define pmc6_gp                792
-#define pmc7_gp                793
-#define pmc8_gp                794
-#define mmcr0_gp       795
-#define siar_gp                796
-#define sdar_gp                797
-#define mmcr1_gp       798
-#define imc_gp         799
-
-#define trig0_gp       976             
-#define trig1_gp       977             
-#define trig2_gp       978             
-
-#define dabrx          1015
-
 ;      hid0 bits
 #define emcp   0
 #define emcpm  0x80000000
 #define ilockm 0x00002000
 #define dlock  19
 #define dlockm 0x00001000
-#define exttben        19
 #define icfi   20
 #define icfim  0x00000800
 #define dcfi   21
 #define hid1prem       0x06000000
 #define hid1pi0                14
 #define hid1pi0m       0x00020000
-#define hid1FCPErr     14
 #define hid1ps         15
-#define hid1FCD0PErr   15
 #define hid1psm                0x00010000
 #define hid1pc0                0x0000F800
 #define hid1pr0                0x00000600
 #define hid1pc1                0x000000F8
 #define hid1pc0                0x0000F800
 #define hid1pr1                0x00000006
-#define hid1FCD1PErr   16
-#define hid1FIERATErr  17
-
-;      hid2 bits
-#define hid2vmin       18
-#define hid2vminm      0x00002000
 
 ;      msscr0 bits
 #define shden  0
 #define apmck  15
 #define apmckm 0x00010000
 
-#define mckIFUE        42
-#define mckLDST        43
-#define mckXCs 44
-#define mckXCe 45
-#define mckNoErr       0
-#define mckIFSLBPE     1
-#define mckIFTLBPE     2
-#define mckIFTLBUE     3
-
-;      dsisr bits
-#define mckUEdfr       16
-#define mckUETwDfr     17
-#define mckL1DCPE      18
-#define        mckL1DTPE       19
-#define        mckDEPE         20
-#define mckTLBPE       21
-#define mckSLBPE       23
-
-;      Async MCK source
-#define AsyMCKSrc 0x0226
-#define AsyMCKRSrc 0x0227
-#define AsyMCKext 0
-#define AsyMCKfir 1
-#define AsyMCKhri 2
-#define AsyMCKdbg 3
-#define AsyMCKncstp 4
-
-;      Core FIR
-#define cFIR 0x0300
-#define cFIRrst 0x0310
-#define cFIRICachePE 0
-#define cFIRITagPE0 1
-#define cFIRITagPE1 2
-#define cFIRIEratPE 3
-#define cFIRIFUL2UE 4
-#define cFIRIFUCS 5
-#define cFIRDCachePE 6
-#define cFIRDTagPE 7
-#define cFIRDEratPE 8
-#define cFIRTLBPE 9
-#define cFIRSLBPE 10
-#define cFIRSL2UE 11
-
-;      Core Error Inject
-#define CoreErrI 0x0350
-#define CoreIFU 0
-#define CoreLSU 1
-#define CoreRate0 2
-#define CoreRate1 3
-#define CoreOnce 0
-#define CoreSolid 2
-#define CorePulse 3
-
-;      GUS Mode Register
-#define GUSModeReg 0x0430
-#define GUSMdmapen 0x00008000
-#define GUSMstgtdis 0x00000080
-#define GUSMstgttim 0x00000038
-#define GUSMstgttoff 0x00000004
-
-;      HID4
-#define hid4RMCI 23
-#define hid4FAlgn 24
-#define hid4DisPF 25
-#define hid4ResPF 26
-#define hid4EnSPTW 27
-#define hid4L1DCFI 28
-#define hid4DisDERpg 31
-#define hid4DisDCTpg 36
-#define hid4DisDCpg 41
-#define hid4DisTLBpg 48
-#define hid4DisSLBpg 54
-#define hid4MckEIEna 55
-
 ;      L2 cache control
 #define l2e            0
 #define l2em   0x80000000
 #define cr7_so 31
 #define cr7_un 31
 
-#define slbESID        36
-#define slbKey 52
-#define slbIndex 52
-#define slbV   36
-#define slbVm  0x08000000
-#define slbCnt 64
-
 /*
  * Macros to access high and low word values of an address
  */
index 3310e203c7678b44909469e877dda759e3653b92..fe64a1f94a4d8179a682b0d8ed80f57a8b2e15e2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0f867cb581516ef02b952ec57d6b3e4503c89789..4db875d69e1a8e2d89fda981486d0f42914a796e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index dda677031b5f923a969b81cae2cac2e3b4a7ce29..7b2eed2ff516b9d26c5aa6b40f920118b955dee6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c66791ba52168d69e57d049987fd312eec5b6d07..607bc04a4fac5bf57faf03ce2dafc260a1a49675 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -78,10 +75,6 @@ ENTRY(atomic_switch_trap, TAG_NO_FRAME_USED)
 
                        li              r5, BTTD_TRAP_VECTOR
 
-                       cmplwi  r24,0x3C                                                        ; (BRINGUP)
-                       bne             .L_CallPseudoKernel                                     ; (BRINGUP)
-                       nop                                                                                     ; (BRINGUP)
-
 /******************************************************************************
  * void CallPseudoKernel ( int vector, thread_act_t * act, BEDA_t * beda, savearea *sv )
  *
@@ -141,20 +134,20 @@ ENTRY(atomic_switch_trap, TAG_NO_FRAME_USED)
 
 .L_CallFromPreemptiveThread:
 
-                       lwz             r1,savesrr0+4(r4)                                       ; Get current PC
-                       lwz             r2,saver1+4(r4)                                         ; Get current R1
-                       lwz             r3,savesrr1+4(r4)                                       ; Get current MSR
+                       lwz             r1,savesrr0(r4)                                         ; Get current PC
+                       lwz             r2,saver1(r4)                                           ; Get current R1
+                       lwz             r3,savesrr1(r4)                                         ; Get current MSR
                        stw             r1,BEDA_SRR0(r26)                                       ; Save current PC
                        rlwinm  r3,r3,0,MSR_BE_BIT+1,MSR_SE_BIT-1                               
                                                                                                                ; Clear SE|BE bits in MSR
                        stw             r2,BEDA_SPRG1(r26)                                      ; Save current R1 
-                       stw             r3,savesrr1+4(r4)                                       ; Load new MSR
+                       stw             r3,savesrr1(r4)                                         ; Load new MSR
 
                        lwz             r1,BEDA_SPRG0(r26)                                      ; Get replacement R1
                        lwzx    r2,r5,r6                                                        ; Load vector address
                        stw             r3,BEDA_SRR1(r26)                                       ; Update saved MSR
-                       stw             r1,saver1+4(r4)                                         ; Load up new R1
-                       stw             r2,savesrr0+4(r4)                                       ; Save vector as PC
+                       stw             r1,saver1(r4)                                           ; Load up new R1
+                       stw             r2,savesrr0(r4)                                         ; Save vector as PC
 
                        b               EXT(fastexit)                                           ; Go back and take the fast path exit...
 
@@ -190,7 +183,7 @@ ENTRY(atomic_switch_trap, TAG_NO_FRAME_USED)
                        ori             r7,r7,(0x8000 >> (bbNoMachSCbit - 16))  ; Disable Mach SCs for Blue Box
 
                        cmpwi   r2,0                                                            ; Is this a preemptive thread
-                       stw             r1,savectr+4(r4)                                                ; Update CTR
+                       stw             r1,savectr(r4)                                          ; Update CTR
                        beq             .L_ExitFromPreemptiveThread
 
                        lwz             r8,BTTD_INTCONTROLWORD(r6)                      ; Get ICW
@@ -206,10 +199,10 @@ ENTRY(atomic_switch_trap, TAG_NO_FRAME_USED)
                        beq             cr1,.L_ExitToSystemContext                      ; We are in system context
                        beq             .L_ExitUpdateRuptControlWord            ; We do not have a pending interrupt
 
-                       lwz             r2,saver1+4(r4)                                         ; Get current R1
+                       lwz             r2,saver1(r4)                                           ; Get current R1
                        lwz             r1,BEDA_SPRG0(r26)                                      ; Get replacement R1
                        stw             r2,BEDA_SPRG1(r26)                                      ; Save current R1
-                       stw             r1,saver1+4(r4)                                         ; Load up new R1
+                       stw             r1,saver1(r4)                                           ; Load up new R1
                        lwz             r3,BTTD_PENDINGINT_VECTOR(r6)           ; Get pending interrupt PC
                        b               .L_ExitAbortExit                                        ; Abort and Exit
 
@@ -222,17 +215,17 @@ ENTRY(atomic_switch_trap, TAG_NO_FRAME_USED)
 
 .L_ExitFromPreemptiveThread:
                        mfsprg  r3,0                                                            ; Get the per_proc
-                       lwz             r2,savesrr1+4(r4)                                       ; Get current MSR       
+                       lwz             r2,savesrr1(r4)                                         ; Get current MSR       
                        lwz             r1,BEDA_SRR1(r26)                                       ; Get new MSR
                        stw             r7,ACT_MACT_SPF(r13)                            ; Update special flags
                        stw             r7,spcFlags(r3)                                         ; Update per_proc version
                        rlwimi  r2,r1,0,MSR_FE0_BIT,MSR_FE1_BIT
                                                                                                                ; Insert FE0,FE1,SE,BE bits
                        lwz             r3,BEDA_SRR0(r26)                                       ; Get new PC
-                       stw             r2,savesrr1+4(r4)                                               ; Update MSR
+                       stw             r2,savesrr1(r4)                                         ; Update MSR
 
 .L_ExitAbortExit:
-                       stw             r3,savesrr0+4(r4)                                               ; Update PC
+                       stw             r3,savesrr0(r4)                                         ; Update PC
 
                        b               EXT(fastexit)                                           ; Go back and take the fast path exit...
 
index 9ea600f3bd5e0d6a7bbdefe13d4fb406660b57fb..5d36e6fa42072ce53b1bbbea42602b7120fd74a3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 389fe4b2fa45f8bcbd8a12ee3cf28ac66b17b6f5..1a18bf37a9a1e848c1d4012f92afdf4b5602eb82 100644 (file)
@@ -1,24 +1,21 @@
 /*
- * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 ;
 #include <ppc/asm.h>
 #include <ppc/proc_reg.h>
-#include <assym.s>
 
 ;              Use CR5_lt to indicate non-cached
 #define noncache 20
-
 ;              Use CR5_gt to indicate that we need to turn data translation back on
 #define fixxlate 21
-
-;              Use CR5_eq to indicate that we need to invalidate bats (if 32-bit) or turn off
-;              64-bit mode (if 64-bit) before returning to our caller.  We overload the
-;              bit to reduce the number of conditional branches at bcopy exit.
-#define restorex 22
-
-;              Use CR5_so to indicate that we need to restore real-mode cachability
-;              Only needed on 64-bit machines
-#define flipcache 23
+;              Use CR5_eq to indicate that we need to invalidate bats
+#define killbats 22
 
 ;
 ; bcopy_nc(from, to, nbytes)
@@ -65,24 +53,19 @@ LEXT(bcopy_nc)
 ;      
 ; void bcopy_physvir(from, to, nbytes)
 ; Attempt to copy physically addressed memory with translation on if conditions are met.
-; Otherwise do a normal bcopy_phys.  This routine is used because some 32-bit processors 
-; are very slow doing real-mode (translation off) copies, so we set up temporary BATs
-; for the passed phys addrs and do the copy with translation on.  
+; Otherwise do a normal bcopy_phys.
 ;
 ; Rules are: neither source nor destination can cross a page. 
+; No accesses above the 2GB line (I/O or ROM).
 ;
-; Interrupts must be disabled throughout the copy when this is called.
+; Interrupts must be disabled throughout the copy when this is called
+
 ; To do this, we build a
 ; 128 DBAT for both the source and sink.  If both are the same, only one is
 ; loaded.  We do not touch the IBATs, so there is no issue if either physical page
 ; address is the same as the virtual address of the instructions we are executing.
 ;
-; At the end, we invalidate the used DBATs.
-;
-; Note that the address parameters are long longs.  We will transform these to 64-bit
-; values.  Note that on 32-bit architectures that this will ignore the high half of the
-; passed in value.  This should be ok since we can not have any bigger than 32 bit addresses
-; there anyhow.
+; At the end, we invalidate the used DBATs and reenable interrupts.
 ;
 ; Note, this one will not work in user state
 ; 
@@ -92,32 +75,22 @@ LEXT(bcopy_nc)
 
 LEXT(bcopy_physvir)
 
-                       crclr   flipcache                                       ; (HACK) No cache flip needed
-            mfsprg     r8,2                                            ; get processor feature flags
-            rlwinm     r3,r3,0,1,0                                     ; Duplicate high half of long long paddr into top of reg
-                       addic.  r0,r7,-1                                        ; Get length - 1
-                       rlwimi  r3,r4,0,0,31                            ; Combine bottom of long long to full 64-bits
+                       addic.  r0,r5,-1                                        ; Get length - 1
                        add             r11,r3,r0                                       ; Point to last byte of sink
-                       rlwinm  r4,r5,0,1,0                                     ; Duplicate high half of long long paddr into top of reg
-            mtcrf      0x02,r8                                         ; move pf64Bit to cr6 so we can test
-            rlwimi     r4,r6,0,0,31                            ; Combine bottom of long long to full 64-bits
-                       mr              r5,r7                                           ; Get the length into the right register
-                       cmplw   cr1,r3,r4                                       ; Does source == sink?  
-            bt++       pf64Bitb,bcopy_phys1            ; if 64-bit processor, use standard routine (no BATs)
+                       cmplw   cr1,r3,r4                                       ; Does source == sink?                  
                        add             r12,r4,r0                                       ; Point to last byte of source
                        bltlr-                                                          ; Bail if length is 0 or way too big
                        xor             r7,r11,r3                                       ; See if we went to next page
                        xor             r8,r12,r4                                       ; See if we went to next page
                        or              r0,r7,r8                                        ; Combine wrap
                        
-//                     li              r9,((PTE_WIMG_CB_CACHED_COHERENT<<3)|2) ; Set default attributes
-                       li              r9,((2<<3)|2)                           ; Set default attributes
+                       li              r9,((PTE_WIMG_CB_CACHED_COHERENT<<3)|2) ; Set default attributes
                        rlwinm. r0,r0,0,0,19                            ; Did we overflow a page?
                        li              r7,2                                            ; Set validity flags
                        li              r8,2                                            ; Set validity flags
-                       bne-    bcopy_phys1                                     ; Overflowed page, do normal physical copy...
+                       bne-    EXT(bcopy_phys)                         ; Overflowed page, do normal physical copy...
 
-                       crset   restorex                                        ; Remember to trash BATs on the way out
+                       crset   killbats                                        ; Remember to trash BATs on the way out
                        rlwimi  r11,r9,0,15,31                          ; Set sink lower DBAT value
                        rlwimi  r12,r9,0,15,31                          ; Set source lower DBAT value
                        rlwimi  r7,r11,0,0,14                           ; Set sink upper DBAT value
@@ -136,123 +109,41 @@ LEXT(bcopy_physvir)
 
 bcpvsame:      mr              r6,r3                                           ; Set source
                        crclr   noncache                                        ; Set cached
-                       crclr   fixxlate                                        ; Set translation already ok
                        
-                       b               copyit32                                        ; Go copy it...
+                       b               copyit                                          ; Go copy it...
+
 
 ;      
 ; void bcopy_phys(from, to, nbytes)
 ; Turns off data translation before the copy.  Note, this one will
-; not work in user state.  This routine is used on 32 and 64-bit
-; machines.
-;
-; Note that the address parameters are long longs.  We will transform these to 64-bit
-; values.  Note that on 32-bit architectures that this will ignore the high half of the
-; passed in value.  This should be ok since we can not have any bigger than 32 bit addresses
-; there anyhow.
-;
-; Also note that you probably will not be happy if either the sink or source spans across the
-; boundary between RAM and I/O space.  Good chance of hanging the machine and this code 
-; will not check, so be careful.
+; not work in user state
 ;
 
                        .align  5
                        .globl  EXT(bcopy_phys)
 
 LEXT(bcopy_phys)
-                       crclr   flipcache                                       ; (HACK) No cache flip needed
-            rlwinm     r3,r3,0,1,0                                     ; Duplicate high half of long long paddr into top of reg
-            mfsprg     r8,2                                            ; get processor feature flags
-                       rlwimi  r3,r4,0,0,31                            ; Combine bottom of long long to full 64-bits
-                       rlwinm  r4,r5,0,1,0                                     ; Duplicate high half of long long paddr into top of reg
-                       mtcrf   0x02,r8                                         ; move pf64Bit to cr6 so we can test
-                       rlwimi  r4,r6,0,0,31                            ; Combine bottom of long long to full 64-bits
-                       mr              r5,r7                                           ; Get the length into the right register
-            
-bcopy_phys1:                                                                   ; enter from bcopy_physvir with pf64Bit already in cr6
+
                        mfmsr   r9                                                      ; Get the MSR
+
                        crclr   noncache                                        ; Set cached
-            bt++       pf64Bitb,bcopy_phys64           ; skip if 64-bit (only they take hint)
-
-; 32-bit CPUs
-            
-            sub.       r0,r3,r4                                        ; to==from?
-                       rlwinm  r8,r9,0,MSR_DR_BIT,MSR_DR_BIT   ; was translation on?
-            cmpwi      cr1,r8,0                                        ; set cr1 beq if translation was off
-                       oris    r8,r8,hi16(MASK(MSR_VEC))       ; Get vector enable
+                       rlwinm. r8,r9,0,MSR_DR_BIT,MSR_DR_BIT   ; Is data translation on?
+
+                       cmplw   cr1,r4,r3                                       ; Compare "to" and "from"
                        cmplwi  cr7,r5,0                                        ; Check if we have a 0 length
-            beqlr-                                                             ; bail if to==from
-                       ori             r8,r8,lo16(MASK(MSR_FP))        ; Get FP
                        mr              r6,r3                                           ; Set source
-                       andc    r9,r9,r8                                        ; Turn off translation if it is on (should be) and FP, VEC
+                       beqlr-  cr1                                                     ; Bail if "to" and "from" are the same  
+                       xor             r9,r9,r8                                        ; Turn off translation if it is on (should be)
                        beqlr-  cr7                                                     ; Bail if length is 0
                        
-                       crclr   restorex                                        ; Make sure we do not trash BATs on the way out
+                       rlwinm  r9,r9,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       crclr   killbats                                        ; Make sure we do not trash BATs on the way out
+                       rlwinm  r9,r9,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
                        mtmsr   r9                                                      ; Set DR translation off
                        isync                                                           ; Wait for it
                        
-                       crnot   fixxlate,cr1_eq                         ; Remember to turn on translation if it was
-                       b               copyit32                                        ; Go copy it...
-            
-; 64-bit: turn DR off and SF on, remember if we need to restore on way out.
-
-bcopy_phys64:                                                                  ; r9 = MSR
-
-                       srdi    r2,r3,31                                        ; (HACK) Get a 1 if source is in I/O memory
-            srdi.      r0,r9,63-MSR_SF_BIT                     ; set cr0 beq on if SF was off when we were called
-            rlwinm     r8,r9,MSR_DR_BIT+1,31,31        ; r8 <- DR bit right justified
-            cmpld      cr1,r3,r4                                       ; to==from?
-            li         r0,1                                            ; Note - we use this in a couple places below
-                       lis             r6,hi16(MASK(MSR_VEC))          ; Get vector enable
-            cmpwi      cr7,r5,0                                        ; length==0 ?
-            ori                r6,r6,lo16(MASK(MSR_FP)|MASK(MSR_DR))   ; Add in FP and DR
-            beqlr--    cr1                                                     ; bail if to==from
-                       srdi    r10,r4,31                                       ; (HACK) Get a 1 if sink is in I/O memory
-            rldimi     r9,r0,63,MSR_SF_BIT                     ; set SF on
-            beqlr--    cr7                                                     ; bail if length==0
-            andc       r9,r9,r6                                        ; turn DR, VEC, FP off
-            cmpwi      cr1,r8,0                                        ; was DR on?
-            crmove     restorex,cr0_eq                         ; if SF was off, remember to turn back off before we return
-            mtmsrd     r9                                                      ; turn 64-bit addressing on, data translation off
-                       cmpldi  cr0,r2,1                                        ; (HACK) Is source in I/O memory?
-            isync                                                              ; wait for it to happen
-                       mr              r6,r3                                           ; Set source
-                       cmpldi  cr7,r10,1                                       ; (HACK) Is sink in I/O memory?
-            crnot      fixxlate,cr1_eq                         ; if DR was on, remember to turn back on before we return
-
-                       cror    flipcache,cr0_eq,cr7_eq         ; (HACK) See if either source or sink is in I/O area
-
-                       rlwinm  r10,r9,MSR_EE_BIT+1,31,31       ; (HACK GLORIOUS HACK) Isolate the EE bit
-                       sldi    r11,r0,31-MSR_EE_BIT            ; (HACK GLORIOUS HACK)) Get a mask for the EE bit
-                       sldi    r0,r0,32+8                                      ; (HACK) Get the right bit to turn off caching
-                       bf++    flipcache,copyit64                      ; (HACK) No need to mess with caching...
-                       
-;
-;                      HACK GLORIOUS HACK - when we force of caching, we need to also force off
-;                      interruptions.  We are out of CR bits, so we need to stash the entry EE
-;                      somewheres.  It is in the XER....  We NEED to change this!!!!
-;
-
-                       mtxer   r10                                                     ; (HACK GLORIOUS HACK) Remember EE
-                       andc    r9,r9,r11                                       ; (HACK GLORIOUS HACK) Turn off EE bit
-                       mfspr   r2,hid4                                         ; (HACK) Get HID4
-                       crset   noncache                                        ; (HACK) Set non-cached
-                       mtmsrd  r9                                                      ; (HACK GLORIOUS HACK) Force off EE
-                       or              r2,r2,r0                                        ; (HACK) Set bit to make real accesses cache-inhibited
-                       sync                                                            ; (HACK) Sync up
-                       li              r0,1
-                       mtspr   hid4,r2                                         ; (HACK) Make real accesses cache-inhibited
-                       isync                                                           ; (HACK) Toss prefetches
-
-                       lis             r12,0xE000                                      ; (HACK) Get the unlikeliest ESID possible
-                       srdi    r12,r12,1                                       ; (HACK) Make 0x7FFFFFFFF0000000
-                       slbie   r12                                                     ; (HACK) Make sure the ERAT is cleared 
-                       
-                       sync                                                            ; (HACK)
-                       isync                                                           ; (HACK)
-                       
-            b          copyit64
-            
+                       crnot   fixxlate,cr0_eq                         ; Remember to turn on translation if it was
+                       b               copyit                                          ; Go copy it...
 
 ;      
 ; void bcopy(from, to, nbytes)
@@ -265,19 +156,14 @@ LEXT(bcopy)
 
                        crclr   noncache                                        ; Set cached
 
-bcpswap:       
-                       crclr   flipcache                                       ; (HACK) No cache flip needed
-            mfsprg     r8,2                                            ; get processor feature flags
-            sub.       r0,r4,r3                                        ; test for to==from in mode-independent way
-            mtcrf      0x02,r8                                         ; move pf64Bit to cr6 so we can test
-                       cmpwi   cr1,r5,0                                        ; Check if we have a 0 length
-                       crclr   restorex                                        ; Make sure we do not trash BATs on the way out
+bcpswap:       cmplw   cr1,r4,r3                                       ; Compare "to" and "from"
+                       mr.             r5,r5                                           ; Check if we have a 0 length
                        mr              r6,r3                                           ; Set source
+                       crclr   killbats                                        ; Make sure we do not trash BATs on the way out
+                       beqlr-  cr1                                                     ; Bail if "to" and "from" are the same  
+                       beqlr-                                                          ; Bail if length is 0
                        crclr   fixxlate                                        ; Set translation already ok
-                       beqlr-                                                          ; Bail if "to" and "from" are the same  
-                       beqlr-  cr1                                                     ; Bail if length is 0
-            bt++       pf64Bitb,copyit64                       ; handle 64-bit processor
-                       b               copyit32                                        ; Go copy it...
+                       b               copyit                                          ; Go copy it...
 
 ;
 ;                      When we move the memory, forward overlays must be handled.  We
@@ -285,32 +171,19 @@ bcpswap:
 ;                      We need to preserve R3 because it needs to be returned for memcpy.
 ;                      We can be interrupted and lose control here.
 ;
-;                      There is no stack, so in order to use vectors, we would
-;                      need to take the vector exception. Any potential gains by using vectors 
+;                      There is no stack, so in order to used floating point, we would
+;                      need to take the FP exception. Any potential gains by using FP 
 ;                      would be more than eaten up by this.
 ;
-;                      NOTE: this code is called in three "modes":
-;                              - on 32-bit processors (32-byte cache line)
-;                              - on 64-bit processors running in 32-bit mode (128-byte cache line)
-;                              - on 64-bit processors running in 64-bit mode (128-byte cache line)
-;
-;                      ALSO NOTE: bcopy is called from copyin and copyout etc
-;                      with the "thread_recover" ptr set.  This means bcopy must not set up a
-;                      stack frame or touch non-volatile registers, and also means that it
-;                      cannot rely on turning off interrupts, because we expect to get DSIs
-;                      and have execution aborted by a "longjmp" to the thread_recover
-;                      routine.
+;                      Later, we should used Altivec for large moves.
 ;
        
                        .align  5
                        .globl  EXT(memcpy)
-            ; NB: memcpy is only called in 32-bit mode, albeit on both 32- and 64-bit
-            ; processors...
+
 LEXT(memcpy)
-                       crclr   flipcache                                       ; (HACK) No cache flip needed
-            mfsprg     r8,2                                            ; get processor feature flags
+
                        cmplw   cr1,r3,r4                                       ; "to" and "from" the same?
-            mtcrf      0x02,r8                                         ; move pf64Bit to cr6 so we can test
                        mr              r6,r4                                           ; Set the "from"
                        mr.             r5,r5                                           ; Length zero?
                        crclr   noncache                                        ; Set cached
@@ -318,10 +191,9 @@ LEXT(memcpy)
                        crclr   fixxlate                                        ; Set translation already ok
                        beqlr-  cr1                                                     ; "to" and "from" are the same
                        beqlr-                                                          ; Length is 0
-                       crclr   restorex                                        ; Make sure we do not trash BATs on the way out
-            bt++       pf64Bitb,copyit64                       ; handle 64-bit processors
+                       crclr   killbats                                        ; Make sure we do not trash BATs on the way out
                        
-copyit32:      sub             r12,r4,r6                                       ; Get potential overlap (negative if backward move)
+copyit:                sub             r12,r4,r6                                       ; Get potential overlap (negative if backward move)
                        lis             r8,0x7FFF                                       ; Start up a mask
                        srawi   r11,r12,31                                      ; Propagate the sign bit
                        dcbt    br0,r6                                          ; Touch in the first source line
@@ -334,7 +206,7 @@ copyit32:   sub             r12,r4,r6                                       ; Get potential overlap (negative if backward move)
                        cmplwi  cr7,r9,32                                       ; See if at least a line between  source and sink
                        dcbtst  br0,r4                                          ; Touch in the first sink line
                        cmplwi  cr1,r5,32                                       ; Are we moving more than a line?
-                       cror    noncache,noncache,cr7_lt        ; Set to not DCBZ output line if not enough space
+                       cror    noncache,noncache,28            ; Set to not DCBZ output line if not enough space
                        blt-    fwdovrlap                                       ; This is a forward overlapping area, handle it...
 
 ;
@@ -350,7 +222,6 @@ copyit32:   sub             r12,r4,r6                                       ; Get potential overlap (negative if backward move)
 ;                      We can not do this if noncache is set because we will take an 
 ;                      alignment exception.
 
-G4word:                                                                                        ; enter from 64-bit case with word aligned uncached operands
                        neg             r0,r4                                           ; Get the number of bytes to move to align to a line boundary
                        rlwinm. r0,r0,0,27,31                           ; Clean it up and test it
                        and             r0,r0,r8                                        ; limit to the maximum front end move
@@ -487,45 +358,17 @@ nohalf:           bf              31,bcpydone                                     ; Leave cuz we are all done...
                        lbz             r7,0(r6)                                        ; Get the byte
                        stb             r7,0(r4)                                        ; Save the single
 
-bcpydone:      
+bcpydone:      bt-             killbats,bcclrbat                       ; Jump if we need to clear bats...
+                       bflr    fixxlate                                        ; Leave now if we do not need to fix translation...
                        mfmsr   r9                                                      ; Get the MSR
-                       bf++    flipcache,bcpydone0                     ; (HACK) No need to mess with caching...
-
-                       li              r0,1                                            ; (HACK) Get a 1
-                       mfxer   r10                                                     ; (HACK GLORIOUS HACK) Get the entry EE
-                       sldi    r0,r0,32+8                                      ; (HACK) Get the right bit to turn off caching
-                       mfspr   r2,hid4                                         ; (HACK) Get HID4
-                       rlwinm  r10,r10,31-MSR_EE_BIT,MSR_EE_BIT,MSR_EE_BIT     ; (HACK GLORIOUS HACK) Set the EE bit
-                       andc    r2,r2,r0                                        ; (HACK) Clear bit to make real accesses cache-inhibited
-                       or              r9,r9,r10                                       ; (HACK GLORIOUS HACK) Set the EE in MSR
-                       sync                                                            ; (HACK) Sync up
-                       mtspr   hid4,r2                                         ; (HACK) Make real accesses not cache-inhibited
-                       isync                                                           ; (HACK) Toss prefetches
-       
-                       lis             r12,0xE000                                      ; (HACK) Get the unlikeliest ESID possible
-                       srdi    r12,r12,1                                       ; (HACK) Make 0x7FFFFFFFF0000000
-                       slbie   r12                                                     ; (HACK) Make sure the ERAT is cleared 
-
-                       mtmsr   r9                                                      ; (HACK GLORIOUS HACK) Set EE properly
-
-bcpydone0:
-                       lis             r0,hi16(MASK(MSR_VEC))          ; Get the vector bit
-                       ori             r0,r0,lo16(MASK(MSR_FP))        ; Get the float bit
-                       bf++    fixxlate,bcpydone1                      ; skip if we do not need to fix translation...
                        ori             r9,r9,lo16(MASK(MSR_DR))        ; Turn data translation on
-                       andc    r9,r9,r0                                        ; Make sure that FP and VEC are off
+                       rlwinm  r9,r9,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r9,r9,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
                        mtmsr   r9                                                      ; Just do it
                        isync                                                           ; Hang in there
-            
-bcpydone1:
-            bflr++     restorex                                        ; done if we do not have to fix up addressing
-            mfsprg     r8,2                                            ; get the feature flags again
-            mtcrf      0x02,r8                                         ; put pf64Bit where we can test it
-            bt++       pf64Bitb,bcpydone2                      ; skip if 64-bit processor
-            
-            ; 32-bit processor, so clear out the BATs we set up for bcopy_physvir
-            
-            li         r0,0                                            ; Get set to invalidate upper half
+                       blr                                                                     ; Leave cuz we are all done...                  
+
+bcclrbat:      li              r0,0                                            ; Get set to invalidate upper half
                        sync                                                            ; Make sure all is well
                        mtdbatu 0,r0                                            ; Clear sink upper DBAT
                        mtdbatu 1,r0                                            ; Clear source upper DBAT
@@ -533,16 +376,6 @@ bcpydone1:
                        isync                   
                        blr
 
-            ; 64-bit processor, so turn off 64-bit mode we turned on to do bcopy_phys
-            
-bcpydone2:
-            mfmsr      r9                                                      ; get MSR again
-                       andc    r9,r9,r0                                        ; Make sure that FP and VEC are off
-            rldicl     r9,r9,0,MSR_SF_BIT+1            ; clear SF
-            mtmsrd     r9
-            isync
-            blr
-
 
 ;
 ;                      0123456789ABCDEF0123456789ABCDEF
@@ -563,8 +396,7 @@ bcpydone2:
 ;                      and on in order.  That means that when we are at the second to last DW we
 ;                      have to wait until the whole line is in cache before we can proceed.
 ;
-
-G4reverseWord:                                                                 ; here from 64-bit code with word aligned uncached operands
+       
 fwdovrlap:     add             r4,r5,r4                                        ; Point past the last sink byte
                        add             r6,r5,r6                                        ; Point past the last source byte 
                        and             r0,r4,r8                                        ; Apply movement limit
@@ -711,306 +543,3 @@ bnohalf:  bflr    31                                                      ; Leave cuz we are all done...
                        stb             r7,-1(r4)                                       ; Save the single
                        
                        b               bcpydone                                        ; Go exit cuz we are all done...
-
-
-// Here on 64-bit processors, which have a 128-byte cache line.  This can be
-// called either in 32 or 64-bit mode, which makes the test for reverse moves
-// a little tricky.  We've already filtered out the (sou==dest) and (len==0)
-// special cases.
-//
-// When entered:
-//             r4 = destination (32 or 64-bit ptr)
-//             r5 = length (always 32 bits)
-//             r6 = source (32 or 64-bit ptr)
-//             cr5 = noncache, fixxlate, flipcache, and restorex flags set
-
-        .align 5
-copyit64:
-        lis            r2,0x4000                       // r2 = 0x00000000 40000000
-        neg            r12,r4                          // start to compute #bytes to align dest
-               bt--    noncache,noncache1      // (HACK) Do not even try anything cached...
-        dcbt   0,r6                            // touch in 1st block of source
-noncache1:     
-        add.   r2,r2,r2                        // if 0x00000000 80000000 < 0, we are in 32-bit mode
-        cntlzw r9,r5                           // get highest power-of-2 in length
-        rlwinm r7,r12,0,25,31          // r7 <- bytes to 128-byte align dest
-               bt--    noncache,noncache2      // (HACK) Do not even try anything cached...
-        dcbtst 0,r4                            // touch in 1st destination cache block
-noncache2:
-        sraw   r2,r2,r9                        // get mask with 1s for leading 0s in length, plus 1 more 1-bit
-        bge            copyit64a                       // skip if we are running in 64-bit mode
-        rlwinm r4,r4,0,0,31            // running in 32-bit mode, so truncate ptrs and lengths to 32 bits
-        rlwinm r5,r5,0,0,31
-        rlwinm r6,r6,0,0,31
-copyit64a:                                                     // now we can use 64-bit compares even if running in 32-bit mode
-        sub            r8,r4,r6                        // get (dest-source)
-        andc   r7,r7,r2                        // limit bytes to align by operand length
-        cmpld  cr1,r8,r5                       // if (dest-source)<length, must move reverse
-        bt--   noncache,c64uncached    // skip if uncached
-        blt--  cr1,c64rdouble          // handle cached reverse moves        
-        
-        
-// Forward, cached or doubleword aligned uncached.  This is the common case.
-//   r4-r6 = dest, length, source (as above)
-//             r7 = #bytes 128-byte align dest (limited by copy length)
-//     cr5 = flags, as above
-
-c64double:
-        andi.  r8,r7,7                         // r8 <- #bytes to doubleword align
-        srwi   r9,r7,3                         // r9 <- #doublewords to 128-byte align
-        sub            r5,r5,r7                        // adjust length remaining
-        cmpwi  cr1,r9,0                        // any doublewords to move to cache align?
-        srwi   r10,r5,7                        // r10 <- 128-byte chunks to xfer after aligning dest
-        cmpwi  cr7,r10,0                       // set cr7 on chunk count
-        beq            c64double2                      // dest already doubleword aligned
-        mtctr  r8
-        b              c64double1
-        
-        .align 5                                       // align inner loops
-c64double1:                                                    // copy bytes until dest is doubleword aligned
-        lbz            r0,0(r6)
-        addi   r6,r6,1
-        stb            r0,0(r4)
-        addi   r4,r4,1
-        bdnz   c64double1
-
-c64double2:                                                    // r9/cr1=doublewords, r10=128-byte chunks, cr7=blt if r5==0
-        beq            cr1,c64double4          // no doublewords to xfer in order to cache align
-        mtctr  r9
-        b              c64double3
-
-        .align 5                                       // align inner loops
-c64double3:                                                    // copy doublewords until dest is 128-byte aligned
-        ld             r7,0(r6)
-        addi   r6,r6,8
-        std            r7,0(r4)
-        addi   r4,r4,8
-        bdnz   c64double3
-        
-// Here to xfer 128-byte chunks, if any.  Because the IBM 970 cannot issue two stores/cycle,
-// we pipeline the inner loop so we can pair loads and stores.  Since we only have 8 GPRs for
-// data (64 bytes), we load/store each twice per 128-byte chunk.
-
-c64double4:                                                    // r10/cr7=128-byte chunks
-        rlwinm r0,r5,29,28,31          // r0 <- count of leftover doublewords, after moving chunks
-        cmpwi  cr1,r0,0                        // set cr1 on leftover doublewords
-        beq            cr7,c64double7          // no 128-byte chunks
-        sub            r8,r6,r4                        // r8 <- (source - dest)
-        li             r9,128                          // start at next cache line (we've already touched in 1st line)
-        cmpldi cr7,r8,128                      // if (source-dest)<128, cannot use dcbz128 beacause of overlap
-        cror   noncache,cr7_lt,noncache        // turn on "noncache" flag if (source-dest)<128
-               bt--    noncache,noncache3      // (HACK) Skip cache touch if noncachable
-        dcbt128        r9,r6,1                         // start forward stream
-noncache3:
-        mtctr  r10
-        
-        ld             r0,0(r6)                        // start pipe: load 1st half-line
-        ld             r2,8(r6)
-        ld             r7,16(r6)
-        ld             r8,24(r6)
-        ld             r9,32(r6)
-        ld             r10,40(r6)
-        ld             r11,48(r6)
-        ld             r12,56(r6)
-               b               c64InnerLoopEntryPt
-        
-        .align 5                                       // align inner loop
-c64InnerLoop:                                          // loop copying 128-byte cache lines to 128-aligned destination
-        std            r0,64(r4)                       // store 2nd half of chunk n
-        ld             r0,0(r6)                        // load 1st half of chunk n+1
-        std            r2,72(r4)
-        ld             r2,8(r6)
-        std            r7,80(r4)
-        ld             r7,16(r6)
-        std            r8,88(r4)
-        ld             r8,24(r6)
-        std            r9,96(r4)
-        ld             r9,32(r6)
-        std            r10,104(r4)
-        ld             r10,40(r6)
-        std            r11,112(r4)
-        ld             r11,48(r6)
-        std            r12,120(r4)
-        ld             r12,56(r6)
-        addi   r4,r4,128                       // advance to next dest chunk
-c64InnerLoopEntryPt:                           // initial entry into loop, with 1st halfline loaded        
-        bt             noncache,c64InnerLoop1  // skip if uncached or overlap
-        dcbz128        0,r4                            // avoid prefetch of next cache line
-c64InnerLoop1:
-        std            r0,0(r4)                        // store 1st half of chunk n
-        ld             r0,64(r6)                       // load 2nd half of chunk n
-        std            r2,8(r4)
-        ld             r2,72(r6)
-        std            r7,16(r4)
-        ld             r7,80(r6)
-        std            r8,24(r4)
-        ld             r8,88(r6)
-        std            r9,32(r4)
-        ld             r9,96(r6)
-        std            r10,40(r4)
-        ld             r10,104(r6)
-        std            r11,48(r4)
-        ld             r11,112(r6)
-        std            r12,56(r4)
-        ld             r12,120(r6)
-        addi   r6,r6,128                       // advance to next source chunk if any
-        bdnz   c64InnerLoop            // loop if more chunks
-        
-        std            r0,64(r4)                       // store 2nd half of last chunk
-        std            r2,72(r4)
-        std            r7,80(r4)
-        std            r8,88(r4)
-        std            r9,96(r4)
-        std            r10,104(r4)
-        std            r11,112(r4)
-        std            r12,120(r4)
-        addi   r4,r4,128                       // advance to next dest chunk
-
-c64double7:                        // r5 <- leftover bytes, cr1 set on doubleword count
-        rlwinm r0,r5,29,28,31          // r0 <- count of leftover doublewords (0-15)
-        andi.  r5,r5,7                         // r5/cr0 <- count of leftover bytes (0-7)
-        beq            cr1,c64byte                     // no leftover doublewords
-        mtctr  r0
-        b              c64double8
-        
-        .align 5                                       // align inner loop
-c64double8:                                                    // loop copying leftover doublewords
-        ld             r0,0(r6)
-        addi   r6,r6,8
-        std            r0,0(r4)
-        addi   r4,r4,8
-        bdnz   c64double8
-
-
-// Forward byte loop.
-
-c64byte:                                                       // r5/cr0 <- byte count (can be big if unaligned uncached)
-               beq             bcpydone                        // done if no leftover bytes
-        mtctr  r5
-        b              c64byte1
-        
-        .align 5                                       // align inner loop
-c64byte1:
-        lbz            r0,0(r6)
-        addi   r6,r6,1
-        stb            r0,0(r4)
-        addi   r4,r4,1
-        bdnz   c64byte1
-
-        b              bcpydone
-
-
-// Uncached copies.  We must avoid unaligned accesses, since they always take alignment
-// exceptions on uncached memory on 64-bit processors.  This may mean we copy long operands
-// a byte at a time, but that is still much faster than alignment exceptions.
-//   r4-r6 = dest, length, source (as above)
-//             r2 = mask of 1s for leading 0s in length, plus 1 extra 1
-//             r7 = #bytes to copy to 128-byte align dest (limited by operand length)
-//        cr1 = blt if reverse move required
-
-c64uncached:
-        xor            r0,r6,r4                        // get relative alignment
-        rlwinm r10,r0,0,29,31          // relatively doubleword aligned?
-        rlwinm r11,r0,0,30,31          // relatively word aligned?
-        not            r8,r2                           // get mask to limit initial length of copy for G4word
-        blt            cr1,c64reverseUncached
-        
-        cmpwi  cr0,r10,0                       // set cr0 beq if doubleword aligned
-        cmpwi  cr1,r11,0                       // set cr1 beq if word aligned
-        beq            cr0,c64double           // doubleword aligned
-        beq            cr1,G4word                      // word aligned, use G3/G4 code
-        cmpwi  r5,0                            // set cr0 on byte count
-        b              c64byte                         // unaligned operands
-
-c64reverseUncached:
-        cmpwi  cr0,r10,0                       // set cr0 beq if doubleword aligned
-        cmpwi  cr1,r11,0                       // set cr1 beq if word aligned
-        beq            cr0,c64rdouble          // doubleword aligned so can use LD/STD
-        beq            cr1,G4reverseWord       // word aligned, use G3/G4 code
-        add            r6,r6,r5                        // point to (end+1) of source and dest
-        add            r4,r4,r5
-        cmpwi  r5,0                            // set cr0 on length
-        b              c64rbyte                        // copy a byte at a time
-        
-        
-
-// Reverse doubleword copies.  This is used for all cached copies, and doubleword
-// aligned uncached copies.
-//             r4 = destination (32 or 64-bit ptr)
-//             r5 = length (always 32 bits)
-//             r6 = source (32 or 64-bit ptr)
-//             cr5 = noncache, fixxlate, and restorex flags set
-
-c64rdouble:
-        add            r6,r6,r5                        // point to (end+1) of source and dest
-        add            r4,r4,r5
-        rlwinm.        r7,r4,0,29,31           // r7 <- #bytes to doubleword align dest
-        cmplw  cr1,r7,r5                       // operand long enough to doubleword align?
-        blt            cr1,c64rd0                      // yes
-        mr             r7,r5                           // no
-c64rd0:
-        sub            r5,r5,r7                        // adjust length
-        srwi   r8,r5,6                         // r8 <- 64-byte chunks to xfer
-        cmpwi  cr1,r8,0                        // any chunks?
-        beq            c64rd2                          // source already doubleword aligned
-        mtctr  r7
-
-c64rd1:                                                                // copy bytes until source doublword aligned
-        lbzu   r0,-1(r6)
-        stbu   r0,-1(r4)
-        bdnz   c64rd1
-        
-c64rd2:                                                                // r8/cr1 <- count of 64-byte chunks
-        rlwinm r0,r5,29,29,31          // r0 <- count of leftover doublewords
-        andi.  r5,r5,7                         // r5/cr0 <- count of leftover bytes
-        cmpwi  cr7,r0,0                        // leftover doublewords?
-        beq            cr1,c64rd4                      // no chunks to xfer
-        li             r9,-128                         // start at next cache line
-        mtctr  r8
-        bt             noncache,c64rd3         // (HACK) Do not start a stream if noncachable...
-        dcbt128        r9,r6,3                         // start reverse stream
-        b              c64rd3
-        
-        .align 5                                       // align inner loop
-c64rd3:                                                                // loop copying 64-byte chunks
-        ld             r7,-8(r6)
-        ld             r8,-16(r6)
-        ld             r9,-24(r6)
-        ld             r10,-32(r6)
-        ld             r11,-40(r6)
-        ld             r12,-48(r6)
-        std            r7,-8(r4)
-        std            r8,-16(r4)
-        ld             r7,-56(r6)
-        ldu            r8,-64(r6)
-        std            r9,-24(r4)
-        std            r10,-32(r4)
-        std            r11,-40(r4)
-        std            r12,-48(r4)
-        std            r7,-56(r4)
-        stdu   r8,-64(r4)
-        bdnz   c64rd3
-
-c64rd4:                                                                // r0/cr7 = leftover doublewords  r5/cr0 = leftover bytes
-        beq            cr7,c64rbyte            // no leftover doublewords
-        mtctr  r0
-        
-c64rd5:                                                                // loop copying leftover doublewords
-        ldu            r0,-8(r6)
-        stdu   r0,-8(r4)
-        bdnz   c64rd5
-
-
-// Reverse byte loop.
-
-c64rbyte:                                                      // r5/cr0 <- byte count (can be big if unaligned uncached)
-        beq            bcpydone                        // done if no leftover bytes
-        mtctr  r5
-        
-c64rbyte1:
-        lbzu   r0,-1(r6)
-        stbu   r0,-1(r4)
-        bdnz   c64rbyte1
-
-        b              bcpydone
-
diff --git a/osfmk/ppc/bcopytest.c b/osfmk/ppc/bcopytest.c
deleted file mode 100644 (file)
index e27d13e..0000000
+++ /dev/null
@@ -1,626 +0,0 @@
-#include <cpus.h>
-#include <debug.h>
-#include <mach_kgdb.h>
-#include <mach_vm_debug.h>
-#include <db_machine_commands.h>
-
-#include <kern/thread.h>
-#include <kern/thread_act.h>
-#include <mach/vm_attributes.h>
-#include <mach/vm_param.h>
-#include <vm/vm_kern.h>
-#include <vm/vm_map.h>
-#include <vm/vm_page.h>
-#include <kern/spl.h>
-
-#include <kern/misc_protos.h>
-#include <ppc/exception.h>
-#include <ppc/misc_protos.h>
-#include <ppc/proc_reg.h>
-
-#include <vm/pmap.h>
-#include <ppc/pmap.h>
-#include <ppc/mem.h>
-
-#include <ppc/new_screen.h>
-#include <ppc/Firmware.h>
-#include <ppc/mappings.h>
-#include <ddb/db_output.h>
-
-#include <ppc/POWERMAC/video_console.h>                /* (TEST/DEBUG) */
-
-#define patper 253
-
-
-int main(void);
-void clrarea(unsigned int *source, unsigned int *sink);
-int tstcopy(void *src, void *snk, unsigned int lgn);
-void clrarea2(unsigned int *source, unsigned int *sink);
-int tstcopy2(void *src, void *snk, unsigned int lgn);
-int tstcopy3(void *src, void *snk, unsigned int lgn);
-int tstcopy4(void *src, void *snk, unsigned int lgn);
-int tstcopy5(void *src, void *snk, unsigned int lgn);
-int dumbcopy(void *src, void *snk, unsigned int lgn);
-
-
-unsigned int gtick(void);
-
-
-void bcopytest(void);
-void bcopytest(void) {
-
-       void *srcptr, *snkptr, *asrc, *asnk;
-       int bsrc, bsnk, size, iterations, i, ret, n; 
-       unsigned int makerand, timein, timeout, ticks;
-       volatile int dbg = 0;
-       unsigned int *sink, *source;
-       
-       long long tottime, totbytes;
-       long long tottime2, totbytes2;
-       
-       kern_return_t retr;
-       
-       db_printf("bcopy test\n");      
-       
-       retr = kmem_alloc_wired(kernel_map, (vm_offset_t *)&sink, (1024*1024)+4096);    /* Get sink area */
-       if(retr != KERN_SUCCESS) {      /* Did we find any memory at all? */
-               panic("bcopytest: Whoops...  no memory for sink\n");
-       }
-       
-       retr = kmem_alloc_wired(kernel_map, (vm_offset_t *)&source, (1024*1024)+4096);  /* Get source area */
-       if(retr != KERN_SUCCESS) {      /* Did we find any memory at all? */
-               panic("bcopytest: Whoops...  no memory for source\n");
-       }
-
-       db_printf("Source at %08X; Sink at %08X\n", source, sink);
-       
-       srcptr = (void *)&source[0];
-       snkptr = (void *)&sink[0];
-       
-#if 1
-       db_printf("Testing non-overlap case; source bndry = 0 to 7F; sink bndry = 0 - 7F; lgn = 1 to 256\n");
-       for(bsrc = 0; bsrc < 128; bsrc++) {                     /* Step the source by 1 */
-               for(bsnk = 0; bsnk < 128; bsnk++) {             /* Step the sink by 1 */
-                       for(size = 1; size <= 256; size++) {    /* Step the size by 1 */
-                       
-                               clrarea(source, sink);                                          /* Reset source and clear sink */
-                               if(size == 255) {
-                                       dbg = 99;
-                               }
-                               if(tstcopy((void *)((unsigned int)srcptr + bsrc), (void *)((unsigned int)snkptr + bsnk), size)) {       
-                                       db_printf("Test failed; source = %02X; sink = %02X; length = %d\n", bsrc, bsnk, size);
-                                       db_printf("failed\n");
-                               }
-                       }
-               }
-       }
-       db_printf("Non-overlap test complete\n");
-#endif
-
-
-#if 1  
-       db_printf("Testing overlap\n");
-       for(bsrc = 1; bsrc < 128; bsrc++) {                     /* Step the source by 1 */
-               for(bsnk = 0; bsnk < 128; bsnk++) {             /* Step the sink by 1 */
-                       for(size = 1; size <= 256; size++) {    /* Step the size by 1 */
-                       
-                               clrarea2(source, sink);                                         /* Reset source and clear sink */
-                               if(bsrc < bsnk) {
-                                       dbg = 88;
-                               }
-                               else {
-                                       dbg = 99;
-                               }
-                               if(tstcopy2((void *)((unsigned int)srcptr + bsrc), (void *)((unsigned int)srcptr + bsnk), size)) {      
-                                       db_printf("Test failed; source = %02X; sink = %02X; length = %d\n", bsrc, bsnk, size);
-                                       db_printf("failed\n");
-                               }
-                       }
-               }
-       }
-       db_printf("Overlap test complete\n");
-#endif
-
-#if 1
-       db_printf("Starting exhaustive tests\n");
-       for(i = 0; i < 262144 * 4; i++) {               /* Set all 1MB of source and dest to known pattern */
-               ((unsigned char *)srcptr)[i] = i % patper;      /* Make a non-power-of-two length pattern */
-               ((unsigned char *)snkptr)[i] = i % patper;      /* Make a non-power-of-two length pattern */
-       }
-
-       db_printf("No overlap; source < sink, length = 0 to 1023\nSource =");
-
-#if 1
-       for(bsrc = 0; bsrc < 128; bsrc++) {                             /* Step source by 1 */
-               db_printf(" %3d", bsrc);                                        /* Show where we're at */
-               for(bsnk = 0; bsnk < 128; bsnk++) {                     /* Step sink by 1 */
-                       for(size = 0; size < 1025; size++) {    /* Step size from 0 to 1023 */                          
-                               asrc = (void *)((unsigned int)srcptr + bsrc);                   /* Start byte address */
-                               asnk = (void *)((unsigned int)srcptr + bsnk + 2048);    /* End byte address */
-                               ret = tstcopy5(asrc, asnk, size);       /* Copy and validate */
-                               if(ret) {       
-                                       db_printf("\nTest failed - source = %3d, sink = %3d size = %d\n", bsrc, bsnk, size);
-                                       db_printf("failed\n");
-                               }
-                       }
-               }
-       }
-#endif
-                               
-       db_printf("\n");
-       db_printf("No overlap; source > sink, length = 0 to 1023\nSource =");
-
-#if 1
-       for(bsrc = 0; bsrc < 128; bsrc++) {                             /* Step source by 1 */
-               db_printf(" %3d", bsrc);                                        /* Show where we're at */
-               for(bsnk = 0; bsnk < 128; bsnk++) {                     /* Step sink by 1 */
-                       for(size = 0; size < 1025; size++) {    /* Step size from 0 to 1023 */                          
-                               asrc = (void *)((unsigned int)srcptr + bsrc + 2048);    /* Start byte address */
-                               asnk = (void *)((unsigned int)srcptr + bsnk);                   /* End byte address */
-                               ret = tstcopy5(asrc, asnk, size);       /* Copy and validate */
-                               if(ret) {       
-                                       db_printf("\nTest failed - source = %3d, sink = %3d size = %d\n", bsrc, bsnk, size);
-                                       db_printf("failed\n");
-                               }
-                       }
-               }
-       }
-#endif
-                               
-       db_printf("\n");
-       db_printf("Overlap; source = sink + N (N = 0 to 127), length = 0 to 1023\nN =");
-
-#if 1
-       for(n = 0; n < 128; n++) {                                              /* Step n by 1 */
-               db_printf(" %3d", n);                                   /* Show where we're at */
-               for(bsnk = 0; bsnk < 128; bsnk++) {                     /* Step sink by 1 */
-                       for(size = 0; size < 1025; size++) {    /* Step size from 0 to 1023 */                          
-                               asrc = (void *)((unsigned int)srcptr + bsnk + n);       /* Start byte address */
-                               asnk = (void *)((unsigned int)srcptr + bsnk);           /* End byte address */
-                               ret = tstcopy5(asrc, asnk, size);       /* Copy and validate */
-                               if(ret) {       
-                                       db_printf("\nTest failed - source = %3d, sink = %3d size = %d\n", bsrc, bsnk, size);
-                                       db_printf("failed\n");
-                               }
-                       }
-               }
-       }
-#endif
-                               
-       db_printf("\n");
-       db_printf("Overlap; source + N = sink (N = 0 to 127), length = 0 to 1023\nSource =");
-
-#if 1
-       for(bsrc = 0; bsrc < 128; bsrc++) {                             /* Step source by 1 */
-               db_printf(" %3d", bsrc);                                        /* Show where we're at */
-               for(n = 0; n < 128; n++) {                                      /* Step N by 1 */
-                       for(size = 0; size < 1025; size++) {    /* Step size from 0 to 1023 */                          
-                               asrc = (void *)((unsigned int)srcptr + bsnk);   /* Start byte address */
-                               asnk = (void *)((unsigned int)srcptr + bsnk + n);       /* End byte address */
-                               ret = tstcopy5(asrc, asnk, size);       /* Copy and validate */
-                               if(ret) {       
-                                       db_printf("\nTest failed - source = %3d, n = %3d size = %d\n", bsrc, n, size);
-                                       db_printf("failed\n");
-                               }
-                       }
-               }
-       }
-#endif
-                               
-                               
-       db_printf("\n");
-       db_printf("Overlap; source = sink + N + 128 (N = 0 to 127), length = 0 to 1023\nN =");
-
-#if 1
-       for(n = 0; n < 128; n++) {                                              /* Step n by 1 */
-               db_printf(" %3d", n);                                   /* Show where we're at */
-               for(bsnk = 0; bsnk < 128; bsnk++) {                     /* Step sink by 1 */
-                       for(size = 0; size < 1025; size++) {    /* Step size from 0 to 1023 */                          
-                               asrc = (void *)((unsigned int)srcptr + bsnk + n + 128); /* Start byte address */
-                               asnk = (void *)((unsigned int)srcptr + bsnk);           /* End byte address */
-                               ret = tstcopy5(asrc, asnk, size);       /* Copy and validate */
-                               if(ret) {       
-                                       db_printf("\nTest failed - source = %3d, sink = %3d size = %d\n", bsrc, bsnk, size);
-                                       db_printf("failed\n");
-                               }
-                       }
-               }
-       }
-#endif
-                               
-       db_printf("\n");
-       db_printf("Overlap; source + N + 128 = sink (N = 0 to 127), length = 0 to 1023\nSource =");
-
-#if 1
-       for(bsrc = 0; bsrc < 128; bsrc++) {                             /* Step source by 1 */
-               db_printf(" %3d", bsrc);                                        /* Show where we're at */
-               for(n = 0; n < 128; n++) {                                      /* Step N by 1 */
-                       for(size = 0; size < 1025; size++) {    /* Step size from 0 to 1023 */                          
-                               asrc = (void *)((unsigned int)srcptr + bsnk);   /* Start byte address */
-                               asnk = (void *)((unsigned int)srcptr + bsnk + n + 128); /* End byte address */
-                               ret = tstcopy5(asrc, asnk, size);       /* Copy and validate */
-                               if(ret) {       
-                                       db_printf("\nTest failed - source = %3d, n = %3d size = %d\n", bsrc, n, size);
-                                       db_printf("failed\n");
-                               }
-                       }
-               }
-       }
-#endif
-                               
-       db_printf("\n");
-       db_printf("Overlap; source = sink + N + 256 (N = 0 to 127), length = 0 to 1023\nSource =");
-
-#if 1
-       for(n = 0; n < 128; n++) {                                              /* Step n by 1 */
-               db_printf(" %3d", n);                                   /* Show where we're at */
-               for(bsnk = 0; bsnk < 128; bsnk++) {                     /* Step sink by 1 */
-                       for(size = 0; size < 1025; size++) {    /* Step size from 0 to 1023 */                          
-                               asrc = (void *)((unsigned int)srcptr + bsnk + n + 256); /* Start byte address */
-                               asnk = (void *)((unsigned int)srcptr + bsnk);           /* End byte address */
-                               ret = tstcopy5(asrc, asnk, size);       /* Copy and validate */
-                               if(ret) {       
-                                       db_printf("\nTest failed - source = %3d, sink = %3d size = %d\n", bsrc, bsnk, size);
-                                       db_printf("failed\n");
-                               }
-                       }
-               }
-       }
-#endif
-                               
-       db_printf("\n");
-       db_printf("Overlap; source + N + 256 = sink (N = 0 to 127), length = 0 to 1023\nSource =");
-#if 1
-       for(bsrc = 0; bsrc < 128; bsrc++) {                             /* Step source by 1 */
-               db_printf(" %3d", bsrc);                                        /* Show where we're at */
-               for(n = 0; n < 128; n++) {                                      /* Step N by 1 */
-                       for(size = 0; size < 1025; size++) {    /* Step size from 0 to 1023 */                          
-                               asrc = (void *)((unsigned int)srcptr + bsnk);   /* Start byte address */
-                               asnk = (void *)((unsigned int)srcptr + bsnk + n + 256); /* End byte address */
-                               ret = tstcopy5(asrc, asnk, size);       /* Copy and validate */
-                               if(ret) {       
-                                       db_printf("\nTest failed - source = %3d, n = %3d size = %d\n", bsrc, n, size);
-                                       db_printf("failed\n");
-                               }
-                       }
-               }
-       }
-#endif
-                               
-
-
-
-
-
-#endif
-       
-#if 0
-       iterations = 1000;
-       tottime = 0;
-       totbytes = 0;
-       
-       db_printf("Random test starting; iterations = %d\n", iterations);
-       for(i = 0; i < 262144 * 4; i++) {               /* Clear all 2MB of source (and dest for this test) */
-               ((unsigned char *)srcptr)[i] = i & 255;
-       }
-       
-       for(i = 0; i < iterations; i++) {                       /* Test until we are done */
-               makerand = rand() << 16 | (rand() & 0x0000FFFF);
-               bsrc = makerand & 0x0007FFFF;                   /* Generate source */
-               makerand = rand() << 16 | (rand() & 0x0000FFFF);
-               bsnk = makerand & 0x0007FFFF;                   /* Generate sink */
-               makerand = rand() << 16 | (rand() & 0x0000FFFF);
-               size = makerand & 0x0007FFFF;                   /* Generate length */
-#if 1
-               db_printf("rt %7d: src = %08X; sink = %08X; length = %7d\n", i, ((unsigned int)srcptr + bsrc),
-                       ((unsigned int)srcptr + bsnk), size);
-#endif
-
-               asrc = (void *)((unsigned int)srcptr + bsrc); 
-               asnk = (void *)((unsigned int)srcptr + bsnk); 
-               timein = gtick();
-               ret = tstcopy3(asrc, asnk, size);
-               timeout = gtick();
-               if(ret) {       
-                       db_printf("Test failed; source = %02X; sink = %02X; length = %d\n", bsrc, bsnk, size);
-                       db_printf("failed\n");
-       
-               }
-               ticks = timeout - timein;                               /* Get time in ticks for copy */
-               tottime += ticks;
-               totbytes += size;
-               
-               rate = (double) totbytes / (double)tottime;     /* Get bytes per tick */ 
-//             rate = rate * (double)11250000.0;                               /* Bytes per second */
-//             rate = rate * (double)16500000.0;                               /* Bytes per second */
-               rate = rate * (double)tbfreq;                                   /* Bytes per second */
-               rate = rate / (double)1000000.0;                                /* Get number of MBs */
-               
-               db_printf("Total bytes = %lld; total time = %lld; rate = %f10\n", totbytes, tottime, rate);
-               
-       }
-#endif
-
-
-       
-#if 0
-       iterations = 100;
-       tottime = 0;
-       totbytes = 0;
-       
-       db_printf("Random test starting; iterations = %d\n", iterations);
-       for(i = 0; i < 262144 * 4; i++) {               /* Clear all 2MB of source (and dest for this test) */
-               ((unsigned char *)srcptr)[i] = i & 255;
-       }
-       
-       for(i = 0; i < iterations; i++) {                       /* Test until we are done */
-               makerand = rand() << 16 | (rand() & 0x0000FFFF);
-               bsrc = makerand & 0x0007FFFF;                   /* Generate source */
-               makerand = rand() << 16 | (rand() & 0x0000FFFF);
-               bsnk = makerand & 0x0007FFFF;                   /* Generate sink */
-               makerand = rand() << 16 | (rand() & 0x0000FFFF);
-               size = makerand & 0x0007FFFF;                   /* Generate length */
-#if 1
-               db_printf("rt %7d: src = %08X; sink = %08X; length = %7d\n", i, ((unsigned int)srcptr + bsrc),
-                       ((unsigned int)srcptr + bsnk), size);
-#endif
-
-               asrc = (void *)((unsigned int)srcptr + bsrc); 
-               asnk = (void *)((unsigned int)srcptr + bsnk); 
-               timein = gtick();
-               ret = tstcopy4(asrc, asnk, size);
-               timeout = gtick();
-               if(ret) {       
-                       db_printf("Test failed; source = %02X; sink = %02X; length = %d\n", bsrc, bsnk, size);
-                       db_printf("failed\n");
-       
-               }
-               ticks = timeout - timein;                               /* Get time in ticks for copy */
-               tottime += ticks;
-               totbytes += size;
-               
-               rate = (double) totbytes / (double)tottime;     /* Get bytes per tick */ 
-//             rate = rate * (double)11250000.0;                               /* Bytes per second */
-//             rate = rate * (double)16500000.0;                               /* Bytes per second */
-               rate = rate * (double)tbfreq;                                   /* Bytes per second */
-               rate = rate / (double)1000000.0;                                /* Get number of MBs */
-               
-               db_printf("Total bytes = %lld; total time = %lld; rate = %f10\n", totbytes, tottime, rate);
-               
-       }
-#endif
-       
-#if 0
-       iterations = 100;
-       tottime = 0;
-       totbytes = 0;
-       
-       db_printf("Random test starting; iterations = %d\n", iterations);
-       for(i = 0; i < 262144 * 4; i++) {               /* Clear all 2MB of source (and dest for this test) */
-               ((unsigned char *)srcptr)[i] = i & 255;
-       }
-       
-       for(i = 0; i < iterations; i++) {                       /* Test until we are done */
-               makerand = rand() << 16 | (rand() & 0x0000FFFF);
-               bsrc = makerand & 0x0007FFFF;                   /* Generate source */
-               makerand = rand() << 16 | (rand() & 0x0000FFFF);
-               bsnk = makerand & 0x0007FFFF;                   /* Generate sink */
-               makerand = rand() << 16 | (rand() & 0x0000FFFF);
-               size = makerand & 0x0007FFFF;                   /* Generate length */
-#if 1
-               db_printf("rt %7d: src = %08X; sink = %08X; length = %7d\n", i, ((unsigned int)srcptr + bsrc),
-                       ((unsigned int)srcptr + bsnk), size);
-#endif
-
-               asrc = (void *)((unsigned int)srcptr + bsrc); 
-               asnk = (void *)((unsigned int)srcptr + bsnk); 
-               timein = gtick();
-               ret = dumbcopy(asrc, asnk, size);
-               timeout = gtick();
-               if(ret) {       
-                       db_printf("Test failed; source = %02X; sink = %02X; length = %d\n", bsrc, bsnk, size);
-                       db_printf("failed\n");
-       
-               }
-               ticks = timeout - timein;                               /* Get time in ticks for copy */
-               tottime += ticks;
-               totbytes += size;
-               
-               rate = (double) totbytes / (double)tottime;     /* Get bytes per tick */ 
-               rate = rate * (double)tbfreq;                           /* Bytes per second */
-               rate = rate / (double)1000000.0;                        /* Get number of MBs */
-               
-               db_printf("Total bytes = %lld; total time = %lld; rate = %f10\n", totbytes, tottime, rate);
-               
-       }
-#endif
-       
-       kmem_free(kernel_map, (vm_offset_t) sink, (1024*1024)+4096);    /* Release this mapping block */
-       kmem_free(kernel_map, (vm_offset_t) source, (1024*1024)+4096);  /* Release this mapping block */
-       
-       if(dbg == 22) db_printf("Gabbagoogoo\n");
-       return;
-}
-
-void clrarea(unsigned int *source, unsigned int *sink) {
-
-       unsigned int i;
-       
-       for(i=0; i < 1024; i++) {               /* Init source & sink */
-               source[i]       = 0x55555555;   /* Known pattern */
-               sink[i]         = 0xAAAAAAAA;   /* Known pattern */
-       }
-       return;
-}
-
-void clrarea2(unsigned int *source, unsigned int *sink) {
-
-       unsigned int i;
-       unsigned char *ss;
-       
-       ss = (unsigned char *)&source[0];
-       
-       for(i=0; i < 1024 * 4; i++) {   /* Init source/sink */
-               ss[i] = i & 0xFF;                       /* Known pattern */
-       }
-       return;
-}
-
-int tstcopy(void *src, void *snk, unsigned int lgn) {
-
-       unsigned int i, crap;
-       
-       bcopy(src, snk, lgn);
-       
-       for(i = 0; i < lgn; i++) {
-               if(((unsigned char *)snk)[i] != 0x55) {
-                       crap = (unsigned int)&((unsigned char *)snk)[i];
-                       db_printf("bad copy at sink[%d] (%08X) it is %02X\n", i,crap, ((unsigned char *)snk)[i]);
-                       return 1;
-               }
-       }
-       if(((unsigned char *)snk)[lgn] != 0xAA) {       /* Is it right? */
-               crap = (unsigned int)&((unsigned char *)snk)[i];
-               db_printf("Copied too far at sink[%d] (%08X) it is %02X\n", i, crap, ((unsigned char *)snk)[lgn]);
-               return 1;
-       }
-       return 0;
-
-}
-
-int tstcopy2(void *src, void *snk, unsigned int lgn) {
-
-       unsigned int i, crap;
-       unsigned char ic, ec;
-       
-       ic = ((unsigned char *)src)[0];
-       ec = ((unsigned char *)snk)[lgn];
-       
-       bcopy(src, snk, lgn);
-       
-       for(i = 0; i < lgn; i++) {
-               if(((unsigned char *)snk)[i] != ic) {
-                       crap = (unsigned int)&((unsigned char *)snk)[i];
-                       db_printf("bad copy at sink[%d] (%08X) it is %02X\n", i,crap, ((unsigned char *)snk)[i]);
-                       return 1;
-               }
-               ic = (ic + 1) & 0xFF;
-       }
-       
-       if(((unsigned char *)snk)[lgn] != ec) { /* Is it right? */
-               crap = (unsigned int)&((unsigned char *)snk)[i];
-               db_printf("Copied too far at sink[%d] (%08X) it is %02X\n", i, crap, ((unsigned char *)snk)[lgn]);
-               return 1;
-       }
-       return 0;
-
-}
-
-int tstcopy3(void *src, void *snk, unsigned int lgn) {
-
-       unsigned int i, crap;
-       unsigned char ic, ec, oic;
-       
-       oic = ((unsigned char *)snk)[0];
-       ic = ((unsigned char *)src)[0];
-       ec = ((unsigned char *)snk)[lgn];
-       
-       bcopy(src, snk, lgn);
-       
-       for(i = 0; i < lgn; i++) {
-               if(((unsigned char *)snk)[i] != ic) {
-                       crap = (unsigned int)&((unsigned char *)snk)[i];
-                       db_printf("bad copy at sink[%d] (%08X) it is %02X\n", i ,crap, ((unsigned char *)snk)[i]);
-                       return 1;
-               }
-               ic = (ic + 1) & 0xFF;
-       }
-       
-       if(((unsigned char *)snk)[lgn] != ec) { /* Is it right? */
-               crap = (unsigned int)&((unsigned char *)snk)[i];
-               db_printf("Copied too far at sink[%d] (%08X) it is %02X\n", i, crap, ((unsigned char *)snk)[lgn]);
-               return 1;
-       }
-
-       for(i=0; i < lgn; i++) {        /* Restore pattern */
-               ((unsigned char *)snk)[i] = oic;                
-               oic = (oic + 1) & 0xFF;
-       }
-
-       return 0;
-
-}
-
-int tstcopy4(void *src, void *snk, unsigned int lgn) {
-       
-       bcopy(src, snk, lgn);
-       return 0;
-
-}
-
-int tstcopy5(void *src, void *snk, unsigned int lgn) {
-
-       unsigned int i, crap;
-       unsigned char ic, ec, oic, pc;
-       
-       oic = ((unsigned char *)snk)[0];                                /* Original first sink character */
-       ic = ((unsigned char *)src)[0];                                 /* Original first source character */
-       ec = ((unsigned char *)snk)[lgn];                               /* Original character just after last sink character */
-       pc = ((unsigned char *)snk)[-1];                                /* Original character just before sink */
-       
-       bcopy(src, snk, lgn);
-       
-       if(((unsigned char *)snk)[lgn] != ec) {                 /* Did we copy too far forward? */
-               crap = (unsigned int)&((unsigned char *)snk)[i];
-               db_printf("Copied too far at sink[%d] (%08X) it is %02X\n", i, crap, ((unsigned char *)snk)[lgn]);
-               return 1;
-       }
-
-       if(((unsigned char *)snk)[-1] != pc) {                  /* Did we copy too far backward? */
-               crap = (unsigned int)&((unsigned char *)snk)[i];
-               db_printf("Copied too far at sink[%d] (%08X) it is %02X\n", i, crap, ((unsigned char *)snk)[lgn]);
-               return 1;
-       }
-
-       for(i = 0; i < lgn; i++) {                                              /* Check sink byte sequence */
-               if(((unsigned char *)snk)[i] != ic) {
-                       crap = (unsigned int)&((unsigned char *)snk)[i];
-                       db_printf("bad copy at sink[%d] (%08X) it is %02X\n", i ,crap, ((unsigned char *)snk)[i]);
-                       return 1;
-               }
-               ic = (ic + 1) % patper;
-       }
-
-       for(i=0; i < lgn; i++) {        /* Restore pattern */
-               ((unsigned char *)snk)[i] = oic;                
-               oic = (oic + 1) % patper;
-       }
-
-       return 0;
-
-}
-
-int dumbcopy(void *src, void *snk, unsigned int lgn) {
-       int i;
-       char *p = (char *)snk;
-       char *q = (char *)src;
-       
-       for(i = 0; i < lgn; i++) {
-               *p++ = *q++;
-       }
-       return 0;
-
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
index f7e586e85c04f3a3b91a496551101ba274acef87..a01cf81fe82c89d13dbd1267811c8eced6fd6929 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index b6f2edac95403343f10f05c2ca9441a491b35dd4..e37a7d660e732a250e683401a135502d20e68b56 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
diff --git a/osfmk/ppc/bsd_asm.s b/osfmk/ppc/bsd_asm.s
new file mode 100644 (file)
index 0000000..c1af2da
--- /dev/null
@@ -0,0 +1,129 @@
+/*
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+#include <debug.h>           
+#include <mach_assert.h>
+#include <mach/exception_types.h>
+#include <mach/ppc/vm_param.h> 
+        
+#include <assym.s>
+#include <ppc/asm.h> 
+#include <ppc/proc_reg.h>
+#include <ppc/trap.h>
+#include <ppc/exception.h>
+/*
+ * void cthread_set_self(cproc_t p)
+ *
+ * set's thread state "user_value"
+ *
+ * This op is invoked as follows:
+ *     li r0, CthreadSetSelfNumber     // load the fast-trap number
+ *     sc                              // invoke fast-trap
+ *     blr
+ *
+ * Entry:      VM switched ON
+ *             Interrupts  OFF
+ *              original r1-3 saved in sprg1-3
+ *              original srr0 and srr1 saved in per_proc_info structure
+ *              original cr            saved in per_proc_info structure
+ *              exception type         saved in per_proc_info structure
+ *              r1 = scratch
+ *              r2 = virt addr of per_proc_info
+ *             r3 = exception type (one of EXC_...)
+ *
+ */
+       .text
+       .align  5
+ENTRY(CthreadSetSelfNumber, TAG_NO_FRAME_USED)
+       lwz     r1,     PP_CPU_DATA(r2)
+       lwz     r1,     CPU_ACTIVE_THREAD(r1)
+       lwz     r1,     THREAD_TOP_ACT(r1)  
+       lwz     r1,     ACT_MACT_PCB(r1)
+
+       mfsprg  r3,     3
+       stw     r3,     CTHREAD_SELF(r1)
+
+       /* Prepare to rfi to the exception exit routine, which is
+        * in physical address space */
+       addis   r3,     0,      HIGH_CADDR(EXT(exception_exit))
+       addi    r3,     r3,     LOW_ADDR(EXT(exception_exit))
+
+       lwz     r3,     0(r3)
+       mtsrr0  r3
+       li      r3,     MSR_VM_OFF
+       mtsrr1  r3
+
+       lwz     r3,     PP_SAVE_SRR1(r2)        /* load the last register... */
+       lwz     r2,     PP_SAVE_SRR0(r2)        /* For trampoline */
+       lwz     r1,     PCB_SR0(r1)             /* For trampoline... */
+
+       rfi
+
+
+/*
+ * ur_cthread_t ur_cthread_self(void)
+ *
+ * return thread state "user_value"
+ *
+ * This op is invoked as follows:
+ *     li r0, UrCthreadSelfNumber      // load the fast-trap number
+ *     sc                              // invoke fast-trap
+ *     blr
+ *
+ * Entry:      VM switched ON
+ *             Interrupts  OFF
+ *              original r1-3 saved in sprg1-3
+ *              original srr0 and srr1 saved in per_proc_info structure
+ *              original cr            saved in per_proc_info structure
+ *              exception type         saved in per_proc_info structure
+ *              r1 = scratch
+ *              r2 = virt addr of per_proc_info
+ *             r3 = exception type (one of EXC_...)
+ *
+ */
+       .text
+       .align  5
+ENTRY(UrCthreadSelfNumber, TAG_NO_FRAME_USED)
+       lwz     r1,     PP_CPU_DATA(r2)
+       lwz     r1,     CPU_ACTIVE_THREAD(r1)
+       lwz     r1,     THREAD_TOP_ACT(r1)  
+       lwz     r1,     ACT_MACT_PCB(r1)
+
+       lwz     r3,     CTHREAD_SELF(r1)
+       mtsprg  3,      r3
+
+
+       /* Prepare to rfi to the exception exit routine, which is
+        * in physical address space */
+       addis   r3,     0,      HIGH_CADDR(EXT(exception_exit))
+       addi    r3,     r3,     LOW_ADDR(EXT(exception_exit))
+       lwz     r3,     0(r3)
+       mtsrr0  r3
+       li      r3,     MSR_VM_OFF
+       mtsrr1  r3
+
+       lwz     r3,     PP_SAVE_SRR1(r2)        /* load the last register... */
+       lwz     r2,     PP_SAVE_SRR0(r2)        /* For trampoline */
+       lwz     r1,     PCB_SR0(r1)             /* For trampoline... */
+
+       rfi
diff --git a/osfmk/ppc/bsd_ppc.c b/osfmk/ppc/bsd_ppc.c
new file mode 100644 (file)
index 0000000..d3afa89
--- /dev/null
@@ -0,0 +1,280 @@
+/*
+ * Copyright (c) 2000-2001 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+#include <mach/mach_types.h>
+#include <mach/exception_types.h>
+#include <mach/error.h>
+#include <kern/counters.h>
+#include <kern/syscall_sw.h>
+#include <kern/task.h>
+#include <kern/thread.h>
+#include <ppc/thread.h>
+#include <kern/thread_act.h>
+#include <ppc/thread_act.h>
+#include <ppc/asm.h>
+#include <ppc/proc_reg.h>
+#include <ppc/trap.h>
+#include <ppc/exception.h>
+#include <kern/assert.h>
+
+#include <sys/syscall.h>
+#include <sys/ktrace.h>
+#include <sys/kdebug.h>
+struct proc;
+
+#define        ERESTART        -1              /* restart syscall */
+#define        EJUSTRETURN     -2              /* don't modify regs, just return */
+
+struct unix_syscallargs {
+       int flavor;
+       int r3;
+       int arg1, arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9;
+};
+struct sysent {                /* system call table */
+       unsigned short          sy_narg;                /* number of args */
+       char                    sy_parallel;    /* can execute in parallel */
+       char                    sy_funnel;      /* funnel type */
+       unsigned long           (*sy_call)(void *, void *, int *);      /* implementing function */
+};
+
+#define KERNEL_FUNNEL 1
+#define NETWORK_FUNNEL 2
+
+extern funnel_t * kernel_flock;
+extern funnel_t * network_flock;
+
+extern struct sysent sysent[];
+
+void  *get_bsdtask_info(
+       task_t);
+
+int set_bsduthreadargs (
+       thread_act_t, struct pcb *, 
+       struct unix_syscallargs  *);
+
+void * get_bsduthreadarg(
+       thread_act_t);
+
+void
+unix_syscall(
+       struct pcb * pcb,
+    int, int, int, int, int, int, int );
+
+/*
+ * Function:   unix_syscall
+ *
+ * Inputs:     pcb     - pointer to Process Control Block
+ *             arg1    - arguments to mach system calls
+ *             arg2
+ *             arg3
+ *             arg4
+ *             arg5
+ *             arg6
+ *             arg7
+ *
+ * Outputs:    none
+ */
+void
+unix_syscall(
+    struct pcb * pcb,
+    int arg1,
+    int arg2,
+    int arg3,
+    int arg4,
+    int arg5,
+    int arg6,
+    int arg7 
+    )
+{
+       struct ppc_saved_state  *regs;
+       thread_act_t            thread;
+       struct sysent           *callp;
+       int                             nargs, error;
+       unsigned short          code;
+       struct proc *p;
+       void *vt;
+       int * vtint;
+       int *rval;
+       int funnel_type;
+       struct proc *current_proc();
+
+       struct unix_syscallargs sarg;
+       extern int nsysent;
+
+       regs = &pcb->ss;
+       code = regs->r0;
+
+       thread = current_act();
+       p = current_proc();
+       rval = (int *)get_bsduthreadrval(thread);
+
+       /*
+        * Set up call pointer
+        */
+       callp = (code >= nsysent) ? &sysent[63] : &sysent[code];
+
+       sarg. flavor = (callp == sysent)? 1: 0;
+       if (sarg.flavor) {
+               code = regs->r3;
+               callp = (code >= nsysent) ? &sysent[63] : &sysent[code];
+       } else 
+               sarg. r3 = regs->r3;
+
+       if (code != 180) {
+               if (sarg.flavor)
+                       KERNEL_DEBUG_CONSTANT(BSDDBG_CODE(DBG_BSD_EXCP_SC, code) | DBG_FUNC_START,
+                               arg1, arg2, arg3, arg4, 0);
+               else
+                       KERNEL_DEBUG_CONSTANT(BSDDBG_CODE(DBG_BSD_EXCP_SC, code) | DBG_FUNC_START,
+                               sarg.r3, arg1, arg2, arg3, 0);
+       }
+       sarg.arg1 = arg1;
+       sarg.arg2 = arg2;
+       sarg.arg3 = arg3;
+       sarg.arg4 = arg4;
+       sarg.arg5 = arg5;
+       sarg.arg6 = arg6;
+       sarg.arg7 = arg7;
+
+       if(callp->sy_funnel == NETWORK_FUNNEL) {
+               (void) thread_funnel_set(network_flock, TRUE);
+       } else {
+               (void) thread_funnel_set(kernel_flock, TRUE);
+       }
+
+       set_bsduthreadargs(thread,pcb,&sarg);
+
+       if (callp->sy_narg > 8)
+               panic("unix_syscall: max arg count exceeded");
+
+       rval[0] = 0;
+
+       /*
+        * r4 is volatile, if we set it to regs->r4 here the child
+        * will have parents r4 after execve
+        */
+       rval[1] = 0;
+
+       error = 0; /* Start with a good value */
+
+       /*
+       ** the PPC runtime calls cerror after every unix system call, so
+       ** assume no error and adjust the "pc" to skip this call.
+       ** It will be set back to the cerror call if an error is detected.
+       */
+       regs->srr0 += 4;
+       vt = get_bsduthreadarg(thread);
+       counter_always(c_syscalls_unix++);
+       current_task()->syscalls_unix++;
+
+       ktrsyscall(p, code, callp->sy_narg, vt);
+
+       error = (*(callp->sy_call))(p, (void *)vt, rval);
+
+       regs = find_user_regs(thread);
+       if (regs == (struct ppc_saved_state  *)0)
+               panic("No user savearea while returning from system call");
+
+       if (error == ERESTART) {
+               regs->srr0 -= 8;
+       } else if (error != EJUSTRETURN) {
+               if (error) {
+                       regs->r3 = error;
+                       /* set the "pc" to execute cerror routine */
+                       regs->srr0 -= 4;
+               } else { /* (not error) */
+                       regs->r3 = rval[0];
+                       regs->r4 = rval[1];
+               } 
+       }
+       /* else  (error == EJUSTRETURN) { nothing } */
+
+       ktrsysret(p, code, error, rval[0]);
+
+       (void) thread_funnel_set(current_thread()->funnel_lock, FALSE);
+
+       if (code != 180) {
+               KERNEL_DEBUG_CONSTANT(BSDDBG_CODE(DBG_BSD_EXCP_SC, code) | DBG_FUNC_END,
+                       error, rval[0], rval[1], 0, 0);
+       }
+
+       thread_exception_return();
+       /* NOTREACHED */
+}
+
+unix_syscall_return(error)
+{
+       struct ppc_saved_state  *regs;
+       thread_act_t            thread;
+       struct sysent           *callp;
+       int                             nargs;
+       unsigned short          code;
+       int *rval;
+       struct proc *p;
+       void *vt;
+       int * vtint;
+       struct pcb *pcb;
+       struct proc *current_proc();
+
+       struct unix_syscallargs sarg;
+       extern int nsysent;
+
+       thread = current_act();
+       p = current_proc();
+       rval = (int *)get_bsduthreadrval(thread);
+       pcb = thread->mact.pcb;
+       regs = &pcb->ss;
+
+       if (thread_funnel_get() == THR_FUNNEL_NULL)
+               panic("Unix syscall return without funnel held");
+
+       /*
+        * Get index into sysent table
+        */   
+       code = regs->r0;
+
+       if (error == ERESTART) {
+               regs->srr0 -= 8;
+       } else if (error != EJUSTRETURN) {
+               if (error) {
+                       regs->r3 = error;
+                       /* set the "pc" to execute cerror routine */
+                       regs->srr0 -= 4;
+               } else { /* (not error) */
+                       regs->r3 = rval[0];
+                       regs->r4 = rval[1];
+               } 
+       }
+       /* else  (error == EJUSTRETURN) { nothing } */
+
+       ktrsysret(p, code, error, rval[0]);
+
+       (void) thread_funnel_set(current_thread()->funnel_lock, FALSE);
+
+       if (code != 180) {
+               KERNEL_DEBUG_CONSTANT(BSDDBG_CODE(DBG_BSD_EXCP_SC, code) | DBG_FUNC_END,
+                       error, rval[0], rval[1], 0, 0);
+       }
+
+       thread_exception_return();
+       /* NOTREACHED */
+}
+
index 82e83de1c4e5ab403ccc9d8736f0dcc16948e9da..2faf894a06e6e29cc4277620f7c1f54b8bc1c475 100644 (file)
 /*
- * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
+ /*
+ * @OSF_FREE_COPYRIGHT@
+ */
 
 #include <ppc/asm.h>
-#include <ppc/exception.h>
-#include <assym.s>
-
-        .text
-        .align 2
-        .globl _memset
-        .globl _bzero
-        .globl _bzero_nc
-        .globl _bzero_phys
-
-
-// ***********************
-// * B Z E R O _ P H Y S *
-// ***********************
-//
-// void bzero_phys(addr64_t phys_addr, uint32_t length);
-//
-// Takes a phys addr in (r3,r4), and length in r5.  We leave cache on.
-
-        .align 5
-LEXT(bzero_phys)
-        mflr   r12                             // save return address
-        rlwinm r3,r3,0,1,0             // coallesce long-long in (r3,r4) into reg64_t in r3
-        rlwimi r3,r4,0,0,31
-        mr             r4,r5                   // put length where bzero() expects it
-        bl             EXT(ml_set_physical_get_ffs)    // turn DR off, SF on, features in cr6, old MSR in r11
-        bl             EXT(bzero)              // use normal bzero() routine
-        mtlr   r12                             // restore return
-        b              EXT(ml_restore)         // restore MSR, turning DR on and SF off
-        
-
-// *******************
-// * B Z E R O _ N C *
-// *******************
-//
-//     void bzero_nc(char      *addr, unsigned int length);
-//
-// For use with uncached memory.  Doesn't seem to be used at all, so probably not
-// performance critical.  NB: we must avoid unaligned stores, because some
-// machines (eg, 970) take alignment exceptions on _any_ unaligned op to uncached
-// memory.  Of course, we must also avoid dcbz.
-
-LEXT(bzero_nc)
-        cmplwi cr1,r4,20               // too short to bother with 16-byte loops?
-        cmplwi cr7,r4,0                // check for (len==0)
-        li             r6,0                    // get a 0
-        bge            cr1,bznc1               // skip if length >=20
-        mtctr  r4                              // set up byte loop
-        beqlr--        cr7                             // done if len=0
-        
-// Short operands, loop over bytes.
-
-bznc0:
-        stb            r6,0(r3)
-        addi   r3,r3,1
-        bdnz   bznc0
-        blr
-        
-// Handle operands long enough to do doubleword stores; we must doubleword
-// align, to avoid alignment exceptions.
-
-bznc1:
-        neg            r7,r3                   // start to compute #bytes to align
-        mfsprg r10,2                   // get feature flags
-        andi.  r0,r7,7                 // get #bytes to doubleword align
-        mr             r5,r3                   // make copy of operand ptr as bcopy expects
-        mtcrf  0x02,r10                // put pf64Bitb etc in cr6
-        beq            bzero_tail              // already doubleword aligned
-        sub            r4,r4,r0                // adjust count
-        mtctr  r0                              // set up loop
-bznc2:                                                 // zero bytes until doubleword aligned
-        stb            r6,0(r5)
-        addi   r5,r5,1
-        bdnz   bznc2
-        b              bzero_tail              // join bzero, now that r5 is aligned
-        
-
-// *************     ***************
-// * B Z E R O * and * M E M S E T *
-// *************     ***************
-//
-// void *   memset(void *b, int c, size_t len);
-// void                bzero(void *b, size_t len);
-//
-// These routines support G3, G4, and the 970, and run in both 32 and
-// 64-bit mode.  Lengths (size_t) are always 32 bits.
-//
-// Register use:
-//    r0 = temp
-//    r2 = temp
-//    r3 = original ptr, not changed since memset returns it
-//    r4 = count of bytes to set
-//    r5 = working operand ptr ("rp")
-//    r6 = value to store (usually 0)
-// r7-r9 = temps
-//   r10 = feature flags
-//   r11 = old MSR (if bzero_phys)
-//   r12 = return address (if bzero_phys)
-//   cr6 = feature flags (pf64Bit, pf128Byte, and pf32Byte)
-
-        .align 5
-LEXT(memset)                                   // void *   memset(void *b, int c, size_t len);
-        andi.  r6,r4,0xFF              // copy value to working register, test for 0
-        mr             r4,r5                   // move length to working register
-        bne--  memset1                 // skip if nonzero
-LEXT(bzero)                                            // void bzero(void *b, size_t len);
-        dcbtst 0,r3                    // touch in 1st cache block
-        mfsprg r10,2                   // get features
-        li             r6,0                    // get a 0
-        neg            r7,r3                   // start to compute #bytes to align
-        andi.  r0,r10,pf128Byte+pf32Byte // get cache line size
-        mtcrf  0x02,r10                // put pf128Byte etc in cr6
-        cmplw  r4,r0                   // operand length >= cache line size?
-        mr             r5,r3                   // make copy of operand ptr (can't change r3)
-        blt            bzero_tail              // too short for dcbz (or dcbz128)
-        rlwinm r0,r7,0,0x1F    // get #bytes to  32-byte align
-        rlwinm r9,r7,0,0x7F    // get #bytes to 128-byte align
-        bt++   pf128Byteb,bzero_128 // skip if 128-byte processor
-
-// Operand length >=32 and cache line size is 32.
-//             r0 = #bytes to 32-byte align
-//             r4 = length
-//             r5 = ptr to operand
-//             r6 = 0
-
-        sub            r2,r4,r0                // adjust length
-        cmpwi  cr1,r0,0                // already 32-byte aligned?
-        srwi.  r8,r2,5                 // get #32-byte chunks
-        beq            bzero_tail              // not long enough to dcbz
-        mtctr  r8                              // set up loop count
-        rlwinm r4,r2,0,27,31   // mask down to leftover byte count
-        beq            cr1,bz_dcbz32   // skip if already 32-byte aligned
-        
-// 32-byte align.  We just store 32 0s, rather than test and use conditional
-// branches.  This is usually faster, because there are no mispredicts.
-
-        stw            r6,0(r5)                // zero next 32 bytes
-        stw            r6,4(r5)
-        stw            r6,8(r5)
-        stw            r6,12(r5)
-        stw            r6,16(r5)
-        stw            r6,20(r5)
-        stw            r6,24(r5)
-        stw            r6,28(r5)
-        add            r5,r5,r0                // now r5 is 32-byte aligned
-        b              bz_dcbz32
-
-// Loop doing 32-byte version of DCBZ instruction.
-
-        .align 4                               // align the inner loop
-bz_dcbz32:
-        dcbz   0,r5                    // zero another 32 bytes
-        addi   r5,r5,32
-        bdnz   bz_dcbz32
-
-// Store trailing bytes.  This routine is used both by bzero and memset.
-//             r4 = #bytes to store (may be large if memset)
-//             r5 = address
-//             r6 = value to store (in all 8 bytes)
-//     cr6 = pf64Bit etc flags
-
-bzero_tail:
-        srwi.  r0,r4,4                 // get #(16-byte-chunks)
-        mtcrf  0x01,r4                 // remaining byte count to cr7
-        beq            bzt3                    // no 16-byte chunks
-        mtctr  r0                              // set up loop count
-        bt++   pf64Bitb,bzt2   // skip if 64-bit processor
-        b              bzt1
-        .align 5
-bzt1:                                                  // loop over 16-byte chunks on 32-bit processor
-        stw            r6,0(r5)
-        stw            r6,4(r5)
-        stw            r6,8(r5)
-        stw            r6,12(r5)
-        addi   r5,r5,16
-        bdnz   bzt1
-        b              bzt3
-        .align 5
-bzt2:                                                  // loop over 16-byte chunks on 64-bit processor
-        std            r6,0(r5)
-        std            r6,8(r5)
-        addi   r5,r5,16
-        bdnz   bzt2
-        bf             28,bzt4                 // 8-byte chunk?
-        std            r6,0(r5)
-        addi   r5,r5,8
-        b              bzt4
-bzt3:
-        bf             28,bzt4                 // 8-byte chunk?
-        stw            r6,0(r5)
-        stw            r6,4(r5)
-        addi   r5,r5,8
-bzt4:
-        bf             29,bzt5                 // word?
-        stw            r6,0(r5)
-        addi   r5,r5,4
-bzt5:
-        bf             30,bzt6                 // halfword?
-        sth            r6,0(r5)
-        addi   r5,r5,2
-bzt6:
-        bflr   31                              // byte?
-        stb            r6,0(r5)
-        blr
-        
-// Operand length is >=128 and cache line size is 128. We assume that
-// because the linesize is 128 bytes, this is a 64-bit processor.
-//             r4 = length
-//             r5 = ptr to operand
-//             r6 = 0
-//             r7 = neg(r5)
-//             r9 = #bytes to 128-byte align
-
-        .align 5
-bzero_128:
-        sub            r2,r4,r9                // r2 <- length remaining after cache-line aligning
-        rlwinm r0,r7,0,0xF             // r0 <- #bytes to 16-byte align
-        srwi.  r8,r2,7                 // r8 <- number of cache lines to 0
-        std            r6,0(r5)                // always store 16 bytes to 16-byte align...
-        std            r6,8(r5)                // ...even if too short for dcbz128
-        add            r5,r5,r0                // 16-byte align ptr
-        sub            r4,r4,r0                // adjust count
-        beq            bzero_tail              // r8==0, not long enough to dcbz128
-        sub.   r7,r9,r0                // get #bytes remaining to 128-byte align
-        rlwinm r4,r2,0,0x7F    // r4 <- length remaining after dcbz128'ing
-        mtctr  r8                              // set up dcbz128 loop
-        beq            bz_dcbz128              // already 128-byte aligned
-        b              bz_align                // enter loop over 16-byte chunks
-
-// 128-byte align by looping over 16-byte chunks.
-        
-        .align 5
-bz_align:                                              // loop over 16-byte chunks
-        subic. r7,r7,16                // more to go?
-        std            r6,0(r5)
-        std            r6,8(r5)
-        addi   r5,r5,16
-        bgt            bz_align
-        
-        b              bz_dcbz128              // enter dcbz128 loop
-        
-// Loop over 128-byte cache lines.
-//             r4 = length remaining after cache lines (0..127)
-//             r5 = ptr (128-byte aligned)
-//             r6 = 0
-//             ctr = count of cache lines to 0
-
-        .align 5
-bz_dcbz128:
-        dcbz128        0,r5                    // zero a 128-byte cache line
-        addi   r5,r5,128
-        bdnz   bz_dcbz128
-        
-        b              bzero_tail              // handle leftovers
-
-
-// Handle memset() for nonzero values.  This case is relatively infrequent;
-// the large majority of memset() calls are for 0.
-//             r3 = ptr
-//             r4 = count
-//             r6 = value in lower byte (nonzero)
-
-memset1:
-        cmplwi r4,16                   // too short to bother aligning?
-        rlwimi r6,r6,8,16,23   // replicate value to low 2 bytes
-        mr             r5,r3                   // make working copy of operand ptr
-        rlwimi r6,r6,16,0,15   // value now in all 4 bytes
-        blt            bzero_tail              // length<16, we won't be using "std"
-        mfsprg r10,2                   // get feature flags
-        neg            r7,r5                   // start to compute #bytes to align
-        rlwinm r6,r6,0,1,0             // value now in all 8 bytes (if 64-bit)
-        andi.  r0,r7,7                 // r6 <- #bytes to doubleword align
-        stw            r6,0(r5)                // store 8 bytes to avoid a loop
-        stw            r6,4(r5)
-        mtcrf  0x02,r10                // get pf64Bit flag etc in cr6
-        sub            r4,r4,r0                // adjust count
-        add            r5,r5,r0                // doubleword align ptr
-        b              bzero_tail
-        
-        
+#include <ppc/proc_reg.h>      /* For CACHE_LINE_SIZE */
+
+/*
+ *      void   bzero(char *addr, unsigned int length)
+ *
+ * bzero implementation for PowerPC
+ *   - assumes cacheable memory (i.e. uses DCBZ)
+ *   - assumes non-pic code
+ *
+ * returns start address in r3, as per memset (called by memset)
+ */    
+       
+ENTRY(bzero, TAG_NO_FRAME_USED)
+
+       cmpwi   cr0,    r4,     0 /* no bytes to zero? */
+       mr      r7,     r3
+       mr      r8,     r3      /* use r8 as counter to where we are */
+       beqlr-
+       cmpwi   cr0,    r4,     CACHE_LINE_SIZE /* clear less than a block? */
+       li      r0,     0        /* use r0 as source of zeros */
+       blt     .L_bzeroEndWord
+
+/* first, clear bytes up to the next word boundary */
+       addis   r6,     0,      HIGH_CADDR(.L_bzeroBeginWord)
+       addi    r6,     r6,     LOW_ADDR(.L_bzeroBeginWord)
+                /* extract byte offset as word offset */
+       rlwinm. r5,     r8,     2,      28,     29
+       addi    r8,     r8,     -1 /* adjust for update */
+       beq     .L_bzeroBeginWord /* no bytes to zero */
+       subfic  r5,     r5,     16 /* compute the number of instructions */
+       sub     r6,     r6,     r5 /* back from word clear to execute */
+       mtctr   r6
+       bctr
+
+       stbu    r0,     1(r8)
+       stbu    r0,     1(r8)
+       stbu    r0,     1(r8)
+
+/* clear words up to the next block boundary */
+.L_bzeroBeginWord:
+       addis   r6,     0,      HIGH_CADDR(.L_bzeroBlock)
+       addi    r6,     r6,     LOW_ADDR(.L_bzeroBlock)
+       addi    r8,     r8,     1
+       rlwinm. r5,     r8,     0,      27,     29 /* extract word offset */
+       addi    r8,     r8,     -4              /* adjust for update */
+       beq     .L_bzeroBlock                   /* no words to zero */
+               /* compute the number of instructions */
+       subfic  r5,     r5,     CACHE_LINE_SIZE
+       sub     r6,     r6,     r5 /* back from word clear to execute */
+       mtctr   r6
+       bctr
+
+       stwu    r0,     4(r8)
+       stwu    r0,     4(r8)
+       stwu    r0,     4(r8)
+       stwu    r0,     4(r8)
+       stwu    r0,     4(r8)
+       stwu    r0,     4(r8)
+       stwu    r0,     4(r8)
+
+ /* clear cache blocks */
+.L_bzeroBlock:
+       addi    r8,     r8,     4 /* remove update adjust */
+       sub     r5,     r8,     r7 /* bytes zeroed */
+       sub     r4,     r4,     r5
+       srwi.   r5,     r4,     CACHE_LINE_POW2 /* blocks to zero */
+       beq     .L_bzeroEndWord
+       mtctr   r5
+
+.L_bzeroBlock1:
+       dcbz    0,      r8
+       addi    r8,     r8,     CACHE_LINE_SIZE
+       bdnz    .L_bzeroBlock1
+
+ /* clear remaining words */
+.L_bzeroEndWord:
+       addis   r6,     0,      HIGH_CADDR(.L_bzeroEndByte)
+       addi    r6,     r6,     LOW_ADDR(.L_bzeroEndByte)
+       rlwinm. r5,     r4,     0,      27,     29 /* extract word offset */
+       addi    r8,     r8,     -4                 /* adjust for update */
+       beq     .L_bzeroEndByte                    /* no words to zero */
+       sub     r6,     r6,     r5 /* back from word clear to execute */
+       mtctr   r6
+       bctr
+
+       stwu    r0,     4(r8)
+       stwu    r0,     4(r8)
+       stwu    r0,     4(r8)
+       stwu    r0,     4(r8)
+       stwu    r0,     4(r8)
+       stwu    r0,     4(r8)
+       stwu    r0,     4(r8)
+
+ /* clear remaining bytes */
+.L_bzeroEndByte:
+       addis   r6,     0,      HIGH_CADDR(.L_bzeroEnd)
+       addi    r6,     r6,     LOW_ADDR(.L_bzeroEnd)
+               /* extract byte offset as word offset */
+       rlwinm. r5,     r4,     2,      28,     29
+       addi    r8,     r8,     3 /* adjust for update */
+       beqlr
+       sub     r6,     r6,     r5 /* back from word clear to execute */
+       mtctr   r6
+       bctr
+
+       stbu    r0,     1(r8)
+       stbu    r0,     1(r8)
+       stbu    r0,     1(r8)
+
+.L_bzeroEnd:
+       blr
+
+/*
+ * void *memset(void *from, int c, vm_size_t nbytes)
+ *
+ * almost everywhere in the kernel 
+ * this appears to be called with argument c==0. We optimise for those 
+ * cases and call bzero if we can.
+ *
+ */
+
+ENTRY(memset, TAG_NO_FRAME_USED)
+
+       mr.     ARG3,   ARG1
+       mr      ARG1,   ARG2
+       /* optimised case - do a bzero */
+       beq+    EXT(bzero)
+
+       /* If count is zero, return straight away */
+       cmpi    cr0,    ARG1,   0
+       beqlr-  
+       
+       /* Now, ARG0 = addr, ARG1=len, ARG3=value */
+
+       subi    ARG2,   ARG0,   1       /* use ARG2 as our counter */
+       
+0:
+       subi    ARG1,   ARG1,   1
+       cmpi    cr0,    ARG1,   0
+       stbu    ARG3,   1(ARG2)
+       bne+    0b
+
+       /* Return original address in ARG0 */
+       
+       blr
+
+/*
+ *      void   bzero_nc(char *addr, unsigned int length)
+ *
+ * bzero implementation for PowerPC
+ *   - assumes non-pic code
+ *
+ * returns start address in r3, as per memset (called by memset)
+ */    
+       
+ENTRY(bzero_nc, TAG_NO_FRAME_USED)
+
+       cmpwi   cr0,    r4,     0 /* no bytes to zero? */
+       mr      r7,     r3
+       mr      r8,     r3      /* use r8 as counter to where we are */
+       beqlr-
+       cmpwi   cr0,    r4,     CACHE_LINE_SIZE /* clear less than a block? */
+       li      r0,     0        /* use r0 as source of zeros */
+       blt     .L_bzeroNCEndWord
+
+/* first, clear bytes up to the next word boundary */
+       addis   r6,     0,      HIGH_CADDR(.L_bzeroNCBeginWord)
+       addi    r6,     r6,     LOW_ADDR(.L_bzeroNCBeginWord)
+                /* extract byte offset as word offset */
+       rlwinm. r5,     r8,     2,      28,     29
+       addi    r8,     r8,     -1 /* adjust for update */
+       beq     .L_bzeroNCBeginWord /* no bytes to zero */
+       subfic  r5,     r5,     16 /* compute the number of instructions */
+       sub     r6,     r6,     r5 /* back from word clear to execute */
+       mtctr   r6
+       bctr
+
+       stbu    r0,     1(r8)
+       stbu    r0,     1(r8)
+       stbu    r0,     1(r8)
+
+/* clear words up to the next block boundary */
+.L_bzeroNCBeginWord:
+       addis   r6,     0,      HIGH_CADDR(.L_bzeroNCBlock)
+       addi    r6,     r6,     LOW_ADDR(.L_bzeroNCBlock)
+       addi    r8,     r8,     1
+       rlwinm. r5,     r8,     0,      27,     29 /* extract word offset */
+       addi    r8,     r8,     -4              /* adjust for update */
+       beq     .L_bzeroNCBlock                 /* no words to zero */
+               /* compute the number of instructions */
+       subfic  r5,     r5,     CACHE_LINE_SIZE
+       sub     r6,     r6,     r5 /* back from word clear to execute */
+       mtctr   r6
+       bctr
+
+       stwu    r0,     4(r8)
+       stwu    r0,     4(r8)
+       stwu    r0,     4(r8)
+       stwu    r0,     4(r8)
+       stwu    r0,     4(r8)
+       stwu    r0,     4(r8)
+       stwu    r0,     4(r8)
+
+ /* clear cache blocks */
+.L_bzeroNCBlock:
+       addi    r8,     r8,     4 /* remove update adjust */
+       sub     r5,     r8,     r7 /* bytes zeroed */
+       sub     r4,     r4,     r5
+       srwi.   r5,     r4,     CACHE_LINE_POW2 /* blocks to zero */
+       beq     .L_bzeroNCEndWord
+       mtctr   r5
+
+.L_bzeroNCBlock1:
+       stw     r0,     0(r8)
+       stw     r0,     4(r8)
+       stw     r0,     8(r8)
+       stw     r0,     12(r8)
+       stw     r0,     16(r8)
+       stw     r0,     20(r8)
+       stw     r0,     24(r8)
+       stw     r0,     28(r8)
+       addi    r8,     r8,     CACHE_LINE_SIZE
+       bdnz    .L_bzeroNCBlock1
+
+ /* clear remaining words */
+.L_bzeroNCEndWord:
+       addis   r6,     0,      HIGH_CADDR(.L_bzeroNCEndByte)
+       addi    r6,     r6,     LOW_ADDR(.L_bzeroNCEndByte)
+       rlwinm. r5,     r4,     0,      27,     29 /* extract word offset */
+       addi    r8,     r8,     -4                 /* adjust for update */
+       beq     .L_bzeroNCEndByte                          /* no words to zero */
+       sub     r6,     r6,     r5 /* back from word clear to execute */
+       mtctr   r6
+       bctr
+
+       stwu    r0,     4(r8)
+       stwu    r0,     4(r8)
+       stwu    r0,     4(r8)
+       stwu    r0,     4(r8)
+       stwu    r0,     4(r8)
+       stwu    r0,     4(r8)
+       stwu    r0,     4(r8)
+
+ /* clear remaining bytes */
+.L_bzeroNCEndByte:
+       addis   r6,     0,      HIGH_CADDR(.L_bzeroNCEnd)
+       addi    r6,     r6,     LOW_ADDR(.L_bzeroNCEnd)
+               /* extract byte offset as word offset */
+       rlwinm. r5,     r4,     2,      28,     29
+       addi    r8,     r8,     3 /* adjust for update */
+       beqlr
+       sub     r6,     r6,     r5 /* back from word clear to execute */
+       mtctr   r6
+       bctr
+
+       stbu    r0,     1(r8)
+       stbu    r0,     1(r8)
+       stbu    r0,     1(r8)
 
+.L_bzeroNCEnd:
+       blr
index 94d9fe0ca80ee01bf3c1d6a2d3a4afacacdaa3a4..0f3157714600076d7c1c29e93a2f7a6ca38ab0e4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
  * @OSF_COPYRIGHT@
  */
 
+#include <cpus.h>
+
 #include <ppc/asm.h>
 #include <ppc/proc_reg.h>
-#include <ppc/exception.h>
+#include <cpus.h>
 #include <assym.s>
+#include <mach_debug.h>
+#include <mach/ppc/vm_param.h>
 
-/* These routines run in 32 or 64-bit addressing, and handle
- * 32 and 128 byte caches.  They do not use compare instructions
- * on addresses, since compares are 32/64-bit-mode-specific.
+/*
+ * extern void sync_cache(vm_offset_t pa, unsigned count);
+ *
+ * sync_cache takes a physical address and count to sync, thus
+ * must not be called for multiple virtual pages.
+ *
+ * it writes out the data cache and invalidates the instruction
+ * cache for the address range in question
  */
 
-#define        kDcbf                   0x1
-#define        kDcbfb                  31
-#define        kDcbi                   0x2
-#define        kDcbib                  30
-#define        kIcbi                   0x4
-#define        kIcbib                  29
+ENTRY(sync_cache, TAG_NO_FRAME_USED)
+
+       /* Switch off data translations */
+       mfmsr   r6
+       rlwinm  r6,r6,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+       rlwinm  r6,r6,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+       rlwinm  r7,     r6,     0,      MSR_DR_BIT+1,   MSR_DR_BIT-1
+       mtmsr   r7
+       isync
+
+       /* Check to see if the address is aligned. */
+       add     r8, r3,r4
+       andi.   r8,r8,(CACHE_LINE_SIZE-1)
+       beq-    .L_sync_check
+       addi    r4,r4,CACHE_LINE_SIZE
+       li      r7,(CACHE_LINE_SIZE-1)  /* Align buffer & count - avoid overflow problems */
+       andc    r4,r4,r7
+       andc    r3,r3,r7
+
+.L_sync_check:
+       cmpwi   r4,     CACHE_LINE_SIZE
+       ble     .L_sync_one_line
+       
+       /* Make ctr hold count of how many times we should loop */
+       addi    r8,     r4,     (CACHE_LINE_SIZE-1)
+       srwi    r8,     r8,     CACHE_LINE_POW2
+       mtctr   r8
 
+       /* loop to flush the data cache */
+.L_sync_data_loop:
+       subic   r4,     r4,     CACHE_LINE_SIZE
+       dcbf    r3,     r4
+       bdnz    .L_sync_data_loop
+       
+       sync
+       mtctr   r8
+
+       /* loop to invalidate the instruction cache */
+.L_sync_inval_loop:
+       icbi    r3,     r4
+       addic   r4,     r4,     CACHE_LINE_SIZE
+       bdnz    .L_sync_inval_loop
+
+.L_sync_cache_done:
+       sync                    /* Finish physical writes */
+       mtmsr   r6              /* Restore original translations */
+       isync                   /* Ensure data translations are on */
+       blr
+
+.L_sync_one_line:
+       dcbf    0,r3
+       sync
+       icbi    0,r3
+       b       .L_sync_cache_done
 
 /*
  * extern void flush_dcache(vm_offset_t addr, unsigned count, boolean phys);
- * extern void flush_dcache64(addr64_t addr, unsigned count, boolean phys);
  *
  * flush_dcache takes a virtual or physical address and count to flush
  * and (can be called for multiple virtual pages).
  * if 'phys' is non-zero then physical addresses will be used
  */
 
+ENTRY(flush_dcache, TAG_NO_FRAME_USED)
+
+       /* optionally switch off data translations */
+
+       cmpwi   r5,     0
+       mfmsr   r6
+       beq+    0f
+       rlwinm  r6,r6,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+       rlwinm  r6,r6,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+       rlwinm  r7,     r6,     0,      MSR_DR_BIT+1,   MSR_DR_BIT-1
+       mtmsr   r7
+       isync
+0:     
+
+       /* Check to see if the address is aligned. */
+       add     r8, r3,r4
+       andi.   r8,r8,(CACHE_LINE_SIZE-1)
+       beq-    .L_flush_dcache_check
+       addi    r4,r4,CACHE_LINE_SIZE
+       li      r7,(CACHE_LINE_SIZE-1)  /* Align buffer & count - avoid overflow problems */
+       andc    r4,r4,r7
+       andc    r3,r3,r7
 
-        .text
-        .align 5
-        .globl _flush_dcache
-_flush_dcache:
-        li             r0,kDcbf                                        // use DCBF instruction
-        rlwinm r3,r3,0,0,31                            // truncate address in case this is a 64-bit machine
-        b              cache_op_join                           // join common code
+.L_flush_dcache_check:
+       cmpwi   r4,     CACHE_LINE_SIZE
+       ble     .L_flush_dcache_one_line
+       
+       /* Make ctr hold count of how many times we should loop */
+       addi    r8,     r4,     (CACHE_LINE_SIZE-1)
+       srwi    r8,     r8,     CACHE_LINE_POW2
+       mtctr   r8
 
-        .align 5
-        .globl _flush_dcache64
-_flush_dcache64:
-               rlwinm  r3,r3,0,1,0                                     ; Duplicate high half of long long paddr into top of reg
-               li              r0,kDcbf                                        // use DCBF instruction
-               rlwimi  r3,r4,0,0,31                            ; Combine bottom of long long to full 64-bits
-               mr              r4,r5                                           ; Move count
-               mr              r5,r6                                           ; Move physical flag
-        b              cache_op_join                           // join common code
+.L_flush_dcache_flush_loop:
+       subic   r4,     r4,     CACHE_LINE_SIZE
+       dcbf    r3,     r4
+       bdnz    .L_flush_dcache_flush_loop
+
+.L_flush_dcache_done:
+       /* Sync restore msr if it was modified */
+       cmpwi   r5,     0
+       sync                    /* make sure invalidates have completed */
+       beq+    0f
+       mtmsr   r6              /* Restore original translations */
+       isync                   /* Ensure data translations are on */
+0:
+       blr
+
+.L_flush_dcache_one_line:
+       xor     r4,r4,r4
+       dcbf    0,r3
+       b       .L_flush_dcache_done
 
 
 /*
  * extern void invalidate_dcache(vm_offset_t va, unsigned count, boolean phys);
- * extern void invalidate_dcache64(addr64_t va, unsigned count, boolean phys);
  *
  * invalidate_dcache takes a virtual or physical address and count to
  * invalidate and (can be called for multiple virtual pages).
  *
  * it invalidates the data cache for the address range in question
  */
-        .globl _invalidate_dcache
-_invalidate_dcache:
-        li             r0,kDcbi                                        // use DCBI instruction
-        rlwinm r3,r3,0,0,31                            // truncate address in case this is a 64-bit machine
-        b              cache_op_join                           // join common code
-
-
-        .align 5
-        .globl _invalidate_dcache64
-_invalidate_dcache64:
-               rlwinm  r3,r3,0,1,0                                     ; Duplicate high half of long long paddr into top of reg
-        li             r0,kDcbi                                        // use DCBI instruction
-               rlwimi  r3,r4,0,0,31                            ; Combine bottom of long long to full 64-bits
-               mr              r4,r5                                           ; Move count
-               mr              r5,r6                                           ; Move physical flag
-        b              cache_op_join                           // join common code
+
+ENTRY(invalidate_dcache, TAG_NO_FRAME_USED)
+
+       /* optionally switch off data translations */
+
+       cmpwi   r5,     0
+       mfmsr   r6
+       beq+    0f
+       rlwinm  r6,r6,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+       rlwinm  r6,r6,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+       rlwinm  r7,     r6,     0,      MSR_DR_BIT+1,   MSR_DR_BIT-1
+       mtmsr   r7
+       isync
+0:     
+
+       /* Check to see if the address is aligned. */
+       add     r8, r3,r4
+       andi.   r8,r8,(CACHE_LINE_SIZE-1)
+       beq-    .L_invalidate_dcache_check
+       addi    r4,r4,CACHE_LINE_SIZE
+       li      r7,(CACHE_LINE_SIZE-1)  /* Align buffer & count - avoid overflow problems */
+       andc    r4,r4,r7
+       andc    r3,r3,r7
+
+.L_invalidate_dcache_check:
+       cmpwi   r4,     CACHE_LINE_SIZE
+       ble     .L_invalidate_dcache_one_line
+       
+       /* Make ctr hold count of how many times we should loop */
+       addi    r8,     r4,     (CACHE_LINE_SIZE-1)
+       srwi    r8,     r8,     CACHE_LINE_POW2
+       mtctr   r8
+
+.L_invalidate_dcache_invalidate_loop:
+       subic   r4,     r4,     CACHE_LINE_SIZE
+       dcbi    r3,     r4
+       bdnz    .L_invalidate_dcache_invalidate_loop
+
+.L_invalidate_dcache_done:
+       /* Sync restore msr if it was modified */
+       cmpwi   r5,     0
+       sync                    /* make sure invalidates have completed */
+       beq+    0f
+       mtmsr   r6              /* Restore original translations */
+       isync                   /* Ensure data translations are on */
+0:
+       blr
+
+.L_invalidate_dcache_one_line:
+       xor     r4,r4,r4
+       dcbi    0,r3
+       b       .L_invalidate_dcache_done
 
 /*
  * extern void invalidate_icache(vm_offset_t addr, unsigned cnt, boolean phys);
- * extern void invalidate_icache64(addr64_t addr, unsigned cnt, boolean phys);
  *
  * invalidate_icache takes a virtual or physical address and
  * count to invalidate, (can be called for multiple virtual pages).
  *
  * it invalidates the instruction cache for the address range in question.
- */
-        .globl _invalidate_icache
-_invalidate_icache:
-        li             r0,kIcbi                                        // use ICBI instruction
-        rlwinm r3,r3,0,0,31                            // truncate address in case this is a 64-bit machine
-        b              cache_op_join                           // join common code
-        
-
-        .align 5
-        .globl _invalidate_icache64
-_invalidate_icache64:
-               rlwinm  r3,r3,0,1,0                                     ; Duplicate high half of long long paddr into top of reg
-        li             r0,kIcbi                                        // use ICBI instruction
-               rlwimi  r3,r4,0,0,31                            ; Combine bottom of long long to full 64-bits
-               mr              r4,r5                                           ; Move count
-               mr              r5,r6                                           ; Move physical flag
-        b              cache_op_join                           // join common code
-                        
-/*
- * extern void sync_ppage(ppnum_t pa);
- *
- * sync_ppage takes a physical page number
- *
- * it writes out the data cache and invalidates the instruction
- * cache for the address range in question
  */
 
-        .globl _sync_ppage
-        .align 5
-_sync_ppage:                                                           // Should be the most commonly called routine, by far 
-               mfsprg  r2,2
-        li             r0,kDcbf+kIcbi                          // we need to dcbf and then icbi
-               mtcrf   0x02,r2                                         ; Move pf64Bit to cr6
-        li             r5,1                                            // set flag for physical addresses
-               li              r4,4096                                         ; Set page size
-               bt++    pf64Bitb,spp64                          ; Skip if 64-bit (only they take the hint)
-        rlwinm r3,r3,12,0,19                           ; Convert to physical address - 32-bit
-        b              cache_op_join                           ; Join up....
-        
-spp64: sldi    r3,r3,12                                        ; Convert to physical address - 64-bit        
-        b              cache_op_join                           ; Join up....
-                        
+ENTRY(invalidate_icache, TAG_NO_FRAME_USED)
 
+       /* optionally switch off data translations */
+       cmpwi   r5,     0
+       mfmsr   r6
+       beq+    0f
+       rlwinm  r6,r6,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+       rlwinm  r6,r6,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+       rlwinm  r7,     r6,     0,      MSR_DR_BIT+1,   MSR_DR_BIT-1
+       mtmsr   r7
+       isync
+0:     
 
-/*
- * extern void sync_cache_virtual(vm_offset_t addr, unsigned count);
- *
- * Like "sync_cache", except it takes a virtual address and byte count.
- * It flushes the data cache, invalidates the I cache, and sync's.
- */
-        .globl _sync_cache_virtual
-        .align 5
-_sync_cache_virtual:
-        li             r0,kDcbf+kIcbi                          // we need to dcbf and then icbi
-        li             r5,0                                            // set flag for virtual addresses
-        b              cache_op_join                           // join common code
-        
-                        
-/*
- * extern void sync_cache(vm_offset_t pa, unsigned count);
- * extern void sync_cache64(addr64_t pa, unsigned count);
- *
- * sync_cache takes a physical address and count to sync, thus
- * must not be called for multiple virtual pages.
- *
- * it writes out the data cache and invalidates the instruction
- * cache for the address range in question
- */
+       /* Check to see if the address is aligned. */
+       add     r8, r3,r4
+       andi.   r8,r8,(CACHE_LINE_SIZE-1)
+       beq-    .L_invalidate_icache_check
+       addi    r4,r4,CACHE_LINE_SIZE
+       li      r7,(CACHE_LINE_SIZE-1)  /* Align buffer & count - avoid overflow problems */
+       andc    r4,r4,r7
+       andc    r3,r3,r7
+
+.L_invalidate_icache_check:
+       cmpwi   r4,     CACHE_LINE_SIZE
+       ble     .L_invalidate_icache_one_line
+       
+       /* Make ctr hold count of how many times we should loop */
+       addi    r8,     r4,     (CACHE_LINE_SIZE-1)
+       srwi    r8,     r8,     CACHE_LINE_POW2
+       mtctr   r8
+
+.L_invalidate_icache_invalidate_loop:
+       subic   r4,     r4,     CACHE_LINE_SIZE
+       icbi    r3,     r4
+       bdnz    .L_invalidate_icache_invalidate_loop
 
-        .globl _sync_cache
-        .align 5
-_sync_cache:
-        li             r0,kDcbf+kIcbi                          // we need to dcbf and then icbi
-        li             r5,1                                            // set flag for physical addresses
-        rlwinm r3,r3,0,0,31                            // truncate address in case this is a 64-bit machine
-        b              cache_op_join                           // join common code
-
-        .globl _sync_cache64
-        .align 5
-_sync_cache64: 
-               rlwinm  r3,r3,0,1,0                                     ; Duplicate high half of long long paddr into top of reg
-        li             r0,kDcbf+kIcbi                          // we need to dcbf and then icbi
-               rlwimi  r3,r4,0,0,31                            ; Combine bottom of long long to full 64-bits
-               mr              r4,r5                                           ; Copy over the length
-        li             r5,1                                            // set flag for physical addresses
-
-        
-        // Common code to handle the cache operations.
-
-cache_op_join:                                                         // here with r3=addr, r4=count, r5=phys flag, r0=bits
-        mfsprg r10,2                                           // r10 <- processor feature flags
-        cmpwi  cr5,r5,0                                        // using physical addresses?
-        mtcrf  0x01,r0                                         // move kDcbf, kDcbi, and kIcbi bits to CR7
-        andi.  r9,r10,pf32Byte+pf128Byte       // r9 <- cache line size
-        mtcrf  0x02,r10                                        // move pf64Bit bit to CR6
-        subi   r8,r9,1                                         // r8 <- (linesize-1)
-        beq--  cr5,cache_op_2                          // skip if using virtual addresses
-        
-        bf--   pf64Bitb,cache_op_not64         // This is not a 64-bit machine
-       
-        srdi   r12,r3,31                                       // Slide bit 32 to bit 63
-        cmpldi r12,1                                           // Are we in the I/O mapped area?
-        beqlr--                                                                // No cache ops allowed here...
-        
-cache_op_not64:
-        mflr   r12                                                     // save return address
-        bl             EXT(ml_set_physical)            // turn on physical addressing
-        mtlr   r12                                                     // restore return address
-
-        // get r3=first cache line, r4=first line not in set, r6=byte count
-        
-cache_op_2:        
-        add            r7,r3,r4                                        // point to 1st byte not to operate on
-        andc   r3,r3,r8                                        // r3 <- 1st line to operate on
-        add            r4,r7,r8                                        // round up
-        andc   r4,r4,r8                                        // r4 <- 1st line not to operate on
-        sub.   r6,r4,r3                                        // r6 <- byte count to operate on
-        beq--  cache_op_exit                           // nothing to do
-        bf--   kDcbfb,cache_op_6                       // no need to dcbf
-        
-        
-        // DCBF loop
-        
-cache_op_5:
-        sub.   r6,r6,r9                                        // more to go?
-        dcbf   r6,r3                                           // flush next line to RAM
-        bne            cache_op_5                                      // loop if more to go
-        sync                                                           // make sure the data reaches RAM
-        sub            r6,r4,r3                                        // reset count
-
-
-        // ICBI loop
-        
-cache_op_6:
-        bf--   kIcbib,cache_op_8                       // no need to icbi
-cache_op_7:
-        sub.   r6,r6,r9                                        // more to go?
-        icbi   r6,r3                                           // invalidate next line
-        bne            cache_op_7
-        sub            r6,r4,r3                                        // reset count
-        isync
-        sync
-        
-        
-        // DCBI loop
-        
-cache_op_8:
-        bf++   kDcbib,cache_op_exit            // no need to dcbi
-cache_op_9:
-        sub.   r6,r6,r9                                        // more to go?
-        dcbi   r6,r3                                           // invalidate next line
-        bne            cache_op_9
-        sync
-        
-        
-        // restore MSR iff necessary and done
-        
-cache_op_exit:
-        beqlr--        cr5                                                     // if using virtual addresses, no need to restore MSR
-        b              EXT(ml_restore)                         // restore MSR and return
+.L_invalidate_icache_done:
+       sync                    /* make sure invalidates have completed */
+       mtmsr   r6              /* Restore original translations */
+       isync                   /* Ensure data translations are on */
+       blr
 
+.L_invalidate_icache_one_line:
+       xor     r4,r4,r4
+       icbi    0,r3
+       b       .L_invalidate_icache_done
index 077f87bf1b7968489e0b3a6d588a32627f34f8e9..e4c912349385cc23c1d0d29f7069f5f93e1475b8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
diff --git a/osfmk/ppc/commpage/bcopy_64.s b/osfmk/ppc/commpage/bcopy_64.s
deleted file mode 100644 (file)
index 60df800..0000000
+++ /dev/null
@@ -1,301 +0,0 @@
-/*
- * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-/* =======================================
- * BCOPY, MEMCPY, and MEMMOVE for Mac OS X
- * =======================================
- *
- * Version of 2/20/2003, for a hypothetic 64-bit processor without Altivec.
- * This version might be used bringing up new processors, with known
- * Altivec bugs that need to be worked around.  It is not particularly well
- * optimized.
- *
- * Register usage.  Note we use R2, so this code will not run in a PEF/CFM
- * environment.
- *   r0  = "w7" or temp
- *   r2  = "w8"
- *   r3  = not used, as memcpy and memmove return 1st parameter as a value
- *   r4  = source ptr ("rs")
- *   r5  = count of bytes to move ("rc")
- *   r6  = "w1"
- *   r7  = "w2"
- *   r8  = "w3"
- *   r9  = "w4"
- *   r10 = "w5"
- *   r11 = "w6"
- *   r12 = destination ptr ("rd")
- */
-#define rs     r4
-#define rd     r12
-#define rc     r5
-#define        rv      r2
-
-#define w1     r6
-#define w2     r7
-#define w3     r8
-#define        w4      r9
-#define        w5      r10
-#define        w6      r11
-#define        w7      r0
-#define        w8      r2
-
-#define        ASSEMBLER
-#include <sys/appleapiopts.h>
-#include <ppc/asm.h>
-#include <machine/cpu_capabilities.h>
-#include <machine/commpage.h>
-
-        .text
-        .globl         EXT(bcopy_64)
-
-#define        kLong           64                              // too long for inline loopless code
-
-
-// Main entry points.
-
-        .align         5
-bcopy_64:                                                      // void bcopy(const void *src, void *dst, size_t len)
-        cmplwi rc,kLong                        // short or long?
-        sub            w1,r4,r3                        // must move in reverse if (rd-rs)<rc
-        cmplw  cr1,w1,rc                       // set cr1 blt iff we must move reverse
-        mr             rd,r4                           // start to move registers to canonic spot
-        mr             rs,r3
-        blt            LShort                          // handle short operands
-        dcbt   0,r3                            // touch in destination
-        b              LLong                           // join medium/long operand code
-
-// NB: memmove() must be 8 words past bcopy(), to agree with comm page addresses.
-        
-        .align 5
-Lmemcpy_g4:                                                    // void* memcpy(void *dst, void *src, size_t len)
-Lmemmove_g4:                                           // void* memmove(void *dst, const void *src, size_t len)
-        cmplwi rc,kLong                        // short or long?
-        sub            w1,r3,r4                        // must move in reverse if (rd-rs)<rc
-        dcbt   0,r4                            // touch in the first line of source
-        cmplw  cr1,w1,rc                       // set cr1 blt iff we must move reverse
-        mr             rd,r3                           // must leave r3 alone, it is return value for memcpy etc
-        bge            LLong                           // handle medium or long operands
-
-// Handle short operands.
-        
-LShort:
-        mtcrf  0x02,rc                         // put length bits 26-27 in cr6 (faster one cr at a time)
-        mtcrf  0x01,rc                         // put length bits 28-31 in cr7
-        blt            cr1,LShortReverse
-        
-// Forward short operands.  This is the most frequent case, so it is inline.
-
-LShort64:                                                      // enter to xfer last 64 bytes
-        bf             26,0f                           // 64-byte chunk to xfer?
-        ld             w1,0(rs)
-        ld             w2,8(rs)
-        ld             w3,16(rs)
-        ld             w4,24(rs)
-        addi   rs,rs,32
-        std            w1,0(rd)
-        std            w2,8(rd)
-        std            w3,16(rd)
-        std            w4,24(rd)
-        addi   rd,rd,32
-0:
-        bf             27,1f                           // quadword to move?
-        ld             w1,0(rs)
-        ld             w2,8(rs)
-        addi   rs,rs,16
-        std            w1,0(rd)
-        std            w2,8(rd)
-        addi   rd,rd,16
-1:
-        bf             28,2f                           // doubleword?
-        ld             w1,0(rs)
-        addi   rs,rs,8
-        std            w1,0(rd)
-        addi   rd,rd,8
-2:
-        bf             29,3f                           // word?
-        lwz            w1,0(rs)
-        addi   rs,rs,4
-        stw            w1,0(rd)
-        addi   rd,rd,4
-3:
-        bf             30,4f                           // halfword to move?
-        lhz            w1,0(rs)
-        addi   rs,rs,2
-        sth            w1,0(rd)
-        addi   rd,rd,2
-4:
-        bflr   31                                      // skip if no odd byte
-        lbz            w1,0(rs)
-        stb            w1,0(rd)
-        blr
-        
-        
-// Handle short reverse operands.
-//             cr6 = bits 26-27 of length
-//             cr7 = bits 28-31 of length      
-
-LShortReverse:
-        add            rs,rs,rc                        // adjust ptrs for reverse move
-        add            rd,rd,rc
-LShortReverse64:                                       // enter to xfer last 64 bytes
-        bf             26,0f                           // 64-byte chunk to xfer?
-        ld             w1,-8(rs)
-        ld             w2,-16(rs)
-        ld             w3,-24(rs)
-        ldu            w4,-32(rs)
-        std            w1,-8(rd)
-        std            w2,-16(rd)
-        std            w3,-24(rd)
-        stdu   w4,-32(rd)
-0:
-        bf             27,1f                           // quadword to move?
-        ld             w1,-8(rs)
-        ldu            w2,-16(rs)
-        std            w1,-8(rd)
-        stdu   w2,-16(rd)
-1:
-        bf             28,2f                           // doubleword?
-        ldu            w1,-8(rs)
-        stdu   w1,-8(rd)
-2:
-        bf             29,3f                           // word?
-        lwzu   w1,-4(rs)
-        stwu   w1,-4(rd)
-3:
-        bf             30,4f                           // halfword to move?
-        lhzu   w1,-2(rs)
-        sthu   w1,-2(rd)
-4:
-        bflr   31                                      // done if no odd byte
-        lbz    w1,-1(rs)                       // no update
-        stb    w1,-1(rd)
-        blr
-        
-
-// Long operands.
-//     cr1 = blt iff we must move reverse
-
-        .align 4
-LLong:
-        dcbtst 0,rd                            // touch in destination
-        neg            w3,rd                           // start to compute #bytes to align destination
-        andi.  w6,w3,7                         // w6 <- #bytes to 8-byte align destination
-        blt            cr1,LLongReverse        // handle reverse moves
-        mtctr  w6                                      // set up for loop to align destination
-        sub            rc,rc,w6                        // adjust count
-        beq            LAligned                        // destination already 8-byte aligned
-1:
-        lbz            w1,0(rs)
-        addi   rs,rs,1
-        stb            w1,0(rd)
-        addi   rd,rd,1
-        bdnz   1b
-        
-// Destination is 8-byte aligned.
-
-LAligned:
-        srwi.  w2,rc,6                         // w2 <- count of 64-byte chunks
-        mtcrf  0x02,rc                         // leftover byte count to cr (faster one cr at a time)
-        mtcrf  0x01,rc                         // put length bits 28-31 in cr7
-        beq            LShort64                        // no 64-byte chunks
-        mtctr  w2
-        b              1f
-        
-// Loop moving 64-byte chunks.
-
-        .align 5
-1:
-        ld             w1,0(rs)
-        ld             w2,8(rs)
-        ld             w3,16(rs)
-        ld             w4,24(rs)
-        ld             w5,32(rs)
-        ld             w6,40(rs)
-        ld             w7,48(rs)
-        ld             w8,56(rs)
-        addi   rs,rs,64
-        std            w1,0(rd)
-        std            w2,8(rd)
-        std            w3,16(rd)
-        std            w4,24(rd)
-        std            w5,32(rd)
-        std            w6,40(rd)
-        std            w7,48(rd)
-        std            w8,56(rd)
-        addi   rd,rd,64
-        bdnz   1b
-        
-        b              LShort64
-
-        
-// Handle reverse moves.
-
-LLongReverse:
-        add            rd,rd,rc                                // point to end of operands
-        add            rs,rs,rc
-        andi.  r0,rd,7                                 // is destination 8-byte aligned?
-        sub            rc,rc,r0                                // adjust count
-        mtctr  r0                                              // set up for byte loop
-        beq            LRevAligned                             // already aligned
-        
-1:
-        lbzu   w1,-1(rs)
-        stbu   w1,-1(rd)
-        bdnz   1b
-
-// Destination is 8-byte aligned.
-
-LRevAligned:
-        srwi.  w2,rc,6                         // w2 <- count of 64-byte chunks
-        mtcrf  0x02,rc                         // leftover byte count to cr (faster one cr at a time)
-        mtcrf  0x01,rc                         // put length bits 28-31 in cr7
-        beq            LShortReverse64         // no 64-byte chunks
-        mtctr  w2
-        b              1f
-
-// Loop over 64-byte chunks (reverse).
-
-        .align 5
-1:
-        ld             w1,-8(rs)
-        ld             w2,-16(rs)
-        ld             w3,-24(rs)
-        ld             w4,-32(rs)
-        ld             w5,-40(rs)
-        ld             w6,-48(rs)
-        ld             w7,-56(rs)
-        ldu            w8,-64(rs)
-        std            w1,-8(rd)
-        std            w2,-16(rd)
-        std            w3,-24(rd)
-        std            w4,-32(rd)
-        std            w5,-40(rd)
-        std            w6,-48(rd)
-        std            w7,-56(rd)
-        stdu   w8,-64(rd)
-        bdnz   1b
-        
-        b              LShortReverse64
-
-        COMMPAGE_DESCRIPTOR(bcopy_64,_COMM_PAGE_BCOPY,k64Bit,kHasAltivec,0)
diff --git a/osfmk/ppc/commpage/bcopy_970.s b/osfmk/ppc/commpage/bcopy_970.s
deleted file mode 100644 (file)
index d21d0bc..0000000
+++ /dev/null
@@ -1,592 +0,0 @@
-/*
- * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-/* =======================================
- * BCOPY, MEMCPY, and MEMMOVE for Mac OS X
- * =======================================
- *
- * Version of 6/11/2003, tuned for the IBM 970.
- *
- *
- * Register usage.  Note the rather delicate way we assign multiple uses
- * to the same register.  Beware.
- *   r0  = temp (NB: cannot use r0 for any constant such as "c16")
- *   r3  = not used, as memcpy and memmove return 1st parameter as a value
- *   r4  = source ptr ("rs")
- *   r5  = count of bytes to move ("rc")
- *   r6  = "w1", "c16", or "cm17"
- *   r7  = "w2", "c32", or "cm33"
- *   r8  = "w3", "c48", or "cm49"
- *   r9  = "w4",        or "cm1"
- *   r10 = vrsave ("rv")
- *   r11 = unused
- *   r12 = destination ptr ("rd")
- *   v0  = permute vector ("vp") 
- * v1-v8 = qw's loaded from source
- *v9-v12 = permuted qw's ("vw", "vx", "vy", and "vz")
- */
-#define rs     r4
-#define rd     r12
-#define rc     r5
-#define        rv      r10
-
-#define w1     r6
-#define w2     r7
-#define w3     r8
-#define        w4      r9
-
-#define c16            r6
-#define cm17   r6
-#define c32            r7
-#define cm33   r7
-#define c48            r8
-#define cm49   r8
-#define cm1            r9
-
-#define        vp      v0
-#define        vw      v9
-#define        vx      v10
-#define        vy      v11
-#define        vz      v12
-
-#define        ASSEMBLER
-#include <sys/appleapiopts.h>
-#include <ppc/asm.h>
-#include <machine/cpu_capabilities.h>
-#include <machine/commpage.h>
-
-        .text
-        .globl EXT(bcopy_970)
-
-
-#define        kShort          64
-#define        kVeryLong       (128*1024)
-
-
-// Main entry points.
-
-        .align         5
-bcopy_970:                                                     // void bcopy(const void *src, void *dst, size_t len)
-        cmplwi rc,kShort                       // short or long?
-        sub            w1,r4,r3                        // must move in reverse if (rd-rs)<rc
-        mr             rd,r4                           // move registers to canonic spot
-        mr             rs,r3
-        blt            LShort                          // handle short operands
-        dcbt   0,rs                            // touch in the first line of source
-        dcbtst 0,rd                            // touch in destination
-        b              LLong1                          // join long operand code
-
-// NB: memmove() must be 8 words past bcopy(), to agree with comm page addresses.
-
-        .align 5
-Lmemcpy_970:                                           // void* memcpy(void *dst, void *src, size_t len)
-Lmemmove_970:                                          // void* memmove(void *dst, const void *src, size_t len)
-        cmplwi rc,kShort                       // short or long?
-        sub            w1,r3,r4                        // must move in reverse if (rd-rs)<rc
-        mr             rd,r3                           // must leave r3 alone, it is return value for memcpy etc
-        bge            LLong0                          // handle long operands
-
-// Handle short operands.
-//             rs = source
-//             rd = destination
-//             rc = count
-//             w1 = (rd-rs), must move reverse if (rd-rs)<rc
-        
-LShort:
-        cmplw  cr1,w1,rc                       // set cr1 blt if we must move reverse
-        mtcrf  0x02,rc                         // move length to cr6 and cr7 one at a time
-        mtcrf  0x01,rc
-        blt--  cr1,LShortReverse
-        
-// Forward short operands.  This is the most frequent case, so it is inline.
-
-        bf             26,0f                           // 32-byte chunk to move?
-        ld             w1,0(rs)
-        ld             w2,8(rs)
-        ld             w3,16(rs)
-        ld             w4,24(rs)
-        addi   rs,rs,32
-        std            w1,0(rd)
-        std            w2,8(rd)
-        std            w3,16(rd)
-        std            w4,24(rd)
-        addi   rd,rd,32
-0:
-LShort32:
-        bf             27,1f                           // quadword to move?
-        ld             w1,0(rs)
-        ld             w3,8(rs)
-        addi   rs,rs,16
-        std            w1,0(rd)
-        std            w3,8(rd)
-        addi   rd,rd,16
-1:
-LShort16:                                                      // join here to xfer 0-15 bytes
-        bf             28,2f                           // doubleword?
-        ld             w1,0(rs)
-        addi   rs,rs,8
-        std            w1,0(rd)
-        addi   rd,rd,8
-2:
-        bf             29,3f                           // word?
-        lwz            w1,0(rs)
-        addi   rs,rs,4
-        stw            w1,0(rd)
-        addi   rd,rd,4
-3:
-        bf             30,4f                           // halfword to move?
-        lhz            w1,0(rs)
-        addi   rs,rs,2
-        sth            w1,0(rd)
-        addi   rd,rd,2
-4:
-        bflr   31                                      // skip if no odd byte
-        lbz            w1,0(rs)
-        stb            w1,0(rd)
-        blr
-        
-        
-// Handle short reverse operands.
-//             cr = length in bits 26-31       
-
-LShortReverse:
-        add            rs,rs,rc                        // adjust ptrs for reverse move
-        add            rd,rd,rc
-        bf             26,0f                           // 32 bytes to move?
-        ld             w1,-8(rs)
-        ld             w2,-16(rs)
-        ld             w3,-24(rs)
-        ldu            w4,-32(rs)
-        std            w1,-8(rd)
-        std            w2,-16(rd)
-        std            w3,-24(rd)
-        stdu   w4,-32(rd)
-0:
-        bf             27,1f                           // quadword to move?
-        ld             w1,-8(rs)
-        ldu            w2,-16(rs)
-        std            w1,-8(rd)
-        stdu   w2,-16(rd)
-1:
-LShortReverse16:                                       // join here to xfer 0-15 bytes and return
-        bf             28,2f                           // doubleword?
-        ldu            w1,-8(rs)
-        stdu   w1,-8(rd)
-2:
-        bf             29,3f                           // word?
-        lwzu   w1,-4(rs)
-        stwu   w1,-4(rd)
-3:
-        bf             30,4f                           // halfword to move?
-        lhzu   w1,-2(rs)
-        sthu   w1,-2(rd)
-4:
-        bflr   31                                      // done if no odd byte
-        lbz    w1,-1(rs)                       // no update
-        stb    w1,-1(rd)
-        blr
-        
-
-// Long operands, use Altivec in most cases.
-//             rs = source
-//             rd = destination
-//             rc = count
-//             w1 = (rd-rs), must move reverse if (rd-rs)<rc
-
-LLong0:                                                                // entry from memmove()
-        dcbt   0,rs                            // touch in source
-        dcbtst 0,rd                            // touch in destination
-LLong1:                                                                // entry from bcopy() with operands already touched in
-        cmplw  cr1,w1,rc                       // set cr1 blt iff we must move reverse
-        neg            w3,rd                           // start to compute #bytes to align destination
-        rlwinm w2,w1,0,0xF                     // 16-byte aligned?  (w2==0 if so)
-        andi.  w4,w3,0xF                       // w4 <- #bytes to 16-byte align destination
-        cmpwi  cr5,w2,0                        // set cr5 beq if relatively 16-byte aligned
-        blt--  cr1,LLongReverse        // handle reverse moves
-        sub            rc,rc,w4                        // adjust length for aligning destination
-        srwi   r0,rc,7                         // get #cache lines to copy (may be 0)
-        cmpwi  cr1,r0,0                        // set cr1 on #chunks
-        beq            LFwdAligned                     // dest is already aligned
-        
-// 16-byte align destination.
-
-        mtcrf  0x01,w4                         // cr7 <- #bytes to align dest (nonzero)
-        bf             31,1f                           // byte to move?
-        lbz            w1,0(rs)
-        addi   rs,rs,1
-        stb            w1,0(rd)
-        addi   rd,rd,1
-1:
-        bf             30,2f                           // halfword?
-        lhz            w1,0(rs)
-        addi   rs,rs,2
-        sth            w1,0(rd)
-        addi   rd,rd,2
-2:
-        bf             29,3f                           // word?
-        lwz            w1,0(rs)
-        addi   rs,rs,4
-        stw            w1,0(rd)
-        addi   rd,rd,4
-3:
-        bf             28,LFwdAligned          // doubleword?
-        ld             w1,0(rs)
-        addi   rs,rs,8
-        std            w1,0(rd)
-        addi   rd,rd,8
-
-
-// Forward, destination is 16-byte aligned.  There are five cases:
-//  1. If the length>=kVeryLong (ie, several pages), then use the
-//     "bigcopy" path that pulls all the punches.  This is the fastest
-//        case for cold-cache operands, as any this long will likely be.
-//     2. If length>=128 and source is 16-byte aligned, then use the
-//        lvx/stvx loop over 128-byte chunks.  This is the fastest
-//     case for hot-cache operands, 2nd fastest for cold.
-//     3. If length>=128 and source is not 16-byte aligned, then use the
-//        lvx/vperm/stvx loop over 128-byte chunks.
-//     4. If length<128 and source is 8-byte aligned, then use the
-//        ld/std loop over 32-byte chunks.
-//     5. If length<128 and source is not 8-byte aligned, then use the
-//        lvx/vperm/stvx loop over 32-byte chunks.  This is the slowest case.
-// Registers at this point:
-//             r0/cr1 = count of cache lines ("chunks") that we'll cover (may be 0)
-//                     rs = alignment unknown
-//                 rd = 16-byte aligned
-//                     rc = bytes remaining
-//                     w2 = low 4 bits of (rd-rs), used to check alignment
-//                cr5 = beq if source is also 16-byte aligned
-
-LFwdAligned:
-        andi.  w3,w2,7                         // is source at least 8-byte aligned?
-        mtcrf  0x01,rc                         // move leftover count to cr7 for LShort16
-        bne            cr1,LFwdLongVectors     // at least one 128-byte chunk, so use vectors
-        srwi   w1,rc,5                         // get 32-byte chunk count
-        mtcrf  0x02,rc                         // move bit 27 of length to cr6 for LShort32
-        mtctr  w1                                      // set up 32-byte loop (w1!=0)
-        beq            LFwdMedAligned          // source is 8-byte aligned, so use ld/std loop
-        mfspr  rv,vrsave                       // get bitmap of live vector registers
-        oris   w4,rv,0xFFF8            // we use v0-v12
-        li             c16,16                          // get constants used in lvx
-        li             c32,32
-        mtspr  vrsave,w4                       // update mask
-        lvx            v1,0,rs                         // prefetch 1st source quadword
-        lvsl   vp,0,rs                         // get permute vector to shift left
-        
-        
-// Fewer than 128 bytes but not doubleword aligned: use lvx/vperm/stvx.
-
-1:                                                                     // loop over 32-byte chunks
-        lvx            v2,c16,rs
-        lvx            v3,c32,rs
-        addi   rs,rs,32
-        vperm  vx,v1,v2,vp
-        vperm  vy,v2,v3,vp
-        vor            v1,v3,v3                        // v1 <- v3
-        stvx   vx,0,rd
-        stvx   vy,c16,rd
-        addi   rd,rd,32
-        bdnz   1b
-        
-        mtspr  vrsave,rv                       // restore bitmap of live vr's
-        b              LShort32
-
-        
-// Fewer than 128 bytes and doubleword aligned: use ld/std.
-
-        .align 5
-LFwdMedAligned:                                                                        // loop over 32-byte chunks
-        ld             w1,0(rs)
-        ld             w2,8(rs)
-        ld             w3,16(rs)
-        ld             w4,24(rs)
-        addi   rs,rs,32
-        std            w1,0(rd)
-        std            w2,8(rd)
-        std            w3,16(rd)
-        std            w4,24(rd)
-        addi   rd,rd,32
-        bdnz   LFwdMedAligned
-        
-        b              LShort32
-
-        
-// Forward, 128 bytes or more: use vectors.  When entered:
-//         r0 = 128-byte chunks to move (>0)
-//             rd = 16-byte aligned
-//        cr5 = beq if source is 16-byte aligned
-//        cr7 = low 4 bits of rc (ie, leftover byte count 0-15)
-// We set up many registers:
-//        ctr = number of 128-byte chunks to move
-//     r0/cr0 = leftover QWs to move
-//        cr7 = low 4 bits of rc (ie, leftover byte count 0-15)
-//        cr6 = beq if leftover byte count is 0
-//             rv = original value of VRSave
-// c16,c32,c48 = loaded
-
-LFwdLongVectors:
-        mfspr  rv,vrsave                       // get bitmap of live vector registers
-        lis            w3,kVeryLong>>16        // cutoff for very-long-operand special case path
-        cmplw  cr1,rc,w3                       // very long operand?
-        rlwinm w3,rc,0,28,31           // move last 0-15 byte count to w3
-        bgea-- cr1,_COMM_PAGE_BIGCOPY  // handle big copies separately
-        mtctr  r0                                      // set up loop count
-        cmpwi  cr6,w3,0                        // set cr6 on leftover byte count
-        oris   w4,rv,0xFFF8            // we use v0-v12
-        rlwinm.        r0,rc,28,29,31          // get number of quadword leftovers (0-7) and set cr0
-        li             c16,16                          // get constants used in ldvx/stvx
-        mtspr  vrsave,w4                       // update mask
-        li             c32,32
-        li             c48,48
-        beq            cr5,LFwdLongAligned     // source is also 16-byte aligned, no need for vperm
-        lvsl   vp,0,rs                         // get permute vector to shift left
-        lvx            v1,0,rs                         // prefetch 1st source quadword
-        b              LFwdLongUnaligned
-
-
-// Forward, long, unaligned vector loop.
-
-        .align 5                                       // align inner loops
-LFwdLongUnaligned:                                     // loop over 128-byte chunks
-        addi   w4,rs,64
-        lvx            v2,c16,rs
-        lvx            v3,c32,rs
-        lvx            v4,c48,rs
-        lvx            v5,0,w4
-        lvx            v6,c16,w4
-        vperm  vw,v1,v2,vp
-        lvx            v7,c32,w4
-        lvx            v8,c48,w4
-        addi   rs,rs,128
-        vperm  vx,v2,v3,vp
-        addi   w4,rd,64
-        lvx            v1,0,rs
-        stvx   vw,0,rd
-        vperm  vy,v3,v4,vp
-        stvx   vx,c16,rd
-        vperm  vz,v4,v5,vp
-        stvx   vy,c32,rd
-        vperm  vw,v5,v6,vp
-        stvx   vz,c48,rd
-        vperm  vx,v6,v7,vp
-        addi   rd,rd,128
-        stvx   vw,0,w4
-        vperm  vy,v7,v8,vp
-        stvx   vx,c16,w4
-        vperm  vz,v8,v1,vp
-        stvx   vy,c32,w4
-        stvx   vz,c48,w4
-        bdnz   LFwdLongUnaligned
-
-        beq            4f                                      // no leftover quadwords
-        mtctr  r0
-3:                                                                     // loop over remaining quadwords
-        lvx            v2,c16,rs
-        addi   rs,rs,16
-        vperm  vx,v1,v2,vp
-        vor            v1,v2,v2                        // v1 <- v2
-        stvx   vx,0,rd
-        addi   rd,rd,16
-        bdnz   3b
-4:
-        mtspr  vrsave,rv                       // restore bitmap of live vr's
-        bne            cr6,LShort16            // handle last 0-15 bytes if any
-        blr
-
-
-// Forward, long, 16-byte aligned vector loop.
-
-        .align 5
-LFwdLongAligned:                               // loop over 128-byte chunks
-        addi   w4,rs,64
-        lvx            v1,0,rs
-        lvx            v2,c16,rs
-        lvx            v3,c32,rs
-        lvx            v4,c48,rs
-        lvx            v5,0,w4
-        lvx            v6,c16,w4
-        lvx            v7,c32,w4
-        lvx            v8,c48,w4
-        addi   rs,rs,128
-        addi   w4,rd,64
-        stvx   v1,0,rd 
-        stvx   v2,c16,rd
-        stvx   v3,c32,rd
-        stvx   v4,c48,rd
-        stvx   v5,0,w4
-        stvx   v6,c16,w4
-        stvx   v7,c32,w4
-        stvx   v8,c48,w4
-        addi   rd,rd,128
-        bdnz   LFwdLongAligned
-                
-        beq            4f                                      // no leftover quadwords
-        mtctr  r0
-3:                                                                     // loop over remaining quadwords (1-7)
-        lvx            v1,0,rs
-        addi   rs,rs,16
-        stvx   v1,0,rd
-        addi   rd,rd,16
-        bdnz   3b
-4:
-        mtspr  vrsave,rv                       // restore bitmap of live vr's
-        bne            cr6,LShort16            // handle last 0-15 bytes if any
-        blr
-        
-
-// Long, reverse moves.
-//             rs = source
-//             rd = destination
-//             rc = count
-//        cr5 = beq if relatively 16-byte aligned
-
-LLongReverse:
-        add            rd,rd,rc                        // point to end of operands
-        add            rs,rs,rc
-        andi.  r0,rd,0xF                       // #bytes to 16-byte align destination
-        beq            2f                                      // already aligned
-        
-// 16-byte align destination.
-
-        mtctr  r0                                      // set up for loop
-        sub            rc,rc,r0
-1:
-        lbzu   w1,-1(rs)
-        stbu   w1,-1(rd)
-        bdnz   1b
-
-// Prepare for reverse vector loop.  When entered:
-//             rd = 16-byte aligned
-//             cr5 = beq if source also 16-byte aligned
-// We set up many registers:
-//             ctr/cr1 = number of 64-byte chunks to move (may be 0)
-//             r0/cr0 = leftover QWs to move
-//             cr7 = low 4 bits of rc (ie, leftover byte count 0-15)
-//             cr6 = beq if leftover byte count is 0
-//             cm1 = -1
-//             rv = original value of vrsave
-
-2:
-        mfspr  rv,vrsave                       // get bitmap of live vector registers
-        srwi   r0,rc,6                         // get count of 64-byte chunks to move (may be 0)
-        oris   w1,rv,0xFFF8            // we use v0-v12
-        mtcrf  0x01,rc                         // prepare for moving last 0-15 bytes in LShortReverse16
-        rlwinm w3,rc,0,28,31           // move last 0-15 byte count to w3 too
-        cmpwi  cr1,r0,0                        // set cr1 on chunk count
-        mtspr  vrsave,w1                       // update mask
-        mtctr  r0                                      // set up loop count
-        cmpwi  cr6,w3,0                        // set cr6 on leftover byte count
-        rlwinm.        r0,rc,28,30,31          // get number of quadword leftovers (0-3) and set cr0
-        li             cm1,-1                          // get constants used in ldvx/stvx
-        
-        bne            cr5,LReverseVecUnal     // handle unaligned operands
-        beq            cr1,2f                          // no chunks (if no chunks, must be leftover QWs)
-        li             cm17,-17
-        li             cm33,-33
-        li             cm49,-49
-        b              1f
-
-// Long, reverse 16-byte-aligned vector loop.
-      
-        .align 5                                       // align inner loops
-1:                                                             // loop over 64-byte chunks
-        lvx            v1,cm1,rs
-        lvx            v2,cm17,rs
-        lvx            v3,cm33,rs
-        lvx            v4,cm49,rs
-        subi   rs,rs,64
-        stvx   v1,cm1,rd
-        stvx   v2,cm17,rd
-        stvx   v3,cm33,rd
-        stvx   v4,cm49,rd
-        subi   rd,rd,64
-        bdnz   1b
-        
-        beq            4f                                      // no leftover quadwords
-2:                                                                     // r0=#QWs, rv=vrsave, cr7=(rc & F), cr6 set on cr7
-        mtctr  r0
-3:                                                                     // loop over remaining quadwords (1-7)
-        lvx            v1,cm1,rs
-        subi   rs,rs,16
-        stvx   v1,cm1,rd
-        subi   rd,rd,16
-        bdnz   3b
-4:
-        mtspr  vrsave,rv                       // restore bitmap of live vr's
-        bne            cr6,LShortReverse16     // handle last 0-15 bytes if any
-        blr
-
-
-// Long, reverse, unaligned vector loop.
-//             ctr/cr1 = number of 64-byte chunks to move (may be 0)
-//             r0/cr0 = leftover QWs to move
-//             cr7 = low 4 bits of rc (ie, leftover byte count 0-15)
-//             cr6 = beq if leftover byte count is 0
-//             rv = original value of vrsave
-//             cm1 = -1
-
-LReverseVecUnal:
-        lvsl   vp,0,rs                         // get permute vector to shift left
-        lvx            v1,cm1,rs                       // v1 always looks ahead
-        li             cm17,-17
-        beq            cr1,2f                          // no chunks (if no chunks, must be leftover QWs)
-        li             cm33,-33
-        li             cm49,-49
-        b              1f
-        
-        .align 5                                       // align the inner loops
-1:                                                                     // loop over 64-byte chunks
-        lvx            v2,cm17,rs
-        lvx            v3,cm33,rs
-        lvx            v4,cm49,rs
-        subi   rs,rs,64
-        vperm  vx,v2,v1,vp
-        lvx            v1,cm1,rs
-        vperm  vy,v3,v2,vp
-        stvx   vx,cm1,rd
-        vperm  vz,v4,v3,vp
-        stvx   vy,cm17,rd
-        vperm  vx,v1,v4,vp
-        stvx   vz,cm33,rd
-        stvx   vx,cm49,rd
-        subi   rd,rd,64
-        bdnz   1b
-
-        beq            4f                                      // no leftover quadwords
-2:                                                                     // r0=#QWs, rv=vrsave, v1=next QW, cr7=(rc & F), cr6 set on cr7
-        mtctr  r0
-3:                                                                     // loop over 1-3 quadwords
-        lvx            v2,cm17,rs
-        subi   rs,rs,16
-        vperm  vx,v2,v1,vp
-        vor            v1,v2,v2                        // v1 <- v2
-        stvx   vx,cm1,rd
-        subi   rd,rd,16
-        bdnz   3b
-4:
-        mtspr  vrsave,rv                       // restore bitmap of live vr's
-        bne            cr6,LShortReverse16     // handle last 0-15 bytes iff any
-        blr
-
-        COMMPAGE_DESCRIPTOR(bcopy_970,_COMM_PAGE_BCOPY,k64Bit+kHasAltivec,0,kCommPageMTCRF)
diff --git a/osfmk/ppc/commpage/bcopy_g3.s b/osfmk/ppc/commpage/bcopy_g3.s
deleted file mode 100644 (file)
index cfa8edd..0000000
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-/* =======================================
- * BCOPY, MEMCPY, and MEMMOVE for Mac OS X
- * =======================================
- *
- * Version of 2/20/2003, tuned for G3.
- *
- * Register usage.  Note we use R2, so this code will not run in a PEF/CFM
- * environment.
- *
- *   r0  = "w7" or temp
- *   r2  = "w8"
- *   r3  = not used, as memcpy and memmove return 1st parameter as a value
- *   r4  = source ptr ("rs")
- *   r5  = count of bytes to move ("rc")
- *   r6  = "w1"
- *   r7  = "w2"
- *   r8  = "w3"
- *   r9  = "w4"
- *   r10 = "w5"
- *   r11 = "w6"
- *   r12 = destination ptr ("rd")
- * f0-f3 = used for moving 8-byte aligned data
- */
-#define rs     r4              // NB: we depend on rs==r4 in "lswx" instructions
-#define rd     r12
-#define rc     r5
-
-#define w1     r6
-#define w2     r7
-#define w3     r8
-#define        w4      r9
-#define        w5      r10
-#define        w6      r11
-#define        w7      r0
-#define        w8      r2
-
-#define        ASSEMBLER
-#include <sys/appleapiopts.h>
-#include <ppc/asm.h>
-#include <machine/cpu_capabilities.h>
-#include <machine/commpage.h>
-
-        .text
-        .globl         EXT(bcopy_g3)
-
-
-#define        kLong   33                                      // too long for string ops
-
-
-// Main entry points.
-
-        .align         5
-bcopy_g3:                                                      // void bcopy(const void *src, void *dst, size_t len)
-        cmplwi rc,kLong                        // length > 32 bytes?
-        sub            w1,r4,r3                        // must move in reverse if (rd-rs)<rc
-        mr             rd,r4                           // start to move source & dest to canonic spot
-        bge            LLong0                          // skip if long operand
-        mtxer  rc                                      // set length for string ops
-        lswx   r5,0,r3                         // load bytes into r5-r12
-        stswx  r5,0,r4                         // store them
-        blr
-
-// NB: memcpy() and memmove() must follow bcopy() by 32 bytes, for comm page.
-
-        .align 5
-Lmemcpy_g3:                                                    // void* memcpy(void *dst, void *src, size_t len)
-Lmemmove_g3:                                           // void* memmove(void *dst, const void *src, size_t len)
-        cmplwi rc,kLong                        // length > 32 bytes?
-        sub            w1,r3,rs                        // must move in reverse if (rd-rs)<rc
-        mr             rd,r3                           // must leave r3 alone, it is return value for memcpy etc
-        bge            LLong1                          // longer than 32 bytes
-        mtxer  rc                                      // set length for string ops
-        lswx   r5,0,r4                         // load bytes into r5-r12
-        stswx  r5,0,r3                         // store them
-        blr
-
-// Long operands (more than 32 bytes.)
-//             w1  = (rd-rs), used to check for alignment
-
-LLong0:                                                                // enter from bcopy()
-        mr             rs,r3                           // must leave r3 alone (it is return value for memcpy)
-LLong1:                                                                // enter from memcpy() and memmove()
-        cmplw  cr1,w1,rc                       // set cr1 blt iff we must move reverse
-        rlwinm r0,w1,0,0x3                     // are operands relatively word-aligned?
-        neg            w2,rd                           // prepare to align destination
-        cmpwi  cr5,r0,0                        // set cr5 beq if relatively word aligned
-        blt            cr1,LLongReverse        // handle reverse move
-        andi.  w4,w2,3                         // w4 <- #bytes to word align destination
-        beq            cr5,LLongFloat          // relatively aligned so use FPRs
-        sub            rc,rc,w4                        // adjust count for alignment
-        srwi   r0,rc,5                         // get #chunks to xfer (>=1)
-        rlwinm rc,rc,0,0x1F            // mask down to leftover bytes
-        mtctr  r0                                      // set up loop count
-        beq            1f                                      // dest already word aligned
-    
-// Word align the destination.
-        
-        mtxer  w4                                      // byte count to xer
-        cmpwi  r0,0                            // any chunks to xfer?
-        lswx   w1,0,rs                         // move w4 bytes to align dest
-        add            rs,rs,w4
-        stswx  w1,0,rd
-        add            rd,rd,w4
-        beq-   2f                                      // pathologic case, no chunks to xfer
-
-// Forward, unaligned loop.
-
-1:
-        lwz            w1,0(rs)
-        lwz            w2,4(rs)
-        lwz            w3,8(rs)
-        lwz            w4,12(rs)
-        lwz            w5,16(rs)
-        lwz            w6,20(rs)
-        lwz            w7,24(rs)
-        lwz            w8,28(rs)
-        addi   rs,rs,32
-        stw            w1,0(rd)
-        stw            w2,4(rd)
-        stw            w3,8(rd)
-        stw            w4,12(rd)
-        stw            w5,16(rd)
-        stw            w6,20(rd)
-        stw            w7,24(rd)
-        stw            w8,28(rd)
-        addi   rd,rd,32
-        bdnz   1b
-2:                                                                     // rc = remaining bytes (0-31)
-        mtxer  rc                                      // set up count for string ops
-        mr             r0,rd                           // move dest ptr out of the way
-        lswx   r5,0,rs                         // load xer bytes into r5-r12 (rs==r4)
-        stswx  r5,0,r0                         // store them
-        blr
-        
-
-
-// Forward, aligned loop.  We use FPRs.
-
-LLongFloat:
-        andi.  w4,w2,7                         // W4 <- #bytes to doubleword-align destination
-        sub            rc,rc,w4                        // adjust count for alignment
-        srwi   r0,rc,5                         // number of 32-byte chunks to xfer
-        rlwinm rc,rc,0,0x1F            // mask down to leftover bytes
-        mtctr  r0                                      // set up loop count
-        beq            1f                                      // dest already doubleword aligned
-    
-// Doubleword align the destination.
-        
-        mtxer  w4                                      // byte count to xer
-        cmpwi  r0,0                            // any chunks to xfer?
-        lswx   w1,0,rs                         // move w4 bytes to align dest
-        add            rs,rs,w4
-        stswx  w1,0,rd
-        add            rd,rd,w4
-        beq-   2f                                      // pathologic case, no chunks to xfer
-1:                                                                     // loop over 32-byte chunks
-        lfd            f0,0(rs)
-        lfd            f1,8(rs)
-        lfd            f2,16(rs)
-        lfd            f3,24(rs)
-        addi   rs,rs,32
-        stfd   f0,0(rd)
-        stfd   f1,8(rd)
-        stfd   f2,16(rd)
-        stfd   f3,24(rd)
-        addi   rd,rd,32
-        bdnz   1b
-2:                                                                     // rc = remaining bytes (0-31)
-        mtxer  rc                                      // set up count for string ops
-        mr             r0,rd                           // move dest ptr out of the way
-        lswx   r5,0,rs                         // load xer bytes into r5-r12 (rs==r4)
-        stswx  r5,0,r0                         // store them
-        blr
-
-        
-// Long, reverse moves.
-//             cr5 = beq if relatively word aligned
-
-LLongReverse:
-        add            rd,rd,rc                        // point to end of operands + 1
-        add            rs,rs,rc
-        beq            cr5,LReverseFloat       // aligned operands so can use FPRs
-        srwi   r0,rc,5                         // get chunk count
-        rlwinm rc,rc,0,0x1F            // mask down to leftover bytes
-        mtctr  r0                                      // set up loop count
-        mtxer  rc                                      // set up for trailing bytes
-1:
-        lwz            w1,-4(rs)
-        lwz            w2,-8(rs)
-        lwz            w3,-12(rs)
-        lwz            w4,-16(rs)
-        stw            w1,-4(rd)
-        lwz            w5,-20(rs)
-        stw            w2,-8(rd)
-        lwz            w6,-24(rs)
-        stw            w3,-12(rd)
-        lwz            w7,-28(rs)
-        stw            w4,-16(rd)
-        lwzu   w8,-32(rs)
-        stw            w5,-20(rd)
-        stw            w6,-24(rd)
-        stw            w7,-28(rd)
-        stwu   w8,-32(rd)
-        bdnz   1b
-
-        sub            r4,rs,rc                        // point to 1st (leftmost) leftover byte (0..31)
-        sub            r0,rd,rc                        // move dest ptr out of way
-        lswx   r5,0,r4                         // load xer bytes into r5-r12
-        stswx  r5,0,r0                         // store them
-        blr
-
-
-// Long, reverse aligned moves.  We use FPRs.
-
-LReverseFloat:
-        andi.  w4,rd,7                         // W3 <- #bytes to doubleword-align destination
-        sub            rc,rc,w4                        // adjust count for alignment
-        srwi   r0,rc,5                         // number of 32-byte chunks to xfer
-        rlwinm rc,rc,0,0x1F            // mask down to leftover bytes
-        mtctr  r0                                      // set up loop count
-        beq            1f                                      // dest already doubleword aligned
-    
-// Doubleword align the destination.
-        
-        mtxer  w4                                      // byte count to xer
-        cmpwi  r0,0                            // any chunks to xfer?
-        sub            rs,rs,w4                        // point to 1st bytes to xfer
-        sub            rd,rd,w4
-        lswx   w1,0,rs                         // move w3 bytes to align dest
-        stswx  w1,0,rd
-        beq-   2f                                      // pathologic case, no chunks to xfer
-1:
-        lfd            f0,-8(rs)
-        lfd            f1,-16(rs)
-        lfd            f2,-24(rs)
-        lfdu   f3,-32(rs)
-        stfd   f0,-8(rd)
-        stfd   f1,-16(rd)
-        stfd   f2,-24(rd)
-        stfdu  f3,-32(rd)
-        bdnz   1b
-2:                                                                     // rc = remaining bytes (0-31)
-        mtxer  rc                                      // set up count for string ops
-        sub            r4,rs,rc                        // point to 1st (leftmost) leftover byte (0..31)
-        sub            r0,rd,rc                        // move dest ptr out of way
-        lswx   r5,0,r4                         // load xer bytes into r5-r12
-        stswx  r5,0,r0                         // store them
-        blr
-
-        COMMPAGE_DESCRIPTOR(bcopy_g3,_COMM_PAGE_BCOPY,0,k64Bit+kHasAltivec,0)
diff --git a/osfmk/ppc/commpage/bcopy_g4.s b/osfmk/ppc/commpage/bcopy_g4.s
deleted file mode 100644 (file)
index 4750ae4..0000000
+++ /dev/null
@@ -1,621 +0,0 @@
-/*
- * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-/* =======================================
- * BCOPY, MEMCPY, and MEMMOVE for Mac OS X
- * =======================================
- *
- * Version of 2/20/2003, tuned for G4.  The inner loops use DCBA to avoid
- * reading destination cache lines.  Only the 7450 actually benefits from
- * this, and then only in the cold-cache case.  On 7400s and 7455s, we
- * patch the DCBAs into NOPs.
- *
- * Register usage.  Note we use R2, so this code will not run in a PEF/CFM
- * environment.  Note also the rather delicate way we assign multiple uses
- * to the same register.  Beware.
- *
- *   r0  = "w7" or temp (NB: cannot use r0 for any constant such as "c16")
- *   r2  = "w8" or vrsave ("rv")
- *   r3  = not used, as memcpy and memmove return 1st parameter as a value
- *   r4  = source ptr ("rs")
- *   r5  = count of bytes to move ("rc")
- *   r6  = "w1", "c16", or "cm17"
- *   r7  = "w2", "c32", or "cm33"
- *   r8  = "w3", "c48", or "cm49"
- *   r9  = "w4", or "cm1"
- *   r10 = "w5", "c96", or "cm97"
- *   r11 = "w6", "c128", or "cm129"
- *   r12 = destination ptr ("rd")
- *   v0  = permute vector ("vp") 
- * v1-v4 = qw's loaded from source
- * v5-v7 = permuted qw's ("vw", "vx", "vy")
- */
-#define rs     r4
-#define rd     r12
-#define rc     r5
-#define        rv      r2
-
-#define w1     r6
-#define w2     r7
-#define w3     r8
-#define        w4      r9
-#define        w5      r10
-#define        w6      r11
-#define        w7      r0
-#define        w8      r2
-
-#define c16            r6
-#define cm17   r6
-#define c32            r7
-#define cm33   r7
-#define c48            r8
-#define cm49   r8
-#define cm1            r9
-#define c96            r10
-#define cm97   r10
-#define c128   r11
-#define cm129  r11
-
-#define        vp      v0
-#define        vw      v5
-#define        vx      v6
-#define        vy      v7
-
-#define        ASSEMBLER
-#include <sys/appleapiopts.h>
-#include <ppc/asm.h>
-#include <machine/cpu_capabilities.h>
-#include <machine/commpage.h>
-
-        .text
-        .globl         EXT(bcopy_g4)
-
-#define        kMedium         32                              // too long for inline loopless code
-#define        kLong           96                              // long enough to justify use of Altivec
-
-
-// Main entry points.
-
-        .align         5
-bcopy_g4:                                                      // void bcopy(const void *src, void *dst, size_t len)
-        cmplwi rc,kMedium                      // short or long?
-        sub            w1,r4,r3                        // must move in reverse if (rd-rs)<rc
-        cmplw  cr1,w1,rc                       // set cr1 blt iff we must move reverse
-        mr             rd,r4                           // start to move registers to canonic spot
-        mr             rs,r3
-        blt+   LShort                          // handle short operands
-        dcbt   0,r3                            // touch in destination
-        b              LMedium                         // join medium/long operand code
-
-// NB: memmove() must be 8 words past bcopy(), to agree with comm page addresses.
-        
-        .align 5
-Lmemcpy_g4:                                                    // void* memcpy(void *dst, void *src, size_t len)
-Lmemmove_g4:                                           // void* memmove(void *dst, const void *src, size_t len)
-        cmplwi rc,kMedium                      // short or long?
-        sub            w1,r3,r4                        // must move in reverse if (rd-rs)<rc
-        dcbt   0,r4                            // touch in the first line of source
-        cmplw  cr1,w1,rc                       // set cr1 blt iff we must move reverse
-        mr             rd,r3                           // must leave r3 alone, it is return value for memcpy etc
-        bge-   LMedium                         // handle medium or long operands
-
-// Handle short operands.
-        
-LShort:
-        andi.  r0,rc,0x10                      // test bit 27 separately (faster on G4)
-        mtcrf  0x01,rc                         // put length bits 28-31 in cr7
-        blt-   cr1,LShortReverse
-        
-// Forward short operands.  This is the most frequent case, so it is inline.
-
-        beq            LShort16                        // quadword to move?
-        lwz            w1,0(rs)
-        lwz            w2,4(rs)
-        lwz            w3,8(rs)
-        lwz            w4,12(rs)
-        addi   rs,rs,16
-        stw            w1,0(rd)
-        stw            w2,4(rd)
-        stw            w3,8(rd)
-        stw            w4,12(rd)
-        addi   rd,rd,16
-LShort16:                                                      // join here to xfer 0-15 bytes
-        bf             28,2f                           // doubleword?
-        lwz            w1,0(rs)
-        lwz            w2,4(rs)
-        addi   rs,rs,8
-        stw            w1,0(rd)
-        stw            w2,4(rd)
-        addi   rd,rd,8
-2:
-        bf             29,3f                           // word?
-        lwz            w1,0(rs)
-        addi   rs,rs,4
-        stw            w1,0(rd)
-        addi   rd,rd,4
-3:
-        bf             30,4f                           // halfword to move?
-        lhz            w1,0(rs)
-        addi   rs,rs,2
-        sth            w1,0(rd)
-        addi   rd,rd,2
-4:
-        bflr   31                                      // skip if no odd byte
-        lbz            w1,0(rs)
-        stb            w1,0(rd)
-        blr
-        
-        
-// Handle short reverse operands.
-//             cr0 = bne if bit 27 of length is set
-//             cr7 = bits 28-31 of length      
-
-LShortReverse:
-        add            rs,rs,rc                        // adjust ptrs for reverse move
-        add            rd,rd,rc
-        beq            LShortReverse16         // quadword to move?
-        lwz            w1,-4(rs)
-        lwz            w2,-8(rs)
-        lwz            w3,-12(rs)
-        lwzu   w4,-16(rs)
-        stw            w1,-4(rd)
-        stw            w2,-8(rd)
-        stw            w3,-12(rd)
-        stwu   w4,-16(rd)
-LShortReverse16:                                       // join here to xfer 0-15 bytes and return
-        bf             28,2f                           // doubleword?
-        lwz            w1,-4(rs)
-        lwzu   w2,-8(rs)
-        stw            w1,-4(rd)
-        stwu   w2,-8(rd)
-2:
-        bf             29,3f                           // word?
-        lwzu   w1,-4(rs)
-        stwu   w1,-4(rd)
-3:
-        bf             30,4f                           // halfword to move?
-        lhzu   w1,-2(rs)
-        sthu   w1,-2(rd)
-4:
-        bflr   31                                      // done if no odd byte
-        lbz    w1,-1(rs)                       // no update
-        stb    w1,-1(rd)
-        blr
-        
-
-// Medium and long operands.  Use Altivec if long enough, else scalar loops.
-//             w1 = (rd-rs), used to check for alignment
-//     cr1 = blt iff we must move reverse
-
-        .align 4
-LMedium:
-        dcbtst 0,rd                            // touch in destination
-        cmplwi cr7,rc,kLong            // long enough for vectors?
-        neg            w3,rd                           // start to compute #bytes to align destination
-        rlwinm r0,w1,0,0x7                     // check relative 8-byte alignment
-        andi.  w6,w3,7                         // w6 <- #bytes to 8-byte align destination
-        blt            cr1,LMediumReverse      // handle reverse moves
-        rlwinm w4,w3,0,0x1F            // w4 <- #bytes to 32-byte align destination
-        cmpwi  cr6,r0,0                        // set cr6 beq if relatively aligned
-        bge            cr7,LFwdLong            // long enough for vectors
-
-// Medium length: use scalar loops.
-//     w6/cr0 = #bytes to 8-byte align destination
-//        cr6 = beq if relatively doubleword aligned
-
-        sub            rc,rc,w6                        // decrement length remaining
-        beq            1f                                      // skip if dest already doubleword aligned
-        mtxer  w6                                      // set up count for move
-        lswx   w1,0,rs                         // move w6 bytes to align destination
-        stswx  w1,0,rd
-        add            rs,rs,w6                        // bump ptrs past
-        add            rd,rd,w6
-1:        
-        srwi   r0,rc,4                         // get # 16-byte chunks (>=1)
-        mtcrf  0x01,rc                         // save remaining byte count here for LShort16
-        mtctr  r0                                      // set up 16-byte loop
-        bne            cr6,3f                          // source not 4-byte aligned
-        b              2f
-        
-        .align 4
-2:                                                                     // loop over 16-byte  aligned chunks
-        lfd            f0,0(rs)
-        lfd            f1,8(rs)
-        addi   rs,rs,16
-        stfd   f0,0(rd)
-        stfd   f1,8(rd)
-        addi   rd,rd,16
-        bdnz   2b
-        
-        b              LShort16
-        
-        .align 4
-3:                                                                     // loop over 16-byte unaligned chunks
-        lwz            w1,0(rs)
-        lwz            w2,4(rs)
-        lwz            w3,8(rs)
-        lwz            w4,12(rs)
-        addi   rs,rs,16
-        stw            w1,0(rd)
-        stw            w2,4(rd)
-        stw            w3,8(rd)
-        stw            w4,12(rd)
-        addi   rd,rd,16
-        bdnz   3b
-        
-        b              LShort16
-
-
-// Vector loops.  First, we must 32-byte align the destination.
-//             w1 = (rd-rs), used to check for reverse and alignment
-//             w4 = #bytes to 32-byte align destination
-//             rc = long enough for at least one vector loop
-
-LFwdLong:
-        cmpwi  w4,0                            // dest already aligned?
-        sub            rc,rc,w4                        // adjust length
-        mtcrf  0x01,w4                         // cr7 <- #bytes to align dest
-        rlwinm w2,w1,0,0xF                     // relatively 16-byte aligned?
-        mtcrf  0x02,w4                         // finish moving #bytes to align to cr6 and cr7
-        srwi   r0,rc,6                         // get # 64-byte chunks to xfer (>=1)
-        cmpwi  cr5,w2,0                        // set cr5 beq if relatively 16-byte aligned
-        beq            LFwdAligned                     // dest is already aligned
-        
-// 32-byte align destination.
-
-        bf             31,1f                           // byte to move?
-        lbz            w1,0(rs)
-        addi   rs,rs,1
-        stb            w1,0(rd)
-        addi   rd,rd,1
-1:
-        bf             30,2f                           // halfword?
-        lhz            w1,0(rs)
-        addi   rs,rs,2
-        sth            w1,0(rd)
-        addi   rd,rd,2
-2:
-        bf             29,3f                           // word?
-        lwz            w1,0(rs)
-        addi   rs,rs,4
-        stw            w1,0(rd)
-        addi   rd,rd,4
-3:
-        bf             28,4f                           // doubleword?
-        lwz            w1,0(rs)
-        lwz            w2,4(rs)
-        addi   rs,rs,8
-        stw            w1,0(rd)
-        stw            w2,4(rd)
-        addi   rd,rd,8
-4:     
-        bf             27,LFwdAligned          // quadword?
-        lwz            w1,0(rs)
-        lwz            w2,4(rs)
-        lwz            w3,8(rs)
-        lwz            w4,12(rs)
-        addi   rs,rs,16
-        stw            w1,0(rd)
-        stw            w2,4(rd)
-        stw            w3,8(rd)
-        stw            w4,12(rd)
-        addi   rd,rd,16
-
-
-// Destination is 32-byte aligned.
-//             r0 = count of 64-byte chunks to move (not 0)
-//             rd = 32-byte aligned
-//             rc = bytes remaining
-//        cr5 = beq if source is 16-byte aligned
-// We set up many registers:
-//        ctr = number of 64-byte chunks to move
-//     r0/cr0 = leftover QWs to move
-//        cr7 = low 4 bits of rc (ie, leftover byte count 0-15)
-//        cr6 = beq if leftover byte count is 0
-//             rv = original value of vrsave
-// c16 etc = loaded
-
-LFwdAligned:
-        mfspr  rv,vrsave                       // get bitmap of live vector registers
-        mtcrf  0x01,rc                         // move leftover count to cr7 for LShort16
-        rlwinm w3,rc,0,28,31           // move last 0-15 byte count to w3
-        mtctr  r0                                      // set up loop count
-        cmpwi  cr6,w3,0                        // set cr6 on leftover byte count
-        oris   w1,rv,0xFF00            // we use v0-v7
-        rlwinm.        r0,rc,28,30,31          // get number of quadword leftovers (0-3) and set cr0
-        mtspr  vrsave,w1                       // update mask
-        li             c16,16                          // get constants used in ldvx/stvx
-        li             c32,32
-        li             c48,48
-        li             c96,96
-        li             c128,128
-        bne            cr5,LForwardVecUnal     // handle unaligned operands
-        b              1f
-
-        .align 4
-1:                                                             // loop over 64-byte chunks
-        dcbt   c96,rs
-        dcbt   c128,rs
-        lvx            v1,0,rs
-        lvx            v2,c16,rs
-        lvx            v3,c32,rs
-        lvx            v4,c48,rs
-        addi   rs,rs,64
-        dcba   0,rd                            // patched to NOP on some machines
-        stvx   v1,0,rd
-        stvx   v2,c16,rd
-        dcba   c32,rd                          // patched to NOP on some machines
-        stvx   v3,c32,rd
-        stvx   v4,c48,rd
-        addi   rd,rd,64
-        bdnz   1b
-                
-        beq            4f                                      // no leftover quadwords
-        mtctr  r0
-3:                                                                     // loop over remaining quadwords (1-3)
-        lvx            v1,0,rs
-        addi   rs,rs,16
-        stvx   v1,0,rd
-        addi   rd,rd,16
-        bdnz   3b
-4:
-        mtspr  vrsave,rv                       // restore bitmap of live vr's
-        bne            cr6,LShort16            // handle last 0-15 bytes if any
-        blr
-        
-
-// Long, forward, unaligned vector loop.
-
-LForwardVecUnal:
-        lvsl   vp,0,rs                         // get permute vector to shift left
-        lvx            v1,0,rs                         // prefetch 1st source quadword
-        b              1f
-
-        .align 4                                       // align inner loops
-1:                                                                     // loop over 64-byte chunks
-        lvx            v2,c16,rs
-        dcbt   c96,rs
-        lvx            v3,c32,rs
-        dcbt   c128,rs
-        lvx            v4,c48,rs
-        addi   rs,rs,64
-        vperm  vw,v1,v2,vp
-        lvx            v1,0,rs
-        vperm  vx,v2,v3,vp
-        dcba   0,rd                            // patched to NOP on some machines
-        stvx   vw,0,rd
-        vperm  vy,v3,v4,vp
-        stvx   vx,c16,rd
-        vperm  vw,v4,v1,vp
-        dcba   c32,rd                          // patched to NOP on some machines
-        stvx   vy,c32,rd
-        stvx   vw,c48,rd
-        addi   rd,rd,64
-        bdnz   1b
-
-        beq-   4f                                      // no leftover quadwords
-        mtctr  r0
-3:                                                                     // loop over remaining quadwords
-        lvx            v2,c16,rs
-        addi   rs,rs,16
-        vperm  vx,v1,v2,vp
-        vor            v1,v2,v2                        // v1 <- v2
-        stvx   vx,0,rd
-        addi   rd,rd,16
-        bdnz   3b
-4:
-        mtspr  vrsave,rv                       // restore bitmap of live vr's
-        bne            cr6,LShort16            // handle last 0-15 bytes if any
-        blr
-        
-
-// Medium and long, reverse moves.  We use altivec if the operands are long enough,
-// else a lwz/stx loop.
-//             w1 = (rd-rs), used to check for reverse and alignment
-//        cr7 = bge if long
-
-LMediumReverse:
-        add            rd,rd,rc                        // point to end of operands
-        add            rs,rs,rc
-        andi.  w4,rd,0x1F                      // w4 <- #bytes to 32-byte align destination
-        rlwinm w6,rd,0,0x3                     // w6 <- #bytes to 4-byte align destination
-        bge            cr7,LLongReverse        // long enough for vectors
-
-// Scalar loop.
-//         w6 = #bytes to 4-byte align destination
-
-        sub            rc,rc,w6                        // decrement length remaining
-        mtxer  w6                                      // set up count for move
-        sub            rs,rs,w6                        // back up ptrs
-        sub            rd,rd,w6
-        srwi   r0,rc,4                         // get # 16-byte chunks (>=1)
-        mtcrf  0x01,rc                         // set remaining byte count here for LShortReverse16
-        lswx   w1,0,rs                         // move w6 bytes to align destination
-        stswx  w1,0,rd
-        mtctr  r0                                      // set up 16-byte loop
-        b              1f
-        
-        .align 4
-1:                                                                     // loop over 16-byte  aligned chunks
-        lwz            w1,-4(rs)
-        lwz            w2,-8(rs)
-        lwz            w3,-12(rs)
-        lwzu   w4,-16(rs)
-        stw            w1,-4(rd)
-        stw            w2,-8(rd)
-        stw            w3,-12(rd)
-        stwu   w4,-16(rd)
-        bdnz   1b
-        
-        b              LShortReverse16
-        
-
-// Reverse vector loops.  First, we must 32-byte align the destination.
-//             w1 = (rd-rs), used to check for reverse and alignment
-//     w4/cr0 = #bytes to 32-byte align destination
-//             rc = long enough for at least one vector loop
-
-LLongReverse:
-        sub            rc,rc,w4                        // adjust length
-        mtcrf  0x01,w4                         // cr7 <- #bytes to align dest
-        rlwinm w2,w1,0,0xF                     // relatively 16-byte aligned?
-        mtcrf  0x02,w4                         // finish moving #bytes to align to cr6 and cr7
-        srwi   r0,rc,6                         // get # 64-byte chunks to xfer (>=1)
-        cmpwi  cr5,w2,0                        // set cr5 beq if relatively 16-byte aligned
-        beq            LReverseAligned         // dest is already aligned
-        
-// 32-byte align destination.
-
-        bf             31,1f                           // byte to move?
-        lbzu   w1,-1(rs)
-        stbu   w1,-1(rd)
-1:
-        bf             30,2f                           // halfword?
-        lhzu   w1,-2(rs)
-        sthu   w1,-2(rd)
-2:
-        bf             29,3f                           // word?
-        lwzu   w1,-4(rs)
-        stwu   w1,-4(rd)
-3:
-        bf             28,4f                           // doubleword?
-        lwz            w1,-4(rs)
-        lwzu   w2,-8(rs)
-        stw            w1,-4(rd)
-        stwu   w2,-8(rd)
-4:     
-        bf             27,LReverseAligned      // quadword?
-        lwz            w1,-4(rs)
-        lwz            w2,-8(rs)
-        lwz            w3,-12(rs)
-        lwzu   w4,-16(rs)
-        stw            w1,-4(rd)
-        stw            w2,-8(rd)
-        stw            w3,-12(rd)
-        stwu   w4,-16(rd)
-
-// Destination is 32-byte aligned.
-//             r0 = count of 64-byte chunks to move (not 0)
-//             rd = 32-byte aligned
-//             rc = bytes remaining
-//        cr5 = beq if source is 16-byte aligned
-// We set up many registers:
-//        ctr = number of 64-byte chunks to move
-//     r0/cr0 = leftover QWs to move
-//        cr7 = low 4 bits of rc (ie, leftover byte count 0-15)
-//        cr6 = beq if leftover byte count is 0
-//             rv = original value of vrsave
-// cm1 etc = loaded
-        
-LReverseAligned:
-        mfspr  rv,vrsave                       // get bitmap of live vector registers
-        mtcrf  0x01,rc                         // move leftover count to cr7 for LShort16
-        rlwinm w3,rc,0,28,31           // move last 0-15 byte count to w3
-        mtctr  r0                                      // set up loop count
-        cmpwi  cr6,w3,0                        // set cr6 on leftover byte count
-        oris   w1,rv,0xFF00            // we use v0-v7
-        rlwinm.        r0,rc,28,30,31          // get number of quadword leftovers (0-3) and set cr0
-        mtspr  vrsave,w1                       // update mask
-        li             cm1,-1                          // get constants used in ldvx/stvx
-        li             cm17,-17
-        li             cm33,-33
-        li             cm49,-49
-        li             cm97,-97
-        li             cm129,-129        
-        bne            cr5,LReverseVecUnal     // handle unaligned operands
-        b              1f
-      
-        .align 4                                       // align inner loops
-1:                                                             // loop over 64-byte chunks
-        dcbt   cm97,rs
-        dcbt   cm129,rs
-        lvx            v1,cm1,rs
-        lvx            v2,cm17,rs
-        lvx            v3,cm33,rs
-        lvx            v4,cm49,rs
-        subi   rs,rs,64
-        stvx   v1,cm1,rd
-        stvx   v2,cm17,rd
-        stvx   v3,cm33,rd
-        stvx   v4,cm49,rd
-        subi   rd,rd,64
-        bdnz   1b
-
-        beq            4f                                      // no leftover quadwords
-        mtctr  r0
-3:                                                                     // loop over remaining quadwords (1-7)
-        lvx            v1,cm1,rs
-        subi   rs,rs,16
-        stvx   v1,cm1,rd
-        subi   rd,rd,16
-        bdnz   3b
-4:
-        mtspr  vrsave,rv                       // restore bitmap of live vr's
-        bne            cr6,LShortReverse16     // handle last 0-15 bytes if any
-        blr
-
-
-// Long, reverse, unaligned vector loop.
-
-LReverseVecUnal:
-        lvsl   vp,0,rs                         // get permute vector to shift left
-        lvx            v1,cm1,rs                       // v1 always looks ahead
-        b              1f
-        
-        .align 4                                       // align the inner loops
-1:                                                                     // loop over 64-byte chunks
-        lvx            v2,cm17,rs
-        dcbt   cm97,rs
-        lvx            v3,cm33,rs
-        dcbt   cm129,rs
-        lvx            v4,cm49,rs
-        subi   rs,rs,64
-        vperm  vw,v2,v1,vp
-        lvx            v1,cm1,rs
-        vperm  vx,v3,v2,vp
-        stvx   vw,cm1,rd
-        vperm  vy,v4,v3,vp
-        stvx   vx,cm17,rd
-        vperm  vw,v1,v4,vp
-        stvx   vy,cm33,rd
-        stvx   vw,cm49,rd
-        subi   rd,rd,64
-        bdnz   1b
-        
-        beq            3f                                      // no leftover quadwords
-        mtctr  r0
-2:                                                                     // loop over 1-3 quadwords
-        lvx            v2,cm17,rs
-        subi   rs,rs,16
-        vperm  vx,v2,v1,vp
-        vor            v1,v2,v2                        // v1 <- v2
-        stvx   vx,cm1,rd
-        subi   rd,rd,16
-        bdnz   2b
-3:
-        mtspr  vrsave,rv                       // restore bitmap of live vr's
-        bne            cr6,LShortReverse16     // handle last 0-15 bytes iff any
-        blr
-
-        COMMPAGE_DESCRIPTOR(bcopy_g4,_COMM_PAGE_BCOPY,kHasAltivec,k64Bit,kCommPageDCBA)
diff --git a/osfmk/ppc/commpage/bigcopy_970.s b/osfmk/ppc/commpage/bigcopy_970.s
deleted file mode 100644 (file)
index fa9e124..0000000
+++ /dev/null
@@ -1,499 +0,0 @@
-/*
- * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-/* ====================================
- * Very Long Operand BCOPY for Mac OS X
- * ====================================
- *
- * Version of 6/11/2003, tuned for the IBM 970.  This is for operands at
- * least several pages long.  It is called from bcopy()/memcpy()/memmove().
- *
- * We use the following additional strategies not used by the shorter
- * operand paths.  Mostly, we try to optimize for memory bandwidth:
- *     1. Use DCBZ128 to avoid reading destination lines.  Because this code
- *     resides on the commmpage, it can use a private interface with the
- *     kernel to minimize alignment exceptions if the destination is
- *     uncached.  The kernel will clear cr7 whenever it emulates a DCBZ or
- *     DCBZ128 on the commpage.  Thus we take at most one exception per call,
- *     which is amortized across the very long operand.
- *     2. Copy larger chunks per iteration to minimize R/W bus turnaround
- *     and maximize DRAM page locality (opening a new page is expensive.)
- *  3. Touch in one source chunk ahead with DCBT.  This is probably the
- *     least important change, and probably only helps restart the
- *     hardware stream at the start of each source page.
- *
- * Register usage.  Note the rather delicate way we assign multiple uses
- * to the same register.  Beware.
- *   r0  = temp (NB: cannot use r0 for any constant such as "c16")
- *   r3  = not used, as memcpy and memmove return 1st parameter as a value
- *   r4  = source ptr ("rs")
- *   r5  = count of bytes to move ("rc")
- *   r6  = constant 16 ("c16")
- *   r7  = constant 32 (""c32")
- *   r8  = constant 48 (""c48")
- *   r9  = constant 128 (""c128")
- *   r10 = vrsave ("rv")
- *   r11 = constant 256 (""c256")
- *   r12 = destination ptr ("rd")
- *      r13 = constant 384 (""c384")
- *      r14 = temp ("rx")
- *      r15 = temp ("rt")
- */
-#define rs     r4
-#define rd     r12
-#define rc     r5
-#define        rv      r10
-#define        rx      r14
-#define        rt      r15
-
-#define c16    r6
-#define c32    r7
-#define c48    r8
-#define        c128    r9
-#define        c256    r11
-#define        c384    r13
-
-// Offsets within the "red zone" (which is 224 bytes long):
-
-#define rzR13  -8
-#define rzR14  -12
-#define rzR15  -16
-#define rzV20  -32
-#define rzV21  -48
-#define rzV22  -64
-#define rzV23  -80
-#define rzV24  -96
-#define rzV25  -112
-#define rzV26  -128
-#define rzV27  -144
-#define rzV28  -160
-#define rzV29  -176
-#define rzV30  -192
-#define rzV31  -208
-
-
-#include <sys/appleapiopts.h>
-#include <ppc/asm.h>
-#include <machine/cpu_capabilities.h>
-#include <machine/commpage.h>
-
-        .text
-        .globl EXT(bigcopy_970)
-
-
-// Entry point.  This is a subroutine of bcopy().  When called:
-//     r4 = source ptr (aka "rs")
-// r12 = dest ptr (aka "rd")
-//     r5 = length (>= 16K bytes) (aka "rc")
-// 
-// We only do "forward" moves, ie non-overlapping or toward 0.
-//
-// We return with non-volatiles and r3 preserved.
-
-        .align         5
-bigcopy_970:
-        stw            r13,rzR13(r1)           // spill non-volatile regs we use to redzone
-        stw            r14,rzR14(r1)
-        stw            r15,rzR15(r1)
-        li             r0,rzV20
-        neg            rt,rd                           // start to cache-line-align destination
-        stvx   v20,r1,r0                       // we use all 32 VRs
-        li             r0,rzV21
-        stvx   v21,r1,r0
-        li             r0,rzV22
-        stvx   v22,r1,r0
-        li             r0,rzV23
-        stvx   v23,r1,r0
-        li             r0,rzV24
-        andi.  rt,rt,127                       // get #bytes to 128-byte align
-        stvx   v24,r1,r0
-        li             r0,rzV25
-        stvx   v25,r1,r0
-        li             r0,rzV26
-        sub            rc,rc,rt                        // adjust length by #bytes to align destination
-        stvx   v26,r1,r0
-        li             r0,rzV27
-        stvx   v27,r1,r0
-        li             r0,rzV28
-        mtctr  rt                                      // #bytes to align destination
-        stvx   v28,r1,r0
-        li             r0,rzV29
-        stvx   v29,r1,r0
-        li             r0,rzV30
-        stvx   v30,r1,r0
-        li             r0,rzV31
-        stvx   v31,r1,r0
-        beq            2f                                      // dest already 128-byte aligned
-        b              1f
-
-
-// Cache-line-align destination.
-
-        .align 5
-1:
-        lbz            r0,0(rs)
-        addi   rs,rs,1
-        stb            r0,0(rd)
-        addi   rd,rd,1
-        bdnz   1b
-
-
-// Is source 16-byte aligned?  Load constant offsets.
-
-2:
-        andi.  r0,rs,15                        // check source alignment
-        mfspr  rv,vrsave                       // save caller's bitmask
-        li             r0,-1                           // we use all 32 VRs
-        li             c16,16                          // load the constant offsets for x-form ops
-        li             c32,32
-        li             c48,48
-        li             c128,128
-        li             c256,256
-        li             c384,384
-        mtspr  vrsave,r0
-
-// NB: the kernel clears cr7 if it emulates a dcbz128 on the commpage,
-// and we dcbz only if cr7 beq is set.  We check to be sure the dcbz's
-// won't zero source bytes before we load them, since we zero before
-// loading as this is faster than zeroing after loading and before storing.
-
-        cmpw   cr7,r0,r0                       // initialize cr7 beq to use dcbz128
-        sub            rt,rs,rd                        // get (rs-rd)
-        cmplwi cr1,rt,512                      // are we moving down less than 512 bytes?
-        
-// Start fetching in source cache lines.
-
-        dcbt   c128,rs                         // first line already touched in
-        dcbt   c256,rs
-        dcbt   c384,rs
-        
-        bge++  cr1,3f                          // skip if not moving down less than 512 bytes
-        cmpw   cr7,c16,c32                     // cannot dcbz since it would zero source bytes
-3:
-        beq            LalignedLoop            // handle aligned sources
-        lvsl   v0,0,rs                         // get permute vector for left shift
-        lvxl   v1,0,rs                         // prime the loop
-        b              LunalignedLoop          // enter unaligned loop
-
-
-// Main loop for unaligned operands.  We loop over 384-byte chunks (3 cache lines)
-// since we need a few VRs for permuted destination QWs and the permute vector.
-
-        .align 5
-LunalignedLoop:
-        subi   rc,rc,384                       // decrement byte count
-        addi   rx,rs,384                       // get address of next chunk
-        lvxl   v2,c16,rs
-        lvxl   v3,c32,rs
-        bne--  cr7,1f                          // skip dcbz's if cr7 beq has been turned off by kernel
-        dcbz128        0,rd                            // (also skip if moving down less than 512 bytes)
-        bne--  cr7,1f                          // catch it first time through
-        dcbz128        c128,rd
-        dcbz128        c256,rd
-1:
-        addi   rt,rs,64
-        dcbt   0,rx                            // touch in next chunk
-        dcbt   c128,rx
-        dcbt   c256,rx
-        lvxl   v4,c48,rs
-        addi   rs,rs,128
-        lvxl   v5,0,rt
-        cmplwi rc,384                          // another chunk to go?
-        lvxl   v6,c16,rt
-        lvxl   v7,c32,rt
-        lvxl   v8,c48,rt
-        addi   rt,rs,64
-        vperm  v25,v1,v2,v0
-        lvxl   v9,0,rs
-        lvxl   v10,c16,rs
-        vperm  v26,v2,v3,v0
-        lvxl   v11,c32,rs
-        lvxl   v12,c48,rs
-        vperm  v27,v3,v4,v0
-        addi   rs,rs,128
-        lvxl   v13,0,rt
-        lvxl   v14,c16,rt
-        vperm  v28,v4,v5,v0
-        lvxl   v15,c32,rt
-        lvxl   v16,c48,rt
-        vperm  v29,v5,v6,v0
-        addi   rt,rs,64
-        lvxl   v17,0,rs
-        lvxl   v18,c16,rs
-        vperm  v30,v6,v7,v0
-        lvxl   v19,c32,rs
-        lvxl   v20,c48,rs
-        vperm  v31,v7,v8,v0
-        addi   rs,rs,128
-        lvxl   v21,0,rt
-        lvxl   v22,c16,rt
-        vperm  v2,v8,v9,v0
-        lvxl   v23,c32,rt
-        lvxl   v24,c48,rt
-        vperm  v3,v9,v10,v0
-        lvx            v1,0,rs                         // get 1st qw of next chunk
-        vperm  v4,v10,v11,v0
-        
-        addi   rt,rd,64
-        stvxl  v25,0,rd
-        stvxl  v26,c16,rd
-        vperm  v5,v11,v12,v0
-        stvxl  v27,c32,rd
-        stvxl  v28,c48,rd
-        vperm  v6,v12,v13,v0
-        addi   rd,rd,128
-        stvxl  v29,0,rt
-        stvxl  v30,c16,rt
-        vperm  v7,v13,v14,v0
-        stvxl  v31,c32,rt
-        stvxl  v2,c48,rt
-        vperm  v8,v14,v15,v0
-        addi   rt,rd,64
-        stvxl  v3,0,rd
-        stvxl  v4,c16,rd
-        vperm  v9,v15,v16,v0
-        stvxl  v5,c32,rd
-        stvxl  v6,c48,rd
-        vperm  v10,v16,v17,v0
-        addi   rd,rd,128
-        stvxl  v7,0,rt
-        vperm  v11,v17,v18,v0
-        stvxl  v8,c16,rt
-        stvxl  v9,c32,rt
-        vperm  v12,v18,v19,v0
-        stvxl  v10,c48,rt
-        addi   rt,rd,64
-        vperm  v13,v19,v20,v0
-        stvxl  v11,0,rd
-        stvxl  v12,c16,rd
-        vperm  v14,v20,v21,v0
-        stvxl  v13,c32,rd
-        vperm  v15,v21,v22,v0
-        stvxl  v14,c48,rd
-        vperm  v16,v22,v23,v0
-        addi   rd,rd,128
-        stvxl  v15,0,rt
-        vperm  v17,v23,v24,v0
-        stvxl  v16,c16,rt
-        vperm  v18,v24,v1,v0
-        stvxl  v17,c32,rt
-        stvxl  v18,c48,rt
-        bge++  LunalignedLoop          // loop if another 384 bytes to go
-
-// End of unaligned main loop.  Handle up to 384 leftover bytes.
-
-        srwi.  r0,rc,5                         // get count of 32-byte chunks remaining
-        beq            Ldone                           // none
-        rlwinm rc,rc,0,0x1F            // mask count down to 0..31 leftover bytes
-        mtctr  r0
-1:                                                                     // loop over 32-byte chunks
-        lvx            v2,c16,rs
-        lvx            v3,c32,rs
-        addi   rs,rs,32
-        vperm  v8,v1,v2,v0
-        vperm  v9,v2,v3,v0
-        vor            v1,v3,v3                        // v1 <- v3
-        stvx   v8,0,rd
-        stvx   v9,c16,rd
-        addi   rd,rd,32
-        bdnz   1b
-        
-        b              Ldone
-        
-        
-// Aligned loop.  Destination is 128-byte aligned, and source is 16-byte
-// aligned.  Loop over 512-byte chunks (4 cache lines.)
-
-        .align 5
-LalignedLoop:
-        subi   rc,rc,512                       // decrement count
-        addi   rx,rs,512                       // address of next chunk
-        lvxl   v1,0,rs
-        lvxl   v2,c16,rs
-        bne--  cr7,1f                          // skip dcbz's if cr7 beq has been turned off by kernel
-        dcbz128        0,rd                            // (also skip if moving down less than 512 bytes)
-        bne--  cr7,1f                          // catch it first time through
-        dcbz128        c128,rd
-        dcbz128        c256,rd
-        dcbz128        c384,rd
-1:
-        addi   rt,rs,64
-        dcbt   0,rx                            // touch in next chunk
-        dcbt   c128,rx
-        dcbt   c256,rx
-        dcbt   c384,rx
-        lvxl   v3,c32,rs
-        lvxl   v4,c48,rs
-        addi   rs,rs,128
-        lvxl   v5,0,rt
-        cmplwi rc,512                          // another chunk to go?
-        lvxl   v6,c16,rt
-        lvxl   v7,c32,rt
-        lvxl   v8,c48,rt
-        addi   rt,rs,64
-        lvxl   v9,0,rs
-        lvxl   v10,c16,rs
-        lvxl   v11,c32,rs
-        lvxl   v12,c48,rs
-        addi   rs,rs,128
-        lvxl   v13,0,rt
-        lvxl   v14,c16,rt
-        lvxl   v15,c32,rt
-        lvxl   v16,c48,rt
-        addi   rt,rs,64
-        lvxl   v17,0,rs
-        lvxl   v18,c16,rs
-        lvxl   v19,c32,rs
-        lvxl   v20,c48,rs
-        addi   rs,rs,128
-        lvxl   v21,0,rt
-        lvxl   v22,c16,rt
-        lvxl   v23,c32,rt
-        lvxl   v24,c48,rt
-        addi   rt,rs,64
-        lvxl   v25,0,rs
-        lvxl   v26,c16,rs
-        lvxl   v27,c32,rs
-        lvxl   v28,c48,rs
-        addi   rs,rs,128
-        lvxl   v29,0,rt
-        lvxl   v30,c16,rt
-        lvxl   v31,c32,rt
-        lvxl   v0,c48,rt
-
-        addi   rt,rd,64
-        stvxl  v1,0,rd
-        stvxl  v2,c16,rd
-        stvxl  v3,c32,rd
-        stvxl  v4,c48,rd
-        addi   rd,rd,128
-        stvxl  v5,0,rt
-        stvxl  v6,c16,rt
-        stvxl  v7,c32,rt
-        stvxl  v8,c48,rt
-        addi   rt,rd,64
-        stvxl  v9,0,rd
-        stvxl  v10,c16,rd
-        stvxl  v11,c32,rd
-        stvxl  v12,c48,rd
-        addi   rd,rd,128
-        stvxl  v13,0,rt
-        stvxl  v14,c16,rt
-        stvxl  v15,c32,rt
-        stvxl  v16,c48,rt
-        addi   rt,rd,64
-        stvxl  v17,0,rd
-        stvxl  v18,c16,rd
-        stvxl  v19,c32,rd
-        stvxl  v20,c48,rd
-        addi   rd,rd,128
-        stvxl  v21,0,rt
-        stvxl  v22,c16,rt
-        stvxl  v23,c32,rt
-        stvxl  v24,c48,rt
-        addi   rt,rd,64
-        stvxl  v25,0,rd
-        stvxl  v26,c16,rd
-        stvxl  v27,c32,rd
-        stvxl  v28,c48,rd
-        addi   rd,rd,128
-        stvxl  v29,0,rt
-        stvxl  v30,c16,rt
-        stvxl  v31,c32,rt
-        stvxl  v0,c48,rt
-        bge++  LalignedLoop            // loop if another 512 bytes to go
-
-// End of aligned main loop.  Handle up to 511 leftover bytes.
-
-        srwi.  r0,rc,5                         // get count of 32-byte chunks remaining
-        beq            Ldone                           // none
-        rlwinm rc,rc,0,0x1F            // mask count down to 0..31 leftover bytes
-        mtctr  r0
-1:                                                                     // loop over 32-byte chunks
-        lvx            v1,0,rs
-        lvx            v2,c16,rs
-        addi   rs,rs,32
-        stvx   v1,0,rd
-        stvx   v2,c16,rd
-        addi   rd,rd,32
-        bdnz   1b
-
-
-// Done, except for 0..31 leftovers at end.  Restore non-volatiles.
-//     rs = source ptr
-//     rd = dest ptr
-//     rc = count (0..31)
-//     rv = caller's vrsave
-
-Ldone:
-        cmpwi  rc,0                            // any leftover bytes?
-        lwz            r13,rzR13(r1)           // restore non-volatiles from redzone
-        lwz            r14,rzR14(r1)
-        lwz            r15,rzR15(r1)
-        li             r0,rzV20
-        lvx            v20,r1,r0
-        li             r0,rzV21
-        lvx            v21,r1,r0
-        li             r0,rzV22
-        lvx            v22,r1,r0
-        li             r0,rzV23
-        lvx            v23,r1,r0
-        li             r0,rzV24
-        lvx            v24,r1,r0
-        li             r0,rzV25
-        lvx            v25,r1,r0
-        li             r0,rzV26
-        lvx            v26,r1,r0
-        li             r0,rzV27
-        lvx            v27,r1,r0
-        li             r0,rzV28
-        lvx            v28,r1,r0
-        li             r0,rzV29
-        lvx            v29,r1,r0
-        li             r0,rzV30
-        lvx            v30,r1,r0
-        li             r0,rzV31
-        lvx            v31,r1,r0
-        mtspr  vrsave,rv                       // restore caller's bitmask
-        beqlr                                          // done if no leftover bytes
-        
-
-// Handle 1..31 leftover bytes at end.
-
-        mtctr  rc                                      // set up loop count
-        b              1f
-        
-        .align 5
-1:
-        lbz            r0,0(rs)
-        addi   rs,rs,1
-        stb            r0,0(rd)
-        addi   rd,rd,1
-        bdnz   1b
-        
-        blr
-
-
-        COMMPAGE_DESCRIPTOR(bigcopy_970,_COMM_PAGE_BIGCOPY,0,0,0) // load on all machines for now
-
diff --git a/osfmk/ppc/commpage/bzero_128.s b/osfmk/ppc/commpage/bzero_128.s
deleted file mode 100644 (file)
index f97db60..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-
-#define        ASSEMBLER
-#include <sys/appleapiopts.h>
-#include <ppc/asm.h>
-#include <machine/cpu_capabilities.h>
-#include <machine/commpage.h>
-
-        .text
-        .align 2
-        .globl EXT(bzero_128)
-        
-
-// *********************
-// * B Z E R O _ 1 2 8 *
-// *********************
-//
-// For 64-bit processors with a 128-byte cache line.
-//
-// Register use:
-//             r0 = zero
-//             r3 = original ptr, not changed since memset returns it
-//             r4 = count of bytes to set
-//             r9 = working operand ptr
-// We do not touch r2 and r10-r12, which some callers depend on.
-
-        .align 5
-bzero_128:                                             // void bzero(void *b, size_t len);
-        cmplwi cr7,r4,128              // too short for DCBZ128?
-        li             r0,0                    // get a 0
-        neg            r5,r3                   // start to compute #bytes to align
-        mr             r9,r3                   // make copy of operand ptr (can't change r3)
-        blt            cr7,Ltail               // length < 128, too short for DCBZ
-
-// At least 128 bytes long, so compute alignment and #cache blocks.
-
-        andi.  r5,r5,0x7F              // r5 <-  #bytes to 128-byte align
-        sub            r4,r4,r5                // adjust length
-        srwi   r8,r4,7                 // r8 <- 128-byte chunks
-        rlwinm r4,r4,0,0x7F    // mask length down to remaining bytes
-        mtctr  r8                              // set up loop count
-        beq            Ldcbz                   // skip if already aligned (r8!=0)
-        
-// 128-byte align
-
-        mtcrf  0x01,r5                 // start to move #bytes to align to cr6 and cr7
-        cmpwi  cr1,r8,0                // any 128-byte cache lines to 0?
-        mtcrf  0x02,r5
-        
-        bf             31,1f                   // byte?
-        stb            r0,0(r9)
-        addi   r9,r9,1
-1:
-        bf             30,2f                   // halfword?
-        sth            r0,0(r9)
-        addi   r9,r9,2
-2:
-        bf             29,3f                   // word?
-        stw            r0,0(r9)
-        addi   r9,r9,4
-3:
-        bf             28,4f                   // doubleword?
-        std            r0,0(r9)
-        addi   r9,r9,8
-4:
-        bf             27,5f                   // quadword?
-        std            r0,0(r9)
-        std            r0,8(r9)
-        addi   r9,r9,16
-5:
-        bf             26,6f                   // 32-byte chunk?
-        std            r0,0(r9)
-        std            r0,8(r9)
-        std            r0,16(r9)
-        std            r0,24(r9)
-        addi   r9,r9,32
-6:
-        bf             25,7f                   // 64-byte chunk?
-        std            r0,0(r9)
-        std            r0,8(r9)
-        std            r0,16(r9)
-        std            r0,24(r9)
-        std            r0,32(r9)
-        std            r0,40(r9)
-        std            r0,48(r9)
-        std            r0,56(r9)
-        addi   r9,r9,64
-7:
-        beq            cr1,Ltail               // no chunks to dcbz128
-
-// Loop doing 128-byte version of DCBZ instruction.
-// NB: if the memory is cache-inhibited, the kernel will clear cr7
-// when it emulates the alignment exception.  Eventually, we may want
-// to check for this case.
-
-Ldcbz:
-        dcbz128        0,r9                    // zero another 32 bytes
-        addi   r9,r9,128
-        bdnz   Ldcbz
-
-// Store trailing bytes.
-//             r0 = 0
-//             r4 = count
-//             r9 = ptr
-
-Ltail:
-        srwi.  r5,r4,4                 // r5 <- 16-byte chunks to 0
-        mtcrf  0x01,r4                 // remaining byte count to cr7
-        mtctr  r5
-        beq            2f                              // skip if no 16-byte chunks
-1:                                                             // loop over 16-byte chunks
-        std            r0,0(r9)
-        std            r0,8(r9)
-        addi   r9,r9,16
-        bdnz   1b
-2:
-        bf             28,4f                   // 8-byte chunk?
-        std            r0,0(r9)
-        addi   r9,r9,8
-4:
-        bf             29,5f                   // word?
-        stw            r0,0(r9)
-        addi   r9,r9,4
-5:
-        bf             30,6f                   // halfword?
-        sth            r0,0(r9)
-        addi   r9,r9,2
-6:
-        bflr   31                              // byte?
-        stb            r0,0(r9)
-        blr
-
-        COMMPAGE_DESCRIPTOR(bzero_128,_COMM_PAGE_BZERO,kCache128+k64Bit,0,kCommPageMTCRF)
diff --git a/osfmk/ppc/commpage/bzero_32.s b/osfmk/ppc/commpage/bzero_32.s
deleted file mode 100644 (file)
index 8201200..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-
-#define        ASSEMBLER
-#include <sys/appleapiopts.h>
-#include <ppc/asm.h>
-#include <machine/cpu_capabilities.h>
-#include <machine/commpage.h>
-
-        .text
-        .align 2
-        .globl EXT(bzero_32)
-        
-
-// *******************
-// * B Z E R O _ 3 2 *
-// *******************
-//
-// For 32-bit processors with a 32-byte cache line.
-//
-// Register use:
-//             r0 = zero
-//             r3 = original ptr, not changed since memset returns it
-//             r4 = count of bytes to set
-//             r9 = working operand ptr
-// We do not touch r2 and r10-r12, which some callers depend on.
-
-        .align 5
-bzero_32:                                              // void bzero(void *b, size_t len);
-        cmplwi cr7,r4,32               // too short for DCBZ?
-        li             r0,0                    // get a 0
-        neg            r5,r3                   // start to compute #bytes to align
-        mr             r9,r3                   // make copy of operand ptr (can't change r3)
-        blt            cr7,Ltail               // length < 32, too short for DCBZ
-
-// At least 32 bytes long, so compute alignment and #cache blocks.
-
-        andi.  r5,r5,0x1F              // r5 <-  #bytes to 32-byte align
-        sub            r4,r4,r5                // adjust length
-        srwi   r8,r4,5                 // r8 <- #32-byte chunks
-        cmpwi  cr1,r8,0                // any chunks?
-        mtctr  r8                              // set up loop count
-        beq            1f                              // skip if already 32-byte aligned (r8!=0)
-        
-// 32-byte align.  We just store 32 0s, rather than test and use conditional
-// branches.  We've already stored the first few bytes above.
-
-        stw            r0,0(r9)
-        stw            r0,4(r9)
-        stw            r0,8(r9)
-        stw            r0,12(r9)
-        stw            r0,16(r9)
-        stw            r0,20(r9)
-        stw            r0,24(r9)
-        stw            r0,28(r9)
-        add            r9,r9,r5                // now rp is 32-byte aligned
-        beq            cr1,Ltail               // skip if no 32-byte chunks
-
-// Loop doing 32-byte version of DCBZ instruction.
-// NB: we take alignment exceptions on cache-inhibited memory.
-// The kernel could be changed to zero cr7 when emulating a
-// dcbz (as it does on 64-bit processors), so we could avoid all
-// but the first.
-
-1:
-        andi.  r5,r4,0x1F              // will there be trailing bytes?
-        b              2f
-        .align 4
-2:
-        dcbz   0,r9                    // zero another 32 bytes
-        addi   r9,r9,32
-        bdnz   2b
-        
-        beqlr                                  // no trailing bytes
-
-// Store trailing bytes.
-
-Ltail:
-        andi.  r5,r4,0x10              // test bit 27 separately
-        mtcrf  0x01,r4                 // remaining byte count to cr7
-        
-        beq            2f                              // no 16-byte chunks
-        stw            r0,0(r9)
-        stw            r0,4(r9)
-        stw            r0,8(r9)
-        stw            r0,12(r9)
-        addi   r9,r9,16
-2:
-        bf             28,4f                   // 8-byte chunk?
-        stw            r0,0(r9)
-        stw            r0,4(r9)
-        addi   r9,r9,8
-4:
-        bf             29,5f                   // word?
-        stw            r0,0(r9)
-        addi   r9,r9,4
-5:
-        bf             30,6f                   // halfword?
-        sth            r0,0(r9)
-        addi   r9,r9,2
-6:
-        bflr   31                              // byte?
-        stb            r0,0(r9)
-        blr
-
-        COMMPAGE_DESCRIPTOR(bzero_32,_COMM_PAGE_BZERO,kCache32,0,0)
diff --git a/osfmk/ppc/commpage/cacheflush.s b/osfmk/ppc/commpage/cacheflush.s
deleted file mode 100644 (file)
index a556ad6..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-
-#define        ASSEMBLER
-#include <sys/appleapiopts.h>
-#include <ppc/asm.h>                                   // EXT, LEXT
-#include <machine/cpu_capabilities.h>
-#include <machine/commpage.h>
-
-        .text
-        .align 2
-        .globl EXT(commpage_flush_dcache)
-        .globl EXT(commpage_flush_icache)
-
-
-// *********************************************
-// * C O M M P A G E _ F L U S H _ D C A C H E *
-// *********************************************
-//
-//     r3 = ptr to 1st byte to flush
-//     r4 = length to flush (may be 0)
-
-commpage_flush_dcache:
-        cmpwi  r4,0                    // length 0?
-        lhz            r5,_COMM_PAGE_CACHE_LINESIZE(0)
-        subi   r9,r5,1                 // get (linesize-1)
-        and            r0,r3,r9                // get offset within line of 1st byte
-        add            r4,r4,r0                // adjust length so we flush them all
-        add            r4,r4,r9                // round length up...
-        andc   r4,r4,r9                // ...to multiple of cache lines
-        beqlr--                                        // length was 0, so exit
-1:
-        sub.   r4,r4,r5                // more to go?
-        dcbf   0,r3                    // flush another line
-        add            r3,r3,r5
-        bne            1b
-        sync                                   // make sure lines are flushed before we return
-        blr
-        
-        COMMPAGE_DESCRIPTOR(commpage_flush_dcache,_COMM_PAGE_FLUSH_DCACHE,0,0,0)       // matches all CPUs
-        
-        
-// *********************************************
-// * C O M M P A G E _ F L U S H _ I C A C H E *
-// *********************************************
-//
-//     r3 = ptr to 1st byte to flush
-//     r4 = length to flush (may be 0)
-
-commpage_flush_icache:
-        cmpwi  r4,0                    // length 0?
-        lhz            r5,_COMM_PAGE_CACHE_LINESIZE(0)
-        subi   r9,r5,1                 // get (linesize-1)
-        and            r0,r3,r9                // get offset within line of 1st byte
-        add            r4,r4,r0                // adjust length so we flush them all
-        mr             r7,r3                   // copy ptr
-        add            r4,r4,r9                // round length up...
-        andc   r4,r4,r9                // ...to multiple of cache lines
-        mr             r6,r4                   // copy length
-        beqlr--                                        // length was 0, so exit
-1:
-        sub.   r4,r4,r5                // more to go?
-        dcbf   0,r3                    // flush another line
-        add            r3,r3,r5
-        bne            1b
-        sync                                   // make sure lines are flushed
-2:
-        sub.   r6,r6,r5                // more to go?
-        icbi   0,r7
-        add            r7,r7,r5
-        bne            2b
-        isync                                  // make sure we haven't prefetched old instructions
-        
-        blr
-
-        COMMPAGE_DESCRIPTOR(commpage_flush_icache,_COMM_PAGE_FLUSH_ICACHE,0,0,0)       // matches all CPUs
-
-        
diff --git a/osfmk/ppc/commpage/commpage.c b/osfmk/ppc/commpage/commpage.c
deleted file mode 100644 (file)
index 1c67e50..0000000
+++ /dev/null
@@ -1,492 +0,0 @@
-/*
- * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-
-/*
- *     Here's what to do if you want to add a new routine to the comm page:
- *
- *             1. Add a definition for it's address in osfmk/ppc/cpu_capabilities.h,
- *                being careful to reserve room for future expansion.
- *
- *             2. Write one or more versions of the routine, each with it's own
- *                commpage_descriptor.  The tricky part is getting the "special",
- *                "musthave", and "canthave" fields right, so that exactly one
- *                version of the routine is selected for every machine.
- *                The source files should be in osfmk/ppc/commpage/.
- *
- *             3. Add a ptr to your new commpage_descriptor(s) in the "routines"
- *                array in commpage_populate().  Of course, you'll also have to
- *                declare them "extern" in commpage_populate().
- *
- *             4. Write the code in Libc to use the new routine.
- */
-
-#include <mach/mach_types.h>
-#include <mach/machine.h>
-#include <ppc/exception.h>
-#include <ppc/machine_routines.h>
-#include <machine/cpu_capabilities.h>
-#include <machine/commpage.h>
-#include <machine/pmap.h>
-#include <vm/vm_kern.h>
-#include <mach/vm_map.h>
-
-static char    *next = NULL;                   // next available byte in comm page
-static int             cur_routine = 0;                // comm page address of "current" routine
-static int             matched;                                // true if we've found a match for "current" routine
-
-int            _cpu_capabilities = 0;                  // define the capability vector
-
-char   *commPagePtr = NULL;                    // virtual address of comm page in kernel map
-
-
-/* Allocate the commpages and add to the shared submap created by vm:
- *     1. allocate pages in the kernel map (RW)
- *     2. wire them down
- *     3. make a memory entry out of them
- *     4. map that entry into the shared comm region map (R-only)
- */
-static void*
-commpage_allocate( void )
-{
-    extern     vm_map_t        com_region_map;                         // the shared submap, set up in vm init
-    vm_offset_t                        kernel_addr;                            // address of commpage in kernel map
-    vm_offset_t                        zero = 0;
-    vm_size_t                  size = _COMM_PAGE_AREA_USED;    // size actually populated
-    ipc_port_t                 handle;
-    
-    if (com_region_map == NULL)
-        panic("commpage map is null");
-    
-    if (vm_allocate(kernel_map,&kernel_addr,_COMM_PAGE_AREA_USED,VM_FLAGS_ANYWHERE))
-        panic("cannot allocate commpage");
-        
-    if (vm_map_wire(kernel_map,kernel_addr,kernel_addr+_COMM_PAGE_AREA_USED,VM_PROT_DEFAULT,FALSE))
-        panic("cannot wire commpage");
-    
-    if (mach_make_memory_entry(        kernel_map,                     // target map
-                                &size,                         // size
-                                kernel_addr,           // offset (address in kernel map)
-                                VM_PROT_DEFAULT,       // map it RW
-                                &handle,                       // this is the object handle we get
-                                NULL ))                                // parent_entry
-        panic("cannot make entry for commpage");
-    
-    if (vm_map_64(     com_region_map,                                 // target map (shared submap)
-                    &zero,                                                     // address (map into 1st page in submap)
-                    _COMM_PAGE_AREA_USED,                      // size
-                    0,                                                         // mask
-                    VM_FLAGS_FIXED,                                    // flags (it must be 1st page in submap)
-                    handle,                                                    // port is the memory entry we just made
-                    0,                                                         // offset (map 1st page in memory entry)
-                    FALSE,                                                     // copy
-                    VM_PROT_READ,                                      // cur_protection (R-only in user map)
-                    VM_PROT_READ,                                      // max_protection
-                    VM_INHERIT_SHARE ))                                // inheritance
-        panic("cannot map commpage");
-        
-    ipc_port_release(handle);
-        
-    return (void*) kernel_addr;                                                // return address in kernel map
-}
-
-
-/* Get address (in kernel map) of a commpage field. */
-
-static void*
-commpage_addr_of(
-    int        addr_at_runtime )
-{
-    return     (void*) (commPagePtr + addr_at_runtime - _COMM_PAGE_BASE_ADDRESS);
-}
-
-
-/* Determine number of CPUs on this system.  We cannot rely on
- * machine_info.max_cpus this early in the boot.
- */
-static int
-commpage_cpus( void )
-{
-    int                cpus;
-    
-    cpus = ml_get_max_cpus();                  // NB: this call can block
-    
-    if (cpus == 0)
-        panic("commpage cpus==0");
-    if (cpus > 0xFF)
-        cpus = 0xFF;
-    
-    return     cpus;
-}
-
-
-/* Initialize kernel version of _cpu_capabilities vector (used by KEXTs.) */
-
-static void
-commpage_init_cpu_capabilities( void )
-{
-    struct per_proc_info *pp;
-    procFeatures       *pfp;
-    int        cpus;
-    int        available;
-
-    pp = per_proc_info;                                        // use CPU 0's per-proc
-    pfp = &pp->pf;                                             // point to features in per-proc
-    available = pfp->Available;
-
-    // If AltiVec is disabled make sure it is not reported as available.
-    if ((available & pfAltivec) == 0) {
-        _cpu_capabilities &= ~kHasAltivec;
-    }
-
-    if (_cpu_capabilities & kDcbaAvailable) {          // if this processor has DCBA, time it...
-        _cpu_capabilities |= commpage_time_dcba();     // ...and set kDcbaRecomended if it helps.
-    }
-
-    cpus = commpage_cpus();                            // how many CPUs do we have
-    if (cpus == 1) _cpu_capabilities |= kUP;
-    _cpu_capabilities |= (cpus << kNumCPUsShift);
-}
-
-
-/* Copy data into commpage. */
-
- void
-commpage_stuff(
-    int        address,
-    void       *source,
-    int        length  )
-{    
-    char       *dest = commpage_addr_of(address);
-    
-    if (dest < next)
-        panic("commpage overlap: %08 - %08X", dest, next);
-    
-    bcopy((char*)source,dest,length);
-    
-    next = (dest + length);
-}
-
-
-/* Modify commpage code in-place for this specific platform. */
-
-static void
-commpage_change(
-    uint32_t   *ptr,
-    int                bytes,
-    uint32_t   search_mask, 
-    uint32_t   search_pattern,
-    uint32_t   new_mask,
-    uint32_t   new_pattern,
-    int                        (*check)(uint32_t instruction)  )
-{
-    int                        words = bytes >> 2;
-    uint32_t   word;
-    int                        found_one = 0;
-
-    while( (--words) >= 0 ) {
-        word = *ptr;
-        if ((word & search_mask)==search_pattern) {
-            if ((check==NULL) || (check(word))) {      // check instruction if necessary
-                found_one = 1;
-                word &= ~new_mask;
-                word |= new_pattern;
-                *ptr = word;
-            }
-        }
-        ptr++;
-    }
-    
-    if (!found_one)
-        panic("commpage opcode not found");
-}
-
-
-/* Check to see if exactly one bit is set in a MTCRF instruction's FXM field.
- */
-static int
-commpage_onebit(
-    uint32_t   mtcrf )
-{
-    int x = (mtcrf >> 12) & 0xFF;              // isolate the FXM field of the MTCRF
-    
-    if (x==0)
-        panic("commpage bad mtcrf");
-        
-    return     (x & (x-1))==0 ? 1 : 0;         // return 1 iff exactly 1 bit set in FXM field
-}
-
-
-/* Handle kCommPageDCBA bit: this routine uses DCBA.  If the machine we're
- * running on doesn't benefit from use of that instruction, map them to NOPs
- * in the commpage.
- */
-static void
-commpage_handle_dcbas(
-    int        address,
-    int        length  )
-{
-    uint32_t   *ptr, search_mask, search, replace_mask, replace;
-    
-    if ((_cpu_capabilities & kDcbaAvailable) == 0) {
-        ptr = commpage_addr_of(address);
-        
-        search_mask =  0xFC0007FE;             // search x-form opcode bits
-        search =               0x7C0005EC;             // for a DCBA
-        replace_mask =         0xFFFFFFFF;             // replace all bits...
-        replace =              0x60000000;             // ...with a NOP
-    
-        commpage_change(ptr,length,search_mask,search,replace_mask,replace,NULL);
-    }
-}
-
-
-/* Handle kCommPageSYNC bit: this routine uses SYNC or LWSYNC.  If we're
- * running on a UP machine, map them to NOPs.
- */
-static void
-commpage_handle_syncs(
-    int        address, 
-    int        length  )
-{
-    uint32_t   *ptr, search_mask, search, replace_mask, replace;
-    
-    if (_NumCPUs() == 1) {
-        ptr = commpage_addr_of(address);
-        
-        search_mask =  0xFC0007FE;             // search x-form opcode bits
-        search =               0x7C0004AC;             // for a SYNC or LWSYNC
-        replace_mask =         0xFFFFFFFF;             // replace all bits...
-        replace =              0x60000000;             // ...with a NOP
-    
-        commpage_change(ptr,length,search_mask,search,replace_mask,replace,NULL);
-    }
-}
-
-
-/* Handle kCommPageMTCRF bit.  When this was written (3/03), the assembler did not
- * recognize the special form of MTCRF instructions, in which exactly one bit is set
- * in the 8-bit mask field.  Bit 11 of the instruction should be set in this case,
- * since the 970 and probably other 64-bit processors optimize it.  Once the assembler
- * has been updated this code can be removed, though it need not be.
- */
-static void
-commpage_handle_mtcrfs(
-    int        address, 
-    int        length  )
-{
-    uint32_t   *ptr, search_mask, search, replace_mask, replace;
-    
-    if (_cpu_capabilities & k64Bit) {
-        ptr = commpage_addr_of(address);
-        
-        search_mask =  0xFC0007FE;             // search x-form opcode bits
-        search =               0x7C000120;             // for a MTCRF
-        replace_mask =         0x00100000;             // replace bit 11...
-        replace =              0x00100000;             // ...with a 1-bit
-    
-        commpage_change(ptr,length,search_mask,search,replace_mask,replace,commpage_onebit);
-    }
-}
-
-
-/* Copy a routine into comm page if it matches running machine.
- */
-static void
-commpage_stuff_routine(
-    commpage_descriptor        *rd     )
-{
-    char       *routine_code;
-    int                must,cant;
-    
-    if (rd->commpage_address != cur_routine) {
-        if ((cur_routine!=0) && (matched==0))
-            panic("commpage no match");
-        cur_routine = rd->commpage_address;
-        matched = 0;
-    }
-    
-    must = _cpu_capabilities & rd->musthave;
-    cant = _cpu_capabilities & rd->canthave;
-    
-    if ((must == rd->musthave) && (cant == 0)) {
-        if (matched)
-            panic("commpage duplicate matches");
-        matched = 1;
-        routine_code = ((char*)rd) + rd->code_offset;
-        
-        commpage_stuff(rd->commpage_address,routine_code,rd->code_length);
-        
-        if (rd->special & kCommPageDCBA)
-            commpage_handle_dcbas(rd->commpage_address,rd->code_length);
-            
-        if (rd->special & kCommPageSYNC)
-            commpage_handle_syncs(rd->commpage_address,rd->code_length);
-            
-        if (rd->special & kCommPageMTCRF)
-            commpage_handle_mtcrfs(rd->commpage_address,rd->code_length);
-    }
-}
-
-
-/* Fill in commpage: called once, during kernel initialization, from the
- * startup thread before user-mode code is running.
- * See the top of this file for a list of what you have to do to add
- * a new routine to the commpage.
- */  
-void
-commpage_populate( void )
-{
-    char       c1;
-    short      c2;
-    addr64_t c8;
-    static double      two52 = 1048576.0 * 1048576.0 * 4096.0; // 2**52
-    static double      ten6 = 1000000.0;                                               // 10**6
-    commpage_descriptor        **rd;
-    short      version = _COMM_PAGE_THIS_VERSION;
-    
-    
-    commPagePtr = (char*) commpage_allocate();
-    
-    commpage_init_cpu_capabilities();
-
-
-    /* Stuff in the constants.  We move things into the comm page in strictly
-     * ascending order, so we can check for overlap and panic if so.
-     */
-     
-    commpage_stuff(_COMM_PAGE_VERSION,&version,2);
-
-    commpage_stuff(_COMM_PAGE_CPU_CAPABILITIES,&_cpu_capabilities,sizeof(int));
-    
-    c1 = (_cpu_capabilities & kHasAltivec) ? -1 : 0;
-    commpage_stuff(_COMM_PAGE_ALTIVEC,&c1,1);
-    
-    c1 = (_cpu_capabilities & k64Bit) ? -1 : 0;
-    commpage_stuff(_COMM_PAGE_64_BIT,&c1,1);
-    
-    if (_cpu_capabilities & kCache32)
-        c2 = 32;
-    else if (_cpu_capabilities & kCache64)
-        c2 = 64;
-    else if (_cpu_capabilities & kCache128)
-        c2 = 128;
-    commpage_stuff(_COMM_PAGE_CACHE_LINESIZE,&c2,2);
-    
-    commpage_stuff(_COMM_PAGE_2_TO_52,&two52,8);
-    
-    commpage_stuff(_COMM_PAGE_10_TO_6,&ten6,8);
-    
-    c8 = 0;                                                                                                    // 0 timestamp means "disabled"
-    commpage_stuff(_COMM_PAGE_TIMEBASE,&c8,8);
-    commpage_stuff(_COMM_PAGE_TIMESTAMP,&c8,8);
-    commpage_stuff(_COMM_PAGE_SEC_PER_TICK,&c8,8);
-
-
-    /* Now the routines.  We try each potential routine in turn,
-     * and copy in any that "match" the platform we are running on.
-     * We require that exactly one routine match for each slot in the
-     * comm page, and panic if not.
-     *
-     * The check for overlap assumes that these routines are
-     * in strictly ascending order, sorted by address in the
-     * comm page.
-     */
-
-    extern     commpage_descriptor     mach_absolute_time_32;
-    extern     commpage_descriptor     mach_absolute_time_64;
-    extern     commpage_descriptor     spinlock_32_try_mp;
-    extern     commpage_descriptor     spinlock_32_try_up;
-    extern     commpage_descriptor     spinlock_64_try_mp;
-    extern     commpage_descriptor     spinlock_64_try_up;
-    extern     commpage_descriptor     spinlock_32_lock_mp;
-    extern     commpage_descriptor     spinlock_32_lock_up;
-    extern     commpage_descriptor     spinlock_64_lock_mp;
-    extern     commpage_descriptor     spinlock_64_lock_up;
-    extern     commpage_descriptor     spinlock_32_unlock_mp;
-    extern     commpage_descriptor     spinlock_32_unlock_up;
-    extern     commpage_descriptor     spinlock_64_unlock_mp;
-    extern     commpage_descriptor     spinlock_64_unlock_up;
-    extern     commpage_descriptor     pthread_getspecific_sprg3;
-    extern     commpage_descriptor     pthread_getspecific_uftrap;
-    extern     commpage_descriptor     gettimeofday_32;
-    extern     commpage_descriptor     gettimeofday_64;
-    extern     commpage_descriptor     commpage_flush_dcache;
-    extern     commpage_descriptor     commpage_flush_icache;
-    extern     commpage_descriptor     pthread_self_sprg3;
-    extern     commpage_descriptor     pthread_self_uftrap;
-    extern     commpage_descriptor     spinlock_relinquish;
-    extern     commpage_descriptor     bzero_32;
-    extern     commpage_descriptor     bzero_128;
-    extern     commpage_descriptor     bcopy_g3;
-    extern     commpage_descriptor     bcopy_g4;
-    extern     commpage_descriptor     bcopy_970;
-    extern     commpage_descriptor     bcopy_64;
-    extern     commpage_descriptor     bigcopy_970;
-    
-    static     commpage_descriptor     *routines[] = {
-        &mach_absolute_time_32,
-        &mach_absolute_time_64,
-        &spinlock_32_try_mp,
-        &spinlock_32_try_up,
-        &spinlock_64_try_mp,
-        &spinlock_64_try_up,
-        &spinlock_32_lock_mp,
-        &spinlock_32_lock_up,
-        &spinlock_64_lock_mp,
-        &spinlock_64_lock_up,
-        &spinlock_32_unlock_mp,
-        &spinlock_32_unlock_up,
-        &spinlock_64_unlock_mp,
-        &spinlock_64_unlock_up,
-        &pthread_getspecific_sprg3,
-        &pthread_getspecific_uftrap,
-        &gettimeofday_32,
-        &gettimeofday_64,
-        &commpage_flush_dcache,
-        &commpage_flush_icache,
-        &pthread_self_sprg3,
-        &pthread_self_uftrap,
-        &spinlock_relinquish,
-        &bzero_32,
-        &bzero_128,
-        &bcopy_g3,
-        &bcopy_g4,
-        &bcopy_970,
-        &bcopy_64,
-        &bigcopy_970,
-        NULL };
-        
-    for( rd = routines; *rd != NULL ; rd++ ) 
-        commpage_stuff_routine(*rd);
-        
-    if (!matched)
-        panic("commpage no match on last routine");
-    
-    if (next > (commPagePtr + _COMM_PAGE_AREA_USED))
-        panic("commpage overflow");
-        
-    sync_cache_virtual((vm_offset_t) commPagePtr,_COMM_PAGE_AREA_USED);        // make all that new code executable
-
-}
diff --git a/osfmk/ppc/commpage/commpage.h b/osfmk/ppc/commpage/commpage.h
deleted file mode 100644 (file)
index 7b48fda..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-
-#ifndef _PPC_COMMPAGE_H
-#define _PPC_COMMPAGE_H
-
-#ifndef        __ASSEMBLER__
-#include <stdint.h>
-#endif /* __ASSEMBLER__ */
-
-
-/* Special check bits for the compage_descriptor "special" field. */
-#define        kCommPageDCBA           0x0001                  // this routine uses DCBA, map to NOP if not appropriate
-#define        kCommPageSYNC           0x0002                  // this routine uses SYNC, map to NOP if UP
-#define        kCommPageMTCRF          0x0004                  // set bit 11 in MTCRF if only 1 cr specified
-
-
-#ifdef __ASSEMBLER__
-
-#define        COMMPAGE_DESCRIPTOR(label,address,must,cant,special)    \
-LEXT(label)    @\
-    .short     label-. @\
-    .short     .-label-2       @\
-    .short     address @\
-    .short     special @\
-    .long      must    @\
-    .long      cant
-    
-
-#else /* __ASSEMBLER__ */
-
-/* Each potential commpage routine is described by one of these.
- * Note that the COMMPAGE_DESCRIPTOR macro (above), used in
- * assembly language, must agree with this.
- */
-typedef        struct  commpage_descriptor     {
-    short      code_offset;                                    // offset to code from this descriptor
-    short      code_length;                                    // length in bytes
-    short      commpage_address;                               // put at this address (_COMM_PAGE_BCOPY etc)
-    short      special;                                                // special handling bits for DCBA and SYNC etc
-    long       musthave;                                               // _cpu_capability bits we must have
-    long       canthave;                                               // _cpu_capability bits we can't have
-} commpage_descriptor;
-
-
-extern char    *commPagePtr;                           // virt address of commpage in kernel map
-
-
-extern void    commpage_set_timestamp(uint64_t tbr,uint32_t secs,uint32_t usecs,uint32_t ticks_per_sec);
-extern int             commpage_time_dcba( void );
-
-#endif /* __ASSEMBLER__ */
-
-#endif /* _PPC_COMMPAGE_H */
diff --git a/osfmk/ppc/commpage/commpage_asm.s b/osfmk/ppc/commpage/commpage_asm.s
deleted file mode 100644 (file)
index 3c30b32..0000000
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-
-#include <sys/appleapiopts.h>
-#include <ppc/asm.h>
-#include <ppc/proc_reg.h>
-#include <machine/cpu_capabilities.h>
-#include <machine/commpage.h>
-
-
-// commpage_time_dcba() uses a stack frame as follows:
-
-#define        kBufSiz         1024                            // Size of the buffer we use to do DCBA timing on G4
-#define        kSFSize         (kBufSiz+128+16)        // Stack frame size, which contains the 128-byte-aligned buffer
-#define        kLoopCnt        5                                       // Iterations of the timing loop
-#define        kDCBA           22                                      // Bit in cr5 used as a flag in timing loop
-
-
-// commpage_set_timestamp() uses the red zone for temporary storage:
-
-#define        rzSaveF1                        -8              // caller's FPR1
-#define        rzSaveF2                        -16             // caller's FPR2
-#define        rzSaveF3                        -24             // caller's FPR3
-#define        rzSaveF4                        -32             // caller's FPR4
-#define        rzSaveF5                        -40             // caller's FPR5
-#define        rzNewTimeBase           -48             // used to load 64-bit TBR into a FPR
-
-
-// commpage_set_timestamp() uses the following data.  kkTicksPerSec remembers
-// the number used to compute _COMM_PAGE_SEC_PER_TICK.  Since this constant
-// rarely changes, we use it to avoid needless recomputation.  It is a double
-// value, pre-initialize with an exponent of 2**52.
-
-#define        kkBinary0               0                                       // offset in data to long long 0 (a constant)
-#define        kkDouble1               8                                       // offset in data to double 1.0 (a constant)
-#define        kkTicksPerSec   16                                      // offset in data to double(ticks_per_sec)
-
-        .data
-        .align 3                                                       // three doubleword fields
-Ldata:
-        .long  0                                                       // kkBinary0
-        .long  0
-        .double        1.0e0                                           // kkDouble1        
-        .long  0x43300000                                      // kkTicksPerSec (plus 2**52)
-        .long  0                                                       // this is where we store ticks_per_sec, to float
-
-        .text
-        .align 2
-        .globl EXT(commpage_time_dcba)
-        .globl EXT(commpage_set_timestamp)
-
-
-/*     ***********************************************
- *     * C O M M P A G E _ S E T _ T I M E S T A M P *
- *     ***********************************************
- *
- *     Update the gettimeofday() shared data on the commpage, as follows:
- *             _COMM_PAGE_TIMESTAMP = a BSD-style pair of uint_32's for secs and usecs
- *             _COMM_PAGE_TIMEBASE = the timebase at which the timestamp was valid
- *             _COMM_PAGE_SEC_PER_TICK = multiply timebase ticks by this to get seconds (double)
- *     The convention is that if the timebase is 0, the data is invalid.  Because other
- *     CPUs are reading the three values asynchronously and must get a consistent set, 
- *     it is critical that we update them with the following protocol:
- *             1. set timebase to 0 (atomically), to invalidate all three values
- *             2. eieio (to create a barrier in stores to cacheable memory)
- *             3. change timestamp and "secs per tick"
- *             4. eieio
- *             5. set timebase nonzero (atomically)
- *     This works because readers read the timebase, then the timestamp and divisor, sync
- *     if MP, then read the timebase a second time and check to be sure it is equal to the first.
- *
- *     We could save a few cycles on 64-bit machines by special casing them, but it probably
- *     isn't necessary because this routine shouldn't be called very often.
- *
- *     When called:
- *             r3 = upper half of timebase (timebase is disabled if 0)
- *             r4 = lower half of timebase
- *             r5 = seconds part of timestamp
- *             r6 = useconds part of timestamp
- *             r7 = divisor (ie, timebase ticks per sec)
- *     We set up:
- *             r8 = ptr to our static data (kkBinary0, kkDouble1, kkTicksPerSec)
- *             r9 = ptr to comm page in kernel map
- *
- *     --> Interrupts must be disabled and rtclock locked when called.  <--
- */
-        .align 5
-LEXT(commpage_set_timestamp)                           // void commpage_set_timestamp(tbr,secs,usecs,divisor)
-        mfmsr  r11                                                     // get MSR
-        ori            r2,r11,MASK(MSR_FP)                     // turn FP on
-        mtmsr  r2
-        isync                                                          // wait until MSR changes take effect
-        
-        or.            r0,r3,r4                                        // is timebase 0? (thus disabled)
-        lis            r8,hi16(Ldata)                          // point to our data
-        lis            r9,ha16(EXT(commPagePtr))       // get ptr to address of commpage in kernel map
-        stfd   f1,rzSaveF1(r1)                         // save a FPR in the red zone
-        ori            r8,r8,lo16(Ldata)
-        lwz            r9,lo16(EXT(commPagePtr))(r9)   // r9 <- commPagePtr
-        lfd            f1,kkBinary0(r8)                        // get fixed 0s
-        li             r0,_COMM_PAGE_BASE_ADDRESS      // get va in user space of commpage
-        cmpwi  cr1,r9,0                                        // is commpage allocated yet?
-        sub            r9,r9,r0                                        // r9 <- commpage address, biased by user va
-        beq--  cr1,3f                                          // skip if not allocated
-        stfd   f1,_COMM_PAGE_TIMEBASE(r9)      // turn off the timestamp (atomically)
-        eieio                                                          // make sure all CPUs see it is off
-        beq            3f                                                      // all we had to do is turn off timestamp
-        
-        lwz            r0,kkTicksPerSec+4(r8)          // get last ticks_per_sec (or 0 if first)
-        stw            r3,rzNewTimeBase(r1)            // store new timebase so we can lfd
-        stw            r4,rzNewTimeBase+4(r1)
-        cmpw   r0,r7                                           // do we need to recompute _COMM_PAGE_SEC_PER_TICK?
-        stw            r5,_COMM_PAGE_TIMESTAMP(r9)     // store the new timestamp
-        stw            r6,_COMM_PAGE_TIMESTAMP+4(r9)
-        lfd            f1,rzNewTimeBase(r1)            // get timebase in a FPR so we can store atomically
-        beq++  2f                                                      // same ticks_per_sec, no need to recompute
-        
-        stw            r7,kkTicksPerSec+4(r8)          // must recompute SEC_PER_TICK
-        stfd   f2,rzSaveF2(r1)                         // we'll need a few more temp FPRs
-        stfd   f3,rzSaveF3(r1)
-        stfd   f4,rzSaveF4(r1)
-        stfd   f5,rzSaveF5(r1)
-        lfd            f2,_COMM_PAGE_2_TO_52(r9)       // f2 <- double(2**52)
-        lfd            f3,kkTicksPerSec(r8)            // float new ticks_per_sec + 2**52
-        lfd            f4,kkDouble1(r8)                        // f4 <- double(1.0)
-        mffs   f5                                                      // save caller's FPSCR
-        mtfsfi 7,0                                                     // clear Inexeact Exception bit, set round-to-nearest
-        fsub   f3,f3,f2                                        // get ticks_per_sec
-        fdiv   f3,f4,f3                                        // divide 1 by ticks_per_sec to get SEC_PER_TICK
-        stfd   f3,_COMM_PAGE_SEC_PER_TICK(r9)
-        mtfsf  0xFF,f5                                         // restore FPSCR
-        lfd            f2,rzSaveF2(r1)                         // restore FPRs
-        lfd            f3,rzSaveF3(r1)
-        lfd            f4,rzSaveF4(r1)
-        lfd            f5,rzSaveF5(r1)
-2:                                                                                     // f1 == new timestamp
-        eieio                                                          // wait until the stores take
-        stfd   f1,_COMM_PAGE_TIMEBASE(r9)      // then turn the timestamp back on (atomically)
-3:                                                                                     // here once all fields updated
-        lfd            f1,rzSaveF1(r1)                         // restore last FPR
-        mtmsr  r11                                                     // turn FP back off
-        isync
-        blr
-
-
-/*     ***************************************
- *     * C O M M P A G E _ T I M E _ D C B A *
- *     ***************************************
- *
- *     Not all processors that support the DCBA opcode actually benefit from it.
- *     Some store-gather and read-cancel well enough that there is no need to use
- *     DCBA to avoid fetching cache lines that will be completely overwritten, while
- *     others have this feature disabled (to work around errata etc), and so benefit
- *     from DCBA.  Since it is hard to tell the one group from the other, we just
- *     time loops with and without DCBA, and pick the fastest.  Thus we avoid
- *     delicate dependence on processor and/or platform revisions.
- *
- *     We return either kDcbaRecommended or zero.
- *
- *             int commpage_time_dcba( void );
- */
-LEXT(commpage_time_dcba)
-        mflr   r12                                     // get return
-        stw            r12,8(r1)                       // save
-        stwu   r1,-kSFSize(r1)         // carve our temp buffer from the stack
-        addi   r11,r1,127+16           // get base address...
-        rlwinm r11,r11,0,0,24          // ...of our buffer, 128-byte aligned
-        crset  kDCBA                           // first, use DCBA
-        bl             LTest                           // time it with DCBA
-        srwi   r0,r3,3                         // bias 12 pct in favor of not using DCBA...
-        add            r10,r3,r0                       // ...because DCBA is always slower with warm cache
-        crclr  kDCBA
-        bl             LTest                           // time without DCBA
-        cmplw  r10,r3                          // which is better?
-        mtlr   r12                                     // restore return
-        lwz            r1,0(r1)                        // pop off our stack frame
-        li             r3,kDcbaRecommended             // assume using DCBA is faster
-        bltlr
-        li             r3,0                    // no DCBA is faster
-        blr
-                
-        
-// Subroutine to time a loop with or without DCBA.
-//             kDCBA = set if we should use DCBA
-//             r11 = base of buffer to use for test (kBufSiz bytes)
-//
-//             We return TBR ticks in r3.
-//             We use r0,r3-r9.
-
-LTest:
-        li             r4,kLoopCnt                     // number of times to loop
-        li             r3,-1                           // initialize fastest time
-1:
-        mr             r6,r11                          // initialize buffer ptr
-        li             r0,kBufSiz/32           // r0 <- cache blocks to test
-        mtctr  r0
-2:
-        dcbf   0,r6                            // first, force the blocks out of the cache
-        addi   r6,r6,32
-        bdnz   2b
-        sync                                           // make sure all the flushes take
-        mr             r6,r11                          // re-initialize buffer ptr
-        mtctr  r0                                      // reset cache-block count
-        mftbu  r7                                      // remember upper half so we can check for carry
-        mftb   r8                                      // start the timer
-3:                                                                     // loop over cache blocks
-        bf             kDCBA,4f                        // should we DCBA?
-        dcba   0,r6
-4:
-        stw            r0,0(r6)                        // store the entire cache block
-        stw            r0,4(r6)
-        stw            r0,8(r6)
-        stw            r0,12(r6)
-        stw            r0,16(r6)
-        stw            r0,20(r6)
-        stw            r0,24(r6)
-        stw            r0,28(r6)
-        addi   r6,r6,32
-        bdnz   3b
-        mftb   r9
-        mftbu  r0
-        cmpw   r0,r7                           // did timebase carry?
-        bne            1b                                      // yes, retest rather than fuss
-        sub            r9,r9,r8                        // r9 <- time for this loop
-        cmplw  r9,r3                           // faster than current best?
-        bge            5f                                      // no
-        mr             r3,r9                           // remember fastest time through loop
-5:
-        subi   r4,r4,1                         // decrement outer loop count
-        cmpwi  r4,0                            // more to go?
-        bne            1b                                      // loop if so
-        blr                                                    // return fastest time in r3
diff --git a/osfmk/ppc/commpage/gettimeofday.s b/osfmk/ppc/commpage/gettimeofday.s
deleted file mode 100644 (file)
index f168559..0000000
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-
-#define        ASSEMBLER
-#include <sys/appleapiopts.h>
-#include <ppc/asm.h>                                   // EXT, LEXT
-#include <machine/cpu_capabilities.h>
-#include <machine/commpage.h>
-
-#define        USEC_PER_SEC    1000000
-
-
-/* The red zone is used to move data between GPRs and FPRs: */
-
-#define        rzTicks                 -8                      // elapsed ticks since timestamp (double)
-#define        rzSeconds               -16                     // seconds since timestamp (double)
-#define        rzUSeconds              -24                     // useconds since timestamp (double)
-
-
-        .text
-        .align 2
-        .globl EXT(gettimeofday_32)
-        .globl EXT(gettimeofday_64)
-
-
-// *********************************
-// * G E T T I M E O F D A Y _ 3 2 *
-// *********************************
-//
-// This is a subroutine of gettimeofday.c that gets the seconds and microseconds
-// in user mode, usually without having to make a system call.  We do not deal with
-// the timezone.  The kernel maintains the following values in the comm page:
-//
-//     _COMM_PAGE_TIMESTAMP = a BSD-style pair of uint_32's for seconds and microseconds
-//
-//     _COMM_PAGE_TIMEBASE = the timebase at which the timestamp was valid
-//
-//     _COMM_PAGE_SEC_PER_TICK = multiply timebase ticks by this to get seconds (double)
-//
-//     _COMM_PAGE_2_TO_52 = double precision constant 2**52
-//
-//     _COMM_PAGE_10_TO_6 = double precision constant 10**6
-//
-// We have to be careful to read these values atomically.  The kernel updates them 
-// asynchronously to account for drift or time changes (eg, ntp.)  We adopt the
-// convention that (timebase==0) means the timestamp is invalid, in which case we
-// return a bad status so our caller can make the system call.
-//
-//             r3 = ptr to user's timeval structure (should not be null)
-
-gettimeofday_32:                                                               // int gettimeofday_32(timeval *tp);
-0:
-        lwz            r5,_COMM_PAGE_TIMEBASE+0(0)             // r5,r6 = TBR at timestamp
-        lwz            r6,_COMM_PAGE_TIMEBASE+4(0)
-        lwz            r7,_COMM_PAGE_TIMESTAMP+0(0)    // r7 = timestamp seconds
-        lwz            r8,_COMM_PAGE_TIMESTAMP+4(0)    // r8 = timestamp microseconds
-        lfd            f1,_COMM_PAGE_SEC_PER_TICK(0)
-1:        
-        mftbu  r10                                                             // r10,r11 = current timebase
-        mftb   r11
-        mftbu  r12
-        cmplw  r10,r12
-        bne-   1b
-        or.            r0,r5,r6                                                // timebase 0? (ie, is timestamp invalid?)
-        
-        sync                                                                   // create a barrier (patched to NOP if UP)
-        
-        lwz            r0,_COMM_PAGE_TIMEBASE+0(0)             // then load data a 2nd time
-        lwz            r12,_COMM_PAGE_TIMEBASE+4(0)
-        lwz            r2,_COMM_PAGE_TIMESTAMP+0(0)
-        lwz            r9,_COMM_PAGE_TIMESTAMP+4(0)
-        cmplw  cr6,r5,r0                       // did we read a consistent set?
-        cmplw  cr7,r6,r12
-        beq-   3f                                      // timestamp is disabled so return bad status
-        cmplw  cr1,r2,r7
-        cmplw  cr5,r9,r8
-        crand  cr0_eq,cr6_eq,cr7_eq
-        crand  cr1_eq,cr1_eq,cr5_eq
-        crand  cr0_eq,cr0_eq,cr1_eq
-        bne-   0b                                      // loop until we have a consistent set of data
-        
-        subfc  r11,r6,r11                      // compute ticks since timestamp
-        lwz            r9,_COMM_PAGE_2_TO_52(0)        // get exponent for (2**52)
-        subfe  r10,r5,r10                      // complete 64-bit subtract
-        lfd            f2,_COMM_PAGE_2_TO_52(0)        // f3 <- (2**52)
-        srwi.  r0,r10,2                        // if more than 2**34 ticks have elapsed...
-        stw            r11,rzTicks+4(r1)       // store elapsed ticks into red zone
-        or             r10,r10,r9                      // convert long-long in (r10,r11) into double
-        bne-   3f                                      // ...call kernel to reprime timestamp
-
-        stw            r10,rzTicks(r1)         // complete double
-        lis            r12,hi16(USEC_PER_SEC)
-        ori            r12,r12,lo16(USEC_PER_SEC)
-        
-        lfd            f3,rzTicks(r1)          // get elapsed ticks since timestamp + 2**52
-        fsub   f4,f3,f2                        // subtract 2**52 and normalize
-        fmul   f5,f4,f1                        // f5 <- elapsed seconds since timestamp
-        lfd            f3,_COMM_PAGE_10_TO_6(0)        // get 10**6
-        fctiwz f6,f5                           // convert to integer
-        stfd   f6,rzSeconds(r1)        // store integer seconds into red zone
-        stw            r9,rzSeconds(r1)        // prepare to reload as floating pt
-        lfd            f6,rzSeconds(r1)        // get seconds + 2**52
-        fsub   f6,f6,f2                        // f6 <- integral seconds
-        fsub   f6,f5,f6                        // f6 <- fractional part of elapsed seconds
-        fmul   f6,f6,f3                        // f6 <- fractional elapsed useconds
-        fctiwz f6,f6                           // convert useconds to integer
-        stfd   f6,rzUSeconds(r1)       // store useconds into red zone
-        
-        lwz            r5,rzSeconds+4(r1)      // r5 <- seconds since timestamp
-        lwz            r6,rzUSeconds+4(r1)     // r6 <- useconds since timestamp
-        add            r7,r7,r5                        // add elapsed seconds to timestamp seconds
-        add            r8,r8,r6                        // ditto useconds
-        
-        cmplw  r8,r12                          // r8 >= USEC_PER_SEC ?
-        blt            2f                                      // no
-        addi   r7,r7,1                         // add 1 to secs
-        sub            r8,r8,r12                       // subtract USEC_PER_SEC from usecs
-2:
-        stw            r7,0(r3)                        // store secs//usecs into user's timeval
-        stw            r8,4(r3)
-        li             r3,0                            // return success
-        blr
-3:                                                                     // too long since last timestamp or this code is disabled
-        li             r3,1                            // return bad status so our caller will make syscall
-        blr
-        
-        COMMPAGE_DESCRIPTOR(gettimeofday_32,_COMM_PAGE_GETTIMEOFDAY,0,k64Bit,kCommPageSYNC)
-        
-        
-// *********************************
-// * G E T T I M E O F D A Y _ 6 4 *
-// *********************************
-
-gettimeofday_64:                                                       // int gettimeofday_64(timeval *tp);
-0:
-        ld             r6,_COMM_PAGE_TIMEBASE(0)       // r6 = TBR at timestamp
-        ld             r8,_COMM_PAGE_TIMESTAMP(0)      // r8 = timestamp (seconds,useconds)
-        lfd            f1,_COMM_PAGE_SEC_PER_TICK(0)
-        mftb   r10                                                     // r10 = get current timebase
-        lwsync                                                         // create a barrier if MP (patched to NOP if UP)
-        ld             r11,_COMM_PAGE_TIMEBASE(0)      // then get data a 2nd time
-        ld             r12,_COMM_PAGE_TIMESTAMP(0)
-        cmpdi  cr1,r6,0                        // is the timestamp disabled?
-        cmpld  cr6,r6,r11                      // did we read a consistent set?
-        cmpld  cr7,r8,r12
-        beq--  cr1,3f                          // exit if timestamp disabled
-        crand  cr6_eq,cr7_eq,cr6_eq
-        sub            r11,r10,r6                      // compute elapsed ticks from timestamp
-        bne--  cr6,0b                          // loop until we have a consistent set of data
-                
-        srdi.  r0,r11,35                       // has it been more than 2**35 ticks since last timestamp?
-        std            r11,rzTicks(r1)         // put ticks in redzone where we can "lfd" it
-        bne--  3f                                      // timestamp too old, so reprime
-
-        lfd            f3,rzTicks(r1)          // get elapsed ticks since timestamp (fixed pt)
-        fcfid  f4,f3                           // float the tick count
-        fmul   f5,f4,f1                        // f5 <- elapsed seconds since timestamp
-        lfd            f3,_COMM_PAGE_10_TO_6(0)        // get 10**6
-        fctidz f6,f5                           // convert integer seconds to fixed pt
-        stfd   f6,rzSeconds(r1)        // save fixed pt integer seconds in red zone
-        fcfid  f6,f6                           // float the integer seconds
-        fsub   f6,f5,f6                        // f6 <- fractional part of elapsed seconds
-        fmul   f6,f6,f3                        // f6 <- fractional elapsed useconds
-        fctidz f6,f6                           // convert useconds to fixed pt integer
-        stfd   f6,rzUSeconds(r1)       // store useconds into red zone
-        
-        lis            r12,hi16(USEC_PER_SEC)  // r12 <- 10**6
-        srdi   r7,r8,32                        // extract seconds from doubleword timestamp
-        lwz            r5,rzSeconds+4(r1)      // r5 <- seconds since timestamp
-        ori            r12,r12,lo16(USEC_PER_SEC)
-        lwz            r6,rzUSeconds+4(r1)     // r6 <- useconds since timestamp
-        add            r7,r7,r5                        // add elapsed seconds to timestamp seconds
-        add            r8,r8,r6                        // ditto useconds
-        
-        cmplw  r8,r12                          // r8 >= USEC_PER_SEC ?
-        blt            2f                                      // no
-        addi   r7,r7,1                         // add 1 to secs
-        sub            r8,r8,r12                       // subtract USEC_PER_SEC from usecs
-2:
-        stw            r7,0(r3)                        // store secs//usecs into user's timeval
-        stw            r8,4(r3)
-        li             r3,0                            // return success
-        blr
-3:                                                                     // too long since last timestamp or this code is disabled
-        li             r3,1                            // return bad status so our caller will make syscall
-        blr
-
-        COMMPAGE_DESCRIPTOR(gettimeofday_64,_COMM_PAGE_GETTIMEOFDAY,k64Bit,0,kCommPageSYNC)
-
-        
diff --git a/osfmk/ppc/commpage/mach_absolute_time.s b/osfmk/ppc/commpage/mach_absolute_time.s
deleted file mode 100644 (file)
index 865f91e..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-
-#define        ASSEMBLER
-#include <sys/appleapiopts.h>
-#include <ppc/asm.h>                                   // EXT, LEXT
-#include <machine/cpu_capabilities.h>
-#include <machine/commpage.h>
-
-        .text
-        .align 2
-        .globl EXT(mach_absolute_time_32)
-        .globl EXT(mach_absolute_time_64)
-
-
-// *********************************************
-// * M A C H _ A B S O L U T E _ T I M E _ 3 2 *
-// *********************************************
-
-mach_absolute_time_32:
-1:        
-        mftbu  r3
-        mftb   r4
-        mftbu  r5
-        cmplw  r3,r5
-        beqlr+
-        b              1b
-        
-        COMMPAGE_DESCRIPTOR(mach_absolute_time_32,_COMM_PAGE_ABSOLUTE_TIME,0,k64Bit,0)
-        
-        
-// *********************************************
-// * M A C H _ A B S O L U T E _ T I M E _ 6 4 *
-// *********************************************
-//
-// Why bother to special case for 64-bit?  Because the "mftb" variants
-// are 10 cycles each, and they are serialized. 
-
-mach_absolute_time_64:
-        mftb   r4
-        srdi   r3,r4,32
-        blr
-
-        COMMPAGE_DESCRIPTOR(mach_absolute_time_64,_COMM_PAGE_ABSOLUTE_TIME,k64Bit,0,0)
-
-        
diff --git a/osfmk/ppc/commpage/pthread.s b/osfmk/ppc/commpage/pthread.s
deleted file mode 100644 (file)
index a53c7ef..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-
-#include <sys/appleapiopts.h>
-#include <ppc/asm.h>                                   // EXT, LEXT
-#include <machine/cpu_capabilities.h>
-#include <machine/commpage.h>
-
-        .text
-        .align 2
-        .globl EXT(pthread_getspecific_sprg3)
-        .globl EXT(pthread_getspecific_uftrap)
-        .globl EXT(pthread_self_sprg3)
-        .globl EXT(pthread_self_uftrap)
-
-#define        USER_SPRG3      259             // user-mode-readable encoding for SPRG3
-
-
-// *****************************************************
-// * P T H R E A D _ G E T S P E C I F I C _ S P R G 3 *
-// *****************************************************
-//
-// For processors with user-readable SPRG3.   Called with:
-//             r3 = word number
-//             r4 = offset to thread specific data (_PTHREAD_TSD_OFFSET)
-
-pthread_getspecific_sprg3:
-        slwi   r5,r3,2                         // convert word# to byte offset
-        mfspr  r3,USER_SPRG3           // get per-thread cookie
-        add            r5,r5,r4                        // add in offset to first word
-        lwzx   r3,r3,r5                        // get the thread-specific word
-        blr
-        
-    COMMPAGE_DESCRIPTOR(pthread_getspecific_sprg3,_COMM_PAGE_PTHREAD_GETSPECIFIC,k64Bit,0,0)
-    
-    
-// ***************************************
-// * P T H R E A D _ S E L F _ S P R G 3 *
-// ***************************************
-//
-// For processors with user-readable SPRG3.
-
-pthread_self_sprg3:
-        mfspr  r3,USER_SPRG3           // get per-thread cookie
-        blr
-        
-    COMMPAGE_DESCRIPTOR(pthread_self_sprg3,_COMM_PAGE_PTHREAD_SELF,k64Bit,0,0)
-    
-        
-// *******************************************************
-// * P T H R E A D _ G E T S P E C I F I C _ U F T R A P *
-// *******************************************************
-//
-// For processors that use the Ultra-Fast-Trap to get the thread-specific ptr.
-// Called with:
-//             r3 = word number
-//             r4 = offset to thread specific data (_PTHREAD_TSD_OFFSET)
-
-pthread_getspecific_uftrap:
-        slwi   r5,r3,2                         // convert word# to byte offset
-        li             r0,0x7FF2                       // magic "pthread_self" ultra-fast trap code
-        sc
-        add            r5,r5,r4                        // add in offset to first word
-        lwzx   r3,r3,r5                        // get the thread-specific word
-        blr
-
-    COMMPAGE_DESCRIPTOR(pthread_getspecific_uftrap,_COMM_PAGE_PTHREAD_GETSPECIFIC,0,k64Bit,0)
-    
-        
-// *****************************************
-// * P T H R E A D _ S E L F _ U F T R A P *
-// *****************************************
-//
-// For processors that use the Ultra-Fast-Trap to get the thread-specific ptr.
-
-pthread_self_uftrap:
-        li             r0,0x7FF2                       // magic "pthread_self" ultra-fast trap code
-        sc                                                     // get r3==TLDP
-        blr
-
-    COMMPAGE_DESCRIPTOR(pthread_self_uftrap,_COMM_PAGE_PTHREAD_SELF,0,k64Bit,0)
diff --git a/osfmk/ppc/commpage/spinlocks.s b/osfmk/ppc/commpage/spinlocks.s
deleted file mode 100644 (file)
index d619a6e..0000000
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-
-#include <sys/appleapiopts.h>
-#include <ppc/asm.h>                                   // EXT, LEXT
-#include <machine/cpu_capabilities.h>
-#include <machine/commpage.h>
-
-        .text
-        .align 2
-        .globl EXT(spinlock_32_try_mp)
-        .globl EXT(spinlock_32_try_up)
-        .globl EXT(spinlock_32_lock_mp)
-        .globl EXT(spinlock_32_lock_up)
-        .globl EXT(spinlock_32_unlock_mp)
-        .globl EXT(spinlock_32_unlock_up)
-        
-        .globl EXT(spinlock_64_try_mp)
-        .globl EXT(spinlock_64_try_up)
-        .globl EXT(spinlock_64_lock_mp)
-        .globl EXT(spinlock_64_lock_up)
-        .globl EXT(spinlock_64_unlock_mp)
-        .globl EXT(spinlock_64_unlock_up)
-        
-        .globl EXT(spinlock_relinquish)
-
-#define        MP_SPIN_TRIES   1000
-
-
-// The user mode spinlock library.  There are many versions,
-// in order to take advantage of a few special cases:
-//     - no barrier instructions (SYNC,ISYNC) are needed if UP
-//     - 64-bit processors can use LWSYNC instead of SYNC (if MP)
-//     - branch hints appropriate to the processor (+ vs ++ etc)
-//     - potentially custom relinquish strategies (not used at present)
-//     - fixes for errata as necessary
-
-
-spinlock_32_try_mp:
-1:
-        lwarx  r4,0,r3
-        cmpwi  r4,0
-        bne-   2f
-        stwcx. r3,0,r3
-        isync                          // cancel speculative execution
-        beqlr+
-        b              1b
-2:
-        li             r3,0
-        blr
-
-    COMMPAGE_DESCRIPTOR(spinlock_32_try_mp,_COMM_PAGE_SPINLOCK_TRY,0,k64Bit+kUP,0)
-        
-
-spinlock_32_try_up:
-1:
-        lwarx  r4,0,r3
-        cmpwi  r4,0
-        bne-   2f
-        stwcx. r3,0,r3
-        beqlr+
-        b              1b
-2:
-        li             r3,0
-        blr
-
-    COMMPAGE_DESCRIPTOR(spinlock_32_try_up,_COMM_PAGE_SPINLOCK_TRY,kUP,k64Bit,0)
-
-
-spinlock_32_lock_mp:
-        li             r5,MP_SPIN_TRIES
-1:
-        lwarx  r4,0,r3
-        cmpwi  r4,0
-        bne-   2f
-        stwcx. r3,0,r3
-        isync                          // cancel speculative execution
-        beqlr+                         // we return void
-        b              1b
-2:
-        subic. r5,r5,1         // try again before relinquish?
-        bne            1b
-        ba             _COMM_PAGE_RELINQUISH
-
-    COMMPAGE_DESCRIPTOR(spinlock_32_lock_mp,_COMM_PAGE_SPINLOCK_LOCK,0,k64Bit+kUP,0)
-
-
-spinlock_32_lock_up:
-1:
-        lwarx  r4,0,r3
-        cmpwi  r4,0
-        bnea-  _COMM_PAGE_RELINQUISH   // always depress on UP (let lock owner run)
-        stwcx. r3,0,r3
-        beqlr+                         // we return void
-        b              1b
-
-    COMMPAGE_DESCRIPTOR(spinlock_32_lock_up,_COMM_PAGE_SPINLOCK_LOCK,kUP,k64Bit,0)
-
-
-spinlock_32_unlock_mp:
-        li             r4,0
-        sync                           // complete prior stores before unlock
-        stw            r4,0(r3)
-        blr
-
-    COMMPAGE_DESCRIPTOR(spinlock_32_unlock_mp,_COMM_PAGE_SPINLOCK_UNLOCK,0,k64Bit+kUP,0)
-
-
-spinlock_32_unlock_up:
-        li             r4,0
-        stw            r4,0(r3)
-        blr
-
-    COMMPAGE_DESCRIPTOR(spinlock_32_unlock_up,_COMM_PAGE_SPINLOCK_UNLOCK,kUP,k64Bit,0)
-
-
-spinlock_64_try_mp:
-1:
-        lwarx  r4,0,r3
-        cmpwi  r4,0
-        bne--  2f
-        stwcx. r3,0,r3
-        isync                          // cancel speculative execution
-        beqlr++
-        b              1b
-2:
-        li             r6,-4
-        stwcx. r3,r6,r1        // clear the pending reservation (using red zone)
-        li             r3,0            // Pass failure
-        blr
-
-    COMMPAGE_DESCRIPTOR(spinlock_64_try_mp,_COMM_PAGE_SPINLOCK_TRY,k64Bit,kUP,0)
-
-
-spinlock_64_try_up:
-1:
-        lwarx  r4,0,r3
-        cmpwi  r4,0
-        bne--  2f
-        stwcx. r3,0,r3
-        beqlr++
-        b              1b
-2:
-        li             r6,-4
-        stwcx. r3,r6,r1        // clear the pending reservation (using red zone)
-        li             r3,0
-        blr
-
-    COMMPAGE_DESCRIPTOR(spinlock_64_try_up,_COMM_PAGE_SPINLOCK_TRY,k64Bit+kUP,0,0)
-
-
-spinlock_64_lock_mp:
-        li             r5,MP_SPIN_TRIES
-1:
-        lwarx  r4,0,r3
-        cmpwi  r4,0
-        bne--  2f
-        stwcx. r3,0,r3
-        isync                          // cancel speculative execution
-        beqlr++                                // we return void
-        b              1b
-2:
-        li             r6,-4
-        stwcx. r3,r6,r1        // clear the pending reservation (using red zone)
-        subic. r5,r5,1         // try again before relinquish?
-        bne--  1b                      // mispredict this one (a cheap back-off)
-        ba             _COMM_PAGE_RELINQUISH
-
-    COMMPAGE_DESCRIPTOR(spinlock_64_lock_mp,_COMM_PAGE_SPINLOCK_LOCK,k64Bit,kUP,0)
-
-
-spinlock_64_lock_up:
-1:
-        lwarx  r4,0,r3
-        cmpwi  r4,0
-        bne--  2f
-        stwcx. r3,0,r3
-        beqlr++                                // we return void
-        b              1b
-2:                                                     // always relinquish on UP (let lock owner run)
-        li             r6,-4
-        stwcx. r3,r6,r1        // clear the pending reservation (using red zone)
-               ba              _COMM_PAGE_RELINQUISH
-
-    COMMPAGE_DESCRIPTOR(spinlock_64_lock_up,_COMM_PAGE_SPINLOCK_LOCK,k64Bit+kUP,0,0)
-
-
-spinlock_64_unlock_mp:
-        li             r4,0
-        lwsync                         // complete prior stores before unlock
-        stw            r4,0(r3)
-        blr
-
-    COMMPAGE_DESCRIPTOR(spinlock_64_unlock_mp,_COMM_PAGE_SPINLOCK_UNLOCK,k64Bit,kUP,0)
-
-
-spinlock_64_unlock_up:
-        li             r4,0
-        stw            r4,0(r3)
-        blr
-
-    COMMPAGE_DESCRIPTOR(spinlock_64_unlock_up,_COMM_PAGE_SPINLOCK_UNLOCK,k64Bit+kUP,0,0)
-    
-
-spinlock_relinquish:
-        mr             r12,r3          // preserve lockword ptr across relinquish
-        li             r3,0            // THREAD_NULL
-        li             r4,1            // SWITCH_OPTION_DEPRESS
-        li             r5,1            // timeout (ms)
-        li             r0,-61          // SYSCALL_THREAD_SWITCH
-        sc                                     // relinquish
-        mr             r3,r12
-        ba             _COMM_PAGE_SPINLOCK_LOCK
-        
-    COMMPAGE_DESCRIPTOR(spinlock_relinquish,_COMM_PAGE_RELINQUISH,0,0,0)
-
index a1575fdca275fafc006e6cb5ad044672e83bff72..585ef5b739a13dec00f7fbc10598e7ab24d1ab39 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4c80ebf2da56c2a1fbf0f3c604fee1d19fb2bb49..be442911a6479e5384df8b49696d55eabc05308d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1ea0de1ef99e96c741c1a80b82cb73b61280d6ac..312734a4429c0976047303bc26f998ca77ba0329 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 97a56d260879650957e8e835a6a2876e7bdf8b54..cbfab18601b9041af0f4906bfb370bd6872188bb 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #include <ppc/machine_cpu.h>
 #include <ppc/exception.h>
 #include <ppc/asm.h>
-#include <ppc/hw_perfmon.h>
 #include <pexpert/pexpert.h>
 #include <kern/cpu_data.h>
-#include <ppc/mappings.h>
-#include <ppc/Diagnostics.h>
 
 /* TODO: BOGUS TO BE REMOVED */
 int real_ncpus = 1;
@@ -98,15 +92,20 @@ cpu_control(
             cpu_subtype != cmd->cmd_cpu_subtype)
          return(KERN_FAILURE);
 
-       if (perfmon_acquire_facility(current_task()) != KERN_SUCCESS) {
-               return(KERN_RESOURCE_SHORTAGE); /* cpu performance facility in use by another task */
-       }
-
        switch (cmd->cmd_op)
          {
          case PROCESSOR_PM_CLR_PMC:       /* Clear Performance Monitor Counters */
            switch (cpu_subtype)
              {
+             case CPU_SUBTYPE_POWERPC_604:
+               {
+                 oldlevel = ml_set_interrupts_enabled(FALSE);    /* disable interrupts */
+                 mtpmc1(0x0);
+                 mtpmc2(0x0);
+                 ml_set_interrupts_enabled(oldlevel);     /* enable interrupts */
+                 return(KERN_SUCCESS);
+               }
+             case CPU_SUBTYPE_POWERPC_604e:
              case CPU_SUBTYPE_POWERPC_750:
              case CPU_SUBTYPE_POWERPC_7400:
              case CPU_SUBTYPE_POWERPC_7450:
@@ -125,6 +124,21 @@ cpu_control(
          case PROCESSOR_PM_SET_REGS:      /* Set Performance Monitor Registors */
            switch (cpu_subtype)
              {
+             case CPU_SUBTYPE_POWERPC_604:
+               if (count <  (PROCESSOR_CONTROL_CMD_COUNT 
+                              + PROCESSOR_PM_REGS_COUNT_POWERPC_604))
+                 return(KERN_FAILURE);
+               else
+                 {
+                   perf_regs = (processor_pm_regs_t)cmd->cmd_pm_regs;
+                   oldlevel = ml_set_interrupts_enabled(FALSE);    /* disable interrupts */
+                   mtmmcr0(PERFMON_MMCR0(perf_regs) & MMCR0_SUPPORT_MASK);
+                   mtpmc1(PERFMON_PMC1(perf_regs));
+                   mtpmc2(PERFMON_PMC2(perf_regs));
+                   ml_set_interrupts_enabled(oldlevel);     /* enable interrupts */
+                   return(KERN_SUCCESS);
+                 }
+             case CPU_SUBTYPE_POWERPC_604e:
              case CPU_SUBTYPE_POWERPC_750:
                if (count <  (PROCESSOR_CONTROL_CMD_COUNT +
                       PROCESSOR_PM_REGS_COUNT_POWERPC_750))
@@ -167,6 +181,17 @@ cpu_control(
          case PROCESSOR_PM_SET_MMCR:
            switch (cpu_subtype)
              {
+             case CPU_SUBTYPE_POWERPC_604:
+               if (count < (PROCESSOR_CONTROL_CMD_COUNT +
+                      PROCESSOR_PM_REGS_COUNT_POWERPC_604))
+                 return(KERN_FAILURE);
+               else
+                 {
+                   perf_regs = (processor_pm_regs_t)cmd->cmd_pm_regs;
+                   mtmmcr0(PERFMON_MMCR0(perf_regs) & MMCR0_SUPPORT_MASK);
+                   return(KERN_SUCCESS);
+                 }
+             case CPU_SUBTYPE_POWERPC_604e:
              case CPU_SUBTYPE_POWERPC_750:
                if (count < (PROCESSOR_CONTROL_CMD_COUNT +
                      PROCESSOR_PM_REGS_COUNT_POWERPC_750))
@@ -217,6 +242,11 @@ cpu_info_count(
        switch (flavor) {
                case PROCESSOR_PM_REGS_INFO:
                        switch (cpu_subtype) {
+                               case CPU_SUBTYPE_POWERPC_604:
+                                       *count = PROCESSOR_PM_REGS_COUNT_POWERPC_604;
+                                       return(KERN_SUCCESS);
+
+                               case CPU_SUBTYPE_POWERPC_604e:
                                case CPU_SUBTYPE_POWERPC_750:
                
                                        *count = PROCESSOR_PM_REGS_COUNT_POWERPC_750;
@@ -264,6 +294,21 @@ cpu_info(
                        perf_regs = (processor_pm_regs_t) info;
 
                        switch (cpu_subtype) {
+                               case CPU_SUBTYPE_POWERPC_604:
+
+                                       if (*count < PROCESSOR_PM_REGS_COUNT_POWERPC_604)
+                                         return(KERN_FAILURE);
+                                 
+                                       oldlevel = ml_set_interrupts_enabled(FALSE);    /* disable interrupts */
+                                       PERFMON_MMCR0(perf_regs) = mfmmcr0();
+                                       PERFMON_PMC1(perf_regs)  = mfpmc1();
+                                       PERFMON_PMC2(perf_regs)  = mfpmc2();
+                                       ml_set_interrupts_enabled(oldlevel);     /* enable interrupts */
+               
+                                       *count = PROCESSOR_PM_REGS_COUNT_POWERPC_604;
+                                       return(KERN_SUCCESS);
+
+                               case CPU_SUBTYPE_POWERPC_604e:
                                case CPU_SUBTYPE_POWERPC_750:
 
                                        if (*count < PROCESSOR_PM_REGS_COUNT_POWERPC_750)
@@ -400,8 +445,8 @@ cpu_start(
 {
        struct per_proc_info    *proc_info;
        kern_return_t           ret;
-       mapping *mp;
 
+       extern void (*exception_handlers[])(void);
        extern vm_offset_t      intstack;
        extern vm_offset_t      debstack;
 
@@ -430,17 +475,15 @@ cpu_start(
                proc_info->need_ast = (unsigned int)&need_ast[cpu];
                proc_info->FPU_owner = 0;
                proc_info->VMX_owner = 0;
-               mp = (mapping *)(&proc_info->ppCIOmp);
-               mp->mpFlags = 0x01000000 | mpSpecial | 1;
-               mp->mpSpace = invalSpace;
+
 
                if (proc_info->start_paddr == EXCEPTION_VECTOR(T_RESET)) {
 
                        /* TODO: get mutex lock reset_handler_lock */
 
                        resethandler_target.type = RESET_HANDLER_START;
-                       resethandler_target.call_paddr = (vm_offset_t)_start_cpu;       /* Note: these routines are always V=R */
-                       resethandler_target.arg__paddr = (vm_offset_t)proc_info;        /* Note: these routines are always V=R */
+                       resethandler_target.call_paddr = kvtophys((vm_offset_t)_start_cpu); 
+                       resethandler_target.arg__paddr = kvtophys((vm_offset_t)proc_info);
                        
                        ml_phys_write((vm_offset_t)&ResetHandler + 0,
                                      resethandler_target.type);
@@ -496,10 +539,10 @@ cpu_signal_handler(
        pproc = &per_proc_info[cpu];                                    /* Point to our block */
 
 /*
- *     Since we've been signaled, wait about 31 ms for the signal lock to pass
+ *     Since we've been signaled, wait just under 1ms for the signal lock to pass
  */
        if(!hw_lock_mbits(&pproc->MPsigpStat, (MPsigpMsgp | MPsigpAck), (MPsigpBusy | MPsigpPass),
-         (MPsigpBusy | MPsigpPass | MPsigpAck), (gPEClockFrequencyInfo.timebase_frequency_hz >> 5))) {
+         (MPsigpBusy | MPsigpPass | MPsigpAck), (gPEClockFrequencyInfo.bus_clock_rate_hz >> 7))) {
                panic("cpu_signal_handler: Lock pass timed out\n");
        }
        
@@ -522,7 +565,7 @@ cpu_signal_handler(
                        switch (holdParm0) {                                    /* Decode SIGP message order */
 
                                case SIGPast:                                           /* Should we do an AST? */
-                                       pproc->hwCtr.numSIGPast++;              /* Count this one */
+                                       pproc->numSIGPast++;                    /* Count this one */
 #if 0
                                        kprintf("cpu_signal_handler: AST check on cpu %x\n", cpu_number());
 #endif
@@ -531,7 +574,7 @@ cpu_signal_handler(
                                        
                                case SIGPcpureq:                                        /* CPU specific function? */
                                
-                                       pproc->hwCtr.numSIGPcpureq++;   /* Count this one */
+                                       pproc->numSIGPcpureq++;                 /* Count this one */
                                        switch (holdParm1) {                    /* Select specific function */
                                        
                                                case CPRQtemp:                          /* Get the temperature */
@@ -571,10 +614,6 @@ cpu_signal_handler(
                                                        timebaseAddr->done = TRUE;
 
                                                        return;
-                                               
-                                               case CPRQscom:
-                                                       fwSCOM((scomcomm *)holdParm2);  /* Do the function */
-                                                       return;
 
                                                default:
                                                        panic("cpu_signal_handler: unknown CPU request - %08X\n", holdParm1);
@@ -584,14 +623,14 @@ cpu_signal_handler(
        
                                case SIGPdebug:                                         /* Enter the debugger? */               
 
-                                       pproc->hwCtr.numSIGPdebug++;    /* Count this one */
+                                       pproc->numSIGPdebug++;                  /* Count this one */
                                        debugger_is_slave[cpu]++;               /* Bump up the count to show we're here */
                                        hw_atomic_sub(&debugger_sync, 1);       /* Show we've received the 'rupt */
                                        __asm__ volatile("tw 4,r3,r3"); /* Enter the debugger */
                                        return;                                                 /* All done now... */
                                        
                                case SIGPwake:                                          /* Wake up CPU */
-                                       pproc->hwCtr.numSIGPwake++;             /* Count this one */
+                                       pproc->numSIGPwake++;                   /* Count this one */
                                        return;                                                 /* No need to do anything, the interrupt does it all... */
                                        
                                default:
@@ -651,12 +690,12 @@ cpu_signal(
        if((tpproc->MPsigpStat & MPsigpMsgp) == MPsigpMsgp) {   /* Is there an unreceived message already pending? */
 
                if(signal == SIGPwake) {                                        /* SIGPwake can merge into all others... */
-                       mpproc->hwCtr.numSIGPmwake++;                   /* Account for merged wakes */
+                       mpproc->numSIGPmwake++;                                 /* Account for merged wakes */
                        return KERN_SUCCESS;
                }
 
                if((signal == SIGPast) && (tpproc->MPsigpParm0 == SIGPast)) {   /* We can merge ASTs */
-                       mpproc->hwCtr.numSIGPmast++;                    /* Account for merged ASTs */
+                       mpproc->numSIGPmast++;                                  /* Account for merged ASTs */
                        return KERN_SUCCESS;                                    /* Don't bother to send this one... */
                }
 
@@ -664,15 +703,15 @@ cpu_signal(
                        if (hw_lock_mbits(&tpproc->MPsigpStat, (MPsigpMsgp | MPsigpAck), 
                                          (MPsigpBusy | MPsigpPass ), MPsigpBusy, 0)) {
                                busybitset = 1;
-                               mpproc->hwCtr.numSIGPmwake++;   
+                               mpproc->numSIGPmwake++; 
                        }
                }
        }       
        
        if((busybitset == 0) && 
           (!hw_lock_mbits(&tpproc->MPsigpStat, MPsigpMsgp, 0, MPsigpBusy, 
-          (gPEClockFrequencyInfo.timebase_frequency_hz >> 11)))) {     /* Try to lock the message block with a .5ms timeout */
-               mpproc->hwCtr.numSIGPtimo++;                            /* Account for timeouts */
+          (gPEClockFrequencyInfo.bus_clock_rate_hz >> 13)))) { /* Try to lock the message block with a .5ms timeout */
+               mpproc->numSIGPtimo++;                                          /* Account for timeouts */
                return KERN_FAILURE;                                            /* Timed out, take your ball and go home... */
        }
 
@@ -696,7 +735,6 @@ void
 cpu_doshutdown(
        void)
 {
-       enable_preemption();
        processor_doshutdown(current_processor());
 }
 
@@ -707,11 +745,15 @@ cpu_sleep(
        struct per_proc_info    *proc_info;
        unsigned int    cpu;
        facility_context *fowner;
+       extern void (*exception_handlers[])(void);
        extern vm_offset_t      intstack;
        extern vm_offset_t      debstack;
        extern void _restart_cpu(void);
 
        cpu = cpu_number();
+#if 0
+       kprintf("******* About to sleep cpu %d\n", cpu);
+#endif
 
        proc_info = &per_proc_info[cpu];
 
@@ -737,8 +779,8 @@ cpu_sleep(
                        extern void _start_cpu(void);
        
                        resethandler_target.type = RESET_HANDLER_START;
-                       resethandler_target.call_paddr = (vm_offset_t)_start_cpu;       /* Note: these routines are always V=R */
-                       resethandler_target.arg__paddr = (vm_offset_t)proc_info;        /* Note: these routines are always V=R */
+                       resethandler_target.call_paddr = kvtophys((vm_offset_t)_start_cpu); 
+                       resethandler_target.arg__paddr = kvtophys((vm_offset_t)proc_info);
        
                        ml_phys_write((vm_offset_t)&ResetHandler + 0,
                                          resethandler_target.type);
diff --git a/osfmk/ppc/cpu_capabilities.h b/osfmk/ppc/cpu_capabilities.h
deleted file mode 100644 (file)
index ae54cc1..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-
-#ifndef _PPC_CPU_CAPABILITIES_H
-#define _PPC_CPU_CAPABILITIES_H
-
-/* Sadly, some clients of this interface misspell __APPLE_API_PRIVATE.
- * To avoid breaking them, we accept the incorrect _APPLE_API_PRIVATE.
- */
-#ifdef _APPLE_API_PRIVATE
-#ifndef __APPLE_API_PRIVATE
-#define        __APPLE_API_PRIVATE
-#endif /* __APPLE_API_PRIVATE */
-#endif /* _APPLE_API_PRIVATE */
-#ifndef __APPLE_API_PRIVATE
-#error cpu_capabilities.h is for Apple Internal use only
-#else  /* __APPLE_API_PRIVATE */
-
-/* _cpu_capabilities
- *
- * This is the authoritative way to determine from user mode what
- * implementation-specific processor features are available.
- * This API only supported for Apple internal use.
- * 
- */
-
-#ifndef        __ASSEMBLER__
-extern int _cpu_capabilities;
-#endif /* __ASSEMBLER__ */
-
-/* Bit definitions for _cpu_capabilities: */
-
-#define        kHasAltivec                             0x00000001
-#define        k64Bit                                  0x00000002      // 64-bit GPRs
-#define        kCache32                                0x00000004      // cache line size is 32 bytes
-#define        kCache64                                0x00000008
-#define        kCache128                               0x00000010
-#define        kDcbaRecommended                0x00000020      // PPC: dcba is available and recommended
-#define        kDcbaAvailable                  0x00000040      // PPC: dcba is available but is not recommended
-#define        kDataStreamsRecommended 0x00000080      // PPC: dst, dstt, dstst, dss, and dssall instructions available and recommended
-#define        kDataStreamsAvailable   0x00000100      // PPC: dst, dstt, dstst, dss, and dssall instructions available but not recommended
-#define        kDcbtStreamsRecommended 0x00000200      // PPC: enhanced dcbt instruction available and recommended
-#define        kDcbtStreamsAvailable   0x00000400      // PPC: enhanced dcbt instruction available and recommended
-
-#define        kUP                                             0x00008000      // set if (kNumCPUs == 1)
-#define        kNumCPUs                                0x00FF0000      // number of CPUs (see _NumCPUs() below)
-
-#define        kNumCPUsShift                   16                      // see _NumCPUs() below
-
-#define        kHasGraphicsOps                 0x08000000      // PPC: has fres, frsqrte, and fsel instructions
-#define        kHasStfiwx                              0x10000000      // PPC: has stfiwx instruction
-#define        kHasFsqrt                               0x20000000      // PPC: has fsqrt and fsqrts instructions
-
-#ifndef        __ASSEMBLER__
-static __inline__ int _NumCPUs( void ) { return (_cpu_capabilities & kNumCPUs) >> kNumCPUsShift; }
-
-#endif /* __ASSEMBLER__ */
-
-
-/*
- * The shared kernel/user "comm page(s)":
- *
- * The last eight pages of every address space are reserved for the kernel/user
- * "comm area".  Because they can be addressed via a sign-extended 16-bit field,
- * it is particularly efficient to access code or data in the comm area with
- * absolute branches (ba, bla, bca) or absolute load/stores ("lwz r0,-4096(0)").
- * Because the comm area can be reached from anywhere, dyld is not needed.
- * Although eight pages are reserved, presently only two are populated and mapped.
- *
- * Routines on the comm page(s) can be thought of as the firmware for extended processor
- * instructions, whose opcodes are special forms of "bla".  Ie, they are cpu
- * capabilities.  During system initialization, the kernel populates the comm page with
- * code customized for the particular processor and platform.
- *
- * Because Mach VM cannot map the last page of an address space, the max length of
- * the comm area is seven pages.
- */
-#define _COMM_PAGE_BASE_ADDRESS                        (-8*4096)                                               // start at page -8, ie 0xFFFF8000
-#define        _COMM_PAGE_AREA_LENGTH                  ( 7*4096)                                               // reserved length of entire comm area
-#define        _COMM_PAGE_AREA_USED                    ( 2*4096)                                               // we use two pages so far
-/* data in the comm page */
-#define _COMM_PAGE_SIGNATURE                   (_COMM_PAGE_BASE_ADDRESS+0x000) // first few bytes are a signature
-#define _COMM_PAGE_VERSION                             (_COMM_PAGE_BASE_ADDRESS+0x01E) // 16-bit version#
-#define        _COMM_PAGE_THIS_VERSION                 1                                                               // this is version 1 of the commarea format
-  
-#define _COMM_PAGE_CPU_CAPABILITIES            (_COMM_PAGE_BASE_ADDRESS+0x020) // mirror of extern int _cpu_capabilities
-#define _COMM_PAGE_NCPUS                               (_COMM_PAGE_BASE_ADDRESS+0x021) // number of configured CPUs
-#define _COMM_PAGE_ALTIVEC                             (_COMM_PAGE_BASE_ADDRESS+0x024) // nonzero if Altivec available
-#define _COMM_PAGE_64_BIT                              (_COMM_PAGE_BASE_ADDRESS+0x025) // nonzero if 64-bit processor
-#define _COMM_PAGE_CACHE_LINESIZE              (_COMM_PAGE_BASE_ADDRESS+0x026) // cache line size (16-bit field)
-#define _COMM_PAGE_UNUSED1                             (_COMM_PAGE_BASE_ADDRESS+0x030) // 16 unused bytes
-#define _COMM_PAGE_2_TO_52                             (_COMM_PAGE_BASE_ADDRESS+0x040) // double float constant 2**52
-#define _COMM_PAGE_10_TO_6                             (_COMM_PAGE_BASE_ADDRESS+0x048) // double float constant 10**6
-#define _COMM_PAGE_UNUSED2                             (_COMM_PAGE_BASE_ADDRESS+0x050) // 16 unused bytes
-#define _COMM_PAGE_TIMEBASE                            (_COMM_PAGE_BASE_ADDRESS+0x060) // used by gettimeofday()
-#define _COMM_PAGE_TIMESTAMP                   (_COMM_PAGE_BASE_ADDRESS+0x068) // used by gettimeofday()
-#define _COMM_PAGE_SEC_PER_TICK                        (_COMM_PAGE_BASE_ADDRESS+0x070) // used by gettimeofday()
-#define _COMM_PAGE_UNUSED3                             (_COMM_PAGE_BASE_ADDRESS+0x080) // 384 unused bytes
- /* jump table (bla to this address, which may be a branch to the actual code somewhere else) */
-#define _COMM_PAGE_ABSOLUTE_TIME               (_COMM_PAGE_BASE_ADDRESS+0x200) // mach_absolute_time()
-#define _COMM_PAGE_SPINLOCK_TRY                        (_COMM_PAGE_BASE_ADDRESS+0x220) // spinlock_try()
-#define _COMM_PAGE_SPINLOCK_LOCK               (_COMM_PAGE_BASE_ADDRESS+0x260) // spinlock_lock()
-#define _COMM_PAGE_SPINLOCK_UNLOCK             (_COMM_PAGE_BASE_ADDRESS+0x2a0) // spinlock_unlock()
-#define _COMM_PAGE_PTHREAD_GETSPECIFIC (_COMM_PAGE_BASE_ADDRESS+0x2c0) // pthread_getspecific()
-#define _COMM_PAGE_GETTIMEOFDAY                        (_COMM_PAGE_BASE_ADDRESS+0x2e0) // used by gettimeofday()
-#define _COMM_PAGE_FLUSH_DCACHE                        (_COMM_PAGE_BASE_ADDRESS+0x4e0) // sys_dcache_flush()
-#define _COMM_PAGE_FLUSH_ICACHE                        (_COMM_PAGE_BASE_ADDRESS+0x520) // sys_icache_invalidate()
-#define _COMM_PAGE_PTHREAD_SELF                        (_COMM_PAGE_BASE_ADDRESS+0x580) // pthread_self()
-#define        _COMM_PAGE_UNUSED4                              (_COMM_PAGE_BASE_ADDRESS+0x5a0) // 32 unused bytes
-#define        _COMM_PAGE_RELINQUISH                   (_COMM_PAGE_BASE_ADDRESS+0x5c0) // used by spinlocks
-#define _COMM_PAGE_UNUSED5                             (_COMM_PAGE_BASE_ADDRESS+0x5e0) // 32 unused bytes
-#define _COMM_PAGE_BZERO                               (_COMM_PAGE_BASE_ADDRESS+0x600) // bzero()
-#define _COMM_PAGE_BCOPY                               (_COMM_PAGE_BASE_ADDRESS+0x780) // bcopy()
-#define        _COMM_PAGE_MEMCPY                               (_COMM_PAGE_BASE_ADDRESS+0x7a0) // memcpy()
-#define        _COMM_PAGE_MEMMOVE                              (_COMM_PAGE_BASE_ADDRESS+0x7a0) // memmove()
-
-#define        _COMM_PAGE_UNUSED6                              (_COMM_PAGE_BASE_ADDRESS+0xF80) // 128 unused bytes
-
-#define        _COMM_PAGE_BIGCOPY                              (_COMM_PAGE_BASE_ADDRESS+0x1000)// very-long-operand copies
-
-#endif /* __APPLE_API_PRIVATE */
-#endif /* _PPC_CPU_CAPABILITIES_H */
index 6c5da111a0c45a9313fb2cc7473dc4809b871718..e97ccb86529c69a4392e9f02d24bd2edf3c52557 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -45,17 +42,7 @@ extern __inline__ thread_act_t current_act(void)
        thread_act_t act;
        __asm__ volatile("mfsprg %0,1" : "=r" (act));  
        return act;
-};
-
-/*
- *     Note that the following function is ONLY guaranteed when preemption or interrupts are disabled
- */
-extern __inline__ struct per_proc_info *getPerProc(void) 
-{
-       struct per_proc_info *perproc;
-       __asm__ volatile("mfsprg %0,0" : "=r" (perproc));  
-       return perproc;
-};
+}
 
 #define        current_thread()        current_act()->thread
 
index 30a43fbc89b3ca2c58f0ea017ac8786cb3b6aeab..1c3626e58b28c43bebe28f434bbe2f6c08c6a790 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 28e69c4a66f8f36d14a5dde1d7d66a0ac9abddb7..5ea6542ad67b39d9bc0a2fc8970781fc2e9c39cc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -62,7 +59,7 @@ LEXT(Load_context)
 /*
  * Since this is the first thread, we came in on the interrupt
  * stack. The first thread never returns, so there is no need to
* worry about saving its frame, hence we can reset the istackptr
e worry about saving its frame, hence we can reset the istackptr
  * back to the saved_state structure at it's top
  */
                        
@@ -82,16 +79,19 @@ LEXT(Load_context)
                        lwz             r12,PP_ACTIVE_STACKS(r6)
                        lwz             r1,THREAD_KERNEL_STACK(r3)
                        lwz             r9,THREAD_TOP_ACT(r3)                   /* Point to the active activation */
-                       mtsprg  1,r9
+                       mtsprg          1,r9
                        stw             r1,0(r12)
                        li              r0,0                                                    /* Clear a register */
-                       lwz             r3,ACT_MACT_PCB(r9)                             /* Get the savearea used */
+                       lwz             r8,ACT_MACT_PCB(r9)                             /* Get the savearea used */
+                       rlwinm  r7,r8,0,0,19                                    /* Switch to savearea base */
+                       lwz             r11,SAVprev(r8)                                 /* Get the previous savearea */
                        mfmsr   r5                                                              /* Since we are passing control, get our MSR values */
-                       lwz             r11,SAVprev+4(r3)                               /* Get the previous savearea */
-                       lwz             r1,saver1+4(r3)                                 /* Load new stack pointer */
-                       stw             r0,saver3+4(r3)                                 /* Make sure we pass in a 0 for the continuation */
+                       lwz             r1,saver1(r8)                                   /* Load new stack pointer */
+                       stw             r0,saver3(r8)                                   /* Make sure we pass in a 0 for the continuation */
+                       lwz             r7,SACvrswap(r7)                                /* Get the translation from virtual to real */
                        stw             r0,FM_BACKPTR(r1)                               /* zero backptr */
-                       stw             r5,savesrr1+4(r3)                               /* Pass our MSR to the new guy */
+                       stw             r5,savesrr1(r8)                                 /* Pass our MSR to the new guy */
+                       xor             r3,r7,r8                                                /* Get the physical address of the new context save area */
                        stw             r11,ACT_MACT_PCB(r9)                    /* Unstack our savearea */
                        b               EXT(exception_exit)                             /* Go end it all... */
        
@@ -119,18 +119,19 @@ LEXT(Call_continuation)
 /*
  * Get the old kernel stack, and store into the thread structure.
  * See if a continuation is supplied, and skip state save if so.
- *
- * Note that interrupts must be disabled before we get here (i.e., splsched)
+ * NB. Continuations are no longer used, so this test is omitted,
+ * as should the second argument, but it is in generic code.
+ * We always save state. This does not hurt even if continuations
+ * are put back in.
  */
 
 /*                     Context switches are double jumps.  We pass the following to the
  *                     context switch firmware call:
  *
- *                     R3  = switchee's savearea, virtual if continuation, low order physical for full switch
+ *                     R3  = switchee's savearea
  *                     R4  = old thread
  *                     R5  = new SRR0
  *                     R6  = new SRR1
- *                     R7  = high order physical address of savearea for full switch
  *
  *                     savesrr0 is set to go to switch_in
  *                     savesrr1 is set to uninterruptible with translation on
@@ -142,169 +143,169 @@ LEXT(Call_continuation)
 
 LEXT(Switch_context)
 
-                       lwz             r11,THREAD_KERNEL_STACK(r5)             ; Get the new stack pointer
                        mfsprg  r12,0                                                   ; Get the per_proc block
                        lwz             r10,PP_ACTIVE_STACKS(r12)               ; Get the pointer to the current stack
 #if DEBUG
-                       lwz             r0,PP_ISTACKPTR(r12)                    ; (DEBUG/TRACE) make sure we are not
-                       mr.             r0,r0                                                   ; (DEBUG/TRACE) on the interrupt
-                       bne++   notonintstack                                   ; (DEBUG/TRACE) stack
+                       lwz             r11,PP_ISTACKPTR(r12)                   ; (DEBUG/TRACE) make sure we are not
+                       mr.             r11,r11                                                 ; (DEBUG/TRACE) on the interrupt
+                       bne+    notonintstack                                   ; (DEBUG/TRACE) stack
                        BREAKPOINT_TRAP
 notonintstack:
 #endif 
-               
-#if 0
-                       lwz             r8,lgPPStart(0)                                 ; (TEST/DEBUG) Get the start of per_procs
-                       sub             r7,r12,r8                                               ; (TEST/DEBUG) Find offset to our per_proc
-                       xori    r7,r7,0x1000                                    ; (TEST/DEBUG) Switch to other proc
-                       add             r8,r8,r7                                                ; (TEST/DEBUG) Switch to it
-                       lwz             r8,PP_ACTIVE_THREAD(r8)                 ; (TEST/DEBUG) Get the other active thread
-                       cmplw   r8,r5                                                   ; (TEST/DEBUG) Trying to switch to an active thread?
-                       bne++   snively                                                 ; (TEST/DEBUG) Nope...
-                       BREAKPOINT_TRAP                                                 ; (TEST/DEBUG) Get to debugger...
-
-snively:                                                                                       ; (TEST/DEBUG)
-#endif
-
-                       stw             r5,PP_ACTIVE_THREAD(r12)                ; Make the new thread current
-                       lwz             r5,THREAD_TOP_ACT(r5)                   ; Get the new activation
-                       stw             r4,THREAD_CONTINUATION(r3)              ; Set continuation into the thread
+                       stw             r4,THREAD_CONTINUATION(r3)              ; Set continuation into the thread
+                       cmpwi   cr1,r4,0                                                ; used waaaay down below 
                        lwz             r7,0(r10)                                               ; Get the current stack
-                       cmpwi   cr1,r4,0                                                ; Remeber if there is a continuation - used waaaay down below 
-                       stw             r11,0(r10)                                              ; Save the new kernel stack address
-
-                       lwz             r8,ACT_MACT_PCB(r5)                             ; Get the PCB for the new guy
-                       lwz             r9,cioSpace(r5)                                 ; Get copyin/out address space
+/*
+ * Make the new thread the current thread.
+ */
+       
                        stw             r7,THREAD_KERNEL_STACK(r3)              ; Remember the current stack in the thread (do not need???)
-                       mtsprg  1,r5                                                    ; Set the current activation pointer
+                       stw             r5,     PP_ACTIVE_THREAD(r12)           ; Make the new thread current
+                       
+                       lwz             r11,THREAD_KERNEL_STACK(r5)             ; Get the new stack pointer
+               
+                       lwz             r5,THREAD_TOP_ACT(r5)                   ; Get the new activation
+                       mtsprg          1,r5
                        lwz             r7,CTHREAD_SELF(r5)                             ; Pick up the user assist word
-                       lwz             r11,ACT_MACT_BTE(r5)                    ; Get BlueBox Task Environment
-                       lwz             r6,cioRelo(r5)                                  ; Get copyin/out relocation top
-                       lwz             r2,cioRelo+4(r5)                                ; Get copyin/out relocation bottom
+                       lwz             r8,ACT_MACT_PCB(r5)                             ; Get the PCB for the new guy
+                       
+#if 0
+                       lwz             r0,SAVflags(r8)                                 ; (TEST/DEBUG)
+                       rlwinm  r0,r0,24,24,31                                  ; (TEST/DEBUG)
+                       cmplwi  r0,SAVempty                                             ; (TEST/DEBUG)
+                       bne+    nnnn                                                    ; (TEST/DEBUG)
+                       b               .                                                               ; (TEST/DEBUG)
+nnnn:                                                                                          ; (TEST/DEBUG)
+#endif                 
                        
+                       stw             r11,0(r10)                                              ; Save the new kernel stack address
                        stw             r7,UAW(r12)                                             ; Save the assist word for the "ultra fast path"
-
+                       
+                       lwz             r11,ACT_MACT_BTE(r5)                    ; Get BlueBox Task Environment
+               
                        lwz             r7,ACT_MACT_SPF(r5)                             ; Get the special flags
                        
-                       lwz             r0,ACT_KLOADED(r5)
-                       sth             r9,ppCIOmp+mpSpace(r12)                 ; Save the space
-                       stw             r6,ppCIOmp+mpNestReloc(r12)             ; Save top part of physical address
-                       stw             r2,ppCIOmp+mpNestReloc+4(r12)   ; Save bottom part of physical address
-                       lwz             r10,PP_ACTIVE_KLOADED(r12)              ; Get kernel loaded flag address
-                       subfic  r0,r0,0                                                 ; Get bit 0 to 0 if not kloaded, 1 otherwise
-                       lwz             r2,traceMask(0)                                 ; Get the enabled traces
+                       lwz             r10,ACT_KLOADED(r5)
                        stw             r11,ppbbTaskEnv(r12)                    ; Save the bb task env
-                       srawi   r0,r0,31                                                ; Get 0 if not kloaded, ffffffff otherwise
+                       li              r0,0
+                       cmpwi   cr0,r10,0
+                       lwz             r10,PP_ACTIVE_KLOADED(r12)
                        stw             r7,spcFlags(r12)                                ; Set per_proc copy of the special flags
-                       and             r0,r5,r0                                                ; Get 0 if not kloaded, activation otherwise
+                       beq             cr0,.L_sw_ctx_not_kld
                
-                       mr.             r2,r2                                                   ; Any tracing going on?
-                       stw             r0,0(r10)                                               ; Set the kloaded stuff
+                       stw             r5,0(r10)
+                       b               .L_sw_ctx_cont
+
+.L_sw_ctx_not_kld:     
+                       stw             r0,0(r10)                                               /* act_kloaded = 0 */
+
+.L_sw_ctx_cont:        
+                       lis             r10,hi16(EXT(trcWork))                  ; Get top of trace mask
+                       rlwinm  r7,r8,0,0,19                                    /* Switch to savearea base */
+                       ori             r10,r10,lo16(EXT(trcWork))              ; Get bottom of mask
+                       lwz             r11,SAVprev(r8)                                 /* Get the previous of the switchee's savearea */
+                       lwz             r10,traceMask(r10)                              ; Get the enabled traces
                        lis             r0,hi16(CutTrace)                               ; Trace FW call
-                       lwz             r11,SAVprev+4(r8)                               ; Get the previous of the switchee savearea 
+                       mr.             r10,r10                                                 ; Any tracing going on?
                        ori             r0,r0,lo16(CutTrace)                    ; Trace FW call
+                       beq+    cswNoTrc                                                ; No trace today, dude...
                        mr              r10,r3                                                  ; Save across trace
-                       beq++   cswNoTrc                                                ; No trace today, dude...
                        lwz             r2,THREAD_TOP_ACT(r3)                   ; Trace old activation
                        mr              r3,r11                                                  ; Trace prev savearea
                        sc                                                                              ; Cut trace entry of context switch
                        mr              r3,r10                                                  ; Restore
                        
-cswNoTrc:      lwz             r2,curctx(r5)                                   ; Grab our current context pointer
+cswNoTrc:      mfmsr   r6                                                              /* Get the MSR because the switched to thread should inherit it */
+                       lwz             r7,SACvrswap(r7)                                /* Get the translation from virtual to real */
+                       stw             r11,ACT_MACT_PCB(r5)                    /* Dequeue the savearea we're switching to */
+
+                       rlwinm  r6,r6,0,MSR_FP_BIT+1,MSR_FP_BIT-1       /* Turn off the FP */
+                       lwz             r2,curctx(r5)                                   ; Grab our current context pointer
+                       rlwinm  r6,r6,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     /* Turn off the vector */
+                       mr              r4,r3                                                   /* Save our old thread to pass back */
+                       
+                       lhz             r0,PP_CPU_NUMBER(r12)                   ; Get our CPU number
                        lwz             r10,FPUowner(r12)                               ; Grab the owner of the FPU                     
                        lwz             r9,VMXowner(r12)                                ; Grab the owner of the vector
-                       lhz             r0,PP_CPU_NUMBER(r12)                   ; Get our CPU number
-                       mfmsr   r6                                                              ; Get the MSR because the switched to thread should inherit it 
-                       stw             r11,ACT_MACT_PCB(r5)                    ; Dequeue the savearea we are switching to
-                       li              r0,1                                                    ; Get set to hold off quickfret
-
-                       rlwinm  r6,r6,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Turn off the FP
                        cmplw   r10,r2                                                  ; Do we have the live float context?
                        lwz             r10,FPUlevel(r2)                                ; Get the live level
-                       mr              r4,r3                                                   ; Save our old thread to pass back 
                        cmplw   cr5,r9,r2                                               ; Do we have the live vector context?           
-                       rlwinm  r6,r6,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Turn off the vector
-                       stw             r0,holdQFret(r12)                               ; Make sure we hold off releasing quickfret
-                       bne++   cswnofloat                                              ; Float is not ours...
+                       bne+    cswnofloat                                              ; Float is not ours...
                        
                        cmplw   r10,r11                                                 ; Is the level the same?
                        lwz             r5,FPUcpu(r2)                                   ; Get the owning cpu
-                       bne++   cswnofloat                                              ; Level not the same, this is not live...
+                       bne+    cswnofloat                                              ; Level not the same, this is not live...
                        
                        cmplw   r5,r0                                                   ; Still owned by this cpu?
                        lwz             r10,FPUsave(r2)                                 ; Get the level
-                       bne++   cswnofloat                                              ; CPU claimed by someone else...
+                       bne+    cswnofloat                                              ; CPU claimed by someone else...
                        
                        mr.             r10,r10                                                 ; Is there a savearea here?
                        ori             r6,r6,lo16(MASK(MSR_FP))                ; Enable floating point
                        
-                       beq--   cswnofloat                                              ; No savearea to check...
+                       beq-    cswnofloat                                              ; No savearea to check...
                        
                        lwz             r3,SAVlevel(r10)                                ; Get the level
-                       lwz             r5,SAVprev+4(r10)                               ; Get the previous of this savearea
+                       lwz             r5,SAVprev(r10)                                 ; Get the previous of this savearea
                        cmplw   r3,r11                                                  ; Is it for the current level?
                        
-                       bne++   cswnofloat                                              ; Nope...
+                       bne+    cswnofloat                                              ; Nope...
                        
                        stw             r5,FPUsave(r2)                                  ; Pop off this savearea
-
-                       rlwinm  r3,r10,0,0,19                                   ; Move back to start of page
-
-                       lwz             r5,quickfret(r12)                               ; Get the first in quickfret list (top)                                 
-                       lwz             r9,quickfret+4(r12)                             ; Get the first in quickfret list (bottom)                                      
-                       lwz             r7,SACvrswap(r3)                                ; Get the virtual to real conversion (top)
-                       lwz             r3,SACvrswap+4(r3)                              ; Get the virtual to real conversion (bottom)
-                       stw             r5,SAVprev(r10)                                 ; Link the old in (top)                                 
-                       stw             r9,SAVprev+4(r10)                               ; Link the old in (bottom)                                      
-                       xor             r3,r10,r3                                               ; Convert to physical
-                       stw             r7,quickfret(r12)                               ; Set the first in quickfret list (top)                                 
-                       stw             r3,quickfret+4(r12)                             ; Set the first in quickfret list (bottom)                                      
+                       rlwinm  r5,r10,0,0,19                                   ; Move back to start of page
+                       lwz             r5,SACvrswap(r5)                                ; Get the virtual to real conversion
+                       la              r9,quickfret(r12)                               ; Point to the quickfret chain header                                   
+                       xor             r5,r10,r5                                               ; Convert savearea address to real
 
 #if FPVECDBG
                        lis             r0,hi16(CutTrace)                               ; (TEST/DEBUG)
-                       mr              r7,r2                                                   ; (TEST/DEBUG)
                        li              r2,0x4401                                               ; (TEST/DEBUG)
                        oris    r0,r0,lo16(CutTrace)                    ; (TEST/DEBUG)
                        sc                                                                              ; (TEST/DEBUG)
                        lhz             r0,PP_CPU_NUMBER(r12)                   ; (TEST/DEBUG)
-                       mr              r2,r7                                                   ; (TEST/DEBUG) 
 #endif 
 
-cswnofloat:    bne++   cr5,cswnovect                                   ; Vector is not ours...
+;
+;                      Note: we need to do the atomic operation here because, even though
+;                      it is impossible with the current implementation, that we may take a
+;                      PTE miss between the load of the quickfret anchor and the subsequent
+;                      store.  The interrupt handler will dequeue everything on the list and
+;                      we could end up using stale data.  I do not like doing this...
+;
+
+cswfpudq:      lwarx   r3,0,r9                                                 ; Pick up the old chain head
+                       stw             r3,SAVprev(r10)                                 ; Move it to the current guy
+                       stwcx.  r5,0,r9                                                 ; Save it
+                       bne-    cswfpudq                                                ; Someone chaged the list...
+
+cswnofloat:    bne+    cr5,cswnovect                                   ; Vector is not ours...
 
                        lwz             r10,VMXlevel(r2)                                ; Get the live level
                        
                        cmplw   r10,r11                                                 ; Is the level the same?
                        lwz             r5,VMXcpu(r2)                                   ; Get the owning cpu
-                       bne++   cswnovect                                               ; Level not the same, this is not live...
+                       bne+    cswnovect                                               ; Level not the same, this is not live...
                        
                        cmplw   r5,r0                                                   ; Still owned by this cpu?
                        lwz             r10,VMXsave(r2)                                 ; Get the level
-                       bne++   cswnovect                                               ; CPU claimed by someone else...
+                       bne+    cswnovect                                               ; CPU claimed by someone else...
                        
                        mr.             r10,r10                                                 ; Is there a savearea here?
                        oris    r6,r6,hi16(MASK(MSR_VEC))               ; Enable vector
                        
-                       beq--   cswnovect                                               ; No savearea to check...
+                       beq-    cswnovect                                               ; No savearea to check...
                        
                        lwz             r3,SAVlevel(r10)                                ; Get the level
-                       lwz             r5,SAVprev+4(r10)                               ; Get the previous of this savearea
+                       lwz             r5,SAVprev(r10)                                 ; Get the previous of this savearea
                        cmplw   r3,r11                                                  ; Is it for the current level?
                        
-                       bne++   cswnovect                                               ; Nope...
+                       bne+    cswnovect                                               ; Nope...
                        
                        stw             r5,VMXsave(r2)                                  ; Pop off this savearea
-                       rlwinm  r3,r10,0,0,19                                   ; Move back to start of page
-
-                       lwz             r5,quickfret(r12)                               ; Get the first in quickfret list (top)                                 
-                       lwz             r9,quickfret+4(r12)                             ; Get the first in quickfret list (bottom)                                      
-                       lwz             r2,SACvrswap(r3)                                ; Get the virtual to real conversion (top)
-                       lwz             r3,SACvrswap+4(r3)                              ; Get the virtual to real conversion (bottom)
-                       stw             r5,SAVprev(r10)                                 ; Link the old in (top)                                 
-                       stw             r9,SAVprev+4(r10)                               ; Link the old in (bottom)                                      
-                       xor             r3,r10,r3                                               ; Convert to physical
-                       stw             r2,quickfret(r12)                               ; Set the first in quickfret list (top)                                 
-                       stw             r3,quickfret+4(r12)                             ; Set the first in quickfret list (bottom)                                      
+                       rlwinm  r5,r10,0,0,19                                   ; Move back to start of page
+                       lwz             r5,SACvrswap(r5)                                ; Get the virtual to real conversion
+                       la              r9,quickfret(r12)                               ; Point to the quickfret chain header                                   
+                       xor             r5,r10,r5                                               ; Convert savearea address to real
 
 #if FPVECDBG
                        lis             r0,hi16(CutTrace)                               ; (TEST/DEBUG)
@@ -313,23 +314,31 @@ cswnofloat:       bne++   cr5,cswnovect                                   ; Vector is not ours...
                        sc                                                                              ; (TEST/DEBUG)
 #endif 
 
-cswnovect:     li              r0,0                                                    ; Get set to release quickfret holdoff  
-                       rlwinm  r11,r8,0,0,19                                   ; Switch to savearea base
-                       lis             r9,hi16(EXT(switch_in))                 ; Get top of switch in routine 
-                       lwz             r5,savesrr0+4(r8)                               ; Set up the new SRR0
-                       lwz             r7,SACvrswap(r11)                               ; Get the high order V to R translation
-                       lwz             r11,SACvrswap+4(r11)                    ; Get the low order V to R translation
-                       ori             r9,r9,lo16(EXT(switch_in))              ; Bottom half of switch in 
-                       stw             r0,holdQFret(r12)                               ; Make sure we release quickfret holdoff
-                       stw             r9,savesrr0+4(r8)                               ; Make us jump to the switch in routine 
+;
+;                      Note: we need to do the atomic operation here because, even though
+;                      it is impossible with the current implementation, that we may take a
+;                      PTE miss between the load of the quickfret anchor and the subsequent
+;                      store.  The interrupt handler will dequeue everything on the list and
+;                      we could end up using stale data.  I do not like doing this...
+;
 
-                       lwz             r9,SAVflags(r8)                                 /* Get the flags */
+cswvecdq:      lwarx   r3,0,r9                                                 ; Pick up the old chain head
+                       stw             r3,SAVprev(r10)                                 ; Move it to the current guy
+                       stwcx.  r5,0,r9                                                 ; Save it
+                       bne-    cswvecdq                                                ; Someone chaged the list...
+
+cswnovect:     lis             r9,hi16(EXT(switch_in))                 /* Get top of switch in routine */
+                       lwz             r5,savesrr0(r8)                                 /* Set up the new SRR0 */
+                       ori             r9,r9,lo16(EXT(switch_in))              /* Bottom half of switch in */
                        lis             r0,hi16(SwitchContextCall)              /* Top part of switch context */
+                       stw             r9,savesrr0(r8)                                 /* Make us jump to the switch in routine */
+                       
                        li              r10,MSR_SUPERVISOR_INT_OFF              /* Get the switcher's MSR */
-                       ori             r0,r0,lo16(SwitchContextCall)   /* Bottom part of switch context */
-                       stw             r10,savesrr1+4(r8)                              /* Set up for switch in */
+                       lwz             r9,SAVflags(r8)                                 /* Get the flags */
+                       stw             r10,savesrr1(r8)                                /* Set up for switch in */
                        rlwinm  r9,r9,0,15,13                                   /* Reset the syscall flag */
-                       xor             r3,r11,r8                                               /* Get the physical address of the new context save area */
+                       ori             r0,r0,lo16(SwitchContextCall)   /* Bottom part of switch context */
+                       xor             r3,r7,r8                                                /* Get the physical address of the new context save area */
                        stw             r9,SAVflags(r8)                                 /* Set the flags */
 
                        bne             cr1,swtchtocont                                 ; Switch to the continuation
@@ -351,11 +360,9 @@ cswnovect: li              r0,0                                                    ; Get set to release quickfret holdoff
 
                
 swtchtocont:
-
-                       stw             r5,savesrr0+4(r8)                               ; Set the pc
-                       stw             r6,savesrr1+4(r8)                               ; Set the next MSR to use
-                       stw             r4,saver3+4(r8)                                 ; Make sure we pass back the old thread
-                       mr              r3,r8                                                   ; Pass in the virtual address of savearea
+                       stw             r5,savesrr0(r8)                                 ; Set the pc
+                       stw             r6,savesrr1(r8)                                 ; Set the next MSR to use
+                       stw             r4,saver3(r8)                                   ; Make sure we pass back the old thread
                        
                        b               EXT(exception_exit)                             ; Blocking on continuation, toss old context...
 
@@ -368,7 +375,7 @@ swtchtocont:
  *                     with translation on.  If we could, this should be done in lowmem_vectors
  *                     before translation is turned on.  But we can't, dang it!
  *
- *                     R3  = switcher's savearea (32-bit virtual)
+ *                     R3  = switcher's savearea
  *                     saver4  = old thread in switcher's save
  *                     saver5  = new SRR0 in switcher's save
  *                     saver6  = new SRR1 in switcher's save
@@ -381,30 +388,31 @@ swtchtocont:
                        .globl  EXT(switch_in)
 
 LEXT(switch_in)
-
-                       lwz             r4,saver4+4(r3)                                 ; Get the old thread 
-                       lwz             r5,saver5+4(r3)                                 ; Get the srr0 value 
                        
-                       mfsprg  r0,2                                                    ; Get feature flags 
-                       lwz             r9,THREAD_TOP_ACT(r4)                   ; Get the switched from ACT
-                       lwz             r6,saver6+4(r3)                                 ; Get the srr1 value 
-                       rlwinm. r0,r0,0,pf64Bitb,pf64Bitb               ; Check for 64-bit
-                       lwz             r10,ACT_MACT_PCB(r9)                    ; Get the top PCB on the old thread 
+                       lwz             r4,saver4(r3)                                   /* Get the old thread */
+                       lwz             r9,THREAD_TOP_ACT(r4)                   /* Get the switched from ACT */
+                       lwz             r5,saver5(r3)                                   /* Get the srr0 value */
+                       lwz             r10,ACT_MACT_PCB(r9)                    /* Get the top PCB on the old thread */
+                       lwz             r6,saver6(r3)                                   /* Get the srr1 value */
 
-                       stw             r3,ACT_MACT_PCB(r9)                             ; Put the new one on top
-                       stw             r10,SAVprev+4(r3)                               ; Chain on the old one
+                       stw             r3,ACT_MACT_PCB(r9)                             /* Put the new one on top */
+                       stw             r10,SAVprev(r3)                                 /* Chain on the old one */
 
-                       mr              r3,r4                                                   ; Pass back the old thread 
+                       mr              r3,r4                                                   /* Pass back the old thread */
+
+                       mtsrr0  r5                                                              /* Set return point */
+                       mtsrr1  r6                                                              /* Set return MSR */
+                       rfi                                                                             /* Jam... */
+                       .long   0
+                       .long   0
+                       .long   0
+                       .long   0
+                       .long   0
+                       .long   0
+                       .long   0
+                       .long   0
 
-                       mtsrr0  r5                                                              ; Set return point
-                       mtsrr1  r6                                                              ; Set return MSR
-                       
-                       bne++   siSixtyFour                                             ; Go do 64-bit...
 
-                       rfi                                                                             ; Jam...
-                       
-siSixtyFour:
-                       rfid                                                                    ; Jam...
                        
 /*
  * void fpu_save(facility_context ctx)
@@ -420,14 +428,12 @@ siSixtyFour:
 
 LEXT(fpu_save)
                        
-                       lis             r2,hi16(MASK(MSR_VEC))                  ; Get the vector enable
-                       li              r12,lo16(MASK(MSR_EE))                  ; Get the EE bit
-                       ori             r2,r2,lo16(MASK(MSR_FP))                ; Get FP
 
                        mfmsr   r0                                                              ; Get the MSR
-                       andc    r0,r0,r2                                                ; Clear FP, VEC
-                       andc    r2,r0,r12                                               ; Clear EE
+                       rlwinm  r0,r0,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r2,r0,0,MSR_EE_BIT+1,MSR_EE_BIT-1       ; But do interrupts only for now
                        ori             r2,r2,MASK(MSR_FP)                              ; Enable the floating point feature for now also
+                       rlwinm  r0,r0,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
                        mtmsr   r2                                                              ; Set the MSR
                        isync
 
@@ -442,7 +448,7 @@ LEXT(fpu_save)
                        mr.             r3,r12                                                  ; (TEST/DEBUG)
                        li              r2,0x6F00                                               ; (TEST/DEBUG)
                        li              r5,0                                                    ; (TEST/DEBUG)
-                       beq--   noowneryet                                              ; (TEST/DEBUG)
+                       beq-    noowneryet                                              ; (TEST/DEBUG)
                        lwz             r4,FPUlevel(r12)                                ; (TEST/DEBUG)
                        lwz             r5,FPUsave(r12)                                 ; (TEST/DEBUG)
 
@@ -455,17 +461,17 @@ noowneryet:       oris    r0,r0,lo16(CutTrace)                    ; (TEST/DEBUG)
 
 fsretry:       mr.             r12,r12                                                 ; Anyone own the FPU?
                        lhz             r11,PP_CPU_NUMBER(r6)                   ; Get our CPU number
-                       beq--   fsret                                                   ; Nobody owns the FPU, no save required...
+                       beq-    fsret                                                   ; Nobody owns the FPU, no save required...
                        
                        cmplw   cr1,r3,r12                                              ; Is the specified context live?
                        
                        isync                                                                   ; Force owner check first
                        
                        lwz             r9,FPUcpu(r12)                                  ; Get the cpu that context was last on          
-                       bne--   cr1,fsret                                               ; No, it is not...
+                       bne-    cr1,fsret                                               ; No, it is not...
                        
                        cmplw   cr1,r9,r11                                              ; Was the context for this processor? 
-                       beq--   cr1,fsgoodcpu                                   ; Facility last used on this processor...
+                       beq-    cr1,fsgoodcpu                                   ; Facility last used on this processor...
 
                        b               fsret                                                   ; Someone else claimed it...
                        
@@ -479,7 +485,7 @@ fsgoodcpu:  lwz             r3,FPUsave(r12)                                 ; Get the current FPU savearea for the threa
                        
                        lwz             r8,SAVlevel(r3)                                 ; Get the level this savearea is for
                        cmplw   cr1,r9,r8                                               ; Correct level?
-                       beq--   cr1,fsret                                               ; The current level is already saved, bail out...
+                       beq-    cr1,fsret                                               ; The current level is already saved, bail out...
 
 fsneedone:     bl              EXT(save_get)                                   ; Get a savearea for the context
 
@@ -488,26 +494,78 @@ fsneedone:        bl              EXT(save_get)                                   ; Get a savearea for the context
                        lwz             r12,FPUowner(r6)                                ; Get back our thread
                        stb             r4,SAVflags+2(r3)                               ; Mark this savearea as a float
                        mr.             r12,r12                                                 ; See if we were disowned while away. Very, very small chance of it...
-                       beq--   fsbackout                                               ; If disowned, just toss savearea...
+                       beq-    fsbackout                                               ; If disowned, just toss savearea...
                        lwz             r4,facAct(r12)                                  ; Get the activation associated with live context
+                       mtlr    r2                                                              ; Restore return
                        lwz             r8,FPUsave(r12)                                 ; Get the current top floating point savearea
                        stw             r4,SAVact(r3)                                   ; Indicate the right activation for this context
                        lwz             r9,FPUlevel(r12)                                ; Get our current level indicator again         
                        stw             r3,FPUsave(r12)                                 ; Set this as the most current floating point context
-                       stw             r8,SAVprev+4(r3)                                ; And then chain this in front
+                       stw             r8,SAVprev(r3)                                  ; And then chain this in front
 
                        stw             r9,SAVlevel(r3)                                 ; Show level in savearea
 
-            bl         fp_store                                                ; save all 32 FPRs in the save area at r3
-                       mtlr    r2                                                              ; Restore return
-            
+;
+;                      Save the current FPU state into the PCB of the thread that owns it.
+; 
+
+                       la              r11,savefp0(r3)                                 ; Point to the 1st line
+                       dcbz    0,r11                                                   ; Allocate the first savearea line 
+                       
+                       la              r11,savefp4(r3)                                 ; Point to the 2nd line 
+                       stfd    f0,savefp0(r3)
+                       dcbz    0,r11                                                   ; Allocate it
+                       stfd    f1,savefp1(r3)
+                       stfd    f2,savefp2(r3)
+                       la              r11,savefp8(r3)                                 ; Point to the 3rd line 
+                       stfd    f3,savefp3(r3)
+                       dcbz    0,r11                                                   ; Allocate it 
+                       stfd    f4,savefp4(r3)
+                       stfd    f5,savefp5(r3)
+                       stfd    f6,savefp6(r3)
+                       la              r11,savefp12(r3)                                ; Point to the 4th line 
+                       stfd    f7,savefp7(r3)
+                       dcbz    0,r11                                                   ; Allocate it 
+                       stfd    f8,savefp8(r3)
+                       stfd    f9,savefp9(r3)
+                       stfd    f10,savefp10(r3)
+                       la              r11,savefp16(r3)                                ; Point to the 5th line 
+                       stfd    f11,savefp11(r3)
+                       dcbz    0,r11                                                   ; Allocate it 
+                       stfd    f12,savefp12(r3)
+                       stfd    f13,savefp13(r3)
+                       stfd    f14,savefp14(r3)
+                       la              r11,savefp20(r3)                                ; Point to the 6th line 
+                       stfd    f15,savefp15(r3)
+                       stfd    f16,savefp16(r3)
+                       stfd    f17,savefp17(r3)
+                       stfd    f18,savefp18(r3)
+                       la              r11,savefp24(r3)                                ; Point to the 7th line 
+                       stfd    f19,savefp19(r3)
+                       dcbz    0,r11                                                   ; Allocate it 
+                       stfd    f20,savefp20(r3)
+                       stfd    f21,savefp21(r3)
+                       stfd    f22,savefp22(r3)
+                       la              r11,savefp28(r3)                                ; Point to the 8th line 
+                       stfd    f23,savefp23(r3)
+                       dcbz    0,r11                                                   ; Allocate it 
+                       stfd    f24,savefp24(r3)
+                       stfd    f25,savefp25(r3)
+                       stfd    f26,savefp26(r3)
+                       stfd    f27,savefp27(r3)
+                       stfd    f28,savefp28(r3)
+
+                       stfd    f29,savefp29(r3)
+                       stfd    f30,savefp30(r3)
+                       stfd    f31,savefp31(r3)
+
 fsret:         mtmsr   r0                                                              ; Put interrupts on if they were and floating point off
                        isync
 
                        blr
 
-fsbackout:     mr              r4,r0                                                   ; restore the original MSR
-                       b               EXT(save_ret_wMSR)                              ; Toss savearea and return from there...
+fsbackout:     mr              r12,r0                                                  ; Save the original MSR
+                       b               EXT(save_ret_join)                              ; Toss savearea and return from there...
 
 /*
  * fpu_switch()
@@ -609,7 +667,6 @@ fswretry:   mr.             r22,r22                                                 ; See if there is any live FP status
                        mr              r5,r31                                                  ; (TEST/DEBUG)
                        oris    r0,r0,lo16(CutTrace)                    ; (TEST/DEBUG)
                        sc                                                                              ; (TEST/DEBUG)
-                       li              r3,0                                                    ; (TEST/DEBUG)
 #endif 
 
                        beq+    fsnosave                                                ; Same level, so already saved...
@@ -619,54 +676,16 @@ fsmstsave:        stw             r3,FPUowner(r26)                                ; Kill the context now
                        eieio                                                                   ; Make sure everyone sees it
                        bl              EXT(save_get)                                   ; Go get a savearea
 
-                       mr.             r31,r31                                                 ; Are we saving the user state?
-                       la              r15,FPUsync(r22)                                ; Point to the sync word
-                       beq++   fswusave                                                ; Yeah, no need for lock...
-;
-;                      Here we make sure that the live context is not tossed while we are
-;                      trying to push it.  This can happen only for kernel context and
-;                      then only by a race with act_machine_sv_free.
-;
-;                      We only need to hold this for a very short time, so no sniffing needed.
-;                      If we find any change to the level, we just abandon.
-;
-fswsync:       lwarx   r19,0,r15                                               ; Get the sync word
-                       li              r0,1                                                    ; Get the lock
-                       cmplwi  cr1,r19,0                                               ; Is it unlocked?
-                       stwcx.  r0,0,r15                                                ; Store lock and test reservation
-                       cror    cr0_eq,cr1_eq,cr0_eq                    ; Combine lost reservation and previously locked
-                       bne--   fswsync                                                 ; Try again if lost reservation or locked...
-
-                       isync                                                                   ; Toss speculation
-                       
-                       lwz             r0,FPUlevel(r22)                                ; Pick up the level again
-                       li              r7,0                                                    ; Get unlock value
-                       cmplw   r0,r31                                                  ; Same level?
-                       beq++   fswusave                                                ; Yeah, we expect it to be...
-                       
-                       stw             r7,FPUsync(r22)                                 ; Unlock lock. No need to sync here
-                       
-                       bl              EXT(save_ret)                                   ; Toss save area because we are abandoning save                         
-                       b               fsnosave                                                ; Skip the save...
-
-                       .align  5
-
-fswusave:      lwz             r12,facAct(r22)                                 ; Get the activation associated with the context
+                       la              r11,savefp0(r3)                                 ; Point to the 1st line in new savearea
+                       lwz             r12,facAct(r22)                                 ; Get the activation associated with the context
+                       dcbz    0,r11                                                   ; Allocate cache
                        stw             r3,FPUsave(r22)                                 ; Set this as the latest context savearea for the thread
-                       mr.             r31,r31                                                 ; Check again if we were user level
-                       stw             r30,SAVprev+4(r3)                               ; Point us to the old context
+
+                       stw             r30,SAVprev(r3)                                 ; Point us to the old context
                        stw             r31,SAVlevel(r3)                                ; Tag our level
                        li              r7,SAVfloat                                             ; Get the floating point ID
                        stw             r12,SAVact(r3)                                  ; Make sure we point to the right guy
                        stb             r7,SAVflags+2(r3)                               ; Set that we have a floating point save area
-                       
-                       li              r7,0                                                    ; Get the unlock value
-
-                       beq--   fswnulock                                               ; Skip unlock if user (we did not lock it)...
-                       eieio                                                                   ; Make sure that these updates make it out
-                       stw             r7,FPUsync(r22)                                 ; Unlock it.
-                       
-fswnulock:             
 
 #if FPVECDBG
                        lis             r0,hi16(CutTrace)                               ; (TEST/DEBUG)
@@ -675,7 +694,58 @@ fswnulock:
                        sc                                                                              ; (TEST/DEBUG)
 #endif 
 
-            bl         fp_store                                                ; store all 32 FPRs
+;
+;                      Now we will actually save the old context
+;
+                       
+                       la              r11,savefp4(r3)                                 ; Point to the 2nd line
+                       stfd    f0,savefp0(r3)
+                       dcbz    0,r11                                                   ; Allocate cache
+                       stfd    f1,savefp1(r3)
+                       stfd    f2,savefp2(r3)
+                       la              r11,savefp8(r3)                                 ; Point to the 3rd line
+                       stfd    f3,savefp3(r3)
+                       dcbz    0,r11                                                   ; Allocate cache
+                       stfd    f4,savefp4(r3)
+                       stfd    f5,savefp5(r3)
+                       stfd    f6,savefp6(r3)
+                       la              r11,savefp12(r3)                                ; Point to the 4th line
+                       stfd    f7,savefp7(r3)
+                       dcbz    0,r11                                                   ; Allocate cache
+                       stfd    f8,savefp8(r3)
+                       stfd    f9,savefp9(r3)
+                       stfd    f10,savefp10(r3)
+                       la              r11,savefp16(r3)                                ; Point to the 5th line
+                       stfd    f11,savefp11(r3)
+                       dcbz    0,r11                                                   ; Allocate cache
+                       stfd    f12,savefp12(r3)
+                       stfd    f13,savefp13(r3)
+                       stfd    f14,savefp14(r3)
+                       la              r11,savefp20(r3)                                ; Point to the 6th line 
+                       stfd    f15,savefp15(r3)
+                       dcbz    0,r11                                                   ; Allocate cache
+                       stfd    f16,savefp16(r3)
+                       stfd    f17,savefp17(r3)
+                       stfd    f18,savefp18(r3)
+                       la              r11,savefp24(r3)                                ; Point to the 7th line
+                       stfd    f19,savefp19(r3)
+                       dcbz    0,r11                                                   ; Allocate cache
+                       stfd    f20,savefp20(r3)
+
+                       stfd    f21,savefp21(r3)
+                       stfd    f22,savefp22(r3)
+                       la              r11,savefp28(r3)                                ; Point to the 8th line
+                       stfd    f23,savefp23(r3)
+                       dcbz    0,r11                                                   ; allocate it
+                       stfd    f24,savefp24(r3)
+                       stfd    f25,savefp25(r3)
+                       stfd    f26,savefp26(r3)
+                       stfd    f27,savefp27(r3)
+                       dcbz    0,r11                                                   ; allocate it
+                       stfd    f28,savefp28(r3)
+                       stfd    f29,savefp29(r3)
+                       stfd    f30,savefp30(r3)
+                       stfd    f31,savefp31(r3)
 
 ;
 ;                      The context is all saved now and the facility is free.
@@ -710,30 +780,28 @@ fsnosave: lwz             r15,ACT_MACT_PCB(r17)                   ; Get the current level of the "new" one
                        ori             r18,r18,lo16(EXT(per_proc_info))        ; Set base per_proc
                        li              r16,FPUowner                                    ; Displacement to float owner
                        add             r19,r18,r19                                             ; Point to the owner per_proc   
+                       li              r0,0
                        
 fsinvothr:     lwarx   r18,r16,r19                                             ; Get the owner
-                       sub             r0,r18,r29                                              ; Subtract one from the other
-                       sub             r11,r29,r18                                             ; Subtract the other from the one
-                       or              r11,r11,r0                                              ; Combine them
-                       srawi   r11,r11,31                                              ; Get a 0 if equal or -1 of not
-                       and             r18,r18,r11                                             ; Make 0 if same, unchanged if not
-                       stwcx.  r18,r16,r19                                             ; Try to invalidate it
-                       bne--   fsinvothr                                               ; Try again if there was a collision...
+                       cmplw   r18,r29                                                 ; Does he still have this context?
+                       bne             fsinvoths                                               ; Nope...               
+                       stwcx.  r0,r16,r19                                              ; Try to invalidate it
+                       bne-    fsinvothr                                               ; Try again if there was a collision...
                
-                       cmplwi  cr1,r14,0                                               ; Do we possibly have some context to load?
+fsinvoths:     cmplwi  cr1,r14,0                                               ; Do we possibly have some context to load?
                        la              r11,savefp0(r14)                                ; Point to first line to bring in
                        stw             r15,FPUlevel(r29)                               ; Set the "new" active level
                        eieio
                        stw             r29,FPUowner(r26)                               ; Mark us as having the live context
                        
-                       beq++   cr1,MakeSureThatNoTerroristsCanHurtUsByGod      ; No "new" context to load...
+                       beq+    cr1,MakeSureThatNoTerroristsCanHurtUsByGod      ; No "new" context to load...
                        
                        dcbt    0,r11                                                   ; Touch line in
 
-                       lwz             r3,SAVprev+4(r14)                               ; Get the previous context
+                       lwz             r3,SAVprev(r14)                                 ; Get the previous context
                        lwz             r0,SAVlevel(r14)                                ; Get the level of first facility savearea
                        cmplw   r0,r15                                                  ; Top level correct to load?
-                       bne--   MakeSureThatNoTerroristsCanHurtUsByGod  ; No, go initialize...
+                       bne-    MakeSureThatNoTerroristsCanHurtUsByGod  ; No, go initialize...
 
                        stw             r3,FPUsave(r29)                                 ; Pop the context (we will toss the savearea later)
                        
@@ -744,9 +812,6 @@ fsinvothr:  lwarx   r18,r16,r19                                             ; Get the owner
                        sc                                                                              ; (TEST/DEBUG)
 #endif 
 
-// Note this code is used both by 32- and 128-byte processors.  This means six extra DCBTs
-// are executed on a 128-byte machine, but that is better than a mispredicted branch.
-
                        la              r11,savefp4(r14)                                ; Point to next line
                        dcbt    0,r11                                                   ; Touch line in
                        lfd     f0, savefp0(r14)
@@ -797,15 +862,17 @@ fsinvothr:        lwarx   r18,r16,r19                                             ; Get the owner
                        mr              r3,r14                                                  ; Get the old savearea (we popped it before)
                        bl              EXT(save_ret)                                   ; Toss it
                        
-fsenable:      lwz             r8,savesrr1+4(r25)                              ; Get the msr of the interrupted guy
+fsenable:      lwz             r8,savesrr1(r25)                                ; Get the msr of the interrupted guy
+                       rlwinm  r5,r25,0,0,19                                   ; Get the page address of the savearea 
                        ori             r8,r8,MASK(MSR_FP)                              ; Enable the floating point feature
                        lwz             r10,ACT_MACT_SPF(r17)                   ; Get the act special flags
                        lwz             r11,spcFlags(r26)                               ; Get per_proc spec flags cause not in sync with act
+                       lwz             r5,SACvrswap(r5)                                ; Get Virtual to Real translation 
                        oris    r10,r10,hi16(floatUsed|floatCng)        ; Set that we used floating point
                        oris    r11,r11,hi16(floatUsed|floatCng)        ; Set that we used floating point
                        rlwinm. r0,r8,0,MSR_PR_BIT,MSR_PR_BIT   ; See if we are doing this for user state
-                       stw             r8,savesrr1+4(r25)                              ; Set the msr of the interrupted guy
-                       mr              r3,r25                                                  ; Pass the virtual addres of savearea
+                       stw             r8,savesrr1(r25)                                ; Set the msr of the interrupted guy
+                       xor             r3,r25,r5                                               ; Get the real address of the savearea
                        beq-    fsnuser                                                 ; We are not user state...
                        stw             r10,ACT_MACT_SPF(r17)                   ; Set the activation copy
                        stw             r11,spcFlags(r26)                               ; Set per_proc copy
@@ -889,14 +956,13 @@ fsthesame:
                        beq-    cr1,fsenable                                    ; Not saved yet, nothing to pop, go enable and exit...
                        
                        lwz             r11,SAVlevel(r30)                               ; Get the level of top saved context
-                       lwz             r14,SAVprev+4(r30)                              ; Get the previous savearea
+                       lwz             r14,SAVprev(r30)                                ; Get the previous savearea
                        
                        cmplw   r11,r31                                                 ; Are live and saved the same?
 
                        bne+    fsenable                                                ; Level not the same, nothing to pop, go enable and exit...
                        
                        mr              r3,r30                                                  ; Get the old savearea (we popped it before)
-                       stw             r14,FPUsave(r22)                                ; Pop the savearea from the stack
                        bl              EXT(save_ret)                                   ; Toss it
                        b               fsenable                                                ; Go enable and exit...
 
@@ -911,13 +977,12 @@ fsthesame:
 
 LEXT(toss_live_fpu)
                        
-                       lis             r0,hi16(MASK(MSR_VEC))                  ; Get VEC
+                       
                        mfmsr   r9                                                              ; Get the MSR
-                       ori             r0,r0,lo16(MASK(MSR_FP))                ; Add in FP
+                       rlwinm  r0,r9,0,MSR_EE_BIT+1,MSR_EE_BIT-1       ; Clear interuptions
                        rlwinm. r8,r9,0,MSR_FP_BIT,MSR_FP_BIT   ; Are floats on right now?
-                       andc    r9,r9,r0                                                ; Force off VEC and FP
-                       ori             r0,r0,lo16(MASK(MSR_EE))                ; Turn off EE
-                       andc    r0,r9,r0                                                ; Turn off EE now
+                       rlwinm  r9,r9,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Make sure vectors are turned off
+                       rlwinm  r9,r9,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Make sure floats are turned off
                        mtmsr   r0                                                              ; No interruptions
                        isync
                        beq+    tlfnotours                                              ; Floats off, can not be live here...
@@ -932,9 +997,9 @@ LEXT(toss_live_fpu)
                        lwz             r6,FPUowner(r8)                                 ; Get the thread that owns the floats
                        li              r0,0                                                    ; Clear this just in case we need it
                        cmplw   r6,r3                                                   ; Are we tossing our own context?
-                       bne--   tlfnotours                                              ; Nope...
+                       bne-    tlfnotours                                              ; Nope...
                        
-                       lfd             f1,Zero(0)                                              ; Make a 0                      
+                       fsub    f1,f1,f1                                                ; Make a 0                      
                        mtfsf   0xFF,f1                                                 ; Clear it
 
 tlfnotours:    lwz             r11,FPUcpu(r3)                                  ; Get the cpu on which we last loaded context
@@ -943,18 +1008,15 @@ tlfnotours:      lwz             r11,FPUcpu(r3)                                  ; Get the cpu on which we last loaded contex
                        ori             r12,r12,lo16(EXT(per_proc_info))        ; Set base per_proc
                        li              r10,FPUowner                                    ; Displacement to float owner
                        add             r11,r12,r11                                             ; Point to the owner per_proc   
+                       li              r0,0                                                    ; Set a 0 to invalidate context
                        
 tlfinvothr:    lwarx   r12,r10,r11                                             ; Get the owner
+                       cmplw   r12,r3                                                  ; Does he still have this context?
+                       bne+    tlfexit                                                 ; Nope, leave...                
+                       stwcx.  r0,r10,r11                                              ; Try to invalidate it
+                       bne-    tlfinvothr                                              ; Try again if there was a collision...
 
-                       sub             r0,r12,r3                                               ; Subtract one from the other
-                       sub             r8,r3,r12                                               ; Subtract the other from the one
-                       or              r8,r8,r0                                                ; Combine them
-                       srawi   r8,r8,31                                                ; Get a 0 if equal or -1 of not
-                       and             r12,r12,r8                                              ; Make 0 if same, unchanged if not
-                       stwcx.  r12,r10,r11                                             ; Try to invalidate it
-                       bne--   tlfinvothr                                              ; Try again if there was a collision...
-
-                       mtmsr   r9                                                              ; Restore interruptions
+tlfexit:       mtmsr   r9                                                              ; Restore interruptions
                        isync                                                                   ; Could be turning off floats here
                        blr                                                                             ; Leave...
 
@@ -987,14 +1049,11 @@ tlfinvothr:      lwarx   r12,r10,r11                                             ; Get the owner
 
 LEXT(vec_save)
 
-
-                       lis             r2,hi16(MASK(MSR_VEC))                  ; Get VEC
                        mfmsr   r0                                                              ; Get the MSR
-                       ori             r2,r2,lo16(MASK(MSR_FP))                ; Add in FP
-                       andc    r0,r0,r2                                                ; Force off VEC and FP
-                       ori             r2,r2,lo16(MASK(MSR_EE))                ; Clear EE
-                       andc    r2,r0,r2                                                ; Clear EE for now
+                       rlwinm  r0,r0,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Make sure vectors are turned off when we leave
+                       rlwinm  r2,r0,0,MSR_EE_BIT+1,MSR_EE_BIT-1       ; But do interrupts only for now
                        oris    r2,r2,hi16(MASK(MSR_VEC))               ; Enable the vector facility for now also
+                       rlwinm  r0,r0,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force off fp
                        mtmsr   r2                                                              ; Set the MSR
                        isync
                
@@ -1053,17 +1112,17 @@ vsgoodcpu:      lwz             r3,VMXsave(r12)                                 ; Get the current vector savearea for the th
                        
                        bne+    vsret                                                   ; VRsave is non-zero so we need to keep what is saved...
                                                
-                       lwz             r4,SAVprev+4(r3)                                ; Pick up the previous area
+                       lwz             r4,SAVprev(r3)                                  ; Pick up the previous area
                        lwz             r5,SAVlevel(r4)                                 ; Get the level associated with save
                        stw             r4,VMXsave(r12)                                 ; Dequeue this savearea
-                       li              r4,0                                                    ; Clear
                        stw             r5,VMXlevel(r12)                                ; Save the level
        
-                       stw             r4,VMXowner(r12)                                ; Show no live context here
+                       li              r3,0                                                    ; Clear
+                       stw             r3,VMXowner(r12)                                ; Show no live context here
                        eieio
 
-vsbackout:     mr              r4,r0                                                   ; restore the saved MSR                 
-                       b               EXT(save_ret_wMSR)                              ; Toss the savearea and return from there...
+vsbackout:     mr              r12,r0                                                  ; Set the saved MSR                     
+                       b               EXT(save_ret_join)                              ; Toss the savearea and return from there...
 
                        .align  5
 
@@ -1079,22 +1138,286 @@ vsneedone:     mr.             r10,r10                                                 ; Is VRsave set to 0?
                        mr.             r12,r12                                                 ; See if we were disowned while away. Very, very small chance of it...
                        beq-    vsbackout                                               ; If disowned, just toss savearea...
                        lwz             r4,facAct(r12)                                  ; Get the activation associated with live context
+                       mtlr    r2                                                              ; Restore return
                        lwz             r8,VMXsave(r12)                                 ; Get the current top vector savearea
                        stw             r4,SAVact(r3)                                   ; Indicate the right activation for this context
                        lwz             r9,VMXlevel(r12)                                ; Get our current level indicator again         
                        stw             r3,VMXsave(r12)                                 ; Set this as the most current floating point context
-                       stw             r8,SAVprev+4(r3)                                ; And then chain this in front
+                       stw             r8,SAVprev(r3)                                  ; And then chain this in front
 
                        stw             r9,SAVlevel(r3)                                 ; Set level in savearea
-            mfcr       r12                                                             ; save CRs across call to vr_store
-                       lwz             r10,liveVRS(r6)                                 ; Get the right VRSave register
-            
-            bl         vr_store                                                ; store live VRs into savearea as required (uses r4-r11)
 
-                       mtcrf   255,r12                                                 ; Restore the non-volatile CRs
-            mtlr       r2                                                              ; restore return address
-               
-vsret:         mtmsr   r0                                                              ; Put interrupts on if they were and vector off
+                       mfcr    r2                                              ; Save non-volatile CRs
+                       lwz             r10,liveVRS(r6)                 ; Get the right VRSave register
+                       lis             r9,0x5555                               ; Mask with odd bits set                
+                       rlwinm  r11,r10,1,0,31                  ; Shift over 1
+                       ori             r9,r9,0x5555                    ; Finish mask
+                       or              r4,r10,r11                              ; After this, even bits show which lines to zap
+                       
+                       andc    r11,r4,r9                               ; Clear out odd bits
+                       
+                       la              r6,savevr0(r3)                  ; Point to line 0
+                       rlwinm  r4,r11,15,0,15                  ; Move line 8-15 flags to high order odd bits
+                       or              r4,r11,r4                               ; Set the odd bits
+                                                                                       ; (bit 0 is line 0, bit 1 is line 8,
+                                                                                       ; bit 2 is line 1, bit 3 is line 9, etc.
+                       rlwimi  r4,r10,16,16,31                 ; Put vrsave 0 - 15 into positions 16 - 31
+                       la              r7,savevr2(r3)                  ; Point to line 1
+                       mtcrf   255,r4                                  ; Load up the CRs
+                       stw             r10,savevrvalid(r3)             ; Save the validity information
+                       mr              r8,r6                                   ; Start registers off
+;      
+;                      Save the current vector state
+;
+                                               
+                       bf              0,snol0                                 ; No line 0 to do...
+                       dcba    br0,r6                                  ; Allocate cache line 0
+                       
+snol0:         
+                       la              r6,savevr4(r3)                  ; Point to line 2
+                       bf              2,snol1                                 ; No line 1 to do...
+                       dcba    br0,r7                                  ; Allocate cache line 1
+                       
+snol1:         
+                       la              r7,savevr6(r3)                  ; Point to line 3
+                       bf              4,snol2                                 ; No line 2 to do...
+                       dcba    br0,r6                                  ; Allocate cache line 2
+                       
+snol2:         
+                       li              r11,16                                  ; Get offset for odd registers
+                       bf              16,snovr0                               ; Do not save VR0...
+                       stvxl   v0,br0,r8                               ; Save VR0
+                       
+snovr0:                
+                       la              r9,savevr2(r3)                  ; Point to V2/V3 pair
+                       bf              17,snovr1                               ; Do not save VR1...
+                       stvxl   v1,r11,r8                               ; Save VR1
+                       
+snovr1:
+                       la              r6,savevr8(r3)                  ; Point to line 4
+                       bf              6,snol3                                 ; No line 3 to do...
+                       dcba    br0,r7                                  ; Allocate cache line 3
+                       
+snol3:         
+                       la              r8,savevr4(r3)                  ; Point to V4/V5 pair
+                       bf              18,snovr2                               ; Do not save VR2...
+                       stvxl   v2,br0,r9                               ; Save VR2
+                       
+snovr2:
+                       bf              19,snovr3                               ; Do not save VR3...
+                       stvxl   v3,r11,r9                               ; Save VR3
+                       
+snovr3:
+;
+;                      Note: CR4 is now free
+;
+                       la              r7,savevr10(r3)                 ; Point to line 5
+                       bf              8,snol4                                 ; No line 4 to do...
+                       dcba    br0,r6                                  ; Allocate cache line 4
+                       
+snol4:         
+                       la              r9,savevr6(r3)                  ; Point to R6/R7 pair
+                       bf              20,snovr4                               ; Do not save VR4...
+                       stvxl   v4,br0,r8                               ; Save VR4
+                       
+snovr4:
+                       bf              21,snovr5                               ; Do not save VR5...
+                       stvxl   v5,r11,r8                               ; Save VR5
+                       
+snovr5:
+                       mtcrf   0x08,r10                                ; Set CRs for registers 16-19
+                       la              r6,savevr12(r3)                 ; Point to line 6
+                       bf              10,snol5                                ; No line 5 to do...
+                       dcba    br0,r7                                  ; Allocate cache line 5
+                       
+snol5:         
+                       la              r8,savevr8(r3)                  ; Point to V8/V9 pair
+                       bf              22,snovr6                               ; Do not save VR6...
+                       stvxl   v6,br0,r9                               ; Save VR6
+                       
+snovr6:
+                       bf              23,snovr7                               ; Do not save VR7...
+                       stvxl   v7,r11,r9                               ; Save VR7
+                       
+snovr7:
+;
+;                      Note: CR5 is now free
+;
+                       la              r7,savevr14(r3)                 ; Point to line 7
+                       bf              12,snol6                                ; No line 6 to do...
+                       dcba    br0,r6                                  ; Allocate cache line 6
+                       
+snol6:         
+                       la              r9,savevr10(r3)                 ; Point to V10/V11 pair
+                       bf              24,snovr8                               ; Do not save VR8...
+                       stvxl   v8,br0,r8                               ; Save VR8
+                       
+snovr8:
+                       bf              25,snovr9                               ; Do not save VR9...
+                       stvxl   v9,r11,r8                               ; Save VR9
+                       
+snovr9:
+                       mtcrf   0x04,r10                                ; Set CRs for registers 20-23
+                       la              r6,savevr16(r3)                 ; Point to line 8
+                       bf              14,snol7                                ; No line 7 to do...
+                       dcba    br0,r7                                  ; Allocate cache line 7
+                       
+snol7:         
+                       la              r8,savevr12(r3)                 ; Point to V12/V13 pair
+                       bf              26,snovr10                              ; Do not save VR10...
+                       stvxl   v10,br0,r9                              ; Save VR10
+                       
+snovr10:
+                       bf              27,snovr11                              ; Do not save VR11...
+                       stvxl   v11,r11,r9                              ; Save VR11
+                       
+snovr11:
+
+;
+;                      Note: CR6 is now free
+;
+                       la              r7,savevr18(r3)                 ; Point to line 9
+                       bf              1,snol8                                 ; No line 8 to do...
+                       dcba    br0,r6                                  ; Allocate cache line 8
+                       
+snol8:         
+                       la              r9,savevr14(r3)                 ; Point to V14/V15 pair
+                       bf              28,snovr12                              ; Do not save VR12...
+                       stvxl   v12,br0,r8                              ; Save VR12
+                       
+snovr12:
+                       bf              29,snovr13                              ; Do not save VR13...
+                       stvxl   v13,r11,r8                              ; Save VR13
+                       
+snovr13:
+                       mtcrf   0x02,r10                                ; Set CRs for registers 24-27
+                       la              r6,savevr20(r3)                 ; Point to line 10
+                       bf              3,snol9                                 ; No line 9 to do...
+                       dcba    br0,r7                                  ; Allocate cache line 9
+                       
+snol9:         
+                       la              r8,savevr16(r3)                 ; Point to V16/V17 pair
+                       bf              30,snovr14                              ; Do not save VR14...
+                       stvxl   v14,br0,r9                              ; Save VR14
+                       
+snovr14:
+                       bf              31,snovr15                              ; Do not save VR15...
+                       stvxl   v15,r11,r9                              ; Save VR15
+                       
+snovr15:
+;
+;                      Note: CR7 is now free
+;
+                       la              r7,savevr22(r3)                 ; Point to line 11
+                       bf              5,snol10                                ; No line 10 to do...
+                       dcba    br0,r6                                  ; Allocate cache line 10
+                       
+snol10:                
+                       la              r9,savevr18(r3)                 ; Point to V18/V19 pair
+                       bf              16,snovr16                              ; Do not save VR16...
+                       stvxl   v16,br0,r8                              ; Save VR16
+                       
+snovr16:
+                       bf              17,snovr17                              ; Do not save VR17...
+                       stvxl   v17,r11,r8                              ; Save VR17
+                       
+snovr17:
+                       mtcrf   0x01,r10                                ; Set CRs for registers 28-31
+;
+;                      Note: All registers have been or are accounted for in CRs
+;
+                       la              r6,savevr24(r3)                 ; Point to line 12
+                       bf              7,snol11                                ; No line 11 to do...
+                       dcba    br0,r7                                  ; Allocate cache line 11
+                       
+snol11:                
+                       la              r8,savevr20(r3)                 ; Point to V20/V21 pair
+                       bf              18,snovr18                              ; Do not save VR18...
+                       stvxl   v18,br0,r9                              ; Save VR18
+                       
+snovr18:
+                       bf              19,snovr19                              ; Do not save VR19...
+                       stvxl   v19,r11,r9                              ; Save VR19
+                       
+snovr19:
+                       la              r7,savevr26(r3)                 ; Point to line 13
+                       bf              9,snol12                                ; No line 12 to do...
+                       dcba    br0,r6                                  ; Allocate cache line 12
+                       
+snol12:                
+                       la              r9,savevr22(r3)                 ; Point to V22/V23 pair
+                       bf              20,snovr20                              ; Do not save VR20...
+                       stvxl   v20,br0,r8                              ; Save VR20
+                       
+snovr20:
+                       bf              21,snovr21                              ; Do not save VR21...
+                       stvxl   v21,r11,r8                              ; Save VR21
+                       
+snovr21:
+                       la              r6,savevr28(r3)                 ; Point to line 14
+                       bf              11,snol13                               ; No line 13 to do...
+                       dcba    br0,r7                                  ; Allocate cache line 13
+                       
+snol13:                
+                       la              r8,savevr24(r3)                 ; Point to V24/V25 pair
+                       bf              22,snovr22                              ; Do not save VR22...
+                       stvxl   v22,br0,r9                              ; Save VR22
+                       
+snovr22:
+                       bf              23,snovr23                              ; Do not save VR23...
+                       stvxl   v23,r11,r9                              ; Save VR23
+                       
+snovr23:
+                       la              r7,savevr30(r3)                 ; Point to line 15
+                       bf              13,snol14                               ; No line 14 to do...
+                       dcba    br0,r6                                  ; Allocate cache line 14
+                       
+snol14:                
+                       la              r9,savevr26(r3)                 ; Point to V26/V27 pair
+                       bf              24,snovr24                              ; Do not save VR24...
+                       stvxl   v24,br0,r8                              ; Save VR24
+                       
+snovr24:
+                       bf              25,snovr25                              ; Do not save VR25...
+                       stvxl   v25,r11,r8                              ; Save VR25
+                       
+snovr25:
+                       bf              15,snol15                               ; No line 15 to do...
+                       dcba    br0,r7                                  ; Allocate cache line 15
+                       
+snol15:                
+;
+;                      Note: All cache lines allocated now
+;
+                       la              r8,savevr28(r3)                 ; Point to V28/V29 pair
+                       bf              26,snovr26                              ; Do not save VR26...
+                       stvxl   v26,br0,r9                              ; Save VR26
+
+snovr26:
+                       bf              27,snovr27                              ; Do not save VR27...
+                       stvxl   v27,r11,r9                              ; Save VR27
+                       
+snovr27:
+                       la              r7,savevr30(r3)                 ; Point to V30/V31 pair
+                       bf              28,snovr28                              ; Do not save VR28...
+                       stvxl   v28,br0,r8                              ; Save VR28
+                       
+snovr28:               
+                       bf              29,snovr29                              ; Do not save VR29...
+                       stvxl   v29,r11,r8                              ; Save VR29
+                       
+snovr29:               
+                       bf              30,snovr30                              ; Do not save VR30...
+                       stvxl   v30,br0,r7                              ; Save VR30
+                       
+snovr30:
+                       bf              31,snovr31                              ; Do not save VR31...
+                       stvxl   v31,r11,r7                              ; Save VR31
+                       
+snovr31:
+                       mtcrf   255,r2                                  ; Restore all cr
+
+vsret:         mtmsr   r0                                              ; Put interrupts on if they were and vector off
                        isync
 
                        blr
@@ -1208,7 +1531,7 @@ vsvretry: mr.             r22,r22                                                 ; See if there is any live vector status
 
                        bne-    cr2,vsnosave                                    ; Live context saved and VRSave not 0, no save and keep context...
                        
-                       lwz             r4,SAVprev+4(r30)                               ; Pick up the previous area
+                       lwz             r4,SAVprev(r30)                                 ; Pick up the previous area
                        li              r5,0                                                    ; Assume this is the only one (which should be the ususal case)
                        mr.             r4,r4                                                   ; Was this the only one?
                        stw             r4,VMXsave(r22)                                 ; Dequeue this savearea
@@ -1231,54 +1554,14 @@ vsmstsave:      stw             r8,VMXowner(r26)                                ; Clear owner
 
                        bl              EXT(save_get)                                   ; Go get a savearea
 
-                       mr.             r31,r31                                                 ; Are we saving the user state?
-                       la              r15,VMXsync(r22)                                ; Point to the sync word
-                       beq++   vswusave                                                ; Yeah, no need for lock...
-;
-;                      Here we make sure that the live context is not tossed while we are
-;                      trying to push it.  This can happen only for kernel context and
-;                      then only by a race with act_machine_sv_free.
-;
-;                      We only need to hold this for a very short time, so no sniffing needed.
-;                      If we find any change to the level, we just abandon.
-;
-vswsync:       lwarx   r19,0,r15                                               ; Get the sync word
-                       li              r0,1                                                    ; Get the lock
-                       cmplwi  cr1,r19,0                                               ; Is it unlocked?
-                       stwcx.  r0,0,r15                                                ; Store lock and test reservation
-                       cror    cr0_eq,cr1_eq,cr0_eq                    ; Combine lost reservation and previously locked
-                       bne--   vswsync                                                 ; Try again if lost reservation or locked...
-
-                       isync                                                                   ; Toss speculation
-                       
-                       lwz             r0,VMXlevel(r22)                                ; Pick up the level again
-                       li              r7,0                                                    ; Get unlock value
-                       cmplw   r0,r31                                                  ; Same level?
-                       beq++   fswusave                                                ; Yeah, we expect it to be...
-                       
-                       stw             r7,VMXsync(r22)                                 ; Unlock lock. No need to sync here
-                       
-                       bl              EXT(save_ret)                                   ; Toss save area because we are abandoning save                         
-                       b               fsnosave                                                ; Skip the save...
-
-                       .align  5
-
-vswusave:      lwz             r12,facAct(r22)                                 ; Get the activation associated with the context
+                       lwz             r12,facAct(r22)                                 ; Get the activation associated with the context
                        stw             r3,VMXsave(r22)                                 ; Set this as the latest context savearea for the thread
-                       mr.             r31,r31                                                 ; Check again if we were user level
-                       stw             r30,SAVprev+4(r3)                               ; Point us to the old context
+
+                       stw             r30,SAVprev(r3)                                 ; Point us to the old context
                        stw             r31,SAVlevel(r3)                                ; Tag our level
                        li              r7,SAVvector                                    ; Get the vector ID
                        stw             r12,SAVact(r3)                                  ; Make sure we point to the right guy
                        stb             r7,SAVflags+2(r3)                               ; Set that we have a vector save area
-               
-                       li              r7,0                                                    ; Get the unlock value
-
-                       beq--   vswnulock                                               ; Skip unlock if user (we did not lock it)...
-                       eieio                                                                   ; Make sure that these updates make it out
-                       stw             r7,VMXsync(r22)                                 ; Unlock it.
-                       
-vswnulock:             
 
 #if FPVECDBG
                        lis             r0,hi16(CutTrace)                               ; (TEST/DEBUG)
@@ -1288,7 +1571,273 @@ vswnulock:
 #endif 
 
                        lwz             r10,liveVRS(r26)                                ; Get the right VRSave register
-            bl         vr_store                                                ; store VRs into savearea according to vrsave (uses r4-r11)
+                       lis             r9,0x5555                                               ; Mask with odd bits set                
+                       rlwinm  r11,r10,1,0,31                                  ; Shift over 1
+                       ori             r9,r9,0x5555                                    ; Finish mask
+                       or              r21,r10,r11                                             ; After this, even bits show which lines to zap
+                       
+                       andc    r13,r21,r9                                              ; Clear out odd bits
+                       
+                       la              r11,savevr0(r3)                                 ; Point to line 0
+                       rlwinm  r24,r13,15,0,15                                 ; Move line 8-15 flags to high order odd bits
+                       or              r24,r13,r24                                             ; Set the odd bits
+                                                                                                       ; (bit 0 is line 0, bit 1 is line 8,
+                                                                                                       ; bit 2 is line 1, bit 3 is line 9, etc.
+                       rlwimi  r24,r10,16,16,31                                ; Put vrsave 0 - 15 into positions 16 - 31
+                       la              r21,savevr2(r3)                                 ; Point to line 1
+                       mtcrf   255,r24                                                 ; Load up the CRs
+                       stw             r10,savevrvalid(r3)                             ; Save the validity information
+                       mr              r12,r11                                                 ; Start registers off
+;      
+;                      Save the current vector state
+;
+                                               
+                       bf              0,nol0                                                  ; No line 0 to do...
+                       dcba    br0,r11                                                 ; Allocate cache line 0
+                       
+nol0:          
+                       la              r11,savevr4(r3)                                 ; Point to line 2
+                       bf              2,nol1                                                  ; No line 1 to do...
+                       dcba    br0,r21                                                 ; Allocate cache line 1
+                       
+nol1:          
+                       la              r21,savevr6(r3)                                 ; Point to line 3
+                       bf              4,nol2                                                  ; No line 2 to do...
+                       dcba    br0,r11                                                 ; Allocate cache line 2
+                       
+nol2:          
+                       li              r14,16                                                  ; Get offset for odd registers
+                       bf              16,novr0                                                ; Do not save VR0...
+                       stvxl   v0,br0,r12                                              ; Save VR0
+                       
+novr0:         
+                       la              r13,savevr2(r3)                                 ; Point to V2/V3 pair
+                       bf              17,novr1                                                ; Do not save VR1...
+                       stvxl   v1,r14,r12                                              ; Save VR1
+                       
+novr1:
+                       la              r11,savevr8(r3)                                 ; Point to line 4
+                       bf              6,nol3                                                  ; No line 3 to do...
+                       dcba    br0,r21                                                 ; Allocate cache line 3
+                       
+nol3:          
+                       la              r12,savevr4(r3)                                 ; Point to V4/V5 pair
+                       bf              18,novr2                                                ; Do not save VR2...
+                       stvxl   v2,br0,r13                                              ; Save VR2
+                       
+novr2:
+                       bf              19,novr3                                                ; Do not save VR3...
+                       stvxl   v3,r14,r13                                              ; Save VR3
+                       
+novr3:
+;
+;                      Note: CR4 is now free
+;
+                       la              r21,savevr10(r3)                                ; Point to line 5
+                       bf              8,nol4                                                  ; No line 4 to do...
+                       dcba    br0,r11                                                 ; Allocate cache line 4
+                       
+nol4:          
+                       la              r13,savevr6(r3)                                 ; Point to R6/R7 pair
+                       bf              20,novr4                                                ; Do not save VR4...
+                       stvxl   v4,br0,r12                                              ; Save VR4
+                       
+novr4:
+                       bf              21,novr5                                                ; Do not save VR5...
+                       stvxl   v5,r14,r12                                              ; Save VR5
+                       
+novr5:
+                       mtcrf   0x08,r10                                                ; Set CRs for registers 16-19
+                       la              r11,savevr12(r3)                                ; Point to line 6
+                       bf              10,nol5                                                 ; No line 5 to do...
+                       dcba    br0,r21                                                 ; Allocate cache line 5
+                       
+nol5:          
+                       la              r12,savevr8(r3)                                 ; Point to V8/V9 pair
+                       bf              22,novr6                                                ; Do not save VR6...
+                       stvxl   v6,br0,r13                                              ; Save VR6
+                       
+novr6:
+                       bf              23,novr7                                                ; Do not save VR7...
+                       stvxl   v7,r14,r13                                              ; Save VR7
+                       
+novr7:
+;
+;                      Note: CR5 is now free
+;
+                       la              r21,savevr14(r3)                                ; Point to line 7
+                       bf              12,nol6                                                 ; No line 6 to do...
+                       dcba    br0,r11                                                 ; Allocate cache line 6
+                       
+nol6:          
+                       la              r13,savevr10(r3)                                ; Point to V10/V11 pair
+                       bf              24,novr8                                                ; Do not save VR8...
+                       stvxl   v8,br0,r12                                              ; Save VR8
+                       
+novr8:
+                       bf              25,novr9                                                ; Do not save VR9...
+                       stvxl   v9,r14,r12                                              ; Save VR9
+                       
+novr9:
+                       mtcrf   0x04,r10                                                ; Set CRs for registers 20-23
+                       la              r11,savevr16(r3)                                ; Point to line 8
+                       bf              14,nol7                                                 ; No line 7 to do...
+                       dcba    br0,r21                                                 ; Allocate cache line 7
+                       
+nol7:          
+                       la              r12,savevr12(r3)                                ; Point to V12/V13 pair
+                       bf              26,novr10                                               ; Do not save VR10...
+                       stvxl   v10,br0,r13                                             ; Save VR10
+                       
+novr10:
+                       bf              27,novr11                                               ; Do not save VR11...
+                       stvxl   v11,r14,r13                                             ; Save VR11
+                       
+novr11:
+
+;
+;                      Note: CR6 is now free
+;
+                       la              r21,savevr18(r3)                                ; Point to line 9
+                       bf              1,nol8                                                  ; No line 8 to do...
+                       dcba    br0,r11                                                 ; Allocate cache line 8
+                       
+nol8:          
+                       la              r13,savevr14(r3)                                ; Point to V14/V15 pair
+                       bf              28,novr12                                               ; Do not save VR12...
+                       stvxl   v12,br0,r12                                             ; Save VR12
+                       
+novr12:
+                       bf              29,novr13                                               ; Do not save VR13...
+                       stvxl   v13,r14,r12                                             ; Save VR13
+                       
+novr13:
+                       mtcrf   0x02,r10                                                ; Set CRs for registers 24-27
+                       la              r11,savevr20(r3)                                ; Point to line 10
+                       bf              3,nol9                                                  ; No line 9 to do...
+                       dcba    br0,r21                                                 ; Allocate cache line 9
+                       
+nol9:          
+                       la              r12,savevr16(r3)                                ; Point to V16/V17 pair
+                       bf              30,novr14                                               ; Do not save VR14...
+                       stvxl   v14,br0,r13                                             ; Save VR14
+                       
+novr14:
+                       bf              31,novr15                                               ; Do not save VR15...
+                       stvxl   v15,r14,r13                                             ; Save VR15
+                       
+novr15:
+;
+;                      Note: CR7 is now free
+;
+                       la              r21,savevr22(r3)                                ; Point to line 11
+                       bf              5,nol10                                                 ; No line 10 to do...
+                       dcba    br0,r11                                                 ; Allocate cache line 10
+                       
+nol10:         
+                       la              r13,savevr18(r3)                                ; Point to V18/V19 pair
+                       bf              16,novr16                                               ; Do not save VR16...
+                       stvxl   v16,br0,r12                                             ; Save VR16
+                       
+novr16:
+                       bf              17,novr17                                               ; Do not save VR17...
+                       stvxl   v17,r14,r12                                             ; Save VR17
+                       
+novr17:
+                       mtcrf   0x01,r10                                                ; Set CRs for registers 28-31
+;
+;                      Note: All registers have been or are accounted for in CRs
+;
+                       la              r11,savevr24(r3)                                ; Point to line 12
+                       bf              7,nol11                                                 ; No line 11 to do...
+                       dcba    br0,r21                                                 ; Allocate cache line 11
+                       
+nol11:         
+                       la              r12,savevr20(r3)                                ; Point to V20/V21 pair
+                       bf              18,novr18                                               ; Do not save VR18...
+                       stvxl   v18,br0,r13                                             ; Save VR18
+                       
+novr18:
+                       bf              19,novr19                                               ; Do not save VR19...
+                       stvxl   v19,r14,r13                                             ; Save VR19
+                       
+novr19:
+                       la              r21,savevr26(r3)                                ; Point to line 13
+                       bf              9,nol12                                                 ; No line 12 to do...
+                       dcba    br0,r11                                                 ; Allocate cache line 12
+                       
+nol12:         
+                       la              r13,savevr22(r3)                                ; Point to V22/V23 pair
+                       bf              20,novr20                                               ; Do not save VR20...
+                       stvxl   v20,br0,r12                                             ; Save VR20
+                       
+novr20:
+                       bf              21,novr21                                               ; Do not save VR21...
+                       stvxl   v21,r14,r12                                             ; Save VR21
+                       
+novr21:
+                       la              r11,savevr28(r3)                                ; Point to line 14
+                       bf              11,nol13                                                ; No line 13 to do...
+                       dcba    br0,r21                                                 ; Allocate cache line 13
+                       
+nol13:         
+                       la              r12,savevr24(r3)                                ; Point to V24/V25 pair
+                       bf              22,novr22                                               ; Do not save VR22...
+                       stvxl   v22,br0,r13                                             ; Save VR22
+                       
+novr22:
+                       bf              23,novr23                                               ; Do not save VR23...
+                       stvxl   v23,r14,r13                                             ; Save VR23
+                       
+novr23:
+                       la              r21,savevr30(r3)                                ; Point to line 15
+                       bf              13,nol14                                                ; No line 14 to do...
+                       dcba    br0,r11                                                 ; Allocate cache line 14
+                       
+nol14:         
+                       la              r13,savevr26(r3)                                ; Point to V26/V27 pair
+                       bf              24,novr24                                               ; Do not save VR24...
+                       stvxl   v24,br0,r12                                             ; Save VR24
+                       
+novr24:
+                       bf              25,novr25                                               ; Do not save VR25...
+                       stvxl   v25,r14,r12                                             ; Save VR25
+                       
+novr25:
+                       bf              15,nol15                                                ; No line 15 to do...
+                       dcba    br0,r21                                                 ; Allocate cache line 15
+                       
+nol15:         
+;
+;                      Note: All cache lines allocated now
+;
+                       la              r12,savevr28(r3)                                ; Point to V28/V29 pair
+                       bf              26,novr26                                               ; Do not save VR26...
+                       stvxl   v26,br0,r13                                             ; Save VR26
+                       
+novr26:
+                       bf              27,novr27                                               ; Do not save VR27...
+                       stvxl   v27,r14,r13                                             ; Save VR27
+                       
+novr27:
+                       la              r13,savevr30(r3)                                ; Point to V30/V31 pair
+                       bf              28,novr28                                               ; Do not save VR28...
+                       stvxl   v28,br0,r12                                             ; Save VR28
+                       
+novr28:                
+                       bf              29,novr29                                               ; Do not save VR29...
+                       stvxl   v29,r14,r12                                             ; Save VR29
+                       
+novr29:                
+                       bf              30,novr30                                               ; Do not save VR30...
+                       stvxl   v30,br0,r13                                             ; Save VR30
+                       
+novr30:
+                       bf              31,novr31                                               ; Do not save VR31...
+                       stvxl   v31,r14,r13                                             ; Save VR31
+                       
+novr31:
+
                        
 
 ;
@@ -1337,29 +1886,27 @@ vsnosave:       vspltisb v31,-10                                                ; Get 0xF6F6F6F6
                        li              r16,VMXowner                                    ; Displacement to vector owner
                        add             r19,r18,r19                                             ; Point to the owner per_proc   
                        vrlb    v31,v31,v29                                             ; Get 0xDEADDEAD        
+                       li              r0,0
                        
 vsinvothr:     lwarx   r18,r16,r19                                             ; Get the owner
-
-                       sub             r0,r18,r29                                              ; Subtract one from the other
-                       sub             r11,r29,r18                                             ; Subtract the other from the one
-                       or              r11,r11,r0                                              ; Combine them
-                       srawi   r11,r11,31                                              ; Get a 0 if equal or -1 of not
-                       and             r18,r18,r11                                             ; Make 0 if same, unchanged if not
-                       stwcx.  r18,r16,r19                                             ; Try to invalidate it
-                       bne--   vsinvothr                                               ; Try again if there was a collision...         
+                       cmplw   r18,r29                                                 ; Does he still have this context?
+                       bne             vsinvoths                                               ; Nope...               
+                       stwcx.  r0,r16,r19                                              ; Try to invalidate it
+                       bne-    vsinvothr                                               ; Try again if there was a collision...
+               
        
-                       cmplwi  cr1,r14,0                                               ; Do we possibly have some context to load?
+vsinvoths:     cmplwi  cr1,r14,0                                               ; Do we possibly have some context to load?
                        vmrghh  v31,v30,v31                                             ; Get 0x7FFFDEAD.  V31 keeps this value until the bitter end
                        stw             r15,VMXlevel(r29)                               ; Set the "new" active level
                        eieio
                        stw             r29,VMXowner(r26)                               ; Mark us as having the live context
 
-                       beq--   cr1,ProtectTheAmericanWay               ; Nothing to restore, first time use...
+                       beq-    cr1,ProtectTheAmericanWay               ; Nothing to restore, first time use...
                
-                       lwz             r3,SAVprev+4(r14)                               ; Get the previous context
+                       lwz             r3,SAVprev(r14)                                 ; Get the previous context
                        lwz             r0,SAVlevel(r14)                                ; Get the level of first facility savearea
                        cmplw   r0,r15                                                  ; Top level correct to load?
-                       bne--   ProtectTheAmericanWay                   ; No, go initialize...
+                       bne-    ProtectTheAmericanWay                   ; No, go initialize...
                        
                        stw             r3,VMXsave(r29)                                 ; Pop the context (we will toss the savearea later)
 
@@ -1370,23 +1917,390 @@ vsinvothr:     lwarx   r18,r16,r19                                             ; Get the owner
                        sc                                                                              ; (TEST/DEBUG)
 #endif 
 
-                       lwz             r10,savevrvalid(r14)                    ; Get the valid VRs in the savearea
                        lwz             r22,savevrsave(r25)                             ; Get the most current VRSAVE
+                       lwz             r10,savevrvalid(r14)                    ; Get the valid VRs in the savearea
+                       lis             r9,0x5555                                               ; Mask with odd bits set
                        and             r10,r10,r22                                             ; Figure out just what registers need to be loaded
-            mr         r3,r14                                                  ; r3 <- ptr to savearea with VRs
-            bl         vr_load                                                 ; load VRs from save area based on vrsave in r10
-                               
-                       bl              EXT(save_ret)                                   ; Toss the save area after loading VRs
+                       ori             r9,r9,0x5555                                    ; Finish mask
+                       rlwinm  r11,r10,1,0,31                                  ; Shift over 1
+                       or              r12,r10,r11                                             ; After this, even bits show which lines to touch
+                       andc    r13,r12,r9                                              ; Clear out odd bits
+                       
+                       la              r20,savevr0(r14)                                ; Point to line 0
+                       rlwinm  r3,r13,15,0,15                                  ; Move line 8-15 flags to high order odd bits
+                       la              r21,savevr2(r3)                                 ; Point to line 1
+                       or              r3,r13,r3                                               ; Set the odd bits
+                                                                                                       ; (bit 0 is line 0, bit 1 is line 8,
+                                                                                                       ; bit 2 is line 1, bit 3 is line 9, etc.
+                       rlwimi  r3,r10,16,16,31                                 ; Put vrsave 0 - 15 into positions 16 - 31
+                       mtcrf   255,r3                                                  ; Load up the CRs
+                       mr              r22,r20                                                 ; Start registers off
+;      
+;                      Load the new vector state
+;
+                                               
+                       bf              0,lnol0                                                 ; No line 0 to do...
+                       dcbt    br0,r20                                                 ; Touch cache line 0
+                       
+lnol0:         
+                       la              r20,savevr4(r14)                                ; Point to line 2
+                       bf              2,lnol1                                                 ; No line 1 to do...
+                       dcbt    br0,r21                                                 ; Touch cache line 1
+                       
+lnol1:         
+                       la              r21,savevr6(r14)                                ; Point to line 3
+                       bf              4,lnol2                                                 ; No line 2 to do...
+                       dcbt    br0,r20                                                 ; Touch cache line 2
+                       
+lnol2:         
+                       li              r30,16                                                  ; Get offset for odd registers
+                       bf              16,lnovr0                                               ; Do not restore VR0...
+                       lvxl    v0,br0,r22                                              ; Restore VR0
+                       
+lnovr0:                
+                       la              r23,savevr2(r14)                                ; Point to V2/V3 pair
+                       bf              17,lnovr1                                               ; Do not restore VR1...
+                       lvxl    v1,r30,r22                                              ; Restore VR1
+                       
+lnovr1:
+                       la              r20,savevr8(r14)                                ; Point to line 4
+                       bf              6,lnol3                                                 ; No line 3 to do...
+                       dcbt    br0,r21                                                 ; Touch cache line 3
+                       
+lnol3:         
+                       la              r22,savevr4(r14)                                ; Point to V4/V5 pair
+                       bf              18,lnovr2                                               ; Do not restore VR2...
+                       lvxl    v2,br0,r23                                              ; Restore VR2
+                       
+lnovr2:
+                       bf              19,lnovr3                                               ; Do not restore VR3...
+                       lvxl    v3,r30,r23                                              ; Restore VR3
+                       
+lnovr3:
+;
+;                      Note: CR4 is now free
+;
+                       la              r21,savevr10(r14)                               ; Point to line 5
+                       bf              8,lnol4                                                 ; No line 4 to do...
+                       dcbt    br0,r20                                                 ; Touch cache line 4
+                       
+lnol4:         
+                       la              r23,savevr6(r14)                                ; Point to R6/R7 pair
+                       bf              20,lnovr4                                               ; Do not restore VR4...
+                       lvxl    v4,br0,r22                                              ; Restore VR4
+                       
+lnovr4:
+                       bf              21,lnovr5                                               ; Do not restore VR5...
+                       lvxl    v5,r30,r22                                              ; Restore VR5
+                       
+lnovr5:
+                       mtcrf   0x08,r10                                                ; Set CRs for registers 16-19
+                       la              r20,savevr12(r14)                               ; Point to line 6
+                       bf              10,lnol5                                                ; No line 5 to do...
+                       dcbt    br0,r21                                                 ; Touch cache line 5
+                       
+lnol5:         
+                       la              r22,savevr8(r14)                                ; Point to V8/V9 pair
+                       bf              22,lnovr6                                               ; Do not restore VR6...
+                       lvxl    v6,br0,r23                                              ; Restore VR6
+                       
+lnovr6:
+                       bf              23,lnovr7                                               ; Do not restore VR7...
+                       lvxl    v7,r30,r23                                              ; Restore VR7
+                       
+lnovr7:
+;
+;                      Note: CR5 is now free
+;
+                       la              r21,savevr14(r14)                               ; Point to line 7
+                       bf              12,lnol6                                                ; No line 6 to do...
+                       dcbt    br0,r20                                                 ; Touch cache line 6
+                       
+lnol6:         
+                       la              r23,savevr10(r14)                               ; Point to V10/V11 pair
+                       bf              24,lnovr8                                               ; Do not restore VR8...
+                       lvxl    v8,br0,r22                                              ; Restore VR8
+                       
+lnovr8:
+                       bf              25,lnovr9                                               ; Do not save VR9...
+                       lvxl    v9,r30,r22                                              ; Restore VR9
+                       
+lnovr9:
+                       mtcrf   0x04,r10                                                ; Set CRs for registers 20-23
+                       la              r20,savevr16(r14)                               ; Point to line 8
+                       bf              14,lnol7                                                ; No line 7 to do...
+                       dcbt    br0,r21                                                 ; Touch cache line 7
+                       
+lnol7:         
+                       la              r22,savevr12(r14)                               ; Point to V12/V13 pair
+                       bf              26,lnovr10                                              ; Do not restore VR10...
+                       lvxl    v10,br0,r23                                             ; Restore VR10
+                       
+lnovr10:
+                       bf              27,lnovr11                                              ; Do not restore VR11...
+                       lvxl    v11,r30,r23                                             ; Restore VR11
+                       
+lnovr11:
+
+;
+;                      Note: CR6 is now free
+;
+                       la              r21,savevr18(r14)                               ; Point to line 9
+                       bf              1,lnol8                                                 ; No line 8 to do...
+                       dcbt    br0,r20                                                 ; Touch cache line 8
+                       
+lnol8:         
+                       la              r23,savevr14(r14)                               ; Point to V14/V15 pair
+                       bf              28,lnovr12                                              ; Do not restore VR12...
+                       lvxl    v12,br0,r22                                             ; Restore VR12
+                       
+lnovr12:
+                       bf              29,lnovr13                                              ; Do not restore VR13...
+                       lvxl    v13,r30,r22                                             ; Restore VR13
+                       
+lnovr13:
+                       mtcrf   0x02,r10                                                ; Set CRs for registers 24-27
+                       la              r20,savevr20(r14)                               ; Point to line 10
+                       bf              3,lnol9                                                 ; No line 9 to do...
+                       dcbt    br0,r21                                                 ; Touch cache line 9
+                       
+lnol9:         
+                       la              r22,savevr16(r14)                               ; Point to V16/V17 pair
+                       bf              30,lnovr14                                              ; Do not restore VR14...
+                       lvxl    v14,br0,r23                                             ; Restore VR14
+                       
+lnovr14:
+                       bf              31,lnovr15                                              ; Do not restore VR15...
+                       lvxl    v15,r30,r23                                             ; Restore VR15
+                       
+lnovr15:
+;
+;                      Note: CR7 is now free
+;
+                       la              r21,savevr22(r14)                               ; Point to line 11
+                       bf              5,lnol10                                                ; No line 10 to do...
+                       dcbt    br0,r20                                                 ; Touch cache line 10
+                       
+lnol10:                
+                       la              r23,savevr18(r14)                               ; Point to V18/V19 pair
+                       bf              16,lnovr16                                              ; Do not restore VR16...
+                       lvxl    v16,br0,r22                                             ; Restore VR16
+                       
+lnovr16:
+                       bf              17,lnovr17                                              ; Do not restore VR17...
+                       lvxl    v17,r30,r22                                             ; Restore VR17
+                       
+lnovr17:
+                       mtcrf   0x01,r10                                                ; Set CRs for registers 28-31
+;
+;                      Note: All registers have been or are accounted for in CRs
+;
+                       la              r20,savevr24(r14)                               ; Point to line 12
+                       bf              7,lnol11                                                ; No line 11 to do...
+                       dcbt    br0,r21                                                 ; Touch cache line 11
+                       
+lnol11:                
+                       la              r22,savevr20(r14)                               ; Point to V20/V21 pair
+                       bf              18,lnovr18                                              ; Do not restore VR18...
+                       lvxl    v18,br0,r23                                             ; Restore VR18
+                       
+lnovr18:
+                       bf              19,lnovr19                                              ; Do not restore VR19...
+                       lvxl    v19,r30,r23                                             ; Restore VR19
+                       
+lnovr19:
+                       la              r21,savevr26(r14)                               ; Point to line 13
+                       bf              9,lnol12                                                ; No line 12 to do...
+                       dcbt    br0,r20                                                 ; Touch cache line 12
+                       
+lnol12:                
+                       la              r23,savevr22(r14)                               ; Point to V22/V23 pair
+                       bf              20,lnovr20                                              ; Do not restore VR20...
+                       lvxl    v20,br0,r22                                             ; Restore VR20
+                       
+lnovr20:
+                       bf              21,lnovr21                                              ; Do not restore VR21...
+                       lvxl    v21,r30,r22                                             ; Restore VR21
+                       
+lnovr21:
+                       la              r20,savevr28(r14)                               ; Point to line 14
+                       bf              11,lnol13                                               ; No line 13 to do...
+                       dcbt    br0,r21                                                 ; Touch cache line 13
+                       
+lnol13:                
+                       la              r22,savevr24(r14)                               ; Point to V24/V25 pair
+                       bf              22,lnovr22                                              ; Do not restore VR22...
+                       lvxl    v22,br0,r23                                             ; Restore VR22
+                       
+lnovr22:
+                       bf              23,lnovr23                                              ; Do not restore VR23...
+                       lvxl    v23,r30,r23                                             ; Restore VR23
+                       
+lnovr23:
+                       la              r21,savevr30(r14)                               ; Point to line 15
+                       bf              13,lnol14                                               ; No line 14 to do...
+                       dcbt    br0,r20                                                 ; Touch cache line 14
+                       
+lnol14:                
+                       la              r23,savevr26(r14)                               ; Point to V26/V27 pair
+                       bf              24,lnovr24                                              ; Do not restore VR24...
+                       lvxl    v24,br0,r22                                             ; Restore VR24
+                       
+lnovr24:
+                       bf              25,lnovr25                                              ; Do not restore VR25...
+                       lvxl    v25,r30,r22                                             ; Restore VR25
+                       
+lnovr25:
+                       bf              15,lnol15                                               ; No line 15 to do...
+                       dcbt    br0,r21                                                 ; Touch cache line 15
+                       
+lnol15:                
+;
+;                      Note: All needed cache lines have been touched now
+;
+                       la              r22,savevr28(r14)                               ; Point to V28/V29 pair
+                       bf              26,lnovr26                                              ; Do not restore VR26...
+                       lvxl    v26,br0,r23                                             ; Restore VR26
+                       
+lnovr26:
+                       bf              27,lnovr27                                              ; Do not restore VR27...
+                       lvxl    v27,r30,r23                                             ; Restore VR27
+                       
+lnovr27:
+                       la              r23,savevr30(r14)                               ; Point to V30/V31 pair
+                       bf              28,lnovr28                                              ; Do not restore VR28...
+                       lvxl    v28,br0,r22                                             ; Restore VR28
+                       
+lnovr28:               
+                       bf              29,lnovr29                                              ; Do not restore VR29...
+                       lvxl    v29,r30,r22                                             ; Restore VR29
+                       
+lnovr29:               
+                       bf              30,lnovr30                                              ; Do not restore VR30...
+                       lvxl    v30,br0,r23                                             ; Restore VR30
+                       
+lnovr30:
+;
+;                      Everything is restored now except for VR31.  We need it to get
+;                      the QNaNBarbarian value to put into idle vector registers. 
+;                      Note: V31 was set above to QNaNbarbarian
+;
+                       
+                       cmpwi   r10,-1                                                  ; Handle the quick case of all registers in use
+                       beq-    mstlvr31                                                ; Not likely, but all are in use...
+                       mtcrf   255,r10                                                 ; Get mask of valid registers
+
+                       bt              0,ni0                                                   ; Register is ok already...
+                       vor             v0,v31,v31                                              ; Copy into the next register
+ni0:
+                       bt              1,ni1                                                   ; Register is ok already...
+                       vor             v1,v31,v31                                              ; Copy into the next register
+ni1:
+                       bt              2,ni2                                                   ; Register is ok already...
+                       vor             v2,v31,v31                                              ; Copy into the next register
+ni2:
+                       bt              3,ni3                                                   ; Register is ok already...
+                       vor             v3,v31,v31                                              ; Copy into the next register
+ni3:
+                       bt              4,ni4                                                   ; Register is ok already...
+                       vor             v4,v31,v31                                              ; Copy into the next register
+ni4:
+                       bt              5,ni5                                                   ; Register is ok already...
+                       vor             v5,v31,v31                                              ; Copy into the next register
+ni5:
+                       bt              6,ni6                                                   ; Register is ok already...
+                       vor             v6,v31,v31                                              ; Copy into the next register
+ni6:
+                       bt              7,ni7                                                   ; Register is ok already...
+                       vor             v7,v31,v31                                              ; Copy into the next register
+ni7:
+                       bt              8,ni8                                                   ; Register is ok already...
+                       vor             v8,v31,v31                                              ; Copy into the next register
+ni8:
+                       bt              9,ni9                                                   ; Register is ok already...
+                       vor             v9,v31,v31                                              ; Copy into the next register
+ni9:
+                       bt              10,ni10                                                 ; Register is ok already...
+                       vor             v10,v31,v31                                             ; Copy into the next register
+ni10:
+                       bt              11,ni11                                                 ; Register is ok already...
+                       vor             v11,v31,v31                                             ; Copy into the next register
+ni11:
+                       bt              12,ni12                                                 ; Register is ok already...
+                       vor             v12,v31,v31                                             ; Copy into the next register
+ni12:
+                       bt              13,ni13                                                 ; Register is ok already...
+                       vor             v13,v31,v31                                             ; Copy into the next register
+ni13:
+                       bt              14,ni14                                                 ; Register is ok already...
+                       vor             v14,v31,v31                                             ; Copy into the next register
+ni14:
+                       bt              15,ni15                                                 ; Register is ok already...
+                       vor             v15,v31,v31                                             ; Copy into the next register
+ni15:
+                       bt              16,ni16                                                 ; Register is ok already...
+                       vor             v16,v31,v31                                             ; Copy into the next register
+ni16:
+                       bt              17,ni17                                                 ; Register is ok already...
+                       vor             v17,v31,v31                                             ; Copy into the next register
+ni17:
+                       bt              18,ni18                                                 ; Register is ok already...
+                       vor             v18,v31,v31                                             ; Copy into the next register
+ni18:
+                       bt              19,ni19                                                 ; Register is ok already...
+                       vor             v19,v31,v31                                             ; Copy into the next register
+ni19:
+                       bt              20,ni20                                                 ; Register is ok already...
+                       vor             v20,v31,v31                                             ; Copy into the next register
+ni20:
+                       bt              21,ni21                                                 ; Register is ok already...
+                       vor             v21,v31,v31                                             ; Copy into the next register
+ni21:
+                       bt              22,ni22                                                 ; Register is ok already...
+                       vor             v22,v31,v31                                             ; Copy into the next register
+ni22:
+                       bt              23,ni23                                                 ; Register is ok already...
+                       vor             v23,v31,v31                                             ; Copy into the next register
+ni23:
+                       bt              24,ni24                                                 ; Register is ok already...
+                       vor             v24,v31,v31                                             ; Copy into the next register
+ni24:
+                       bt              25,ni25                                                 ; Register is ok already...
+                       vor             v25,v31,v31                                             ; Copy into the next register
+ni25:
+                       bt              26,ni26                                                 ; Register is ok already...
+                       vor             v26,v31,v31                                             ; Copy into the next register
+ni26:
+                       bt              27,ni27                                                 ; Register is ok already...
+                       vor             v27,v31,v31                                             ; Copy into the next register
+ni27:
+                       bt              28,ni28                                                 ; Register is ok already...
+                       vor             v28,v31,v31                                             ; Copy into the next register
+ni28:
+                       bt              29,ni29                                                 ; Register is ok already...
+                       vor             v29,v31,v31                                             ; Copy into the next register
+ni29:
+                       bt              30,ni30                                                 ; Register is ok already...
+                       vor             v30,v31,v31                                             ; Copy into the next register
+ni30:
+                       bf              31,lnovr31                                              ; V31 is empty, no need to restore...
+
+mstlvr31:      lvxl    v31,r30,r23                                             ; Restore VR31
                        
-vrenable:      lwz             r8,savesrr1+4(r25)                              ; Get the msr of the interrupted guy
+lnovr31:       mr              r3,r14                                                  ; Get the old savearea (we popped it before)
+                       bl              EXT(save_ret)                                   ; Toss it
+                       
+vrenable:      lwz             r8,savesrr1(r25)                                ; Get the msr of the interrupted guy
+                       rlwinm  r5,r25,0,0,19                                   ; Get the page address of the savearea 
                        oris    r8,r8,hi16(MASK(MSR_VEC))               ; Enable the vector facility
                        lwz             r10,ACT_MACT_SPF(r17)                   ; Get the act special flags
                        lwz             r11,spcFlags(r26)                               ; Get per_proc spec flags cause not in sync with act
+                       lwz             r5,SACvrswap(r5)                                ; Get Virtual to Real translation 
                        oris    r10,r10,hi16(vectorUsed|vectorCng)      ; Set that we used vectors
                        oris    r11,r11,hi16(vectorUsed|vectorCng)      ; Set that we used vectors
                        rlwinm. r0,r8,0,MSR_PR_BIT,MSR_PR_BIT   ; See if we are doing this for user state
-                       stw             r8,savesrr1+4(r25)                              ; Set the msr of the interrupted guy
-                       mr              r3,r25                                                  ; Pass virtual address of the savearea
+                       stw             r8,savesrr1(r25)                                ; Set the msr of the interrupted guy
+                       xor             r3,r25,r5                                               ; Get the real address of the savearea
                        beq-    vrnuser                                                 ; We are not user state...
                        stw             r10,ACT_MACT_SPF(r17)                   ; Set the activation copy
                        stw             r11,spcFlags(r26)                               ; Set per_proc copy
@@ -1468,14 +2382,13 @@ vsthesame:
                        beq-    cr1,vrenable                                    ; Not saved yet, nothing to pop, go enable and exit...
                        
                        lwz             r11,SAVlevel(r30)                               ; Get the level of top saved context
-                       lwz             r14,SAVprev+4(r30)                              ; Get the previous savearea
+                       lwz             r14,SAVprev(r30)                                ; Get the previous savearea
                        
                        cmplw   r11,r31                                                 ; Are live and saved the same?
 
                        bne+    vrenable                                                ; Level not the same, nothing to pop, go enable and exit...
                        
                        mr              r3,r30                                                  ; Get the old savearea (we popped it before)
-                       stw             r11,VMXsave(r22)                                ; Pop the vector stack
                        bl              EXT(save_ret)                                   ; Toss it
                        b               vrenable                                                ; Go enable and exit...
 
@@ -1490,13 +2403,11 @@ vsthesame:
 
 LEXT(toss_live_vec)
                        
-                       lis             r0,hi16(MASK(MSR_VEC))                  ; Get VEC
                        mfmsr   r9                                                              ; Get the MSR
-                       ori             r0,r0,lo16(MASK(MSR_FP))                ; Add in FP
-                       rlwinm. r8,r9,0,MSR_VEC_BIT,MSR_VEC_BIT ; Are vectors on right now?
-                       andc    r9,r9,r0                                                ; Force off VEC and FP
-                       ori             r0,r0,lo16(MASK(MSR_EE))                ; Turn off EE
-                       andc    r0,r9,r0                                                ; Turn off EE now
+                       rlwinm  r0,r9,0,MSR_EE_BIT+1,MSR_EE_BIT-1       ; Clear interuptions
+                       rlwinm. r8,r9,0,MSR_VEC_BIT,MSR_VEC_BIT ; Is vector on right now?
+                       rlwinm  r9,r9,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Make sure vector is turned off
+                       rlwinm  r9,r9,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Make sure fpu is turned off
                        mtmsr   r0                                                              ; No interruptions
                        isync
                        beq+    tlvnotours                                              ; Vector off, can not be live here...
@@ -1528,16 +2439,12 @@ tlvnotours:     lwz             r11,VMXcpu(r3)                                  ; Get the cpu on which we last loaded contex
                        li              r0,0                                                    ; Set a 0 to invalidate context
                        
 tlvinvothr:    lwarx   r12,r10,r11                                             ; Get the owner
+                       cmplw   r12,r3                                                  ; Does he still have this context?
+                       bne+    tlvexit                                                 ; Nope, leave...                
+                       stwcx.  r0,r10,r11                                              ; Try to invalidate it
+                       bne-    tlvinvothr                                              ; Try again if there was a collision...
 
-                       sub             r0,r12,r3                                               ; Subtract one from the other
-                       sub             r8,r3,r12                                               ; Subtract the other from the one
-                       or              r8,r8,r0                                                ; Combine them
-                       srawi   r8,r8,31                                                ; Get a 0 if equal or -1 of not
-                       and             r12,r12,r8                                              ; Make 0 if same, unchanged if not
-                       stwcx.  r12,r10,r11                                             ; Try to invalidate it
-                       bne--   tlvinvothr                                              ; Try again if there was a collision...         
-
-                       mtmsr   r9                                                              ; Restore interruptions
+tlvexit:       mtmsr   r9                                                              ; Restore interruptions
                        isync                                                                   ; Could be turning off vectors here
                        blr                                                                             ; Leave....
 
@@ -1567,26 +2474,22 @@ LEXT(vec_trash)
                        ori             r12,r12,lo16(EXT(per_proc_info))        ; Set base per_proc
                        li              r10,VMXowner                                    ; Displacement to vector owner
                        add             r11,r12,r11                                             ; Point to the owner per_proc   
+                       li              r0,0                                                    ; Set a 0 to invalidate context
                        
 vtinvothr:     lwarx   r12,r10,r11                                             ; Get the owner
+                       cmplw   r12,r3                                                  ; Does he still have this context?
+                       bne             vtnotlive                                               ; Nope, not live anywhere...    
+                       stwcx.  r0,r10,r11                                              ; Try to invalidate it
+                       bne-    vtinvothr                                               ; Try again if there was a collision...
 
-                       sub             r0,r12,r3                                               ; Subtract one from the other
-                       sub             r8,r3,r12                                               ; Subtract the other from the one
-                       or              r8,r8,r0                                                ; Combine them
-                       srawi   r8,r8,31                                                ; Get a 0 if equal or -1 of not
-                       and             r12,r12,r8                                              ; Make 0 if same, unchanged if not
-                       stwcx.  r12,r10,r11                                             ; Try to invalidate it
-                       bne--   vtinvothr                                               ; Try again if there was a collision...         
-
-
-                       beqlr++ cr1                                                             ; Leave if there is no savearea
+vtnotlive:     beqlr+  cr1                                                             ; Leave if there is no savearea
                        lwz             r8,SAVlevel(r9)                                 ; Get the level of the savearea
                        cmplw   r8,r11                                                  ; Savearea for the current level?
-                       bnelr++                                                                 ; No, nothing to release...
+                       bnelr+                                                                  ; No, nothing to release...
                        
-                       lwz             r8,SAVprev+4(r9)                                ; Pick up the previous area
+                       lwz             r8,SAVprev(r9)                                  ; Pick up the previous area
                        mr.             r8,r8                                                   ; Is there a previous?
-                       beq--   vtnoprev                                                ; Nope...
+                       beq-    vtnoprev                                                ; Nope...
                        lwz             r7,SAVlevel(r8)                                 ; Get the level associated with save
 
 vtnoprev:      stw             r8,VMXsave(r3)                                  ; Dequeue this savearea
@@ -1618,660 +2521,3 @@ LEXT(fctx_test)
                        mtspr   vrsave,r5                                               ; Set VRSave
                        vor             v0,v0,v0                                                ; Use vectors
                        blr
-
-
-// *******************
-// * f p _ s t o r e *
-// *******************
-//
-// Store FPRs into a save area.   Called by fpu_save and fpu_switch.
-//
-// When called:
-//             floating pt is enabled
-//             r3 = ptr to save area
-//
-// We destroy:
-//             r11.
-
-fp_store:
-            mfsprg     r11,2                                   ; get feature flags
-            mtcrf      0x02,r11                                ; put cache line size bits in cr6
-            la         r11,savefp0(r3)                 ; point to 1st line
-            dcbz128    0,r11                                   ; establish 1st line no matter what linesize is
-            bt--       pf32Byteb,fp_st32               ; skip if a 32-byte machine
-            
-// Store the FPRs on a 128-byte machine.
-                       
-                       stfd    f0,savefp0(r3)
-                       stfd    f1,savefp1(r3)
-                       la              r11,savefp16(r3)                ; Point to the 2nd cache line
-                       stfd    f2,savefp2(r3)
-                       stfd    f3,savefp3(r3)
-                       dcbz128 0,r11                                   ; establish 2nd line
-                       stfd    f4,savefp4(r3)
-                       stfd    f5,savefp5(r3)
-                       stfd    f6,savefp6(r3)
-                       stfd    f7,savefp7(r3)
-                       stfd    f8,savefp8(r3)
-                       stfd    f9,savefp9(r3)
-                       stfd    f10,savefp10(r3)
-                       stfd    f11,savefp11(r3)
-                       stfd    f12,savefp12(r3)
-                       stfd    f13,savefp13(r3)
-                       stfd    f14,savefp14(r3)
-                       stfd    f15,savefp15(r3)
-                       stfd    f16,savefp16(r3)
-                       stfd    f17,savefp17(r3)
-                       stfd    f18,savefp18(r3)
-                       stfd    f19,savefp19(r3)
-                       stfd    f20,savefp20(r3)
-                       stfd    f21,savefp21(r3)
-                       stfd    f22,savefp22(r3)
-                       stfd    f23,savefp23(r3)
-                       stfd    f24,savefp24(r3)
-                       stfd    f25,savefp25(r3)
-                       stfd    f26,savefp26(r3)
-                       stfd    f27,savefp27(r3)
-                       stfd    f28,savefp28(r3)
-                       stfd    f29,savefp29(r3)
-                       stfd    f30,savefp30(r3)
-                       stfd    f31,savefp31(r3)
-            blr
-            
-// Store FPRs on a 32-byte machine.
-
-fp_st32:
-                       la              r11,savefp4(r3)                         ; Point to the 2nd line
-                       stfd    f0,savefp0(r3)
-                       dcbz    0,r11                                           ; Allocate cache
-                       stfd    f1,savefp1(r3)
-                       stfd    f2,savefp2(r3)
-                       la              r11,savefp8(r3)                         ; Point to the 3rd line
-                       stfd    f3,savefp3(r3)
-                       dcbz    0,r11                                           ; Allocate cache
-                       stfd    f4,savefp4(r3)
-                       stfd    f5,savefp5(r3)
-                       stfd    f6,savefp6(r3)
-                       la              r11,savefp12(r3)                        ; Point to the 4th line
-                       stfd    f7,savefp7(r3)
-                       dcbz    0,r11                                           ; Allocate cache
-                       stfd    f8,savefp8(r3)
-                       stfd    f9,savefp9(r3)
-                       stfd    f10,savefp10(r3)
-                       la              r11,savefp16(r3)                        ; Point to the 5th line
-                       stfd    f11,savefp11(r3)
-                       dcbz    0,r11                                           ; Allocate cache
-                       stfd    f12,savefp12(r3)
-                       stfd    f13,savefp13(r3)
-                       stfd    f14,savefp14(r3)
-                       la              r11,savefp20(r3)                        ; Point to the 6th line 
-                       stfd    f15,savefp15(r3)
-                       dcbz    0,r11                                           ; Allocate cache
-                       stfd    f16,savefp16(r3)
-                       stfd    f17,savefp17(r3)
-                       stfd    f18,savefp18(r3)
-                       la              r11,savefp24(r3)                        ; Point to the 7th line
-                       stfd    f19,savefp19(r3)
-                       dcbz    0,r11                                           ; Allocate cache
-                       stfd    f20,savefp20(r3)
-
-                       stfd    f21,savefp21(r3)
-                       stfd    f22,savefp22(r3)
-                       la              r11,savefp28(r3)                        ; Point to the 8th line
-                       stfd    f23,savefp23(r3)
-                       dcbz    0,r11                                           ; allocate it
-                       stfd    f24,savefp24(r3)
-                       stfd    f25,savefp25(r3)
-                       stfd    f26,savefp26(r3)
-                       stfd    f27,savefp27(r3)
-
-                       stfd    f28,savefp28(r3)
-                       stfd    f29,savefp29(r3)
-                       stfd    f30,savefp30(r3)
-                       stfd    f31,savefp31(r3)
-            blr
-
-
-// *******************
-// * v r _ s t o r e *
-// *******************
-//
-// Store VRs into savearea, according to bits set in passed vrsave bitfield.  This routine is used
-// both by vec_save and vec_switch.  In order to minimize conditional branches and touching in
-// unnecessary cache blocks, we either save all or none of the VRs in a block.  We have separate paths
-// for each cache block size.
-//
-// When called:
-//             interrupts are off, vectors are enabled
-//             r3 = ptr to save area
-//             r10 = vrsave (not 0)
-//
-// We destroy:
-//             r4 - r11, all CRs.
-
-vr_store:
-            mfsprg     r9,2                                    ; get feature flags
-                       stw             r10,savevrvalid(r3)             ; Save the validity information in savearea
-                       slwi    r8,r10,1                                ; Shift over 1
-            mtcrf      0x02,r9                                 ; put cache line size bits in cr6 where we can test
-                       or              r8,r10,r8                               ; r8 <- even bits show which pairs are in use
-            bt--       pf32Byteb,vr_st32               ; skip if 32-byte cacheline processor
-
-            
-; Save vectors on a 128-byte linesize processor.  We save all or none of the 8 registers in each of
-; the four cache lines.  This minimizes mispredicted branches yet handles cache lines optimally.
-
-            slwi       r7,r8,2                                 ; shift groups-of-2 over by 2
-            li         r4,16                                   ; load offsets for X-form stores
-            or         r8,r7,r8                                ; show if any in group of 4 are in use
-            li         r5,32
-            slwi       r7,r8,4                                 ; shift groups-of-4 over by 4
-            li         r6,48
-            or         r11,r7,r8                               ; show if any in group of 8 are in use
-            li         r7,64
-            mtcrf      0x80,r11                                ; set CRs one at a time (faster)
-            li         r8,80
-            mtcrf      0x20,r11
-            li         r9,96
-            mtcrf      0x08,r11
-            li         r10,112
-            mtcrf      0x02,r11
-            
-            bf         0,vr_st64b                              ; skip if none of vr0-vr7 are in use
-            la         r11,savevr0(r3)                 ; get address of this group of registers in save area
-            dcbz128    0,r11                                   ; zero the line
-            stvxl      v0,0,r11                                ; save 8 VRs in the line
-            stvxl      v1,r4,r11
-            stvxl      v2,r5,r11
-            stvxl      v3,r6,r11
-            stvxl      v4,r7,r11
-            stvxl      v5,r8,r11
-            stvxl      v6,r9,r11
-            stvxl      v7,r10,r11
-            
-vr_st64b:
-            bf         8,vr_st64c                              ; skip if none of vr8-vr15 are in use
-            la         r11,savevr8(r3)                 ; get address of this group of registers in save area
-            dcbz128    0,r11                                   ; zero the line
-            stvxl      v8,0,r11                                ; save 8 VRs in the line
-            stvxl      v9,r4,r11
-            stvxl      v10,r5,r11
-            stvxl      v11,r6,r11
-            stvxl      v12,r7,r11
-            stvxl      v13,r8,r11
-            stvxl      v14,r9,r11
-            stvxl      v15,r10,r11
-
-vr_st64c:
-            bf         16,vr_st64d                             ; skip if none of vr16-vr23 are in use
-            la         r11,savevr16(r3)                ; get address of this group of registers in save area
-            dcbz128    0,r11                                   ; zero the line
-            stvxl      v16,0,r11                               ; save 8 VRs in the line
-            stvxl      v17,r4,r11
-            stvxl      v18,r5,r11
-            stvxl      v19,r6,r11
-            stvxl      v20,r7,r11
-            stvxl      v21,r8,r11
-            stvxl      v22,r9,r11
-            stvxl      v23,r10,r11
-
-vr_st64d:
-            bflr       24                                              ; done if none of vr24-vr31 are in use
-            la         r11,savevr24(r3)                ; get address of this group of registers in save area
-            dcbz128    0,r11                                   ; zero the line
-            stvxl      v24,0,r11                               ; save 8 VRs in the line
-            stvxl      v25,r4,r11
-            stvxl      v26,r5,r11
-            stvxl      v27,r6,r11
-            stvxl      v28,r7,r11
-            stvxl      v29,r8,r11
-            stvxl      v30,r9,r11
-            stvxl      v31,r10,r11
-            blr            
-            
-; Save vectors on a 32-byte linesize processor.  We save in 16 groups of 2: we either save both
-; or neither in each group.  This cuts down on conditional branches.
-;                       r8 = bitmask with bit n set (for even n) if either of that pair of VRs is in use
-;                   r3 = savearea
-
-vr_st32:
-            mtcrf      0xFF,r8                                 ; set CR bits so we can branch on them
-            li         r4,16                                   ; load offset for X-form stores
-
-            bf         0,vr_st32b                              ; skip if neither VR in this pair is in use
-            la         r11,savevr0(r3)                 ; get address of this group of registers in save area
-            dcba       0,r11                                   ; establish the line wo reading it
-            stvxl      v0,0,r11                                ; save the two VRs in the line
-            stvxl      v1,r4,r11
-
-vr_st32b:
-            bf         2,vr_st32c                              ; skip if neither VR in this pair is in use
-            la         r11,savevr2(r3)                 ; get address of this group of registers in save area
-            dcba       0,r11                                   ; establish the line wo reading it
-            stvxl      v2,0,r11                                ; save the two VRs in the line
-            stvxl      v3,r4,r11
-
-vr_st32c:
-            bf         4,vr_st32d                              ; skip if neither VR in this pair is in use
-            la         r11,savevr4(r3)                 ; get address of this group of registers in save area
-            dcba       0,r11                                   ; establish the line wo reading it
-            stvxl      v4,0,r11                                ; save the two VRs in the line
-            stvxl      v5,r4,r11
-
-vr_st32d:
-            bf         6,vr_st32e                              ; skip if neither VR in this pair is in use
-            la         r11,savevr6(r3)                 ; get address of this group of registers in save area
-            dcba       0,r11                                   ; establish the line wo reading it
-            stvxl      v6,0,r11                                ; save the two VRs in the line
-            stvxl      v7,r4,r11
-
-vr_st32e:
-            bf         8,vr_st32f                              ; skip if neither VR in this pair is in use
-            la         r11,savevr8(r3)                 ; get address of this group of registers in save area
-            dcba       0,r11                                   ; establish the line wo reading it
-            stvxl      v8,0,r11                                ; save the two VRs in the line
-            stvxl      v9,r4,r11
-
-vr_st32f:
-            bf         10,vr_st32g                             ; skip if neither VR in this pair is in use
-            la         r11,savevr10(r3)                ; get address of this group of registers in save area
-            dcba       0,r11                                   ; establish the line wo reading it
-            stvxl      v10,0,r11                               ; save the two VRs in the line
-            stvxl      v11,r4,r11
-
-vr_st32g:
-            bf         12,vr_st32h                             ; skip if neither VR in this pair is in use
-            la         r11,savevr12(r3)                ; get address of this group of registers in save area
-            dcba       0,r11                                   ; establish the line wo reading it
-            stvxl      v12,0,r11                               ; save the two VRs in the line
-            stvxl      v13,r4,r11
-
-vr_st32h:
-            bf         14,vr_st32i                             ; skip if neither VR in this pair is in use
-            la         r11,savevr14(r3)                ; get address of this group of registers in save area
-            dcba       0,r11                                   ; establish the line wo reading it
-            stvxl      v14,0,r11                               ; save the two VRs in the line
-            stvxl      v15,r4,r11
-
-vr_st32i:
-            bf         16,vr_st32j                             ; skip if neither VR in this pair is in use
-            la         r11,savevr16(r3)                ; get address of this group of registers in save area
-            dcba       0,r11                                   ; establish the line wo reading it
-            stvxl      v16,0,r11                               ; save the two VRs in the line
-            stvxl      v17,r4,r11
-
-vr_st32j:
-            bf         18,vr_st32k                             ; skip if neither VR in this pair is in use
-            la         r11,savevr18(r3)                ; get address of this group of registers in save area
-            dcba       0,r11                                   ; establish the line wo reading it
-            stvxl      v18,0,r11                               ; save the two VRs in the line
-            stvxl      v19,r4,r11
-
-vr_st32k:
-            bf         20,vr_st32l                             ; skip if neither VR in this pair is in use
-            la         r11,savevr20(r3)                ; get address of this group of registers in save area
-            dcba       0,r11                                   ; establish the line wo reading it
-            stvxl      v20,0,r11                               ; save the two VRs in the line
-            stvxl      v21,r4,r11
-
-vr_st32l:
-            bf         22,vr_st32m                             ; skip if neither VR in this pair is in use
-            la         r11,savevr22(r3)                ; get address of this group of registers in save area
-            dcba       0,r11                                   ; establish the line wo reading it
-            stvxl      v22,0,r11                               ; save the two VRs in the line
-            stvxl      v23,r4,r11
-
-vr_st32m:
-            bf         24,vr_st32n                             ; skip if neither VR in this pair is in use
-            la         r11,savevr24(r3)                ; get address of this group of registers in save area
-            dcba       0,r11                                   ; establish the line wo reading it
-            stvxl      v24,0,r11                               ; save the two VRs in the line
-            stvxl      v25,r4,r11
-
-vr_st32n:
-            bf         26,vr_st32o                             ; skip if neither VR in this pair is in use
-            la         r11,savevr26(r3)                ; get address of this group of registers in save area
-            dcba       0,r11                                   ; establish the line wo reading it
-            stvxl      v26,0,r11                               ; save the two VRs in the line
-            stvxl      v27,r4,r11
-
-vr_st32o:
-            bf         28,vr_st32p                             ; skip if neither VR in this pair is in use
-            la         r11,savevr28(r3)                ; get address of this group of registers in save area
-            dcba       0,r11                                   ; establish the line wo reading it
-            stvxl      v28,0,r11                               ; save the two VRs in the line
-            stvxl      v29,r4,r11
-
-vr_st32p:
-            bflr       30                                              ; done if neither VR in this pair is in use
-            la         r11,savevr30(r3)                ; get address of this group of registers in save area
-            dcba       0,r11                                   ; establish the line wo reading it
-            stvxl      v30,0,r11                               ; save the two VRs in the line
-            stvxl      v31,r4,r11
-            blr
-
-
-// *****************
-// * v r _ l o a d *
-// *****************
-//
-// Load live VRs from a savearea, according to bits set in a passed vector.  This is the reverse
-// of "vr_store".  Like it, we avoid touching unnecessary cache blocks and minimize conditional
-// branches by loading all VRs from a cache line, if we have to load any.  If we don't load the VRs
-// in a cache line, we bug them.  Note that this behavior is slightly different from earlier kernels,
-// which would bug all VRs that aren't live.
-//
-// When called:
-//             interrupts are off, vectors are enabled
-//             r3 = ptr to save area
-//             r10 = vector of live regs to load (ie, savevrsave & savevrvalid, may be 0)
-//             v31 = bugbug constant (0x7FFFDEAD7FFFDEAD7FFFDEAD7FFFDEAD)
-//
-// We destroy:
-//             r4 - r11, all CRs.
-
-vr_load:
-            mfsprg     r9,2                                    ; get feature flags
-            li         r6,1                                    ; assuming 32-byte, get (#VRs)-1 in a cacheline
-            mtcrf      0x02,r9                                 ; set cache line size bits in cr6
-            lis                r7,0xC000                               ; assuming 32-byte, set bits 0-1
-            bt--       pf32Byteb,vr_ld0                ; skip if 32-bit processor
-            li         r6,7                                    ; 128-byte machines have 8 VRs in a cacheline
-            lis                r7,0xFF00                               ; so set bits 0-7
-            
-// Loop touching in cache blocks we will load from.
-//             r3 = savearea ptr
-//             r5 = we light bits for the VRs we will be loading
-//             r6 = 1 if 32-byte, 7 if 128-byte
-//             r7 = 0xC0000000 if 32-byte, 0xFF000000 if 128-byte
-//             r10 = live VR bits
-//             v31 = bugbug constant
-
-vr_ld0:
-            li         r5,0                                    ; initialize set of VRs to load
-            la         r11,savevr0(r3)                 ; get address of register file
-            b          vr_ld2                                  ; enter loop in middle
-            
-            .align     5
-vr_ld1:                                                                                ; loop over each cache line we will load
-            dcbt       r4,r11                                  ; start prefetch of the line
-            andc       r10,r10,r9                              ; turn off the bits in this line
-            or         r5,r5,r9                                ; we will load all these
-vr_ld2:                                                                                ; initial entry pt
-            cntlzw     r4,r10                                  ; get offset to next live VR
-            andc       r4,r4,r6                                ; cacheline align it
-            srw.       r9,r7,r4                                ; position bits for VRs in that cache line
-            slwi       r4,r4,4                                 ; get byte offset within register file to that line
-            bne                vr_ld1                                  ; loop if more bits in r10
-            
-            bf--       pf128Byteb,vr_ld32              ; skip if not 128-byte lines
-
-// Handle a processor with 128-byte cache lines.  Four groups of 8 VRs.
-//             r3 = savearea ptr
-//             r5 = 1st bit in each cacheline is 1 iff any reg in that line must be loaded
-//             r11 = addr(savevr0)
-//             v31 = bugbug constant
-
-            mtcrf      0x80,r5                                 ; set up bits for conditional branches
-            li         r4,16                                   ; load offsets for X-form stores
-            li         r6,48
-            mtcrf      0x20,r5                                 ; load CRs ona at a time, which is faster
-            li         r7,64
-            li         r8,80
-            mtcrf      0x08,r5
-            li         r9,96
-            li         r10,112
-            mtcrf      0x02,r5
-            li         r5,32
-            
-            bt         0,vr_ld128a                             ; skip if this line must be loaded
-            vor                v0,v31,v31                              ; no VR must be loaded, so bug them all
-            vor                v1,v31,v31
-            vor                v2,v31,v31
-            vor                v3,v31,v31
-            vor                v4,v31,v31
-            vor                v5,v31,v31
-            vor                v6,v31,v31
-            vor                v7,v31,v31
-            b          vr_ld128b
-vr_ld128a:                                                                     ; must load from this line
-            lvxl       v0,0,r11
-            lvxl       v1,r4,r11
-            lvxl       v2,r5,r11
-            lvxl       v3,r6,r11
-            lvxl       v4,r7,r11
-            lvxl       v5,r8,r11
-            lvxl       v6,r9,r11
-            lvxl       v7,r10,r11
-            
-vr_ld128b:                                                             ; here to handle next cache line         
-            la         r11,savevr8(r3)                 ; load offset to it
-            bt         8,vr_ld128c                             ; skip if this line must be loaded
-            vor                v8,v31,v31                              ; no VR must be loaded, so bug them all
-            vor                v9,v31,v31
-            vor                v10,v31,v31
-            vor                v11,v31,v31
-            vor                v12,v31,v31
-            vor                v13,v31,v31
-            vor                v14,v31,v31
-            vor                v15,v31,v31
-            b          vr_ld128d
-vr_ld128c:                                                                     ; must load from this line
-            lvxl       v8,0,r11
-            lvxl       v9,r4,r11
-            lvxl       v10,r5,r11
-            lvxl       v11,r6,r11
-            lvxl       v12,r7,r11
-            lvxl       v13,r8,r11
-            lvxl       v14,r9,r11
-            lvxl       v15,r10,r11
-            
-vr_ld128d:                                                             ; here to handle next cache line         
-            la         r11,savevr16(r3)                ; load offset to it
-            bt         16,vr_ld128e                    ; skip if this line must be loaded
-            vor                v16,v31,v31                             ; no VR must be loaded, so bug them all
-            vor                v17,v31,v31
-            vor                v18,v31,v31
-            vor                v19,v31,v31
-            vor                v20,v31,v31
-            vor                v21,v31,v31
-            vor                v22,v31,v31
-            vor                v23,v31,v31
-            b          vr_ld128f
-vr_ld128e:                                                                     ; must load from this line
-            lvxl       v16,0,r11
-            lvxl       v17,r4,r11
-            lvxl       v18,r5,r11
-            lvxl       v19,r6,r11
-            lvxl       v20,r7,r11
-            lvxl       v21,r8,r11
-            lvxl       v22,r9,r11
-            lvxl       v23,r10,r11
-            
-vr_ld128f:                                                             ; here to handle next cache line         
-            la         r11,savevr24(r3)                ; load offset to it
-            bt         24,vr_ld128g                    ; skip if this line must be loaded
-            vor                v24,v31,v31                             ; no VR must be loaded, so bug them all
-            vor                v25,v31,v31
-            vor                v26,v31,v31
-            vor                v27,v31,v31
-            vor                v28,v31,v31
-            vor                v29,v31,v31
-            vor                v30,v31,v31
-            blr
-vr_ld128g:                                                                     ; must load from this line
-            lvxl       v24,0,r11
-            lvxl       v25,r4,r11
-            lvxl       v26,r5,r11
-            lvxl       v27,r6,r11
-            lvxl       v28,r7,r11
-            lvxl       v29,r8,r11
-            lvxl       v30,r9,r11
-            lvxl       v31,r10,r11
-            blr
-            
-// Handle a processor with 32-byte cache lines.  Sixteen groups of two VRs.
-//             r5 = 1st bit in each cacheline is 1 iff any reg in that line must be loaded
-//             r11 = addr(savevr0)
-
-vr_ld32:
-            mtcrf      0xFF,r5                                 ; set up bits for conditional branches
-            li         r4,16                                   ; load offset for X-form stores
-            
-            bt         0,vr_ld32load0                  ; skip if we must load this line
-            vor                v0,v31,v31                              ; neither VR is live, so bug them both
-            vor                v1,v31,v31
-            b          vr_ld32test2
-vr_ld32load0:                                                          ; must load VRs in this line
-            lvxl       v0,0,r11
-            lvxl       v1,r4,r11
-            
-vr_ld32test2:                                                          ; here to handle next cache line
-            la         r11,savevr2(r3)                 ; get offset to next cache line
-            bt         2,vr_ld32load2                  ; skip if we must load this line
-            vor                v2,v31,v31                              ; neither VR is live, so bug them both
-            vor                v3,v31,v31
-            b          vr_ld32test4
-vr_ld32load2:                                                          ; must load VRs in this line
-            lvxl       v2,0,r11
-            lvxl       v3,r4,r11
-            
-vr_ld32test4:                                                          ; here to handle next cache line
-            la         r11,savevr4(r3)                 ; get offset to next cache line
-            bt         4,vr_ld32load4                  ; skip if we must load this line
-            vor                v4,v31,v31                              ; neither VR is live, so bug them both
-            vor                v5,v31,v31
-            b          vr_ld32test6
-vr_ld32load4:                                                          ; must load VRs in this line
-            lvxl       v4,0,r11
-            lvxl       v5,r4,r11
-            
-vr_ld32test6:                                                          ; here to handle next cache line
-            la         r11,savevr6(r3)                 ; get offset to next cache line
-            bt         6,vr_ld32load6                  ; skip if we must load this line
-            vor                v6,v31,v31                              ; neither VR is live, so bug them both
-            vor                v7,v31,v31
-            b          vr_ld32test8
-vr_ld32load6:                                                          ; must load VRs in this line
-            lvxl       v6,0,r11
-            lvxl       v7,r4,r11
-            
-vr_ld32test8:                                                          ; here to handle next cache line
-            la         r11,savevr8(r3)                 ; get offset to next cache line
-            bt         8,vr_ld32load8                  ; skip if we must load this line
-            vor                v8,v31,v31                              ; neither VR is live, so bug them both
-            vor                v9,v31,v31
-            b          vr_ld32test10
-vr_ld32load8:                                                          ; must load VRs in this line
-            lvxl       v8,0,r11
-            lvxl       v9,r4,r11
-            
-vr_ld32test10:                                                         ; here to handle next cache line
-            la         r11,savevr10(r3)                ; get offset to next cache line
-            bt         10,vr_ld32load10                ; skip if we must load this line
-            vor                v10,v31,v31                             ; neither VR is live, so bug them both
-            vor                v11,v31,v31
-            b          vr_ld32test12
-vr_ld32load10:                                                         ; must load VRs in this line
-            lvxl       v10,0,r11
-            lvxl       v11,r4,r11
-            
-vr_ld32test12:                                                         ; here to handle next cache line
-            la         r11,savevr12(r3)                ; get offset to next cache line
-            bt         12,vr_ld32load12                ; skip if we must load this line
-            vor                v12,v31,v31                             ; neither VR is live, so bug them both
-            vor                v13,v31,v31
-            b          vr_ld32test14
-vr_ld32load12:                                                         ; must load VRs in this line
-            lvxl       v12,0,r11
-            lvxl       v13,r4,r11
-            
-vr_ld32test14:                                                         ; here to handle next cache line
-            la         r11,savevr14(r3)                ; get offset to next cache line
-            bt         14,vr_ld32load14                ; skip if we must load this line
-            vor                v14,v31,v31                             ; neither VR is live, so bug them both
-            vor                v15,v31,v31
-            b          vr_ld32test16
-vr_ld32load14:                                                         ; must load VRs in this line
-            lvxl       v14,0,r11
-            lvxl       v15,r4,r11
-            
-vr_ld32test16:                                                         ; here to handle next cache line
-            la         r11,savevr16(r3)                ; get offset to next cache line
-            bt         16,vr_ld32load16                ; skip if we must load this line
-            vor                v16,v31,v31                             ; neither VR is live, so bug them both
-            vor                v17,v31,v31
-            b          vr_ld32test18
-vr_ld32load16:                                                         ; must load VRs in this line
-            lvxl       v16,0,r11
-            lvxl       v17,r4,r11
-            
-vr_ld32test18:                                                         ; here to handle next cache line
-            la         r11,savevr18(r3)                ; get offset to next cache line
-            bt         18,vr_ld32load18                ; skip if we must load this line
-            vor                v18,v31,v31                             ; neither VR is live, so bug them both
-            vor                v19,v31,v31
-            b          vr_ld32test20
-vr_ld32load18:                                                         ; must load VRs in this line
-            lvxl       v18,0,r11
-            lvxl       v19,r4,r11
-            
-vr_ld32test20:                                                         ; here to handle next cache line
-            la         r11,savevr20(r3)                ; get offset to next cache line
-            bt         20,vr_ld32load20                ; skip if we must load this line
-            vor                v20,v31,v31                             ; neither VR is live, so bug them both
-            vor                v21,v31,v31
-            b          vr_ld32test22
-vr_ld32load20:                                                         ; must load VRs in this line
-            lvxl       v20,0,r11
-            lvxl       v21,r4,r11
-            
-vr_ld32test22:                                                         ; here to handle next cache line
-            la         r11,savevr22(r3)                ; get offset to next cache line
-            bt         22,vr_ld32load22                ; skip if we must load this line
-            vor                v22,v31,v31                             ; neither VR is live, so bug them both
-            vor                v23,v31,v31
-            b          vr_ld32test24
-vr_ld32load22:                                                         ; must load VRs in this line
-            lvxl       v22,0,r11
-            lvxl       v23,r4,r11
-            
-vr_ld32test24:                                                         ; here to handle next cache line
-            la         r11,savevr24(r3)                ; get offset to next cache line
-            bt         24,vr_ld32load24                ; skip if we must load this line
-            vor                v24,v31,v31                             ; neither VR is live, so bug them both
-            vor                v25,v31,v31
-            b          vr_ld32test26
-vr_ld32load24:                                                         ; must load VRs in this line
-            lvxl       v24,0,r11
-            lvxl       v25,r4,r11
-            
-vr_ld32test26:                                                         ; here to handle next cache line
-            la         r11,savevr26(r3)                ; get offset to next cache line
-            bt         26,vr_ld32load26                ; skip if we must load this line
-            vor                v26,v31,v31                             ; neither VR is live, so bug them both
-            vor                v27,v31,v31
-            b          vr_ld32test28
-vr_ld32load26:                                                         ; must load VRs in this line
-            lvxl       v26,0,r11
-            lvxl       v27,r4,r11
-            
-vr_ld32test28:                                                         ; here to handle next cache line
-            la         r11,savevr28(r3)                ; get offset to next cache line
-            bt         28,vr_ld32load28                ; skip if we must load this line
-            vor                v28,v31,v31                             ; neither VR is live, so bug them both
-            vor                v29,v31,v31
-            b          vr_ld32test30
-vr_ld32load28:                                                         ; must load VRs in this line
-            lvxl       v28,0,r11
-            lvxl       v29,r4,r11
-            
-vr_ld32test30:                                                         ; here to handle next cache line
-            la         r11,savevr30(r3)                ; get offset to next cache line
-            bt         30,vr_ld32load30                ; skip if we must load this line
-            vor                v30,v31,v31                             ; neither VR is live, so bug them both
-            blr
-vr_ld32load30:                                                         ; must load VRs in this line
-            lvxl       v30,0,r11
-            lvxl       v31,r4,r11
-            blr
index 7eeeb4e4bce5e02e99777601143def3dbbe1be81..37c8006849d000014ba7cb0afcdc8cc80271f23f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #include <mach/ppc/vm_param.h>
 #include <assym.s>
 
+/* void
+ * db_phys_copy(src, dst, bytecount)
+ *      vm_offset_t     src;
+ *      vm_offset_t     dst;
+ *      int             bytecount
+ *
+ * This routine will copy bytecount bytes from physical address src to physical
+ * address dst. 
+ */
+ENTRY(db_phys_copy, TAG_NO_FRAME_USED)
+
+       /* Switch off data translations */
+       mfmsr   r6
+       rlwinm  r6,r6,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+       rlwinm  r6,r6,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+       rlwinm  r7,     r6,     0,      MSR_DR_BIT+1,   MSR_DR_BIT-1
+       mtmsr   r7
+       isync                   /* Ensure data translations are off */
+
+       subi    r3,     r3,     4
+       subi    r4,     r4,     4
+
+       cmpwi   r5,     3
+       ble-    .L_db_phys_copy_bytes
+.L_db_phys_copy_loop:
+       lwz     r0,     4(r3)
+       addi    r3,     r3,     4
+       subi    r5,     r5,     4
+       stw     r0,     4(r4)
+       addi    r4,     r4,     4
+       cmpwi   r5,     3
+       bgt+    .L_db_phys_copy_loop
+
+       /* If no leftover bytes, we're done now */
+       cmpwi   r5,     0
+       beq+    .L_db_phys_copy_done
+       
+.L_db_phys_copy_bytes:
+       addi    r3,     r3,     3
+       addi    r4,     r4,     3
+.L_db_phys_copy_byte_loop:     
+       lbz     r0,     1(r3)
+       addi    r3,     r3,     1
+       subi    r5,     r5,     1
+       stb     r0,     1(r4)
+       addi    r4,     r4,     1
+       cmpwi   r5,     0
+       bne+    .L_db_phys_copy_loop
+
+.L_db_phys_copy_done:
+       mtmsr   r6              /* Restore original translations */
+       isync                   /* Ensure data translations are off */
+
+       blr
 
 /* void
  * db_phys_cmp(src_a, src_b, bytecount)
  * address src_b. 
  */
 
-#warning THIS IS BROKEN FOR 64-BIT
-
        /* Switch off data translations */
-       lis             r7,hi16(MASK(MSR_VEC))
-       ori             r7,r7,lo16(MASK(MSR_FP))
        mfmsr   r6
-       andc    r6,r6,r7                        ; Force FP and vec off
-       ori             r7,r7,lo16(MASK(MSR_DR))        ; Set the DR bit
-       andc    r7,r6,r7                        ; Force DR off
+       rlwinm  r6,r6,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+       rlwinm  r6,r6,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+       rlwinm  r7,     r6,     0,      MSR_DR_BIT+1,   MSR_DR_BIT-1
        mtmsr   r7
        isync                   /* Ensure data translations are off */
 
index 810aeb110bf60e3265eb6912d7ceee64f04da738..984124ba01bf47406c6bc33bced09edba364e197 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -69,7 +66,6 @@ db_disasm(
                db_task_printsym(db_disasm_symaddr, DB_STGY_ANY, task);
                db_printf(">");
        }
-       db_printf("\n");                /* Make sure we have a new line for multiline displays */
        dis_done();
        return (loc+4);
 }
index ccce9c5b66eee1ec1bc14249f0671a37de3fef2c..229f4f5ac12e35a20282473f94eaa384d1e5b952 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -118,6 +115,11 @@ extern void        kdbprinttrap(
                        int                     code,
                        int                     *pc,
                        int                     sp);
+extern int     db_user_to_kernel_address(
+                       task_t                  task,
+                       vm_offset_t             addr,
+                       unsigned                *kaddr,
+                       int                     flag);
 extern void    db_write_bytes_user_space(
                        vm_offset_t             addr,
                        int                     size,
@@ -248,22 +250,68 @@ kdbprinttrap(
 /*
  *
  */
-addr64_t db_vtophys(
+vm_offset_t db_vtophys(
        pmap_t pmap,
        vm_offset_t va)
 {
-       ppnum_t pp;
-       addr64_t pa;
+       register mapping        *mp;
+       register vm_offset_t    pa;
 
-       pp = pmap_find_phys(pmap, (addr64_t)va);
+       pa = (vm_offset_t)LRA(pmap->space,(void *)va);
 
-       if (pp == 0) return(0);                                 /* Couldn't find it */
-       
-       pa = ((addr64_t)pp << 12) | (addr64_t)(va & 0xFFF);     /* Get physical address */
+       if (pa != 0)
+               return(pa);
+
+       mp = hw_lock_phys_vir(pmap->space, va);
+       if((unsigned int)mp&1) {
+               return 0;
+       }
+
+       if(!mp) {                                                               /* If it was not a normal page */
+               pa = hw_cvp_blk(pmap, va);                      /* Try to convert odd-sized page (returns 0 if not found) */
+               return pa;                                                      /* Return physical address */
+       }
+
+       mp = hw_cpv(mp);                                                /* Convert to virtual address */
+
+       if(!mp->physent) {
+               pa = (vm_offset_t)((mp->PTEr & -PAGE_SIZE) | ((unsigned int)va & (PAGE_SIZE-1)));
+       } else {
+               pa = (vm_offset_t)((mp->physent->pte1 & -PAGE_SIZE) | ((unsigned int)va & (PAGE_SIZE-1)));
+               hw_unlock_bit((unsigned int *)&mp->physent->phys_link, PHYS_LOCK);
+       }
 
        return(pa);
 }
 
+int
+db_user_to_kernel_address(
+       task_t          task,
+       vm_offset_t     addr,
+       unsigned        *kaddr,
+       int             flag)
+{
+       unsigned int    sr_val, raddr;
+
+       raddr = (unsigned int)db_vtophys(task->map->pmap, trunc_page(addr));    /* Get the real address */
+
+       if (!raddr) {
+           if (flag) {
+               db_printf("\nno memory is assigned to address %08x\n", addr);
+               db_error(0);
+               /* NOTREACHED */
+           }
+           return -1;
+       }
+       sr_val = SEG_REG_PROT | task->map->pmap->space
+                | ((addr >> 8) & 0x00F00000);
+               
+       mtsr(SR_COPYIN_NUM, sr_val);
+       sync();
+       *kaddr = (addr & 0x0fffffff) | (SR_COPYIN_NUM << 28);
+       return(0);
+}
+       
 /*
  * Read bytes from task address space for debugger.
  */
@@ -275,8 +323,8 @@ db_read_bytes(
        task_t          task)
 {
        int             n,max;
-       addr64_t        phys_dst;
-       addr64_t        phys_src;
+       unsigned        phys_dst;
+       unsigned        phys_src;
        pmap_t  pmap;
        
        while (size > 0) {
@@ -285,15 +333,16 @@ db_read_bytes(
                else
                        pmap = kernel_pmap;
 
-               phys_src = db_vtophys(pmap, (vm_offset_t)addr);  
+               phys_src = (unsigned int)db_vtophys(pmap, trunc_page(addr));  
                if (phys_src == 0) {
                        db_printf("\nno memory is assigned to src address %08x\n",
                                  addr);
                        db_error(0);
                        /* NOTREACHED */
                }
+               phys_src = phys_src| (addr & page_mask);
 
-               phys_dst = db_vtophys(kernel_pmap, (vm_offset_t)data); 
+               phys_dst = (unsigned int)db_vtophys(kernel_pmap, trunc_page(data)); 
                if (phys_dst == 0) {
                        db_printf("\nno memory is assigned to dst address %08x\n",
                                  data);
@@ -301,20 +350,22 @@ db_read_bytes(
                        /* NOTREACHED */
                }
                
+               phys_dst = phys_dst | (((vm_offset_t) data) & page_mask);
+
                /* don't over-run any page boundaries - check src range */
-               max = round_page_64(phys_src + 1) - phys_src;
+               max = ppc_round_page(phys_src) - phys_src;
                if (max > size)
                        max = size;
                /* Check destination won't run over boundary either */
-               n = round_page_64(phys_dst + 1) - phys_dst;
-               
-               if (n < max) max = n;
+               n = ppc_round_page(phys_dst) - phys_dst;
+               if (n < max)
+                       max = n;
                size -= max;
                addr += max;
                phys_copy(phys_src, phys_dst, max);
 
                /* resync I+D caches */
-               sync_cache64(phys_dst, max);
+               sync_cache(phys_dst, max);
 
                phys_src += max;
                phys_dst += max;
@@ -332,13 +383,13 @@ db_write_bytes(
        task_t          task)
 {
        int             n,max;
-       addr64_t        phys_dst;
-       addr64_t        phys_src;
+       unsigned        phys_dst;
+       unsigned        phys_src;
        pmap_t  pmap;
        
        while (size > 0) {
 
-               phys_src = db_vtophys(kernel_pmap, (vm_offset_t)data); 
+               phys_src = (unsigned int)db_vtophys(kernel_pmap, trunc_page(data)); 
                if (phys_src == 0) {
                        db_printf("\nno memory is assigned to src address %08x\n",
                                  data);
@@ -346,24 +397,27 @@ db_write_bytes(
                        /* NOTREACHED */
                }
                
+               phys_src = phys_src | (((vm_offset_t) data) & page_mask);
+
                /* space stays as kernel space unless in another task */
                if (task == NULL) pmap = kernel_pmap;
                else pmap = task->map->pmap;
 
-               phys_dst = db_vtophys(pmap, (vm_offset_t)addr);  
+               phys_dst = (unsigned int)db_vtophys(pmap, trunc_page(addr));  
                if (phys_dst == 0) {
                        db_printf("\nno memory is assigned to dst address %08x\n",
                                  addr);
                        db_error(0);
                        /* NOTREACHED */
                }
+               phys_dst = phys_dst| (addr & page_mask);
 
                /* don't over-run any page boundaries - check src range */
-               max = round_page_64(phys_src + 1) - phys_src;
+               max = ppc_round_page(phys_src) - phys_src;
                if (max > size)
                        max = size;
                /* Check destination won't run over boundary either */
-               n = round_page_64(phys_dst + 1) - phys_dst;
+               n = ppc_round_page(phys_dst) - phys_dst;
                if (n < max)
                        max = n;
                size -= max;
@@ -371,7 +425,7 @@ db_write_bytes(
                phys_copy(phys_src, phys_dst, max);
 
                /* resync I+D caches */
-               sync_cache64(phys_dst, max);
+               sync_cache(phys_dst, max);
 
                phys_src += max;
                phys_dst += max;
@@ -388,16 +442,18 @@ db_check_access(
        unsigned int    kern_addr;
 
        if (task == kernel_task || task == TASK_NULL) {
-           if (kernel_task == TASK_NULL)  return(TRUE);
+           if (kernel_task == TASK_NULL)
+               return(TRUE);
            task = kernel_task;
        } else if (task == TASK_NULL) {
-           if (current_act() == THR_ACT_NULL) return(FALSE);
+           if (current_act() == THR_ACT_NULL)
+               return(FALSE);
            task = current_act()->task;
        }
-
        while (size > 0) {
-               if(!pmap_find_phys(task->map->pmap, (addr64_t)addr)) return (FALSE);    /* Fail if page not mapped */
-           n = trunc_page_32(addr+PPC_PGBYTES) - addr;
+           if (db_user_to_kernel_address(task, addr, &kern_addr, 0) < 0)
+               return(FALSE);
+           n = ppc_trunc_page(addr+PPC_PGBYTES) - addr;
            if (n > size)
                n = size;
            size -= n;
@@ -413,7 +469,7 @@ db_phys_eq(
        task_t          task2,
        vm_offset_t     addr2)
 {
-       addr64_t        physa, physb;
+       vm_offset_t     physa, physb;
 
        if ((addr1 & (PPC_PGBYTES-1)) != (addr2 & (PPC_PGBYTES-1)))     /* Is byte displacement the same? */
                return FALSE;
@@ -424,8 +480,8 @@ db_phys_eq(
                task1 = current_act()->task;                            /* If so, use that one */
        }
        
-       if(!(physa = db_vtophys(task1->map->pmap, (vm_offset_t)trunc_page_32(addr1)))) return FALSE;    /* Get real address of the first */
-       if(!(physb = db_vtophys(task2->map->pmap, (vm_offset_t)trunc_page_32(addr2)))) return FALSE;    /* Get real address of the second */
+       if(!(physa = db_vtophys(task1->map->pmap, trunc_page(addr1)))) return FALSE;    /* Get real address of the first */
+       if(!(physb = db_vtophys(task2->map->pmap, trunc_page(addr2)))) return FALSE;    /* Get real address of the second */
        
        return (physa == physb);                                                /* Check if they are equal, then return... */
 }
@@ -433,16 +489,6 @@ db_phys_eq(
 #define DB_USER_STACK_ADDR             (0xc0000000)
 #define DB_NAME_SEARCH_LIMIT           (DB_USER_STACK_ADDR-(PPC_PGBYTES*3))
 
-boolean_t      db_phys_cmp(
-                               vm_offset_t a1, 
-                               vm_offset_t a2, 
-                               vm_size_t s1) {
-
-       db_printf("db_phys_cmp: not implemented\n");
-       return 0;
-}
-
-
 int
 db_search_null(
        task_t          task,
@@ -454,37 +500,65 @@ db_search_null(
        register unsigned vaddr;
        register unsigned *kaddr;
 
-       db_printf("db_search_null: not implemented\n");
-
+       kaddr = (unsigned *)*skaddr;
+       for (vaddr = *svaddr; vaddr > evaddr; ) {
+           if (vaddr % PPC_PGBYTES == 0) {
+               vaddr -= sizeof(unsigned);
+               if (db_user_to_kernel_address(task, vaddr, skaddr, 0) < 0)
+                   return(-1);
+               kaddr = (unsigned *)*skaddr;
+           } else {
+               vaddr -= sizeof(unsigned);
+               kaddr--;
+           }
+           if ((*kaddr == 0) ^ (flag  == 0)) {
+               *svaddr = vaddr;
+               *skaddr = (unsigned)kaddr;
+               return(0);
+           }
+       }
        return(-1);
 }
 
-unsigned char *getProcName(struct proc *proc);
-
 void
 db_task_name(
        task_t          task)
 {
-       register unsigned char *p;
+       register char *p;
        register int n;
        unsigned int vaddr, kaddr;
-       unsigned char tname[33];
-       int i;
 
-       p = 0;
-       tname[0] = 0;
-       
-       if(task->bsd_info) p = getProcName((struct proc *)(task->bsd_info));    /* Point to task name */
-       
-       if(p) {
-               for(i = 0; i < 32; i++) {                       /* Move no more than 32 bytes */
-                       tname[i] = p[i];
-                       if(p[i] == 0) break;
-               }
-               tname[i] = 0;
-               db_printf("%s", tname);
+       vaddr = DB_USER_STACK_ADDR;
+       kaddr = 0;
+
+       /*
+        * skip nulls at the end
+        */
+       if (db_search_null(task, &vaddr, DB_NAME_SEARCH_LIMIT, &kaddr, 0) < 0) {
+           db_printf(DB_NULL_TASK_NAME);
+           return;
+       }
+       /*
+        * search start of args
+        */
+       if (db_search_null(task, &vaddr, DB_NAME_SEARCH_LIMIT, &kaddr, 1) < 0) {
+           db_printf(DB_NULL_TASK_NAME);
+           return;
+       }
+
+       n = DB_TASK_NAME_LEN-1;
+       p = (char *)kaddr + sizeof(unsigned);
+       for (vaddr += sizeof(int); vaddr < DB_USER_STACK_ADDR && n > 0; 
+                                                       vaddr++, p++, n--) {
+           if (vaddr % PPC_PGBYTES == 0) {
+               if (db_user_to_kernel_address(task, vaddr, &kaddr, 0) <0)
+                       return;
+               p = (char*)kaddr;
+           }
+           db_printf("%c", (*p < ' ' || *p > '~')? ' ': *p);
        }
-       else db_printf("no name");
+       while (n-- >= 0)        /* compare with >= 0 for one more space */
+           db_printf(" ");
 }
 
 void
index 1fa7e586bd25772373d09ec58e4b59ca858d7c7a..2bc5ce0c4ed6e89a5bc80180aeaf940fcc1b2797 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #include <ppc/mappings.h>
 #include <ppc/pmap.h>
 #include <ppc/mem.h>
+#include <ppc/pmap_internals.h>
 #include <ppc/savearea.h>
 #include <ppc/vmachmon.h>
 
-void db_dumppca(unsigned int ptegindex);       
+void db_dumpphys(struct phys_entry *pp);                                       /* Dump from physent */
+void db_dumppca(struct mapping *mp);                                           /* PCA */
 void db_dumpmapping(struct mapping *mp);                                       /* Dump out a mapping */
+void db_dumppmap(pmap_t pmap);                                                         /* Dump out a pmap */
 extern kmod_info_t *kmod;                                                                      /* Find the kmods */
 
 db_addr_t      db_low_trace_prev = 0;
@@ -84,11 +84,11 @@ void db_low_trace(db_expr_t addr, int have_addr, db_expr_t count, char * modif)
 
        int             c, i;
        unsigned int tempx, cnt;
-       unsigned int xTraceCurr, xTraceStart, xTraceEnd, cxltr;
+       unsigned int xbuf[8];
+       unsigned int xTraceCurr, xTraceStart, xTraceEnd, cxltr, xxltr;
        db_addr_t       next_addr;
        LowTraceRecord xltr;
        unsigned char cmark;
-       addr64_t xxltr;
        
        cnt = 16;                                                                                                       /* Default to 16 entries */
        
@@ -108,36 +108,29 @@ void db_low_trace(db_expr_t addr, int have_addr, db_expr_t count, char * modif)
                return;                                                                                                 /* Leave... */
        }
 
-       if((unsigned int)addr&0x0000007F) {                                                     /* Proper alignment? */
-               db_printf("address not aligned on trace entry boundary (0x80)\n");      /* Tell 'em */
+       if((unsigned int)addr&0x0000003F) {                                                     /* Proper alignment? */
+               db_printf("address not aligned on trace entry boundary (0x40)\n");      /* Tell 'em */
                return;                                                                                                 /* Leave... */
        }
        
-       xxltr = addr;                                                                                           /* Set the start */
-       cxltr = ((xTraceCurr == xTraceStart ? xTraceEnd : xTraceCurr) - sizeof(LowTraceRecord));        /* Get address of newest entry */
+       xxltr=(unsigned int)addr;                                                                       /* Set the start */
+       cxltr=((xTraceCurr==xTraceStart ? xTraceEnd : xTraceCurr)-sizeof(LowTraceRecord));      /* Get address of newest entry */
 
        db_low_trace_prev = addr;                                                                       /* Starting point */
 
        for(i=0; i < cnt; i++) {                                                                        /* Dump the 16 (or all) entries */
        
-               ReadReal((addr64_t)xxltr, (unsigned int *)&xltr);                                       /* Get the first half */
-               ReadReal((addr64_t)xxltr + 32, &(((unsigned int *)&xltr)[8]));          /* Get the second half */
-               ReadReal((addr64_t)xxltr + 64, &(((unsigned int *)&xltr)[16]));         /* Get the second half */
-               ReadReal((addr64_t)xxltr + 96, &(((unsigned int *)&xltr)[24]));         /* Get the second half */
+               ReadReal(xxltr, (unsigned int *)&xltr);                                 /* Get the first half */
+               ReadReal(xxltr+32, &(((unsigned int *)&xltr)[8]));              /* Get the second half */
                
-               db_printf("\n%s%08llX  %1X  %08X %08X - %04X\n", (xxltr != cxltr ? " " : "*"), 
+               db_printf("\n%s%08X  %1X  %08X %08X - %04X\n", (xxltr!=cxltr ? " " : "*"), 
                        xxltr,
                        xltr.LTR_cpu, xltr.LTR_timeHi, xltr.LTR_timeLo, 
-                       (xltr.LTR_excpt & 0x8000 ? 0xFFFF : xltr.LTR_excpt * 64));      /* Print the first line */
-                       
-               db_printf("              DAR/DSR/CR: %016llX %08X %08X\n", xltr.LTR_dar, xltr.LTR_dsisr, xltr.LTR_cr);
-               
-               db_printf("                SRR0/SRR1 %016llX %016llX\n",  xltr.LTR_srr0, xltr.LTR_srr1);
-               db_printf("                LR/CTR    %016llX %016llX\n",  xltr.LTR_lr, xltr.LTR_ctr);
-
-               db_printf("                R0/R1/R2  %016llX %016llX %016llX\n", xltr.LTR_r0, xltr.LTR_r1, xltr.LTR_r2);
-               db_printf("                R3/R4/R5  %016llX %016llX %016llX\n", xltr.LTR_r3, xltr.LTR_r4, xltr.LTR_r5);
-               db_printf("              R6/sv/rsv   %016llX %016llX %08X\n", xltr.LTR_r6, xltr.LTR_save, xltr.LTR_rsvd0);
+                       (xltr.LTR_excpt&0x8000 ? 0xFFFF : xltr.LTR_excpt*64));  /* Print the first line */
+               db_printf("              %08X %08X %08X %08X %08X %08X %08X\n",
+                       xltr.LTR_cr, xltr.LTR_srr0, xltr.LTR_srr1, xltr.LTR_dar, xltr.LTR_save, xltr.LTR_lr, xltr.LTR_ctr);
+               db_printf("              %08X %08X %08X %08X %08X %08X\n",
+                       xltr.LTR_r0, xltr.LTR_r1, xltr.LTR_r2, xltr.LTR_r3, xltr.LTR_r4, xltr.LTR_r5);
        
                if((cnt != 16) && (xxltr == xTraceCurr)) break;                 /* If whole table dump, exit when we hit start again... */
 
@@ -162,69 +155,14 @@ void db_display_long(db_expr_t addr, int have_addr, db_expr_t count, char * modi
        int                             i;
 
        for(i=0; i<8; i++) {                                                                    /* Print 256 bytes */
-               db_printf("%016llX   %08X %08X %08X %08X  %08X %08X %08X %08X\n", addr, /* Print a line */
+               db_printf("%08X   %08X %08X %08X %08X  %08X %08X %08X %08X\n", addr,    /* Print a line */
                        ((unsigned long *)addr)[0], ((unsigned long *)addr)[1], ((unsigned long *)addr)[2], ((unsigned long *)addr)[3], 
                        ((unsigned long *)addr)[4], ((unsigned long *)addr)[5], ((unsigned long *)addr)[6], ((unsigned long *)addr)[7]);
-               addr=(db_expr_t)(addr+0x00000020);                                      /* Point to next address */
+               addr=(db_expr_t)((unsigned int)addr+0x00000020);        /* Point to next address */
        }
        db_next = addr;
 
 
-}
-
-unsigned char xtran[256] = {
-/*  x0   x1   x2   x3   x4   x5   x6   x7   x8   x9   xA   xB   xC   xD   xE   xF         */
-       '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.',  /* 0x */
-       '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.',  /* 1x */
-       ' ', '!', '"', '#', '$', '%', '&',0x27, '(', ')', '*', '+', ',', '-', '.', '/',  /* 2x */
-       '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?',  /* 3x */
-       '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',  /* 4x */
-       'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[',0x5C, ']', '^', '_',  /* 5x */
-       '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',  /* 6x */
-       'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', '.',  /* 7x */
-       '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.',  /* 8x */
-       '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.',  /* 9x */
-       '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.',  /* Ax */
-       '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.',  /* Bx */
-       '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.',  /* Cx */
-       '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.',  /* Dx */
-       '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.',  /* Ex */
-       '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.', '.',  /* Fx */
-};
-
-/*
- *             Print out 256 bytes in characters
- *
- *             
- *             dc [entaddr]
- */
-void db_display_char(db_expr_t addr, int have_addr, db_expr_t count, char * modif) {
-
-       int                             i, j, k;
-       unsigned char xlt[256], *xaddr;
-       
-       xaddr = (unsigned char *)addr;
-       
-
-       for(i = 0; i < 8; i++) {                                                                /* Print 256 bytes */
-               j = 0;
-               for(k = 0; k < 32; k++) {
-                       xlt[j] = xtran[*xaddr];
-                       xaddr++;
-                       j++;
-                       if((k & 3) == 3) {
-                               xlt[j] = ' ';
-                               j++;
-                       }
-               }
-               xlt[j] = 0;
-               
-               db_printf("%016llX   %s\n", (addr64_t)(xaddr - 32), xlt);       /* Print a line */
-       }
-
-       db_next = (db_expr_t)xaddr;
-
-
 }
 
 /*
@@ -240,13 +178,15 @@ void db_display_real(db_expr_t addr, int have_addr, db_expr_t count, char * modi
        unsigned int xbuf[8];
 
        for(i=0; i<8; i++) {                                                                    /* Print 256 bytes */
-               ReadReal(addr, &xbuf[0]);                                                       /* Get the real storage data */
-               db_printf("%016llX   %08X %08X %08X %08X  %08X %08X %08X %08X\n", addr, /* Print a line */
+               ReadReal((unsigned int)addr, &xbuf[0]);                         /* Get the real storage data */
+               db_printf("%08X   %08X %08X %08X %08X  %08X %08X %08X %08X\n", addr,    /* Print a line */
                        xbuf[0], xbuf[1], xbuf[2], xbuf[3], 
                        xbuf[4], xbuf[5], xbuf[6], xbuf[7]);
-               addr = addr + 0x00000020;                                                       /* Point to next address */
+               addr=(db_expr_t)((unsigned int)addr+0x00000020);        /* Point to next address */
        }
        db_next = addr;
+
+
 }
 
 unsigned int   dvspace = 0;
@@ -259,92 +199,30 @@ unsigned int      dvspace = 0;
  */
 void db_display_mappings(db_expr_t addr, int have_addr, db_expr_t count, char * modif) {
 
-       db_expr_t       xspace;
-       pmap_t                  pmap;
-       addr64_t                lnextva;
+       int                             i;
+       unsigned int    xspace;
 
-       mapping         *mp;
-       
-       if (db_expression(&xspace)) {                                                   /* Get the address space requested */
-               if(xspace >= maxAdrSp) {
-                       db_printf("requested address space (%llX) larger than max (%X)\n", xspace, maxAdrSp - 1);
-                       return;
-               }
-               dvspace = xspace;                                                                       /* Get the space or set default */
-       }
+       mapping         *mp, *mpv;
+       vm_offset_t     pa;
        
-       db_printf("mapping information for %016llX in space %8X:\n", addr, dvspace);
-
-       pmap = pmapTrans[dvspace].pmapVAddr;                                    /* Find the pmap address */
-       if(!pmap) {                                                                                             /* The pmap is not in use */
-               db_printf("The space %X is not assigned to a pmap\n", dvspace); /* Say we are wrong */
-               return;
-       }
-
-       mp = hw_find_map(pmap, (addr64_t)addr, &lnextva);               /* Try to find the mapping for this address */
-       if((unsigned int)mp == mapRtBadLk) {                                    /* Did we lock up ok? */
-               db_printf("Timeout locking physical entry for virtual address %016ll8X\n", addr);       
-               return;
-       }
+       if (db_expression(&xspace)) dvspace = xspace;                   /* Get the space or set default */
        
+       db_printf("mapping information for %08X in space %08X:\n", addr, dvspace);
+       mp = hw_lock_phys_vir(dvspace, addr);                                   /* Lock the physical entry for this mapping */
        if(!mp) {                                                                                               /* Did we find one? */
                db_printf("Not mapped\n");      
                return;                                                                                         /* Didn't find any, return FALSE... */
        }
-       
-       mapping_drop_busy(mp);                                                                  /* The mapping shouldn't be changing */
-
-       db_dumpmapping(mp);                                                                             /* Dump it all out */
-
-       return;                                                                                                 /* Tell them we did it */
-
-
-}
-
-/*
- *             Print out hash table data
- *
- *             
- *             dh vaddr [space] (defaults to last entered) 
- */
-void db_display_hash(db_expr_t addr, int have_addr, db_expr_t count, char * modif) {
-
-       db_expr_t               xspace;
-       unsigned int    seg, vsid, ptegindex, htsize;
-       pmap_t                  pmap;
-       addr64_t                lnextva, llva, vpn, esid;
-       uint64_t                hash;
-       int                     s4bit;
-
-       llva = (addr64_t)((unsigned int)addr);                                  /* Make sure we are 64-bit now */
-       
-       s4bit = !((per_proc_info[0].pf.Available & pf64Bit) == 0);      /* Are we a big guy? */
-       if (db_expression(&xspace)) {                                                   /* Get the address space requested */
-               if(xspace >= maxAdrSp) {
-                       db_printf("requested address space (%llX) larger than max (%X)\n", xspace, maxAdrSp - 1);
-                       return;
-               }
-               dvspace = xspace;                                                                       /* Get the space or set default */
+       if((unsigned int)mp&1) {                                                                /* Did we timeout? */
+               db_printf("Timeout locking physical entry for virtual address (%08X)\n", addr); /* Yeah, scream about it! */
+               return;                                                                                         /* Bad hair day, return FALSE... */
        }
-       
-       pmap = pmapTrans[dvspace].pmapVAddr;                                    /* Find the pmap address */
-       if(!pmap) {                                                                                             /* The pmap is not in use */
-               db_printf("The space %X is not assigned to a pmap\n", dvspace); /* Say we are wrong */
-               return;
+       printf("dumpaddr: space=%08X; vaddr=%08X\n", dvspace, addr);    /* Say what address were dumping */
+       mpv = hw_cpv(mp);                                                                               /* Get virtual address of mapping */
+       dumpmapping(mpv);
+       if(mpv->physent) {
+               hw_unlock_bit((unsigned int *)&mpv->physent->phys_link, PHYS_LOCK);     /* Unlock physical entry associated with mapping */
        }
-
-       hash = (uint64_t)pmap->space | ((uint64_t)pmap->space << maxAdrSpb) | ((uint64_t)pmap->space << (2 * maxAdrSpb));       /* Get hash value */
-       hash = hash & 0x0000001FFFFFFFFF;                                               /* Make sure we stay within supported ranges */
-       
-       esid = ((llva >> 14) & -maxAdrSp) ^ hash;                               /* Get ESID */
-       llva = ((llva >> 12) & 0xFFFF) ^ esid;                                  /* Get index into hash table */
-
-       if(s4bit) htsize = hash_table_size >> 7;                                /* Get number of entries in hash table for 64-bit */
-       else htsize = hash_table_size >> 6;                                             /* get number of entries in hash table for 32-bit */
-       
-       ptegindex = llva & (htsize - 1);                                                /* Get the index to the pteg and pca */
-       db_dumppca(ptegindex);                                                                  /* dump the info */
-       
        return;                                                                                                 /* Tell them we did it */
 
 
@@ -358,98 +236,57 @@ void db_display_hash(db_expr_t addr, int have_addr, db_expr_t count, char * modi
 void db_display_pmap(db_expr_t addr, int have_addr, db_expr_t count, char * modif) {
 
        pmap_t                  pmap;
-       int i;
-       unsigned int v0, v1, st0, st1;
        
-       pmap = (pmap_t)addr;
-       if(!have_addr) pmap = kernel_pmap;                                              /* Start at the beginning */
+       pmap = kernel_pmap;                                                                             /* Start at the beginning */
        
-       db_printf("PMAP     (real)            Next     Prev     Space    Flags    Ref      spaceNum Resident Wired\n"); 
-//                xxxxxxxx rrrrrrrrrrrrrrrr  xxxxxxxx pppppppp ssssssss cccccccc vvvvvvvv nnnnnnnn rrrrrrrr wwwwwwwww
+       db_printf("PMAP     (real)    Next     Prev     VRMask   Space    Bmaps    Flags    Ref      spaceNum Resident Wired\n"); 
+//                xxxxxxxx rrrrrrrr  xxxxxxxx pppppppp vvvvvvvv ssssssss bbbbbbbb cccccccc vvvvvvvv nnnnnnnn rrrrrrrr wwwwwwwww
        while(1) {                                                                                              /* Do them all */
-               db_printf("%08X %016llX  %08X %08X %08X %08X %08X %08X %08X %08X\n",
-                       pmap, (addr64_t)pmap ^ pmap->pmapvr,
-                       pmap->pmap_link.next,  pmap->pmap_link.prev,
-                       pmap->space, pmap->pmapFlags, pmap->ref_count, pmap->spaceNum,
+               db_printf("%08X %08X  %08X %08X %08X %08X %08X %08X %08X %08X %08X %08X\n",
+                       pmap, (unsigned int)pmap ^ pmap->pmapvr,
+                       pmap->pmap_link.next,  pmap->pmap_link.prev, pmap->pmapvr,
+                       pmap->space, pmap->bmaps, pmap->vflags, pmap->ref_count, pmap->spaceNum,
                        pmap->stats.resident_count,
                        pmap->stats.wired_count);
 
-               db_printf("lists = %d, rand = %08X, visits = %016llX, searches = %08X\n",
-                       pmap->pmapCurLists, pmap->pmapRandNum,
-                       pmap->pmapSearchVisits, pmap->pmapSearchCnt); 
-
-               db_printf("cctl = %08X, SCSubTag = %016llX\n",
-                       pmap->pmapCCtl, pmap->pmapSCSubTag); 
-               
-               for(i = 0; i < 16; i +=2) {
-                       v0 = (pmap->pmapCCtl >> (31 - i) & 1);                  /* Get high order bit */
-                       v1 = (pmap->pmapCCtl >> (30 - i) & 1);                  /* Get high order bit */
-                       st0 = (pmap->pmapSCSubTag >> (60 - (4 * i))) & 0xF;     /* Get the sub-tag */
-                       st1 = (pmap->pmapSCSubTag >> (56 - (4 * i))) & 0xF;     /* Get the sub-tag */
-                       
-                       db_printf("         %01X %01X %016llX/%016llX  %01X %01X %016llX/%016llX\n", 
-                               v0, st0, pmap->pmapSegCache[i].sgcESID, pmap->pmapSegCache[i].sgcVSID,
-                               v1, st1, pmap->pmapSegCache[i+1].sgcESID, pmap->pmapSegCache[i+1].sgcVSID);
-               }
-
-               db_printf("\n");
-               if(have_addr) break;                                                            /* Do only one if address supplied */
-               pmap = (pmap_t)pmap->pmap_link.next;                            /* Skip to the next */
-               if(pmap == kernel_pmap) break;                                          /* We've wrapped, we're done */
-       }
-       return;
-}
-
-
-/*
- *             Checks the pmap skip lists
- *
- *             
- *             cp pmap
- */
-void db_check_pmaps(db_expr_t addr, int have_addr, db_expr_t count, char * modif) {
 
-       int                             i;
-       unsigned int ret;
-       uint64_t dumpa[32];
-       pmap_t pmap;
-       
-       pmap = (pmap_t)addr;
-       if(!have_addr) pmap = kernel_pmap;                                              /* If no map supplied, start with kernel */
+//                    xxxxxxxx rrrrrrrr  xxxxxxxx pppppppp vvvvvvvv ssssssss bbbbbbbb cccccccc vvvvvvvv nnnnnnnn rrrrrrrr wwwwwwwww
+               db_printf("             SRs:  %08X %08X %08X %08X %08X %08X %08X %08X\n", pmap->pmapSegs[0], pmap->pmapSegs[1], pmap->pmapSegs[2], pmap->pmapSegs[3],
+                       pmap->pmapSegs[4], pmap->pmapSegs[5], pmap->pmapSegs[6], pmap->pmapSegs[7]);
+               db_printf("                   %08X %08X %08X %08X %08X %08X %08X %08X\n", pmap->pmapSegs[8], pmap->pmapSegs[9], pmap->pmapSegs[10], pmap->pmapSegs[11],
+                       pmap->pmapSegs[12], pmap->pmapSegs[13], pmap->pmapSegs[14], pmap->pmapSegs[15]);
        
-       while(1) {                                                                                              /* Do them all */
-               ret = mapSkipListVerifyC(pmap, &dumpa);                                                 /* Check out the map */
-               if(!ret) db_printf("Skiplists verified ok, pmap = %08X\n", pmap);
-               else { 
-                       db_printf("Verification failure at %08X, pmap = %08X\n", ret, pmap);
-                       for(i = 0; i < 32; i += 4) {
-                               db_printf("R%02d  %016llX  %016llX  %016llX  %016llX\n", i,
-                                       dumpa[i], dumpa[i + 1], dumpa[i + 2], dumpa[i + 3]);
-                       }
-               }
-               if(have_addr) break;                                                            /* Do only one if address supplied */
+               db_printf("          spmaps:  %08X %08X %08X %08X %08X %08X %08X %08X\n", pmap->pmapPmaps[0], pmap->pmapPmaps[1], pmap->pmapPmaps[2], pmap->pmapPmaps[3],
+                       pmap->pmapPmaps[4], pmap->pmapPmaps[5], pmap->pmapPmaps[6], pmap->pmapPmaps[7]);
+               db_printf("                   %08X %08X %08X %08X %08X %08X %08X %08X\n", pmap->pmapPmaps[8], pmap->pmapPmaps[9], pmap->pmapPmaps[10], pmap->pmapPmaps[11],
+                       pmap->pmapPmaps[12], pmap->pmapPmaps[13], pmap->pmapPmaps[14], pmap->pmapPmaps[15]);
+
                pmap = (pmap_t)pmap->pmap_link.next;                            /* Skip to the next */
+               db_printf("\n");
                if(pmap == kernel_pmap) break;                                          /* We've wrapped, we're done */
        }
-       
        return;
-
 }
 
-
-/*
- *             Displays iokit junk
- *
-  *            dp
+/* 
+ *     print information about the passed in pmap block 
  */
 
-void db_piokjunk(void);
-
-void db_display_iokit(db_expr_t addr, int have_addr, db_expr_t count, char * modif) {
-
-       db_piokjunk();
+void db_dumppmap(pmap_t pmap) {
+
+       db_printf("Dump of pmap block: %08X\n", pmap);
+       db_printf("         pmap_link: %08X %08X\n", pmap->pmap_link.next,  pmap->pmap_link.prev);
+       db_printf("            pmapvr: %08X\n", pmap->pmapvr);
+       db_printf("             space: %08X\n", pmap->space);
+       db_printf("             bmaps: %08X\n", pmap->bmaps);
+       db_printf("         ref_count: %08X\n", pmap->ref_count);
+       db_printf("          spaceNum: %08X\n", pmap->spaceNum);
+       db_printf("    resident_count: %08X\n", pmap->stats.resident_count);
+       db_printf("       wired_count: %08X\n", pmap->stats.wired_count);
+       db_printf("\n");
 
        return;
+
 }
 
 /*
@@ -459,92 +296,73 @@ void db_display_iokit(db_expr_t addr, int have_addr, db_expr_t count, char * mod
  
 void db_dumpmapping(struct mapping *mp) {                                      /* Dump out a mapping */
 
-       pmap_t pmap;
-       int i;
-
-       db_printf("Dump of mapping block: %08X,  pmap: %08X (%016llX)\n", mp, pmapTrans[mp->mpSpace].pmapVAddr, 
-               pmapTrans[mp->mpSpace].pmapPAddr);                      /* Header */
-       db_printf("              mpFlags: %08X\n", mp->mpFlags);                 
-       db_printf("              mpSpace: %04X\n", mp->mpSpace);                 
-       db_printf("              mpBSize: %04X\n", mp->mpBSize);                 
-       db_printf("                mpPte: %08X\n", mp->mpPte);                 
-       db_printf("              mpPAddr: %08X\n", mp->mpPAddr);                 
-       db_printf("              mpVAddr: %016llX\n", mp->mpVAddr);                 
-       db_printf("              mpAlias: %016llX\n", mp->mpAlias);                 
-       db_printf("             mpList00: %016llX\n", mp->mpList0);                 
+       db_printf("Dump of mapping block: %08X\n", mp);                 /* Header */
+       db_printf("                 next: %08X\n", mp->next);                 
+       db_printf("             hashnext: %08X\n", mp->hashnext);                 
+       db_printf("              PTEhash: %08X\n", mp->PTEhash);                 
+       db_printf("               PTEent: %08X\n", mp->PTEent);                 
+       db_printf("              physent: %08X\n", mp->physent);                 
+       db_printf("                 PTEv: %08X\n", mp->PTEv);                 
+       db_printf("                 PTEr: %08X\n", mp->PTEr);                 
+       db_printf("                 pmap: %08X\n", mp->pmap);
        
-       for(i = 1; i < (mp->mpFlags & mpLists); i++) {                  /* Dump out secondary physical skip lists */
-               db_printf("             mpList%02d: %016llX\n", i, mp->mpList[i - 1]);     
+       if(mp->physent) {                                                                       /* Print physent if it exists */
+               db_printf("Associated physical entry: %08X %08X\n", mp->physent->phys_link, mp->physent->pte1);
+       }
+       else {
+               db_printf("Associated physical entry: none\n");
        }
-                   
+       
+       db_dumppca(mp);                                                                         /* Dump out the PCA information */
+       
        return;
 }
 
 /*
- *             Prints out a PTEG and PCA
+ *             Prints out a PTEG control area
  *
  */
  
-void db_dumppca(unsigned int ptegindex) {      
-
-       addr64_t pteg, pca, llva;       
-       unsigned int xpteg[32], xpca[8], space, hash, pva, seg, api, va;
-       int i, s4bit;
-       unsigned long long llslot, llseg, llhash;
-
-       s4bit = !((per_proc_info[0].pf.Available & pf64Bit) == 0);      /* Are we a big guy? */
-
-       pteg = hash_table_base + (ptegindex << 6);                              /* Point to the PTEG */
-       if(s4bit) pteg = hash_table_base + (ptegindex << 7);    /* Point to the PTEG */
-       pca  = hash_table_base - ((ptegindex + 1) * 4);                 /* Point to the PCA */
-       db_printf("PTEG = %016llX, PCA = %016llX (index = %08X)\n", pteg, pca, ptegindex);
-       
-       ReadReal(pteg, &xpteg[0]);                                                              /* Get first half of the pteg */
-       ReadReal(pteg + 0x20, &xpteg[8]);                                               /* Get second half of the pteg */
-       ReadReal(pca, &xpca[0]);                                                                /* Get pca */
+void db_dumppca(struct mapping *mp) {                                          /* PCA */
+
+       PCA                             *pca;
+       unsigned int    *pteg, sdr;
+       
+       pca = (PCA *)((unsigned int)mp->PTEhash&-64);           /* Back up to the start of the PCA */
+       __asm__ volatile("mfsdr1 %0" : "=r" (sdr));
+       db_printf("        SDR1: %08X\n", sdr);
+       pteg=(unsigned int *)((unsigned int)pca-(((sdr&0x0000FFFF)+1)<<16));
+       db_printf(" Dump of PCA: %08X\n", pca);         /* Header */
+       db_printf("     PCAlock: %08X\n", pca->PCAlock);                 
+       db_printf("     PCAallo: %08X\n", pca->flgs.PCAallo);                 
+       db_printf("     PCAhash: %08X %08X %08X %08X\n", pca->PCAhash[0], pca->PCAhash[1], pca->PCAhash[2], pca->PCAhash[3]);                 
+       db_printf("              %08X %08X %08X %08X\n", pca->PCAhash[4], pca->PCAhash[5], pca->PCAhash[6], pca->PCAhash[7]);                 
+       db_printf("Dump of PTEG: %08X\n", pteg);                /* Header */
+       db_printf("              %08X %08X %08X %08X\n", pteg[0], pteg[1], pteg[2], pteg[3]);                 
+       db_printf("              %08X %08X %08X %08X\n", pteg[4], pteg[5], pteg[6], pteg[7]);                 
+       db_printf("              %08X %08X %08X %08X\n", pteg[8], pteg[9], pteg[10], pteg[11]);                 
+       db_printf("              %08X %08X %08X %08X\n", pteg[12], pteg[13], pteg[14], pteg[15]);                 
+       return;
+}
 
-       db_printf("PCA: free = %02X, steal = %02X, auto = %02X, misc = %02X\n", 
-               ((xpca[0] >> 24) & 255), ((xpca[0] >> 16) & 255), ((xpca[0] >> 8) & 255), xpca[0] & 255);
-               
-       if(!s4bit) {                                                                                    /* Little guy? */
+/*
+ *             Dumps starting with a physical entry
+ */
+void db_dumpphys(struct phys_entry *pp) {                                              /* Dump from physent */
 
-               for(i = 0; i < 16; i += 2) {                                            /* Step through pteg */
-                       db_printf("%08X %08X - ", xpteg[i], xpteg[i + 1]);      /* Dump the pteg slot */
-                       
-                       if(xpteg[i] & 0x80000000) db_printf("  valid - ");      /* Is it valid? */
-                       else db_printf("invalid - ");                                   /* Nope, invalid */
-               
-                       space = (xpteg[i] >> 7) & (maxAdrSp - 1);               /* Extract the space */
-                       hash = space | (space << maxAdrSpb) | (space << (2 * maxAdrSpb));       /* Get the hash */
-                       pva =  ptegindex ^ hash;                                                /* Get part of the vaddr */
-                       seg = (xpteg[i] >> 7) ^ hash;                                   /* Get the segment number */
-                       api = (xpteg[i] & 0x3F);                                                /* Get the API */
-                       va = ((seg << (28 - maxAdrSpb)) & 0xF0000000) | (api << 22) | ((pva << 12) & 0x003FF000);       /* Get the vaddr */
-                       db_printf("va = %08X\n", va);
-               }
-       }
-       else {
-               ReadReal(pteg + 0x40, &xpteg[16]);                                      /* Get third half of the pteg */
-               ReadReal(pteg + 0x60, &xpteg[24]);                                      /* Get fourth half of the pteg */
+       mapping                 *mp;
+       PCA                             *pca;
+       unsigned int    *pteg;
 
-               for(i = 0; i < 32; i += 4) {                                            /* Step through pteg */
-                       db_printf("%08X%08X %08X%08X - ", xpteg[i], xpteg[i + 1], xpteg[i + 2], xpteg[i + 3]);  /* Dump the pteg slot */
-                       
-                       if(xpteg[i + 1] & 1) db_printf("  valid - ");   /* Is it valid? */
-                       else db_printf("invalid - ");                                   /* Nope, invalid */
-
-                       llslot = ((long long)xpteg[i] << 32) | (long long)xpteg[i + 1]; /* Make a long long version of this */ 
-                       space = (llslot >> 12) & (maxAdrSp - 1);                /* Extract the space */
-                       llhash = (unsigned long long)space | ((unsigned long long)space << maxAdrSpb) | ((unsigned long long)space << (2 * maxAdrSpb)); /* Get the hash */
-                       llhash = llhash & 0x0000001FFFFFFFFF;                   /* Make sure we stay within supported ranges */
-                       pva =  (unsigned long long)ptegindex ^ llhash;  /* Get part of the vaddr */
-                       llseg = (llslot >> 12) ^ llhash;                                /* Get the segment number */
-                       api = (llslot >> 7) & 0x1F;                                             /* Get the API */
-                       llva = ((llseg << (28 - maxAdrSpb)) & 0xFFFFFFFFF0000000ULL) | (api << 23) | ((pva << 12) & 0x007FF000);        /* Get the vaddr */
-                       db_printf("va = %016llX\n", llva);
-               }
+       db_printf("Dump from physical entry %08X: %08X %08X\n", pp, pp->phys_link, pp->pte1);
+       mp = hw_cpv(pp->phys_link);
+       while(mp) {
+               db_dumpmapping(mp);
+               db_dumppca(mp);
+               mp = hw_cpv(mp->next);
        }
-
+       
        return;
 }
 
@@ -558,30 +376,16 @@ void db_dumppca(unsigned int ptegindex) {
  */
 void db_display_virtual(db_expr_t addr, int have_addr, db_expr_t count, char * modif) {
 
-       int                     i, size, lines, rlines;
+       int                             i, size, lines, rlines;
        unsigned int    xbuf[8];
-       db_expr_t       xspace;
-       pmap_t          pmap;
+       unsigned int    xspace;
 
        mapping         *mp, *mpv;
-       addr64_t        pa;
-       ppnum_t         pnum;
-
-       if (db_expression(&xspace)) {                                                   /* Parse the space ID */
-               if(xspace >= (1 << maxAdrSpb)) {                                        /* Check if they gave us a sane space number */
-                       db_printf("Invalid space ID: %llX - max is %X\n", xspace, (1 << maxAdrSpb) - 1);
-                       return;
-               }
-               dvspace = xspace;                                                                       /* Get the space or set default */
-       }
+       vm_offset_t     pa;
        
-       pmap = (pmap_t)pmapTrans[dvspace].pmapVAddr;                    /* Find the pmap address */
-       if((unsigned int)pmap == 0) {                                                   /* Is there actually a pmap here? */
-               db_printf("Address space not found: %X\n", dvspace);    /* Complain */
-               return;
-       }
+       if (db_expression(&xspace)) dvspace = xspace;                   /* Get the space or set default */
        
-       addr &= -32;
+       addr&=-32;
        
        size = 4096 - (addr & 0x00000FFF);                                              /* Bytes left on page */
        lines = size / 32;                                                                              /* Number of lines in first or only part */
@@ -589,47 +393,63 @@ void db_display_virtual(db_expr_t addr, int have_addr, db_expr_t count, char * m
        rlines = 8 - lines;
        if(rlines < 0) lines = 0;
        
-       db_printf("Dumping %016llX (pmap = %08X, space = %X); ", addr, pmap, dvspace);
-
-       pnum = pmap_find_phys(pmap, (addr64_t)addr);                    /* Phynd the Physical */
-       if(!pnum) {                                                                                             /* Did we find one? */
+       db_printf("Dumping %08X (space=%08X); ", addr, dvspace);
+       mp = hw_lock_phys_vir(dvspace, addr);                                   /* Lock the physical entry for this mapping */
+       if(!mp) {                                                                                               /* Did we find one? */
                db_printf("Not mapped\n");      
                return;                                                                                         /* Didn't find any, return FALSE... */
        }
-
-       pa = (addr64_t)(pnum << 12) | (addr64_t)(addr & 0xFFF); /* Get the physical address */
-       db_printf("phys = %016llX\n", pa);
-
+       if((unsigned int)mp&1) {                                                                /* Did we timeout? */
+               db_printf("Timeout locking physical entry for virtual address (%08X)\n", addr); /* Yeah, scream about it! */
+               return;                                                                                         /* Bad hair day, return FALSE... */
+       }
+       mpv = hw_cpv(mp);                                                                               /* Get virtual address of mapping */
+       if(!mpv->physent) {                                                                             /* Was there a physical entry? */
+               pa = (vm_offset_t)((mpv->PTEr & -PAGE_SIZE) | ((unsigned int)addr & (PAGE_SIZE-1)));    /* Get physical address from physent */
+       }
+       else {
+               pa = (vm_offset_t)((mpv->physent->pte1 & -PAGE_SIZE) | ((unsigned int)addr & (PAGE_SIZE-1)));   /* Get physical address from physent */
+               hw_unlock_bit((unsigned int *)&mpv->physent->phys_link, PHYS_LOCK);             /* Unlock the physical entry */
+       }
+       db_printf("phys=%08X\n", pa);
        for(i=0; i<lines; i++) {                                                                /* Print n bytes */
-               ReadReal(pa, &xbuf[0]);                                                         /* Get the real storage data */
-               db_printf("%016llX   %08X %08X %08X %08X  %08X %08X %08X %08X\n", addr, /* Print a line */
+               ReadReal((unsigned int)pa, &xbuf[0]);                           /* Get the real storage data */
+               db_printf("%08X   %08X %08X %08X %08X  %08X %08X %08X %08X\n", addr,    /* Print a line */
                        xbuf[0], xbuf[1], xbuf[2], xbuf[3], 
                        xbuf[4], xbuf[5], xbuf[6], xbuf[7]);
-               addr = (db_expr_t)((unsigned int)addr + 0x00000020);    /* Point to next address */
-               pa = pa + 0x00000020;                                                           /* Point to next address */
+               addr=(db_expr_t)((unsigned int)addr+0x00000020);        /* Point to next address */
+               pa=(unsigned int)pa+0x00000020;                                         /* Point to next address */
        }
        db_next = addr;
        
        if(!rlines) return;
        
-       db_printf("Dumping %016llX (pmap = %08X, space = %X); ", addr, pmap, dvspace);
-
-       pnum = pmap_find_phys(pmap, (addr64_t)((unsigned int)addr));    /* Phynd the Physical */
-       if(!pnum) {                                                                                             /* Did we find one? */
+       db_printf("Dumping %08X (space=%08X); ", addr, dvspace);
+       mp = hw_lock_phys_vir(dvspace, addr);                                   /* Lock the physical entry for this mapping */
+       if(!mp) {                                                                                               /* Did we find one? */
                db_printf("Not mapped\n");      
                return;                                                                                         /* Didn't find any, return FALSE... */
        }
-
-       pa = (addr64_t)(pnum << 12) | (addr64_t)((unsigned int)addr & 0xFFF);   /* Get the physical address */
-       db_printf("phys = %016llX\n", pa);
-
+       if((unsigned int)mp&1) {                                                                /* Did we timeout? */
+               db_printf("Timeout locking physical entry for virtual address (%08X)\n", addr); /* Yeah, scream about it! */
+               return;                                                                                         /* Bad hair day, return FALSE... */
+       }
+       mpv = hw_cpv(mp);                                                                               /* Get virtual address of mapping */
+       if(!mpv->physent) {                                                                             /* Was there a physical entry? */
+               pa = (vm_offset_t)((mpv->PTEr & -PAGE_SIZE) | ((unsigned int)addr & (PAGE_SIZE-1)));    /* Get physical address from physent */
+       }
+       else {
+               pa = (vm_offset_t)((mpv->physent->pte1 & -PAGE_SIZE) | ((unsigned int)addr & (PAGE_SIZE-1)));   /* Get physical address from physent */
+               hw_unlock_bit((unsigned int *)&mp->physent->phys_link, PHYS_LOCK);      /* Unlock the physical entry */
+       }
+       db_printf("phys=%08X\n", pa);
        for(i=0; i<rlines; i++) {                                                               /* Print n bytes */
-               ReadReal(pa, &xbuf[0]);                                                         /* Get the real storage data */
-               db_printf("%016llX   %08X %08X %08X %08X  %08X %08X %08X %08X\n", addr, /* Print a line */
+               ReadReal((unsigned int)pa, &xbuf[0]);                           /* Get the real storage data */
+               db_printf("%08X   %08X %08X %08X %08X  %08X %08X %08X %08X\n", addr,    /* Print a line */
                        xbuf[0], xbuf[1], xbuf[2], xbuf[3], 
                        xbuf[4], xbuf[5], xbuf[6], xbuf[7]);
-               addr = (db_expr_t)(addr + 0x00000020);                          /* Point to next address */
-               pa = pa + 0x00000020;                                                           /* Point to next address */
+               addr=(db_expr_t)((unsigned int)addr+0x00000020);        /* Point to next address */
+               pa=(unsigned int)pa+0x00000020;                                         /* Point to next address */
        }
        db_next = addr;
 
@@ -674,8 +494,8 @@ void db_display_save(db_expr_t addr, int have_addr, db_expr_t count, char * modi
                        
                        while(save) {                                                   /* Do them all */
                                totsaves++;                                                     /* Count savearea */
-                               db_printf("         Norm %08X: %016llX %016llX - tot = %d\n", save, save->save_srr0, save->save_srr1, totsaves);
-                               save = (savearea *)save->save_hdr.save_prev;    /* Next one */
+                               db_printf("         Norm %08X: %08X %08X - tot = %d\n", save, save->save_srr0, save->save_srr1, totsaves);
+                               save = save->save_hdr.save_prev;        /* Next one */
                                if(chainsize++ > chainmax) {            /* See if we might be in a loop */
                                        db_printf("         Chain terminated by count (%d) before %08X\n", chainmax, save);
                                        break;
@@ -687,7 +507,7 @@ void db_display_save(db_expr_t addr, int have_addr, db_expr_t count, char * modi
                        while(save) {                                                   /* Do them all */
                                totsaves++;                                                     /* Count savearea */
                                db_printf("         FPU  %08X: %08X - tot = %d\n", save, save->save_hdr.save_level, totsaves);
-                               save = (savearea *)save->save_hdr.save_prev;    /* Next one */
+                               save = save->save_hdr.save_prev;        /* Next one */
                                if(chainsize++ > chainmax) {            /* See if we might be in a loop */
                                        db_printf("         Chain terminated by count (%d) before %08X\n", chainmax, save);
                                        break;
@@ -699,7 +519,7 @@ void db_display_save(db_expr_t addr, int have_addr, db_expr_t count, char * modi
                        while(save) {                                                   /* Do them all */
                                totsaves++;                                                     /* Count savearea */
                                db_printf("         Vec  %08X: %08X - tot = %d\n", save, save->save_hdr.save_level, totsaves);
-                               save = (savearea *)save->save_hdr.save_prev;    /* Next one */
+                               save = save->save_hdr.save_prev;        /* Next one */
                                if(chainsize++ > chainmax) {            /* See if we might be in a loop */
                                        db_printf("         Chain terminated by count (%d) before %08X\n", chainmax, save);
                                        break;
@@ -708,7 +528,7 @@ void db_display_save(db_expr_t addr, int have_addr, db_expr_t count, char * modi
                        
                        if(CTable = act->mact.vmmControl) {             /* Are there virtual machines? */
                                
-                               for(vmid = 0; vmid < kVmmMaxContexts; vmid++) {
+                               for(vmid = 0; vmid < kVmmMaxContextsPerThread; vmid++) {
                                        
                                        if(!(CTable->vmmc[vmid].vmmFlags & vmmInUse)) continue; /* Skip if vm is not in use */
                                        
@@ -724,7 +544,7 @@ void db_display_save(db_expr_t addr, int have_addr, db_expr_t count, char * modi
                                        while(save) {                                           /* Do them all */
                                                totsaves++;                                             /* Count savearea */
                                                db_printf("         FPU  %08X: %08X - tot = %d\n", save, save->save_hdr.save_level, totsaves);
-                                               save = (savearea *)save->save_hdr.save_prev;    /* Next one */
+                                               save = save->save_hdr.save_prev;        /* Next one */
                                                if(chainsize++ > chainmax) {    /* See if we might be in a loop */
                                                        db_printf("         Chain terminated by count (%d) before %08X\n", chainmax, save);
                                                        break;
@@ -736,7 +556,7 @@ void db_display_save(db_expr_t addr, int have_addr, db_expr_t count, char * modi
                                        while(save) {                                           /* Do them all */
                                                totsaves++;                                             /* Count savearea */
                                                db_printf("         Vec  %08X: %08X - tot = %d\n", save, save->save_hdr.save_level, totsaves);
-                                               save = (savearea *)save->save_hdr.save_prev;    /* Next one */
+                                               save = save->save_hdr.save_prev;        /* Next one */
                                                if(chainsize++ > chainmax) {    /* See if we might be in a loop */
                                                        db_printf("         Chain terminated by count (%d) before %08X\n", chainmax, save);
                                                        break;
@@ -781,8 +601,6 @@ void db_display_xregs(db_expr_t addr, int have_addr, db_expr_t count, char * mod
        db_printf("THRM2:  %08X\n", dbspecrs[45]);
        db_printf("THRM3:  %08X\n", dbspecrs[46]);
        db_printf("ICTC:   %08X\n", dbspecrs[47]);
-       db_printf("L2CR2:  %08X\n", dbspecrs[48]);
-       db_printf("DABR:   %08X\n", dbspecrs[49]);
        db_printf("\n");
 
        db_printf("DBAT: %08X %08X %08X %08X\n", dbspecrs[2], dbspecrs[3], dbspecrs[4], dbspecrs[5]);
@@ -823,192 +641,6 @@ void db_display_xregs(db_expr_t addr, int have_addr, db_expr_t count, char * mod
 
 }
 
-/*
- *             Check check mappings and hash table for consistency
- *
-  *            cm
- */
-void db_check_mappings(db_expr_t addr, int have_addr, db_expr_t count, char * modif) {
-
-       addr64_t  pteg, pca, llva, lnextva;     
-       unsigned int xpteg[32], xpca[8], space, hash, pva, seg, api, va, free, free2, xauto, PTEGcnt, wimgkk, wimgxx, slotoff;
-       int i, j, fnderr, slot, slot2, k, s4bit;
-       pmap_t pmap;
-       mapping  *mp;
-       ppnum_t ppn, pa, aoff;
-       unsigned long long llslot, llseg, llhash;
-       
-       s4bit = 0;                                                                                              /* Assume dinky? */
-       if(per_proc_info[0].pf.Available & pf64Bit) s4bit = 1;  /* Are we a big guy? */
-       
-       PTEGcnt = hash_table_size / 64;                                                 /* Get the number of PTEGS */
-       if(s4bit) PTEGcnt = PTEGcnt / 2;                                                /* PTEGs are twice as big */    
-
-       pteg = hash_table_base;                                                                 /* Start of hash table */
-       pca = hash_table_base - 4;                                                              /* Start of PCA */
-       
-       for(i = 0; i < PTEGcnt; i++) {                                                  /* Step through them all */
-
-               fnderr = 0;
-       
-               ReadReal(pteg, &xpteg[0]);                                                      /* Get first half of the pteg */
-               ReadReal(pteg + 0x20, &xpteg[8]);                                       /* Get second half of the pteg */
-               if(s4bit) {                                                                                     /* See if we need the other half */
-                       ReadReal(pteg + 0x40, &xpteg[16]);                              /* Get third half of the pteg */
-                       ReadReal(pteg + 0x60, &xpteg[24]);                              /* Get fourth half of the pteg */
-               }
-               ReadReal(pca, &xpca[0]);                                                        /* Get pca */
-       
-               if(xpca[0] & 0x00000001) {                                                      /* Is PCA locked? */
-                       db_printf("Unexpected locked PCA\n");                   /* Yeah, this may be bad */
-                       fnderr = 1;                                                                             /* Remember to print the pca/pteg pair later */
-               }
-
-               free = 0x80000000;
-               
-               for(j = 0; j < 7; j++) {                                                        /* Search for duplicates */
-                       slot = j * 2;                                                                   /* Point to the slot */
-                       if(s4bit) slot = slot * 2;                                              /* Adjust for bigger slots */
-                       if(!(xpca[0] & free)) {                                                 /* Check more if slot is allocated */
-                               for(k = j + 1; k < 8; k++) {                            /* Search remaining slots */
-                                       slot2 = k * 2;                                                  /* Point to the slot */
-                                       if(s4bit) slot2 = slot2 * 2;                    /* Adjust for bigger slots */
-                                       if((xpteg[slot] == xpteg[slot2]) 
-                                          && (!s4bit || (xpteg[slot + 1] == xpteg[slot2 + 1]))) {              /* Do we have duplicates? */
-                                               db_printf("Duplicate tags in pteg, slot %d and slot %d\n", j, k);
-                                               fnderr = 1;
-                                       }
-                               }
-                       }
-                       free = free >> 1;                                                               /* Move slot over */
-               }
-               
-               free = 0x80000000;
-               xauto = 0x00008000;
-
-               for(j = 0; j < 8; j++) {                                                        /* Step through the slots */
-               
-                       slot = j * 2;                                                                   /* Point to the slot */
-                       if(s4bit) slot = slot * 2;                                              /* Hagfish? */
-                       if(xpca[0] & free) {                                                    /* Check if marked free */
-                               if((!s4bit && (xpteg[slot] & 0x80000000))       /* Is a supposedly free slot valid? */
-                                  || (s4bit && (xpteg[slot + 1] & 1))) {       
-                                       db_printf("Free slot still valid - %d\n", j);   
-                                       fnderr = 1;
-                               }       
-                       }
-                       else {                                                                                  /* We have an in use slot here */
-                                                               
-                               if(!(!s4bit && (xpteg[slot] & 0x80000000))      /* Is a supposedly in use slot valid? */
-                                  && !(s4bit && (xpteg[slot + 1] & 1))) {      
-                                       db_printf("Inuse slot not valid - %d\n", j);    
-                                       fnderr = 1;
-                               }       
-                               else {                                                                          /* Slot is valid, check mapping */
-                                       if(!s4bit) {                                                    /* Not Hagfish? */
-                                               space = (xpteg[slot] >> 7) & (maxAdrSp - 1);    /* Extract the space */
-                                               hash = space | (space << maxAdrSpb) | (space << (2 * maxAdrSpb));       /* Get the hash */
-                                               pva =  i ^ hash;                                        /* Get part of the vaddr */
-                                               seg = (xpteg[slot] >> 7) ^ hash;        /* Get the segment number */
-                                               api = (xpteg[slot] & 0x3F);                     /* Get the API */
-                                               va = ((seg << (28 - maxAdrSpb)) & 0xF0000000) | (api << 22) | ((pva << 12) & 0x003FF000);       /* Get the vaddr */
-                                               llva = (addr64_t)va;                            /* Make this a long long */
-                                               wimgxx = xpteg[slot + 1] & 0x7F;        /* Get the wimg and pp */
-                                               ppn = xpteg[slot + 1] >> 12;            /* Get physical page number */
-                                               slotoff = (i * 64) + (j * 8) | 1;       /* Get offset to slot and valid bit */
-                                       }
-                                       else {                                                                  /* Yes, Hagfish */
-                                               llslot = ((long long)xpteg[slot] << 32) | (long long)xpteg[slot + 1];   /* Make a long long version of this */ 
-                                               space = (llslot >> 12) & (maxAdrSp - 1);        /* Extract the space */
-                                               llhash = (unsigned long long)space | ((unsigned long long)space << maxAdrSpb) | ((unsigned long long)space << (2 * maxAdrSpb)); /* Get the hash */
-                                               llhash = llhash & 0x0000001FFFFFFFFF;   /* Make sure we stay within supported ranges */
-                                               pva =  i ^ llhash;                                      /* Get part of the vaddr */
-                                               llseg = ((llslot >> 12) ^ llhash);      /* Get the segment number */
-                                               api = (llslot >> 7) & 0x1F;                     /* Get the API */
-                                               llva = ((llseg << (28 - maxAdrSpb)) & 0xFFFFFFFFF0000000ULL) | (api << 23) | ((pva << 12) & 0x007FF000);        /* Get the vaddr */
-                                               wimgxx = xpteg[slot + 3] & 0x7F;        /* Get the wimg and pp */
-                                               ppn =  (xpteg[slot + 2] << 20) | (xpteg[slot + 3] >> 12);       /* Get physical page number */
-                                               slotoff = (i * 128) + (j * 16) | 1;             /* Get offset to slot and valid bit */
-                                       }
-                                       
-                                       pmap = pmapTrans[space].pmapVAddr;      /* Find the pmap address */
-                                       if(!pmap) {                                                             /* The pmap is not in use */
-                                               db_printf("The space %08X is not assigned to a pmap, slot = %d\n", space, slot);        /* Say we are wrong */
-                                               fnderr = 1;
-                                               goto dcmout;
-                                       }
-                               
-                                       mp = hw_find_map(pmap, llva, &lnextva);         /* Try to find the mapping for this address */
-//                                     db_printf("%08X - %017llX\n", mp, llva);
-                                       if((unsigned int)mp == mapRtBadLk) {    /* Did we lock up ok? */
-                                               db_printf("Timeout locking mapping for for virtual address %016ll8X, slot = %d\n", llva, j);    
-                                               return;
-                                       }
-                                       
-                                       if(!mp) {                                                               /* Did we find one? */
-                                               db_printf("Not mapped, slot = %d, va = %08X\n", j, (unsigned int)llva); 
-                                               fnderr = 1;
-                                               goto dcmout;
-                                       }
-                                       
-                                       if((mp->mpFlags & 0xFF000000) > 0x01000000) {   /* Is busy count too high? */
-                                               db_printf("Busy count too high, slot = %d\n", j);
-                                               fnderr = 1;
-                                       }
-                                       
-                                       if(mp->mpFlags & mpBlock) {                             /* Is this a block map? */
-                                               if(!(xpca[0] & xauto)) {                                /* Is it marked as such? */
-                                                       db_printf("mapping marked as block, PCA is not, slot = %d\n", j);
-                                                       fnderr = 1;
-                                               }
-                                       }
-                                       else {                                                                  /* Is a block */
-                                               if(xpca[0] & xauto) {                           /* Is it marked as such? */
-                                                       db_printf("mapping not marked as block, PCA is, slot = %d\n", j);
-                                                       fnderr = 1;
-                                               }
-                                               if(mp->mpPte != slotoff) {                      /* See if mapping PTEG offset is us */
-                                                       db_printf("mapping does not point to PTE, slot = %d\n", j);
-                                                       fnderr = 1;
-                                               }
-                                       }
-                               
-                                       wimgkk = (unsigned int)mp->mpVAddr;             /* Get last half of vaddr where keys, etc are */
-                                       wimgkk = (wimgkk ^ wimgxx) & 0x7F;              /* XOR to find differences from PTE */
-                                       if(wimgkk) {                                                    /* See if key in PTE is what we want */
-                                               db_printf("key or WIMG does not match, slot = %d\n", j);
-                                               fnderr = 1;
-                                       }
-                                       
-                                       aoff = (ppnum_t)((llva >> 12) - (mp->mpVAddr >> 12));   /* Get the offset from vaddr */
-                                       pa = aoff + mp->mpPAddr;                                /* Get the physical page number we expect */
-                                       if(pa != ppn) {                                                 /* Is physical address expected? */
-                                               db_printf("Physical address does not match, slot = %d\n", j);
-                                               fnderr = 1;
-                                       }
-       
-                                       mapping_drop_busy(mp);                                  /* We're done with the mapping */
-                               }
-                               
-                       }
-dcmout:
-                       free = free >> 1;
-                       xauto = xauto >> 1;
-               }
-
-
-               if(fnderr)db_dumppca(i);                                                        /* Print if error */
-
-               pteg = pteg + 64;                                                                       /* Go to the next one */
-               if(s4bit) pteg = pteg + 64;                                                     /* Hagfish? */
-               pca = pca - 4;                                                                          /* Go to the next one */
-
-
-       }
-
-       return;
-}
-
 /*
  *             Displays all of the kmods in the system.
  *
index 4de48914617a0daa810a932af672a4e8aaa79707..7b243f6ff92b989c1abfb3135b38e51c397a797d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -59,13 +56,6 @@ void db_display_long(
        char            *modif
 );
 
-void db_display_char(
-       db_expr_t       addr,
-       int                     have_addr,
-       db_expr_t       count,
-       char            *modif
-);
-
 void db_display_real(
        db_expr_t       addr,
        int                     have_addr,
@@ -75,14 +65,10 @@ void db_display_real(
 
 void db_display_virtual(db_expr_t addr, int have_addr, db_expr_t count, char * modif);
 void db_display_mappings(db_expr_t addr, int have_addr, db_expr_t count, char * modif);
-void db_display_hash(db_expr_t addr, int have_addr, db_expr_t count, char * modif);
 void db_display_pmap(db_expr_t addr, int have_addr, db_expr_t count, char * modif);
-void db_display_iokit(db_expr_t addr, int have_addr, db_expr_t count, char * modif);
 void db_display_save(db_expr_t addr, int have_addr, db_expr_t count, char * modif);
 void db_display_xregs(db_expr_t addr, int have_addr, db_expr_t count, char * modif);
 void db_display_kmod(db_expr_t addr, int have_addr, db_expr_t count, char * modif);
 void db_gsnoop(db_expr_t addr, int have_addr, db_expr_t count, char * modif);
-void db_check_mappings(db_expr_t addr, int have_addr, db_expr_t count, char * modif);
-void db_check_pmaps(db_expr_t addr, int have_addr, db_expr_t count, char * modif);
 
 #endif /* !_DDB_DB_LTR_H_ */
index cde656d26bd9c7cc1b189557c75d775051f692c7..fb95f0608d41798730b7097f76080e249dcc1d74 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -68,8 +65,8 @@
 #include <ppc/proc_reg.h>
 #include <ppc/savearea.h>
 
-typedef        addr64_t db_addr_t;     /* address - unsigned */
-typedef        uint64_t db_expr_t;     /* expression - signed???  try unsigned */
+typedef        vm_offset_t     db_addr_t;      /* address - unsigned */
+typedef        int             db_expr_t;      /* expression - signed */
 
 typedef struct savearea db_regs_t;
 db_regs_t      ddb_regs;       /* register state */
@@ -104,7 +101,7 @@ int db_inst_store(unsigned long);
        db_phys_eq(task1,addr1,task2,addr2)
 #define DB_VALID_KERN_ADDR(addr)                               \
        ((addr) >= VM_MIN_KERNEL_ADDRESS &&                     \
-        (addr) < vm_last_addr)
+        (addr) < VM_MAX_KERNEL_ADDRESS)
 #define DB_VALID_ADDRESS(addr,user)                            \
        ((!(user) && DB_VALID_KERN_ADDR(addr)) ||               \
         ((user) && (addr) < VM_MAX_ADDRESS))
@@ -130,6 +127,10 @@ extern db_addr_t   db_disasm(
                                db_addr_t       loc,
                                boolean_t       altfmt,
                                task_t          task);
+extern vm_offset_t     db_kvtophys( 
+                               space_t space,
+                               vm_offset_t va);
+
 extern void            db_read_bytes(
                                vm_offset_t     addr,
                                int             size,
@@ -182,6 +183,11 @@ extern void                kdb_on(
                                int                     cpu);
 extern void            cnpollc(
                                boolean_t               on);
+                               
+extern void            db_phys_copy(
+                               vm_offset_t, 
+                               vm_offset_t, 
+                               vm_size_t);
 
 extern boolean_t       db_phys_cmp(
                                vm_offset_t, 
index 2f6931a633d67e75c696533e70e9ca5b9324530d..f7129ff9fdb4802c58cb25002f03c37ced56ad61 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -61,17 +58,30 @@ extern  char FixedStackStart[], FixedStackEnd[];
        ((((vm_offset_t)(va)) >= (vm_offset_t)&FixedStackStart) &&      \
        (((vm_offset_t)(va)) < ((vm_offset_t)&FixedStackEnd)))
 
+#if 0
+
+#define        INKERNELSTACK(va, th)                                   \
+       (th == THR_ACT_NULL ||                          \
+        (((vm_offset_t)(va)) >= th->thread->kernel_stack &&    \
+         (((vm_offset_t)(va)) < th->thread->kernel_stack +     \
+                                KERNEL_STACK_SIZE)) ||         \
+         INFIXEDSTACK(va))
+#else
 #define INKERNELSTACK(va, th) 1
 
+#endif
+
+#ifdef __MACHO__
 struct db_ppc_frame {
        struct db_ppc_frame     *f_frame;
        int                     pad1;
-       uint32_t        f_retaddr;
+       db_addr_t               f_retaddr;
        int                     pad3;
        int                     pad4;
        int                     pad5;
-       uint32_t        f_arg[DB_NUMARGS_MAX];
+       db_addr_t               f_arg[DB_NUMARGS_MAX];
 };
+#endif
 
 #define        TRAP            1
 #define        INTERRUPT       2
@@ -114,45 +124,45 @@ extern int        _setjmp(
  */
 struct db_variable db_regs[] = {
        /* XXX "pc" is an alias to "srr0"... */
-  { "pc",      &ddb_regs.save_srr0,    db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "srr0",    &ddb_regs.save_srr0,    db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "srr1",    &ddb_regs.save_srr1,    db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r0",      &ddb_regs.save_r0,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r1",      &ddb_regs.save_r1,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r2",      &ddb_regs.save_r2,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r3",      &ddb_regs.save_r3,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r4",      &ddb_regs.save_r4,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r5",      &ddb_regs.save_r5,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r6",      &ddb_regs.save_r6,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r7",      &ddb_regs.save_r7,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r8",      &ddb_regs.save_r8,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r9",      &ddb_regs.save_r9,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r10",     &ddb_regs.save_r10,     db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r11",     &ddb_regs.save_r11,     db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r12",     &ddb_regs.save_r12,     db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r13",     &ddb_regs.save_r13,     db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r14",     &ddb_regs.save_r14,     db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r15",     &ddb_regs.save_r15,     db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r16",     &ddb_regs.save_r16,     db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r17",     &ddb_regs.save_r17,     db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r18",     &ddb_regs.save_r18,     db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r19",     &ddb_regs.save_r19,     db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r20",     &ddb_regs.save_r20,     db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r21",     &ddb_regs.save_r21,     db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r22",     &ddb_regs.save_r22,     db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r23",     &ddb_regs.save_r23,     db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r24",     &ddb_regs.save_r24,     db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r25",     &ddb_regs.save_r25,     db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r26",     &ddb_regs.save_r26,     db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r27",     &ddb_regs.save_r27,     db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r28",     &ddb_regs.save_r28,     db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r29",     &ddb_regs.save_r29,     db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r30",     &ddb_regs.save_r30,     db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "r31",     &ddb_regs.save_r31,     db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "cr",      &ddb_regs.save_cr,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "xer",     &ddb_regs.save_xer,     db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "lr",      &ddb_regs.save_lr,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
-  { "ctr",     &ddb_regs.save_ctr,     db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "pc",      (int *)&ddb_regs.save_srr0,     db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "srr0",    (int *)&ddb_regs.save_srr0,     db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "srr1",    (int *)&ddb_regs.save_srr1,     db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r0",      (int *)&ddb_regs.save_r0,       db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r1",      (int *)&ddb_regs.save_r1,       db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r2",      (int *)&ddb_regs.save_r2,       db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r3",      (int *)&ddb_regs.save_r3,       db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r4",      (int *)&ddb_regs.save_r4,       db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r5",      (int *)&ddb_regs.save_r5,       db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r6",      (int *)&ddb_regs.save_r6,       db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r7",      (int *)&ddb_regs.save_r7,       db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r8",      (int *)&ddb_regs.save_r8,       db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r9",      (int *)&ddb_regs.save_r9,       db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r10",     (int *)&ddb_regs.save_r10,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r11",     (int *)&ddb_regs.save_r11,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r12",     (int *)&ddb_regs.save_r12,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r13",     (int *)&ddb_regs.save_r13,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r14",     (int *)&ddb_regs.save_r14,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r15",     (int *)&ddb_regs.save_r15,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r16",     (int *)&ddb_regs.save_r16,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r17",     (int *)&ddb_regs.save_r17,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r18",     (int *)&ddb_regs.save_r18,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r19",     (int *)&ddb_regs.save_r19,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r20",     (int *)&ddb_regs.save_r20,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r21",     (int *)&ddb_regs.save_r21,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r22",     (int *)&ddb_regs.save_r22,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r23",     (int *)&ddb_regs.save_r23,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r24",     (int *)&ddb_regs.save_r24,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r25",     (int *)&ddb_regs.save_r25,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r26",     (int *)&ddb_regs.save_r26,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r27",     (int *)&ddb_regs.save_r27,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r28",     (int *)&ddb_regs.save_r28,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r29",     (int *)&ddb_regs.save_r29,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r30",     (int *)&ddb_regs.save_r30,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "r31",     (int *)&ddb_regs.save_r31,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "cr",      (int *)&ddb_regs.save_cr,       db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "xer",     (int *)&ddb_regs.save_xer,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "lr",      (int *)&ddb_regs.save_lr,       db_ppc_reg_value, 0, 0, 0, 0, TRUE },
+  { "ctr",     (int *)&ddb_regs.save_ctr,      db_ppc_reg_value, 0, 0, 0, 0, TRUE },
 };
 struct db_variable *db_eregs = db_regs + sizeof(db_regs)/sizeof(db_regs[0]);
 
@@ -163,10 +173,8 @@ db_ppc_reg_value(
        int                     flag,
        db_var_aux_param_t      ap)
 {
-       db_expr_t *dp = 0;
-       db_expr_t null_reg = 0;
-       uint32_t *dp32;
-       
+       int                     *dp = 0;
+       db_expr_t               null_reg = 0;
        register thread_act_t   thr_act = ap->thr_act;
        int                     cpu;
 
@@ -176,78 +184,71 @@ db_ppc_reg_value(
                    db_error("no user registers\n");
            }
            if (thr_act == current_act()) {
-                       if (IS_USER_TRAP((&ddb_regs))) dp = vp->valuep;
-                       else if (INFIXEDSTACK(ddb_regs.save_r1))
-                               db_error("cannot get/set user registers in nested interrupt\n");
+               if (IS_USER_TRAP((&ddb_regs)))
+                   dp = vp->valuep;
+               else if (INFIXEDSTACK(ddb_regs.save_r1))
+                   db_error("cannot get/set user registers in nested interrupt\n");
            }
-       } 
-       else {
-               if (thr_act == THR_ACT_NULL || thr_act == current_act()) {
-                       dp = vp->valuep;
-               } 
-               else {
-                       if (thr_act->thread &&
-                               !(thr_act->thread->state & TH_STACK_HANDOFF) && 
-                               thr_act->thread->kernel_stack) {
-                               
-                               int cpu;
-
-                               for (cpu = 0; cpu < NCPUS; cpu++) {
-                                       if (cpu_to_processor(cpu)->state == PROCESSOR_RUNNING &&
-                                               cpu_to_processor(cpu)->cpu_data->active_thread == thr_act->thread && saved_state[cpu]) {
-                                               
-                                               dp = (db_expr_t)(((uint32_t)saved_state[cpu]) +
-                                                                 (((uint32_t) vp->valuep) -
-                                                                  (uint32_t) &ddb_regs));
-                                               break;
-                                       }
-                               }
+       } else {
+           if (thr_act == THR_ACT_NULL || thr_act == current_act()) {
+               dp = vp->valuep;
+           } else {
+             if (thr_act->thread &&
+                 !(thr_act->thread->state & TH_STACK_HANDOFF) && 
+                       thr_act->thread->kernel_stack) {
+               int cpu;
+
+               for (cpu = 0; cpu < NCPUS; cpu++) {
+                   if (cpu_to_processor(cpu)->state == PROCESSOR_RUNNING &&
+                       cpu_to_processor(cpu)->cpu_data->active_thread == thr_act->thread && saved_state[cpu]) {
+                       dp = (int *) (((int)saved_state[cpu]) +
+                                     (((int) vp->valuep) -
+                                      (int) &ddb_regs));
+                       break;
+                   }
+               }
 
-                               if (dp == 0) dp = &null_reg;
-                       } 
-                       else if (thr_act->thread && (thr_act->thread->state & TH_STACK_HANDOFF)){
-                               /* only PC is valid */
-                               if (vp->valuep == (int *) &ddb_regs.save_srr0) {
-                                       dp = (int *)(&thr_act->thread->continuation);
-                               } 
-                               else {
-                                       dp = &null_reg;
-                               }
-                       }
+               if (dp == 0)
+                   dp = &null_reg;
+             } else if (thr_act->thread &&
+                        (thr_act->thread->state&TH_STACK_HANDOFF)){
+               /* only PC is valid */
+               if (vp->valuep == (int *) &ddb_regs.save_srr0) {
+                   dp = (int *)(&thr_act->thread->continuation);
+               } else {
+                   dp = &null_reg;
+               }
+             }
            }
        }
        if (dp == 0) {
+           int cpu;
 
            if (!db_option(ap->modif, 'u')) {
-                       for (cpu = 0; cpu < NCPUS; cpu++) {
-                               if (cpu_to_processor(cpu)->state == PROCESSOR_RUNNING &&
-                                       cpu_to_processor(cpu)->cpu_data->active_thread == thr_act->thread && saved_state[cpu]) {
-                                               dp = (int *) (((int)saved_state[cpu]) +
-                                                 (((int) vp->valuep) - (int) &ddb_regs));
-                                       break;
-                               }
-                       }
+               for (cpu = 0; cpu < NCPUS; cpu++) {
+                   if (cpu_to_processor(cpu)->state == PROCESSOR_RUNNING &&
+                       cpu_to_processor(cpu)->cpu_data->active_thread == thr_act->thread && saved_state[cpu]) {
+                           dp = (int *) (((int)saved_state[cpu]) +
+                                         (((int) vp->valuep) -
+                                          (int) &ddb_regs));
+                           break;
+                   }
+               }
            }
            if (dp == 0) {
-                       if (!thr_act || thr_act->mact.pcb == 0) db_error("no pcb\n");
-                       dp = (int *)((int)thr_act->mact.pcb + ((int)vp->valuep - (int)&ddb_regs));
+               if (!thr_act || thr_act->mact.pcb == 0)
+                   db_error("no pcb\n");
+               dp = (int *)((int)thr_act->mact.pcb + 
+                            ((int)vp->valuep - (int)&ddb_regs));
            }
        }
-
-       if(vp->valuep == (int *) &ddb_regs.save_cr) {   /* Is this the CR we are doing? */
-               dp32 = (uint32_t *)dp;                                          /* Make this easier */
-               if (flag == DB_VAR_SET) *dp32 = *valuep;
-               else *valuep = *dp32;
-       }
-       else {                                                                                  /* Normal 64-bit registers */
-               if (flag == DB_VAR_SET) *dp = *valuep;
-               else *valuep = *(unsigned long long *)dp;
-       }
-       
+       if (flag == DB_VAR_SET)
+           *dp = *valuep;
+       else
+           *valuep = *dp;
        return(0);
 }
 
-
 void
 db_find_trace_symbols(void)
 {
@@ -373,13 +374,6 @@ db_nextframe(
            /* falling down for unknown case */
        default:
        miss_frame:
-               
-               if(!pmap_find_phys(kernel_pmap, (addr64_t)*fp)) {       /* Check if this is valid */
-                       db_printf("Frame not mapped %08X\n",*fp);               /* Say not found */
-                       *fp = 0;                                                                                /* Show not found */
-                       break;                                                                                  /* Out of here */
-               }
-               
                if ((*fp)->f_frame)
                    *ip = (db_addr_t)
                            db_get_task_value((int)&(*fp)->f_frame->f_retaddr,
index 15f706bb5e41bb9ac6672bed647901d4a52825ec..5ff26263ea208abcc56b2eb0d8d7cdac3ac5c884 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8598062d0772d70e6b9c887e03b0044de191e3d1..ac6e4690d55b59de331d02a75744bc35dd008640 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -49,9 +46,8 @@
 #include <ppc/machine_routines.h>
 
 /*     Per processor CPU features */
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
 struct procFeatures {
-       unsigned int    Available;                      /* 0x000 */
+       unsigned int    Available;
 #define pfFloat                0x80000000
 #define pfFloatb       0
 #define pfAltivec      0x40000000
@@ -70,24 +66,12 @@ struct procFeatures {
 #define pfThermalb     7
 #define pfThermInt     0x00800000
 #define pfThermIntb    8
-#define pfSlowNap      0x00400000
-#define pfSlowNapb     9
-#define pfNoMuMMCK     0x00200000
-#define pfNoMuMMCKb    10
-#define pfNoL2PFNap    0x00100000
-#define pfNoL2PFNapb   11
-#define pfSCOMFixUp    0x00080000
-#define pfSCOMFixUpb   12
-#define        pfHasDcba       0x00040000
-#define        pfHasDcbab      13
-#define        pfL1fa          0x00010000
-#define        pfL1fab         15
-#define pfL2           0x00008000
-#define pfL2b          16
-#define pfL2fa         0x00004000
-#define pfL2fab                17
-#define pfL2i          0x00002000
-#define pfL2ib         18
+#define pfNoL2PFNap    0x00008000
+#define pfNoL2PFNapb   16
+#define pfSlowNap      0x00004000
+#define pfSlowNapb     17
+#define pfNoMuMMCK     0x00002000
+#define pfNoMuMMCKb    18
 #define pfLClck                0x00001000
 #define pfLClckb       19
 #define pfWillNap      0x00000800
@@ -96,50 +80,49 @@ struct procFeatures {
 #define pfNoMSRirb     21
 #define pfL3pdet       0x00000200
 #define pfL3pdetb      22
-#define        pf128Byte       0x00000080
-#define        pf128Byteb      24
-#define        pf32Byte        0x00000020
-#define        pf32Byteb       26
-#define        pf64Bit         0x00000010
-#define        pf64Bitb        27
+#define pfL1i          0x00000100
+#define pfL1ib         23
+#define pfL1d          0x00000080
+#define pfL1db         24
+#define pfL1fa         0x00000040
+#define pfL1fab                25
+#define pfL2           0x00000020
+#define pfL2b          26
+#define pfL2fa         0x00000010
+#define pfL2fab                27
+#define pfL2i          0x00000008
+#define pfL2ib         28
 #define pfL3           0x00000004
 #define pfL3b          29
 #define pfL3fa         0x00000002
 #define pfL3fab                30
 #define pfValid                0x00000001
 #define pfValidb       31
-       unsigned short  rptdProc;                       /* 0x004 */
-       unsigned short  lineSize;                       /* 0x006 */
-       unsigned int    l1iSize;                        /* 0x008 */
-       unsigned int    l1dSize;                        /* 0x00C */
-       unsigned int    l2cr;                           /* 0x010 */
-       unsigned int    l2Size;                         /* 0x014 */
-       unsigned int    l3cr;                           /* 0x018 */
-       unsigned int    l3Size;                         /* 0x01C */
-       unsigned int    pfMSSCR0;                       /* 0x020 */
-       unsigned int    pfMSSCR1;                       /* 0x024 */
-       unsigned int    pfICTRL;                        /* 0x028 */
-       unsigned int    pfLDSTCR;                       /* 0x02C */
-       unsigned int    pfLDSTDB;                       /* 0x030 */
-       unsigned int    pfMaxVAddr;                     /* 0x034 */
-       unsigned int    pfMaxPAddr;                     /* 0x038 */
-       unsigned int    pfPTEG;                         /* 0x03C */
-       uint64_t                pfHID0;                         /* 0x040 */
-       uint64_t                pfHID1;                         /* 0x048 */
-       uint64_t                pfHID2;                         /* 0x050 */
-       uint64_t                pfHID3;                         /* 0x058 */
-       uint64_t                pfHID4;                         /* 0x060 */
-       uint64_t                pfHID5;                         /* 0x068 */
-       unsigned int    l2crOriginal;           /* 0x070 */
-       unsigned int    l3crOriginal;           /* 0x074 */
-       unsigned int    pfBootConfig;           /* 0x07C */
-       unsigned int    reserved[1];            /* 0x80 */
+       unsigned short  rptdProc;
+       unsigned short  lineSize;
+       unsigned int    l1iSize;
+       unsigned int    l1dSize;
+       unsigned int    l2cr;
+       unsigned int    l2Size;
+       unsigned int    l3cr;
+       unsigned int    l3Size;
+       unsigned int    pfHID0;
+       unsigned int    pfHID1;
+       unsigned int    pfHID2;
+       unsigned int    pfHID3;
+       unsigned int    pfMSSCR0;
+       unsigned int    pfMSSCR1;
+       unsigned int    pfICTRL;
+       unsigned int    pfLDSTCR;
+       unsigned int    pfLDSTDB;
+       unsigned int    l2crOriginal;
+       unsigned int    l3crOriginal;
+       unsigned int    pfBootConfig;
+       unsigned int    reserved[4];
 };
-#pragma pack()
 
 typedef struct procFeatures procFeatures;
 
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
 struct thrmControl {
        unsigned int    maxTemp;                        /* Maximum temprature before damage */
        unsigned int    throttleTemp;           /* Temprature at which to throttle down */
@@ -148,130 +131,11 @@ struct thrmControl {
        unsigned int    thrm3val;                       /* Value for thrm3 register */
        unsigned int    rsvd[3];                        /* Pad to cache line */
 };
-#pragma pack()
 
 typedef struct thrmControl thrmControl;
 
-/*
- *
- *             Various performance counters
- */
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
-struct hwCtrs {        
-
-       unsigned int    hwInVains;                              /* In vain */
-       unsigned int    hwResets;                               /* Reset */
-       unsigned int    hwMachineChecks;                /* Machine check */
-       unsigned int    hwDSIs;                                 /* DSIs */
-       unsigned int    hwISIs;                                 /* ISIs */
-       unsigned int    hwExternals;                    /* Externals */
-       unsigned int    hwAlignments;                   /* Alignment */
-       unsigned int    hwPrograms;                     /* Program */
-       unsigned int    hwFloatPointUnavailable;        /* Floating point */
-       unsigned int    hwDecrementers;                 /* Decrementer */
-       unsigned int    hwIOErrors;                     /* I/O error */
-       unsigned int    hwrsvd0;                                /* Reserved */
-       unsigned int    hwSystemCalls;                  /* System call */
-       unsigned int    hwTraces;                               /* Trace */
-       unsigned int    hwFloatingPointAssists; /* Floating point assist */
-       unsigned int    hwPerformanceMonitors;  /* Performance monitor */
-       unsigned int    hwAltivecs;                     /* VMX */
-       unsigned int    hwrsvd1;                                /* Reserved */
-       unsigned int    hwrsvd2;                                /* Reserved */
-       unsigned int    hwrsvd3;                                /* Reserved */
-       unsigned int    hwInstBreakpoints;              /* Instruction breakpoint */
-       unsigned int    hwSystemManagements;    /* System management */
-       unsigned int    hwAltivecAssists;               /* Altivec Assist */
-       unsigned int    hwThermal;                              /* Thermals */
-       unsigned int    hwrsvd5;                                /* Reserved */
-       unsigned int    hwrsvd6;                                /* Reserved */
-       unsigned int    hwrsvd7;                                /* Reserved */
-       unsigned int    hwrsvd8;                                /* Reserved */
-       unsigned int    hwrsvd9;                                /* Reserved */
-       unsigned int    hwrsvd10;                               /* Reserved */
-       unsigned int    hwrsvd11;                               /* Reserved */
-       unsigned int    hwrsvd12;                               /* Reserved */
-       unsigned int    hwrsvd13;                               /* Reserved */
-       unsigned int    hwTrace601;                             /* Trace */
-       unsigned int    hwSIGPs;                                /* SIGP */
-       unsigned int    hwPreemptions;                  /* Preemption */
-       unsigned int    hwContextSwitchs;               /* Context switch */
-       unsigned int    hwShutdowns;                    /* Shutdowns */
-       unsigned int    hwChokes;                               /* System ABENDs */
-       unsigned int    hwDataSegments;                 /* Data Segment Interruptions */
-       unsigned int    hwInstructionSegments;  /* Instruction Segment Interruptions */
-       unsigned int    hwSoftPatches;                  /* Soft Patch interruptions */
-       unsigned int    hwMaintenances;                 /* Maintenance interruptions */
-       unsigned int    hwInstrumentations;             /* Instrumentation interruptions */
-       unsigned int    hwrsvd14;                               /* Reswerved */
-/*                                                                                     0x0B4 */
-
-       unsigned int    hwspare0[17];                   /* Reserved */
-       unsigned int    hwRedrives;                             /* Number of redriven interrupts */
-       unsigned int    hwSteals;                               /* PTE Steals */
-/*                                                                                     0x100 */
-
-       unsigned int    hwMckHang;                              /* ? */
-       unsigned int    hwMckSLBPE;                             /* ? */
-       unsigned int    hwMckTLBPE;                             /* ? */
-       unsigned int    hwMckERCPE;                             /* ? */
-       unsigned int    hwMckL1DPE;                             /* ? */
-       unsigned int    hwMckL1TPE;                             /* ? */
-       unsigned int    hwMckUE;                                /* ? */
-       unsigned int    hwMckIUE;                               /* ? */
-       unsigned int    hwMckIUEr;                              /* ? */
-       unsigned int    hwMckDUE;                               /* ? */
-       unsigned int    hwMckDTW;                               /* ? */
-       unsigned int    hwMckUnk;                               /* ? */
-       unsigned int    hwMckExt;                               /* ? */
-       unsigned int    hwMckICachePE;                  /* ? */
-       unsigned int    hwMckITagPE;                    /* ? */
-       unsigned int    hwMckIEratPE;                   /* ? */
-       unsigned int    hwMckDEratPE;                   /* ? */
-       unsigned int    hwspare2[15];                   /* Pad to next 128 bndry */
-/*                                                                                     0x180 */
-
-       unsigned int    napStamp[2];                    /* Time base when we napped */
-       unsigned int    napTotal[2];                    /* Total nap time in ticks */
-       unsigned int    numSIGPast;                             /* Number of SIGP asts recieved */
-       unsigned int    numSIGPcpureq;                  /* Number of SIGP cpu requests recieved */
-       unsigned int    numSIGPdebug;                   /* Number of SIGP debugs recieved */
-       unsigned int    numSIGPwake;                    /* Number of SIGP wakes recieved */
-       unsigned int    numSIGPtimo;                    /* Number of SIGP send timeouts */
-       unsigned int    numSIGPmast;                    /* Number of SIGPast messages merged */
-       unsigned int    numSIGPmwake;                   /* Number of SIGPwake messages merged */
-       
-       unsigned int    hwspare3[21];                   /* Pad to 512 */
-       
-};
-#pragma pack()
-
-typedef struct hwCtrs hwCtrs;
-
-struct patch_entry {
-       unsigned int    *addr;
-       unsigned int    data;
-       unsigned int    type;
-       unsigned int    value;
-};
-
-typedef struct patch_entry patch_entry_t;
-
-#define        PATCH_INVALID           0
-#define        PATCH_PROCESSOR         1
-#define        PATCH_FEATURE           2
-
-#define PATCH_TABLE_SIZE       12
-
-#define PatchExt32             0x80000000
-#define PatchExt32b            0
-#define PatchLwsync            0x40000000
-#define PatchLwsyncb   1
-
 /* When an exception is taken, this info is accessed via sprg0 */
 /* We should always have this one on a cache line boundary */
-
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
 struct per_proc_info {
        unsigned short  cpu_number;
        unsigned short  cpu_flags;                      /* Various low-level flags */
@@ -281,8 +145,8 @@ struct per_proc_info {
        vm_offset_t     debstackptr;
        vm_offset_t     debstack_top_ss;
 
-       unsigned int    spcFlags;                       /* Special thread flags */
-       unsigned int    Uassist;                        /* User Assist Word */
+       unsigned int    tempwork1;                      /* Temp work area - monitor use carefully */
+       unsigned int    save_exception_type;
        unsigned int    old_thread;
 
        /* PPC cache line boundary here - 020 */
@@ -294,28 +158,31 @@ struct per_proc_info {
  *     Note: the following two pairs of words need to stay in order and each pair must
  *     be in the same reservation (line) granule 
  */
-       struct facility_context *FPU_owner;     /* Owner of the FPU on this cpu */
-       unsigned int    liveVRSave;                     /* VRSave assiciated with live vector registers */
-       struct facility_context *VMX_owner;     /* Owner of the VMX on this cpu */
-       unsigned int    holdQFret;                      /* Hold off releasing quickfret list */
-       unsigned int    rsrvd03C[1];
+       struct facility_context *FPU_owner;             /* Owner of the FPU on this cpu */
+       unsigned int    pprsv1;
+       struct facility_context *VMX_owner;             /* Owner of the VMX on this cpu */
+       unsigned int    pprsv2;
+       unsigned int    next_savearea;                  /* pointer to the next savearea */
 
        /* PPC cache line boundary here - 040 */
-       addr64_t                quickfret;                      /* List of saveareas to release */
-       addr64_t                lclfree;                        /* Pointer to local savearea list */
+       unsigned int    quickfret;                      /* List of saveareas to release */
+       unsigned int    lclfree;                        /* Pointer to local savearea list */
        unsigned int    lclfreecnt;                     /* Entries in local savearea list */
-       unsigned int    spcTRc;                         /* Special trace count */
-       unsigned int    spcTRp;                         /* Special trace buffer pointer */
-       unsigned int    ppbbTaskEnv;            /* BlueBox Task Environment */
+       unsigned int    Lastpmap;                       /* Last user pmap loaded  */
+       unsigned int    userspace;                      /* Last loaded user memory space ID  */
+       unsigned int    userpmap;                       /* User pmap - real address */
+       unsigned int    liveVRSave;                     /* VRSave assiciated with live vector registers */
+       unsigned int    spcFlags;                       /* Special thread flags */
 
        /* PPC cache line boundary here - 060 */
        boolean_t               interrupts_enabled;
+       unsigned int    ppbbTaskEnv;            /* BlueBox Task Environment */
        IOInterruptHandler      interrupt_handler;
        void *                  interrupt_nub;
        unsigned int    interrupt_source;
        void *                  interrupt_target;
        void *                  interrupt_refCon;
-       uint64_t                next_savearea;                  /* pointer to the next savearea */
+       time_base_enable_t      time_base_enable;
 
        /* PPC cache line boundary here - 080 */
        unsigned int    MPsigpStat;                     /* Signal Processor status (interlocked update for this one) */
@@ -334,8 +201,7 @@ struct per_proc_info {
 #define SIGPdebug      2                                       /* Requests a debugger entry */
 #define SIGPwake       3                                       /* Wake up a sleeping processor */
 #define CPRQtemp       0                                       /* Get temprature of processor */
-#define CPRQtimebase   1                               /* Get timebase of processor */
-#define CPRQscom       2                                       /* SCOM */
+#define CPRQtimebase   1                                       /* Get timebase of processor */
        unsigned int    MPsigpParm0;            /* SIGP parm 0 */
        unsigned int    MPsigpParm1;            /* SIGP parm 1 */
        unsigned int    MPsigpParm2;            /* SIGP parm 2 */
@@ -346,79 +212,41 @@ struct per_proc_info {
        /* PPC cache line boundary here - 0A0 */
        procFeatures    pf;                                     /* Processor features */
        
-       /* PPC cache line boundary here - 120 */
+       /* PPC cache line boundary here - 100 */
        thrmControl             thrm;                           /* Thermal controls */
        
+       /* PPC cache line boundary here - 120 */
+       unsigned int    napStamp[2];            /* Time base when we napped */
+       unsigned int    napTotal[2];            /* Total nap time in ticks */
+       unsigned int    numSIGPast;                     /* Number of SIGP asts recieved */
+       unsigned int    numSIGPcpureq;          /* Number of SIGP cpu requests recieved */
+       unsigned int    numSIGPdebug;           /* Number of SIGP debugs recieved */
+       unsigned int    numSIGPwake;            /* Number of SIGP wakes recieved */
+       
        /* PPC cache line boundary here - 140 */
-       unsigned int    ppRsvd140[8];           /* Reserved */
+       unsigned int    numSIGPtimo;            /* Number of SIGP send timeouts */
+       unsigned int    numSIGPmast;            /* Number of SIGPast messages merged */
+       unsigned int    numSIGPmwake;           /* Number of SIGPwake messages merged */
+       unsigned int    spcTRc;                         /* Special trace count */
+       unsigned int    spcTRp;                         /* Special trace buffer pointer */
+       unsigned int    Uassist;                        /* User Assist Word */
+       vm_offset_t             VMMareaPhys;            /* vmm state page physical addr */
+       unsigned int    FAMintercept;           /* vmm FAM Exceptions to intercept */
        
        /* PPC cache line boundary here - 160 */
-       time_base_enable_t      time_base_enable;
-       unsigned int    ppRsvd164[3];           /* Reserved */
        cpu_data_t              pp_cpu_data;            /* cpu data info */
+       unsigned int    rsrvd170[4];            /* Reserved slots */
        
        /* PPC cache line boundary here - 180 */
-       unsigned int    ppRsvd180[2];           /* Reserved */
-       uint64_t                validSegs;                      /* Valid SR/STB slots */
-       addr64_t                ppUserPmap;                     /* Current user state pmap (physical address) */
-       unsigned int    ppUserPmapVirt;         /* Current user state pmap (virtual address) */
-       unsigned int    ppMapFlags;                     /* Mapping flags */
+       unsigned int    rsrvd180[8];            /* Reserved slots */
        
        /* PPC cache line boundary here - 1A0 */
-       unsigned short  ppInvSeg;                       /* Forces complete invalidate of SRs/SLB (this must stay with ppInvSeg) */
-       unsigned short  ppCurSeg;                       /* Set to 1 if user segments, 0 if kernel (this must stay with ppInvSeg) */
-       unsigned int    ppSegSteal;                     /* Count of segment slot steals */
-       ppnum_t                 VMMareaPhys;            /* vmm state page physical addr */
-       unsigned int    VMMXAFlgs;                      /* vmm extended flags */
-       unsigned int    FAMintercept;           /* vmm FAM Exceptions to intercept */
-       unsigned int    rsrvd1B4[3];            /* Reserved slots */
+       unsigned int    rsrvd1A0[8];            /* Reserved slots */
        
        /* PPC cache line boundary here - 1C0 */
-       unsigned int    ppCIOmp[16];            /* Linkage mapping for copyin/out - 64 bytes */
-       
-       /* PPC cache line boundary here - 200 */
-       uint64_t                tempr0;                         /* temporary savearea */
-       uint64_t                tempr1;                 
-       uint64_t                tempr2;
-       uint64_t                tempr3;
-
-       uint64_t                tempr4;                         
-       uint64_t                tempr5;
-       uint64_t                tempr6;
-       uint64_t                tempr7;
-
-       uint64_t                tempr8;
-       uint64_t                tempr9;
-       uint64_t                tempr10;
-       uint64_t                tempr11;
+       unsigned int    rsrvd1C0[8];            /* Reserved slots */
        
-       uint64_t                tempr12;
-       uint64_t                tempr13;
-       uint64_t                tempr14;
-       uint64_t                tempr15;
-       
-       uint64_t                tempr16;
-       uint64_t                tempr17;
-       uint64_t                tempr18;
-       uint64_t                tempr19;
-
-       uint64_t                tempr20;
-       uint64_t                tempr21;
-       uint64_t                tempr22;
-       uint64_t                tempr23;
-       
-       uint64_t                tempr24;
-       uint64_t                tempr25;
-       uint64_t                tempr26;
-       uint64_t                tempr27;
-       
-       uint64_t                tempr28;
-       uint64_t                tempr29;
-       uint64_t                tempr30;
-       uint64_t                tempr31;
-
-
-       /* PPC cache line boundary here - 300 */
+       /* PPC cache line boundary here - 1E0 */
        double                  emfp0;                          /* Copies of floating point registers */
        double                  emfp1;                          /* Used for emulation purposes */
        double                  emfp2;
@@ -459,12 +287,12 @@ struct per_proc_info {
        double                  emfp30;
        double                  emfp31;
 
-/*                                                                - 400 */
+/*                                                                - 2E0 */
        unsigned int    emfpscr_pad;
        unsigned int    emfpscr;
        unsigned int    empadfp[6];
        
-/*                                                                - 420 */
+/*                                                                - 300 */
        unsigned int    emvr0[4];                       /* Copies of vector registers used both */
        unsigned int    emvr1[4];                       /* for full vector emulation or */
        unsigned int    emvr2[4];                       /* as saveareas while assisting denorms */
@@ -499,21 +327,10 @@ struct per_proc_info {
        unsigned int    emvr31[4];
        unsigned int    emvscr[4];                      
        unsigned int    empadvr[4];                     
-/*                                                                - 640 */
-/* note implicit dependence on kSkipListMaxLists, which must be <= 28 */
-    addr64_t           skipListPrev[28];       /* prev ptrs saved as side effect of calling mapSearchFull() */
-    
-/*                                                                - 720 */
+/*                                                                - 520 */
 
        unsigned int    patcharea[56];
-/*                                                                - 800 */
-
-       hwCtrs                  hwCtr;                                  /* Hardware exception counters */
-/*                                                                - A00 */
-
-       unsigned int    pppadpage[384];                 /* Pad to end of page */
-/*                                                                - 1000 */
-
+/*                                                                - 600 */
 
 };
 
@@ -522,15 +339,13 @@ struct per_proc_info {
 #define        pp_simple_lock_count    pp_cpu_data.simple_lock_count
 #define        pp_interrupt_level      pp_cpu_data.interrupt_level
 
-#pragma pack()
-
 
 extern struct per_proc_info per_proc_info[NCPUS];
 
-
 extern char *trap_type[];
 
-#endif /* ndef ASSEMBLER */                                                                                    /* with this savearea should be redriven */
+#endif /* ndef ASSEMBLER */
+/* with this savearea should be redriven */
 
 /* cpu_flags defs */
 #define SIGPactive     0x8000
@@ -578,7 +393,7 @@ extern char *trap_type[];
 #define T_INVALID_EXCP10               (0x1D * T_VECTOR_SIZE)
 #define T_INVALID_EXCP11               (0x1E * T_VECTOR_SIZE)
 #define T_INVALID_EXCP12               (0x1F * T_VECTOR_SIZE)
-#define T_EMULATE                              (0x20 * T_VECTOR_SIZE)
+#define T_INVALID_EXCP13               (0x20 * T_VECTOR_SIZE)
 
 #define T_RUNMODE_TRACE                        (0x21 * T_VECTOR_SIZE) /* 601 only */
 
@@ -588,20 +403,12 @@ extern char *trap_type[];
 #define T_SHUTDOWN                             (0x25 * T_VECTOR_SIZE)
 #define T_CHOKE                                        (0x26 * T_VECTOR_SIZE)
 
-#define T_DATA_SEGMENT                 (0x27 * T_VECTOR_SIZE)
-#define T_INSTRUCTION_SEGMENT  (0x28 * T_VECTOR_SIZE)
-
-#define T_SOFT_PATCH                   (0x29 * T_VECTOR_SIZE)
-#define T_MAINTENANCE                  (0x2A * T_VECTOR_SIZE)
-#define T_INSTRUMENTATION              (0x2B * T_VECTOR_SIZE)
-#define T_ARCHDEP0                             (0x2C * T_VECTOR_SIZE)
-
 #define T_AST                                  (0x100 * T_VECTOR_SIZE) 
 #define T_MAX                                  T_CHOKE          /* Maximum exception no */
 
 #define        T_FAM                                   0x00004000
 
-#define        EXCEPTION_VECTOR(exception)     (exception * 0x100 / T_VECTOR_SIZE )
+#define        EXCEPTION_VECTOR(exception)     (exception * 0x100 /T_VECTOR_SIZE )
 
 /*
  *             System choke (failure) codes 
@@ -614,21 +421,17 @@ extern char *trap_type[];
 #define failNoSavearea 4
 #define failSaveareaCorr 5
 #define failBadLiveContext 6
-#define        failSkipLists 7
-#define        failUnalignedStk 8
 
 /* Always must be last - update failNames table in model_dep.c as well */
-#define failUnknown 9
+#define failUnknown 7
 
 #ifndef ASSEMBLER
 
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
 typedef struct resethandler {
        unsigned int    type;
        vm_offset_t     call_paddr;
        vm_offset_t     arg__paddr;
 } resethandler_t;
-#pragma pack()
 
 extern resethandler_t ResetHandler;
 
@@ -636,7 +439,5 @@ extern resethandler_t ResetHandler;
 
 #define        RESET_HANDLER_NULL      0x0
 #define        RESET_HANDLER_START     0x1
-#define        RESET_HANDLER_BUPOR     0x2
-#define        RESET_HANDLER_IGNORE    0x3
 
 #endif /* _PPC_EXCEPTION_H_ */
index 7a64366c6175f7b0759e456be8ad943c0b60ae56..6781cc8ce31c7ef09f2dbfb8cf43bbcdc1480003 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 430eb0542a6d7cd6b93cda84c1da73ab7c1bcc26..5931f3c5e4d3975fa56b314eff3cc3619046553c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #include <vm/vm_map.h>
 #include <vm/pmap.h>
 #include <ppc/pmap.h>
+#include <ppc/pmap_internals.h>
 #include <ppc/Diagnostics.h>
+#include <ppc/POWERMAC/mp/MPPlugIn.h>
 #include <pexpert/pexpert.h>
 #include <mach/machine.h>
 #include <ppc/vmachmon.h>
-#include <ppc/hw_perfmon.h>
 #include <ppc/PPCcalls.h>
 #include <ppc/mem.h>
-#include <ppc/boot.h>
-#include <ppc/lowglobals.h>
 
 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE)0)->MEMBER)
 
@@ -87,12 +83,7 @@ int main(int argc, char *argv[])
        DECLARE("ACT_MACT_BTS", offsetof(struct thread_activation *, mact.bbTableStart));
        DECLARE("ACT_MACT_BTE", offsetof(struct thread_activation *, mact.bbTaskEnv));
        DECLARE("ACT_MACT_SPF", offsetof(struct thread_activation *, mact.specFlags));
-       DECLARE("ACT_PREEMPT_CNT",      offsetof(struct thread_activation *, mact.preemption_count));
        DECLARE("qactTimer",    offsetof(struct thread_activation *, mact.qactTimer));
-       DECLARE("cioSpace",             offsetof(struct thread_activation *, mact.cioSpace));
-       DECLARE("cioRelo",              offsetof(struct thread_activation *, mact.cioRelo));
-       DECLARE("cioSwitchAway",        cioSwitchAway);
-       DECLARE("cioSwitchAwayb",       cioSwitchAwayb);
        
        DECLARE("floatUsed",    floatUsed);
        DECLARE("vectorUsed",   vectorUsed);
@@ -104,10 +95,13 @@ int main(int argc, char *argv[])
        DECLARE("vectorCngbit", vectorCngbit);
        DECLARE("userProtKey",  userProtKey);
        DECLARE("userProtKeybit",       userProtKeybit);
+       DECLARE("trapUnalign",  trapUnalign);
+       DECLARE("trapUnalignbit",       trapUnalignbit);
+       DECLARE("notifyUnalign",        notifyUnalign);
+       DECLARE("notifyUnalignbit",     notifyUnalignbit);
 
        DECLARE("bbThread",             bbThread);
        DECLARE("bbThreadbit",  bbThreadbit);
-       DECLARE("bbNoMachSC",   bbNoMachSC);
        DECLARE("bbNoMachSCbit",bbNoMachSCbit);
        DECLARE("bbPreemptive", bbPreemptive);
        DECLARE("bbPreemptivebit",      bbPreemptivebit);
@@ -118,8 +112,6 @@ int main(int argc, char *argv[])
        DECLARE("FamVMenabit",          FamVMenabit);
        DECLARE("FamVMmode",            FamVMmode);
        DECLARE("FamVMmodebit",         FamVMmodebit);
-       DECLARE("perfMonitor",          perfMonitor);
-       DECLARE("perfMonitorbit",       perfMonitorbit);
 
        /* Per Proc info structure */
        DECLARE("PP_CPU_NUMBER",                offsetof(struct per_proc_info *, cpu_number));
@@ -128,10 +120,14 @@ int main(int argc, char *argv[])
        DECLARE("PP_INTSTACK_TOP_SS",   offsetof(struct per_proc_info *, intstack_top_ss));
        DECLARE("PP_DEBSTACKPTR",               offsetof(struct per_proc_info *, debstackptr));
        DECLARE("PP_DEBSTACK_TOP_SS",   offsetof(struct per_proc_info *, debstack_top_ss));
+       DECLARE("PP_TEMPWORK1",                 offsetof(struct per_proc_info *, tempwork1));
+       DECLARE("PP_USERSPACE",                 offsetof(struct per_proc_info *, userspace));
+       DECLARE("PP_USERPMAP",                  offsetof(struct per_proc_info *, userpmap));
+       DECLARE("PP_LASTPMAP",                  offsetof(struct per_proc_info *, Lastpmap));
        DECLARE("FPUowner",                             offsetof(struct per_proc_info *, FPU_owner));
        DECLARE("VMXowner",                             offsetof(struct per_proc_info *, VMX_owner));
-       DECLARE("holdQFret",                    offsetof(struct per_proc_info *, holdQFret));
 
+       DECLARE("PP_SAVE_EXCEPTION_TYPE", offsetof(struct per_proc_info *, save_exception_type));
        DECLARE("PP_ACTIVE_KLOADED",    offsetof(struct per_proc_info *, active_kloaded));
        DECLARE("PP_ACTIVE_STACKS",     offsetof(struct per_proc_info *, active_stacks));
        DECLARE("PP_NEED_AST",                  offsetof(struct per_proc_info *, need_ast));
@@ -140,8 +136,11 @@ int main(int argc, char *argv[])
        DECLARE("lclfreecnt",                   offsetof(struct per_proc_info *, lclfreecnt));
        DECLARE("PP_INTS_ENABLED",              offsetof(struct per_proc_info *, interrupts_enabled));
        DECLARE("UAW",                                  offsetof(struct per_proc_info *, Uassist));
+       DECLARE("VMMareaPhys",                  offsetof(struct per_proc_info *, VMMareaPhys));
+       DECLARE("FAMintercept",                 offsetof(struct per_proc_info *, FAMintercept));
        DECLARE("next_savearea",                offsetof(struct per_proc_info *, next_savearea));
        DECLARE("PP_ACTIVE_THREAD",     offsetof(struct per_proc_info *, pp_active_thread));
+       DECLARE("PP_PREEMPT_CNT",               offsetof(struct per_proc_info *, pp_preemption_count));
        DECLARE("PP_SIMPLE_LOCK_CNT",   offsetof(struct per_proc_info *, pp_simple_lock_count));
        DECLARE("PP_INTERRUPT_LVL",             offsetof(struct per_proc_info *, pp_interrupt_level));
        DECLARE("ppbbTaskEnv",                  offsetof(struct per_proc_info *, ppbbTaskEnv));
@@ -165,20 +164,30 @@ int main(int argc, char *argv[])
        DECLARE("pfCanNapb",                    pfCanNapb);
        DECLARE("pfCanDoze",                    pfCanDoze);
        DECLARE("pfCanDozeb",                   pfCanDozeb);
+       DECLARE("pfCanDoze",                    pfCanDoze);
+       DECLARE("pfCanDozeb",                   pfCanDozeb);
        DECLARE("pfThermal",                    pfThermal);
        DECLARE("pfThermalb",                   pfThermalb);
        DECLARE("pfThermInt",                   pfThermInt);
        DECLARE("pfThermIntb",                  pfThermIntb);
+       DECLARE("pfWillNap",                    pfWillNap);
+       DECLARE("pfWillNapb",                   pfWillNapb);
+       DECLARE("pfNoMSRir",                    pfNoMSRir);
+       DECLARE("pfNoMSRirb",                   pfNoMSRirb);
+       DECLARE("pfNoL2PFNap",                          pfNoL2PFNap);
+       DECLARE("pfNoL2PFNapb",                         pfNoL2PFNapb);
        DECLARE("pfSlowNap",                            pfSlowNap);
        DECLARE("pfSlowNapb",                           pfSlowNapb);
        DECLARE("pfNoMuMMCK",                           pfNoMuMMCK);
        DECLARE("pfNoMuMMCKb",                          pfNoMuMMCKb);
-       DECLARE("pfNoL2PFNap",                          pfNoL2PFNap);
-       DECLARE("pfNoL2PFNapb",                         pfNoL2PFNapb);
-       DECLARE("pfSCOMFixUp",                          pfSCOMFixUp);
-       DECLARE("pfSCOMFixUpb",                         pfSCOMFixUpb);
-    DECLARE("pfHasDcba",                       pfHasDcba);
-       DECLARE("pfHasDcbab",                   pfHasDcbab);
+       DECLARE("pfLClck",                              pfLClck);
+       DECLARE("pfLClckb",                             pfLClckb);
+       DECLARE("pfL3pdet",                             pfL3pdet);
+       DECLARE("pfL3pdetb",                    pfL3pdetb);
+       DECLARE("pfL1i",                                pfL1i);
+       DECLARE("pfL1ib",                               pfL1ib);
+       DECLARE("pfL1d",                                pfL1d);
+       DECLARE("pfL1db",                               pfL1db);
        DECLARE("pfL1fa",                               pfL1fa);
        DECLARE("pfL1fab",                              pfL1fab);
        DECLARE("pfL2",                                 pfL2);
@@ -187,20 +196,6 @@ int main(int argc, char *argv[])
        DECLARE("pfL2fab",                              pfL2fab);
        DECLARE("pfL2i",                                pfL2i);
        DECLARE("pfL2ib",                               pfL2ib);
-       DECLARE("pfLClck",                              pfLClck);
-       DECLARE("pfLClckb",                             pfLClckb);
-       DECLARE("pfWillNap",                    pfWillNap);
-       DECLARE("pfWillNapb",                   pfWillNapb);
-       DECLARE("pfNoMSRir",                    pfNoMSRir);
-       DECLARE("pfNoMSRirb",                   pfNoMSRirb);
-       DECLARE("pfL3pdet",                             pfL3pdet);
-       DECLARE("pfL3pdetb",                    pfL3pdetb);
-    DECLARE("pf128Byte",                       pf128Byte);
-    DECLARE("pf128Byteb",                      pf128Byteb);
-    DECLARE("pf32Byte",                                pf32Byte);
-    DECLARE("pf32Byteb",                       pf32Byteb);
-    DECLARE("pf64Bit",                         pf64Bit);
-    DECLARE("pf64Bitb",                                pf64Bitb);
        DECLARE("pfL3",                                 pfL3);
        DECLARE("pfL3b",                                pfL3b);
        DECLARE("pfL3fa",                               pfL3fa);
@@ -219,8 +214,6 @@ int main(int argc, char *argv[])
        DECLARE("pfHID1",                               offsetof(struct per_proc_info *, pf.pfHID1));
        DECLARE("pfHID2",                               offsetof(struct per_proc_info *, pf.pfHID2));
        DECLARE("pfHID3",                               offsetof(struct per_proc_info *, pf.pfHID3));
-       DECLARE("pfHID4",                               offsetof(struct per_proc_info *, pf.pfHID4));
-       DECLARE("pfHID5",                               offsetof(struct per_proc_info *, pf.pfHID5));
        DECLARE("pfMSSCR0",                     offsetof(struct per_proc_info *, pf.pfMSSCR0));
        DECLARE("pfMSSCR1",                     offsetof(struct per_proc_info *, pf.pfMSSCR1));
        DECLARE("pfICTRL",                              offsetof(struct per_proc_info *, pf.pfICTRL));
@@ -229,9 +222,6 @@ int main(int argc, char *argv[])
        DECLARE("pfl2crOriginal",               offsetof(struct per_proc_info *, pf.l2crOriginal));
        DECLARE("pfl3crOriginal",               offsetof(struct per_proc_info *, pf.l3crOriginal));
        DECLARE("pfBootConfig",                 offsetof(struct per_proc_info *, pf.pfBootConfig));
-       DECLARE("pfPTEG",                               offsetof(struct per_proc_info *, pf.pfPTEG));
-       DECLARE("pfMaxVAddr",                   offsetof(struct per_proc_info *, pf.pfMaxVAddr));
-       DECLARE("pfMaxPAddr",                   offsetof(struct per_proc_info *, pf.pfMaxPAddr));
        DECLARE("pfSize",                               sizeof(procFeatures));
        
        DECLARE("thrmmaxTemp",                  offsetof(struct per_proc_info *, thrm.maxTemp));
@@ -241,52 +231,8 @@ int main(int argc, char *argv[])
        DECLARE("thrm3val",                     offsetof(struct per_proc_info *, thrm.thrm3val));
        DECLARE("thrmSize",                     sizeof(thrmControl));
 
-       DECLARE("validSegs",                    offsetof(struct per_proc_info *, validSegs));
-       DECLARE("ppUserPmapVirt",               offsetof(struct per_proc_info *, ppUserPmapVirt));
-       DECLARE("ppUserPmap",                   offsetof(struct per_proc_info *, ppUserPmap));
-       DECLARE("ppMapFlags",                   offsetof(struct per_proc_info *, ppMapFlags));
-       DECLARE("ppInvSeg",                     offsetof(struct per_proc_info *, ppInvSeg));
-       DECLARE("ppCurSeg",                     offsetof(struct per_proc_info *, ppCurSeg));
-       DECLARE("ppSegSteal",                   offsetof(struct per_proc_info *, ppSegSteal));
-
-       DECLARE("VMMareaPhys",                  offsetof(struct per_proc_info *, VMMareaPhys));
-       DECLARE("VMMXAFlgs",                    offsetof(struct per_proc_info *, VMMXAFlgs));
-       DECLARE("FAMintercept",                 offsetof(struct per_proc_info *, FAMintercept));
-
-       DECLARE("ppCIOmp",                              offsetof(struct per_proc_info *, ppCIOmp));
-
-       DECLARE("tempr0",                               offsetof(struct per_proc_info *, tempr0));
-       DECLARE("tempr1",                               offsetof(struct per_proc_info *, tempr1));
-       DECLARE("tempr2",                               offsetof(struct per_proc_info *, tempr2));
-       DECLARE("tempr3",                               offsetof(struct per_proc_info *, tempr3));
-       DECLARE("tempr4",                               offsetof(struct per_proc_info *, tempr4));
-       DECLARE("tempr5",                               offsetof(struct per_proc_info *, tempr5));
-       DECLARE("tempr6",                               offsetof(struct per_proc_info *, tempr6));
-       DECLARE("tempr7",                               offsetof(struct per_proc_info *, tempr7));
-       DECLARE("tempr8",                               offsetof(struct per_proc_info *, tempr8));
-       DECLARE("tempr9",                               offsetof(struct per_proc_info *, tempr9));
-       DECLARE("tempr10",                              offsetof(struct per_proc_info *, tempr10));
-       DECLARE("tempr11",                              offsetof(struct per_proc_info *, tempr11));
-       DECLARE("tempr12",                              offsetof(struct per_proc_info *, tempr12));
-       DECLARE("tempr13",                              offsetof(struct per_proc_info *, tempr13));
-       DECLARE("tempr14",                              offsetof(struct per_proc_info *, tempr14));
-       DECLARE("tempr15",                              offsetof(struct per_proc_info *, tempr15));
-       DECLARE("tempr16",                              offsetof(struct per_proc_info *, tempr16));
-       DECLARE("tempr17",                              offsetof(struct per_proc_info *, tempr17));
-       DECLARE("tempr18",                              offsetof(struct per_proc_info *, tempr18));
-       DECLARE("tempr19",                              offsetof(struct per_proc_info *, tempr19));
-       DECLARE("tempr20",                              offsetof(struct per_proc_info *, tempr20));
-       DECLARE("tempr21",                              offsetof(struct per_proc_info *, tempr21));
-       DECLARE("tempr22",                              offsetof(struct per_proc_info *, tempr22));
-       DECLARE("tempr23",                              offsetof(struct per_proc_info *, tempr23));
-       DECLARE("tempr24",                              offsetof(struct per_proc_info *, tempr24));
-       DECLARE("tempr25",                              offsetof(struct per_proc_info *, tempr25));
-       DECLARE("tempr26",                              offsetof(struct per_proc_info *, tempr26));
-       DECLARE("tempr27",                              offsetof(struct per_proc_info *, tempr27));
-       DECLARE("tempr28",                              offsetof(struct per_proc_info *, tempr28));
-       DECLARE("tempr29",                              offsetof(struct per_proc_info *, tempr29));
-       DECLARE("tempr30",                              offsetof(struct per_proc_info *, tempr30));
-       DECLARE("tempr31",                              offsetof(struct per_proc_info *, tempr31));
+       DECLARE("napStamp",                     offsetof(struct per_proc_info *, napStamp));
+       DECLARE("napTotal",                     offsetof(struct per_proc_info *, napTotal));
 
        DECLARE("emfp0",                                offsetof(struct per_proc_info *, emfp0));
        DECLARE("emfp1",                                offsetof(struct per_proc_info *, emfp1));
@@ -356,92 +302,9 @@ int main(int argc, char *argv[])
        DECLARE("emvr30",                               offsetof(struct per_proc_info *, emvr30));
        DECLARE("emvr31",                               offsetof(struct per_proc_info *, emvr31));
        DECLARE("empadvr",                              offsetof(struct per_proc_info *, empadvr));
-       DECLARE("skipListPrev",                 offsetof(struct per_proc_info *, skipListPrev));
        DECLARE("ppSize",                               sizeof(struct per_proc_info));
        DECLARE("patcharea",                    offsetof(struct per_proc_info *, patcharea));
 
-       DECLARE("hwCounts",                             offsetof(struct per_proc_info *, hwCtr));
-       DECLARE("hwInVains",                    offsetof(struct per_proc_info *, hwCtr.hwInVains));
-       DECLARE("hwResets",                             offsetof(struct per_proc_info *, hwCtr.hwResets));
-       DECLARE("hwMachineChecks",              offsetof(struct per_proc_info *, hwCtr.hwMachineChecks));
-       DECLARE("hwDSIs",                               offsetof(struct per_proc_info *, hwCtr.hwDSIs));
-       DECLARE("hwISIs",                               offsetof(struct per_proc_info *, hwCtr.hwISIs));
-       DECLARE("hwExternals",                  offsetof(struct per_proc_info *, hwCtr.hwExternals));
-       DECLARE("hwAlignments",                 offsetof(struct per_proc_info *, hwCtr.hwAlignments));
-       DECLARE("hwPrograms",                   offsetof(struct per_proc_info *, hwCtr.hwPrograms));
-       DECLARE("hwFloatPointUnavailable",      offsetof(struct per_proc_info *, hwCtr.hwFloatPointUnavailable));
-       DECLARE("hwDecrementers",               offsetof(struct per_proc_info *, hwCtr.hwDecrementers));
-       DECLARE("hwIOErrors",                   offsetof(struct per_proc_info *, hwCtr.hwIOErrors));
-       DECLARE("hwrsvd0",                              offsetof(struct per_proc_info *, hwCtr.hwrsvd0));
-       DECLARE("hwSystemCalls",                offsetof(struct per_proc_info *, hwCtr.hwSystemCalls));
-       DECLARE("hwTraces",                             offsetof(struct per_proc_info *, hwCtr.hwTraces));
-       DECLARE("hwFloatingPointAssists",       offsetof(struct per_proc_info *, hwCtr.hwFloatingPointAssists));
-       DECLARE("hwPerformanceMonitors",        offsetof(struct per_proc_info *, hwCtr.hwPerformanceMonitors));
-       DECLARE("hwAltivecs",                   offsetof(struct per_proc_info *, hwCtr.hwAltivecs));
-       DECLARE("hwrsvd1",                              offsetof(struct per_proc_info *, hwCtr.hwrsvd1));
-       DECLARE("hwrsvd2",                              offsetof(struct per_proc_info *, hwCtr.hwrsvd2));
-       DECLARE("hwrsvd3",                              offsetof(struct per_proc_info *, hwCtr.hwrsvd3));
-       DECLARE("hwInstBreakpoints",    offsetof(struct per_proc_info *, hwCtr.hwInstBreakpoints));
-       DECLARE("hwSystemManagements",  offsetof(struct per_proc_info *, hwCtr.hwSystemManagements));
-       DECLARE("hwAltivecAssists",             offsetof(struct per_proc_info *, hwCtr.hwAltivecAssists));
-       DECLARE("hwThermal",                    offsetof(struct per_proc_info *, hwCtr.hwThermal));
-       DECLARE("hwrsvd5",                              offsetof(struct per_proc_info *, hwCtr.hwrsvd5));
-       DECLARE("hwrsvd6",                              offsetof(struct per_proc_info *, hwCtr.hwrsvd6));
-       DECLARE("hwrsvd7",                              offsetof(struct per_proc_info *, hwCtr.hwrsvd7));
-       DECLARE("hwrsvd8",                              offsetof(struct per_proc_info *, hwCtr.hwrsvd8));
-       DECLARE("hwrsvd9",                              offsetof(struct per_proc_info *, hwCtr.hwrsvd9));
-       DECLARE("hwrsvd10",                             offsetof(struct per_proc_info *, hwCtr.hwrsvd10));
-       DECLARE("hwrsvd11",                             offsetof(struct per_proc_info *, hwCtr.hwrsvd11));
-       DECLARE("hwrsvd12",                             offsetof(struct per_proc_info *, hwCtr.hwrsvd12));
-       DECLARE("hwrsvd13",                             offsetof(struct per_proc_info *, hwCtr.hwrsvd13));
-       DECLARE("hwTrace601",                   offsetof(struct per_proc_info *, hwCtr.hwTrace601));
-       DECLARE("hwSIGPs",                              offsetof(struct per_proc_info *, hwCtr.hwSIGPs));
-       DECLARE("hwPreemptions",                offsetof(struct per_proc_info *, hwCtr.hwPreemptions));
-       DECLARE("hwContextSwitchs",             offsetof(struct per_proc_info *, hwCtr.hwContextSwitchs));
-       DECLARE("hwShutdowns",                  offsetof(struct per_proc_info *, hwCtr.hwShutdowns));
-       DECLARE("hwChokes",                             offsetof(struct per_proc_info *, hwCtr.hwChokes));
-       DECLARE("hwDataSegments",               offsetof(struct per_proc_info *, hwCtr.hwDataSegments));
-       DECLARE("hwInstructionSegments",        offsetof(struct per_proc_info *, hwCtr.hwInstructionSegments));
-       DECLARE("hwSoftPatches",                offsetof(struct per_proc_info *, hwCtr.hwSoftPatches));
-       DECLARE("hwMaintenances",               offsetof(struct per_proc_info *, hwCtr.hwMaintenances));
-       DECLARE("hwInstrumentations",   offsetof(struct per_proc_info *, hwCtr.hwInstrumentations));
-       DECLARE("hwRedrives",                   offsetof(struct per_proc_info *, hwCtr.hwRedrives));
-       DECLARE("hwSteals",                             offsetof(struct per_proc_info *, hwCtr.hwSteals));
-
-       DECLARE("hwMckHang",                    offsetof(struct per_proc_info *, hwCtr.hwMckHang));
-       DECLARE("hwMckSLBPE",                   offsetof(struct per_proc_info *, hwCtr.hwMckSLBPE));
-       DECLARE("hwMckTLBPE",                   offsetof(struct per_proc_info *, hwCtr.hwMckTLBPE));
-       DECLARE("hwMckERCPE",                   offsetof(struct per_proc_info *, hwCtr.hwMckERCPE));
-       DECLARE("hwMckL1DPE",                   offsetof(struct per_proc_info *, hwCtr.hwMckL1DPE));
-       DECLARE("hwMckL1TPE",                   offsetof(struct per_proc_info *, hwCtr.hwMckL1TPE));
-       DECLARE("hwMckUE",                              offsetof(struct per_proc_info *, hwCtr.hwMckUE));
-       DECLARE("hwMckIUE",                             offsetof(struct per_proc_info *, hwCtr.hwMckIUE));
-       DECLARE("hwMckIUEr",                    offsetof(struct per_proc_info *, hwCtr.hwMckIUEr));
-       DECLARE("hwMckDUE",                             offsetof(struct per_proc_info *, hwCtr.hwMckDUE));
-       DECLARE("hwMckDTW",                             offsetof(struct per_proc_info *, hwCtr.hwMckDTW));
-       DECLARE("hwMckUnk",                             offsetof(struct per_proc_info *, hwCtr.hwMckUnk));
-       DECLARE("hwMckExt",                             offsetof(struct per_proc_info *, hwCtr.hwMckExt));
-       DECLARE("hwMckICachePE",                offsetof(struct per_proc_info *, hwCtr.hwMckICachePE));
-       DECLARE("hwMckITagPE",                  offsetof(struct per_proc_info *, hwCtr.hwMckITagPE));
-       DECLARE("hwMckIEratPE",                 offsetof(struct per_proc_info *, hwCtr.hwMckIEratPE));
-       DECLARE("hwMckDEratPE",                 offsetof(struct per_proc_info *, hwCtr.hwMckDEratPE));
-
-       DECLARE("napStamp",                     offsetof(struct per_proc_info *, hwCtr.napStamp));
-       DECLARE("napTotal",                     offsetof(struct per_proc_info *, hwCtr.napTotal));
-
-       DECLARE("patchAddr",                    offsetof(struct patch_entry *, addr));
-       DECLARE("patchData",                    offsetof(struct patch_entry *, data));
-       DECLARE("patchType",                    offsetof(struct patch_entry *, type));
-       DECLARE("patchValue",                   offsetof(struct patch_entry *, value));
-       DECLARE("peSize",                               sizeof(patch_entry_t));
-       DECLARE("PATCH_PROCESSOR",              PATCH_PROCESSOR);
-       DECLARE("PATCH_FEATURE",                PATCH_FEATURE);
-       DECLARE("PATCH_TABLE_SIZE",             PATCH_TABLE_SIZE);
-       DECLARE("PatchExt32",                   PatchExt32);
-       DECLARE("PatchExt32b",                  PatchExt32b);
-       DECLARE("PatchLwsync",                  PatchLwsync);
-       DECLARE("PatchLwsyncb",                 PatchLwsyncb);
-
        DECLARE("RESETHANDLER_TYPE",    offsetof(struct resethandler *, type));
        DECLARE("RESETHANDLER_CALL",    offsetof(struct resethandler *, call_paddr));
        DECLARE("RESETHANDLER_ARG",     offsetof(struct resethandler *, arg__paddr));
@@ -490,11 +353,9 @@ int main(int argc, char *argv[])
        DECLARE("FPUsave",                              offsetof(struct facility_context *,FPUsave));
        DECLARE("FPUlevel",                             offsetof(struct facility_context *,FPUlevel));
        DECLARE("FPUcpu",                               offsetof(struct facility_context *,FPUcpu));
-       DECLARE("FPUsync",                              offsetof(struct facility_context *,FPUsync));
        DECLARE("VMXsave",                              offsetof(struct facility_context *,VMXsave));
        DECLARE("VMXlevel",                             offsetof(struct facility_context *,VMXlevel));
        DECLARE("VMXcpu",                               offsetof(struct facility_context *,VMXcpu));
-       DECLARE("VMXsync",                              offsetof(struct facility_context *,VMXsync));
        DECLARE("facAct",                               offsetof(struct facility_context *,facAct));
 
        /* Values from vmachmon.h */
@@ -512,21 +373,9 @@ int main(int argc, char *argv[])
        DECLARE("kVmmGetFloatState",    kVmmGetFloatState);
        DECLARE("kVmmGetVectorState",   kVmmGetVectorState);
        DECLARE("kVmmSetTimer",                 kVmmSetTimer);
-       DECLARE("kVmmGetTimer",                 kVmmGetTimer);
        DECLARE("kVmmExecuteVM",                kVmmExecuteVM);
        DECLARE("kVmmProtectPage",              kVmmProtectPage);
-       DECLARE("kVmmMapList",                  kVmmMapList);
-       DECLARE("kVmmUnmapList",                kVmmUnmapList);
-       DECLARE("kVmmSetXA",                    kVmmSetXA);
-       DECLARE("kVmmGetXA",                    kVmmGetXA);
-       DECLARE("kVmmMapPage64",                kVmmMapPage64);
-       DECLARE("kVmmGetPageMapping64", kVmmGetPageMapping64);
-       DECLARE("kVmmUnmapPage64",              kVmmUnmapPage64);
-       DECLARE("kVmmGetPageDirtyFlag64",       kVmmGetPageDirtyFlag64);
-       DECLARE("kVmmMapExecute64",     kVmmMapExecute64);
-       DECLARE("kVmmProtectExecute64", kVmmProtectExecute64);
-       DECLARE("kVmmMapList64",                kVmmMapList64);
-       DECLARE("kVmmUnmapList64",              kVmmUnmapList64);
+
        DECLARE("kvmmExitToHost",               kvmmExitToHost);
        DECLARE("kvmmResumeGuest",              kvmmResumeGuest);
        DECLARE("kvmmGetGuestRegister", kvmmGetGuestRegister);
@@ -541,7 +390,6 @@ int main(int argc, char *argv[])
        DECLARE("kVmmReturnProgramException",   kVmmReturnProgramException);
        DECLARE("kVmmReturnSystemCall",         kVmmReturnSystemCall);
        DECLARE("kVmmReturnTraceException",     kVmmReturnTraceException);
-       DECLARE("kVmmInvalidAdSpace",   kVmmInvalidAdSpace);
 
        DECLARE("kVmmProtXtnd",                 kVmmProtXtnd);
        DECLARE("kVmmProtNARW",                 kVmmProtNARW);
@@ -550,167 +398,97 @@ int main(int argc, char *argv[])
        DECLARE("kVmmProtRORO",                 kVmmProtRORO);
        
        DECLARE("vmmFlags",                             offsetof(struct vmmCntrlEntry *, vmmFlags));
-       DECLARE("vmmXAFlgs",                    offsetof(struct vmmCntrlEntry *, vmmXAFlgs));
-       DECLARE("vmmPmap",                              offsetof(struct vmmCntrlEntry *, vmmPmap));
        DECLARE("vmmInUseb",                    vmmInUseb);
        DECLARE("vmmInUse",                             vmmInUse);
+       DECLARE("vmmPmap",                              offsetof(struct vmmCntrlEntry *, vmmPmap));
        DECLARE("vmmContextKern",               offsetof(struct vmmCntrlEntry *, vmmContextKern));
        DECLARE("vmmContextPhys",               offsetof(struct vmmCntrlEntry *, vmmContextPhys));
        DECLARE("vmmContextUser",               offsetof(struct vmmCntrlEntry *, vmmContextUser));
        DECLARE("vmmFacCtx",                    offsetof(struct vmmCntrlEntry *, vmmFacCtx));
-       DECLARE("vmmLastMap",                   offsetof(struct vmmCntrlTable *, vmmLastMap));
-       DECLARE("vmmGFlags",                    offsetof(struct vmmCntrlTable *, vmmGFlags));
-       DECLARE("vmmc",                                 offsetof(struct vmmCntrlTable *, vmmc));
-       DECLARE("vmmAdsp",                              offsetof(struct vmmCntrlTable *, vmmAdsp));
-       DECLARE("vmmLastAdSp",                  vmmLastAdSp);
+       DECLARE("vmmLastMap",                   offsetof(struct vmmCntrlEntry *, vmmLastMap));
        DECLARE("vmmFAMintercept",              offsetof(struct vmmCntrlEntry *, vmmFAMintercept));
        DECLARE("vmmCEntrySize",                sizeof(struct vmmCntrlEntry));
-       DECLARE("kVmmMaxContexts",              kVmmMaxContexts);
+       DECLARE("kVmmMaxContextsPerThread",             kVmmMaxContextsPerThread);
        
        DECLARE("interface_version",    offsetof(struct vmm_state_page_t *, interface_version));
        DECLARE("thread_index",                 offsetof(struct vmm_state_page_t *, thread_index));
        DECLARE("vmmStat",                              offsetof(struct vmm_state_page_t *, vmmStat));
        DECLARE("vmmCntrl",                             offsetof(struct vmm_state_page_t *, vmmCntrl));
-       DECLARE("vmm_proc_state",               offsetof(struct vmm_state_page_t *, vmm_proc_state));
-
        DECLARE("return_code",                  offsetof(struct vmm_state_page_t *, return_code));
-
-       DECLARE("return_params",                offsetof(struct vmm_state_page_t *, vmmRet.vmmrp32.return_params));
-       DECLARE("return_paramsX",               offsetof(struct vmm_state_page_t *, vmmRet.vmmrp64.return_params));
-
-#if 0
        DECLARE("return_params",                offsetof(struct vmm_state_page_t *, return_params));
        DECLARE("vmm_proc_state",               offsetof(struct vmm_state_page_t *, vmm_proc_state));
-#endif
        DECLARE("vmmppcVRs",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcVRs));
        DECLARE("vmmppcVSCR",                   offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcVSCR));
+       DECLARE("vmmppcVSCRshadow",             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcVSCRshadow));
        DECLARE("vmmppcFPRs",                   offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcFPRs));
        DECLARE("vmmppcFPSCR",                  offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcFPSCR));
-
-       DECLARE("vmmppcpc",                             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcPC));
-       DECLARE("vmmppcmsr",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcMSR));
-       DECLARE("vmmppcr0",                             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x00));
-       DECLARE("vmmppcr1",                             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x04));
-       DECLARE("vmmppcr2",                             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x08));
-       DECLARE("vmmppcr3",                             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x0C));
-       DECLARE("vmmppcr4",                             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x10));
-       DECLARE("vmmppcr5",                             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x14));
-
-       DECLARE("vmmppcr6",                             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x18));
-       DECLARE("vmmppcr7",                             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x1C));
-       DECLARE("vmmppcr8",                             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x20));
-       DECLARE("vmmppcr9",                             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x24));
-       DECLARE("vmmppcr10",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x28));
-       DECLARE("vmmppcr11",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x2C));
-       DECLARE("vmmppcr12",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x30));
-       DECLARE("vmmppcr13",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x34));
-
-       DECLARE("vmmppcr14",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x38));
-       DECLARE("vmmppcr15",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x3C));
-       DECLARE("vmmppcr16",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x40));
-       DECLARE("vmmppcr17",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x44));
-       DECLARE("vmmppcr18",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x48));
-       DECLARE("vmmppcr19",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x4C));
-       DECLARE("vmmppcr20",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x50));
-       DECLARE("vmmppcr21",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x54));
-
-       DECLARE("vmmppcr22",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x58));
-       DECLARE("vmmppcr23",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x5C));
-       DECLARE("vmmppcr24",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x60));
-       DECLARE("vmmppcr25",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x64));
-       DECLARE("vmmppcr26",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x68));
-       DECLARE("vmmppcr27",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x6C));
-       DECLARE("vmmppcr28",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x70));
-       DECLARE("vmmppcr29",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x74));
-
-       DECLARE("vmmppcr30",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x78));
-       DECLARE("vmmppcr31",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x7C));
-       DECLARE("vmmppccr",                             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcCR));
-       DECLARE("vmmppcxer",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcXER));
-       DECLARE("vmmppclr",                             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcLR));
-       DECLARE("vmmppcctr",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcCTR));
-       DECLARE("vmmppcmq",                             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcMQ));
-       DECLARE("vmmppcvrsave",                 offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcVRSave));       
-
-       DECLARE("vmmppcXpc",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcPC));
-       DECLARE("vmmppcXmsr",                   offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcMSR));
-       DECLARE("vmmppcXr0",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x00));
-       DECLARE("vmmppcXr1",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x08));
-       DECLARE("vmmppcXr2",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x10));
-       DECLARE("vmmppcXr3",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x18));
-       DECLARE("vmmppcXr4",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x20));
-       DECLARE("vmmppcXr5",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x28));
-
-       DECLARE("vmmppcXr6",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x30));
-       DECLARE("vmmppcXr7",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x38));
-       DECLARE("vmmppcXr8",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x40));
-       DECLARE("vmmppcXr9",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x48));
-       DECLARE("vmmppcXr10",                   offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x50));
-       DECLARE("vmmppcXr11",                   offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x58));
-       DECLARE("vmmppcXr12",                   offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x60));
-       DECLARE("vmmppcXr13",                   offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x68));
-
-       DECLARE("vmmppcXr14",                   offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x70));
-       DECLARE("vmmppcXr15",                   offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x78));
-       DECLARE("vmmppcXr16",                   offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x80));
-       DECLARE("vmmppcXr17",                   offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x88));
-       DECLARE("vmmppcXr18",                   offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x90));
-       DECLARE("vmmppcXr19",                   offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x98));
-       DECLARE("vmmppcXr20",                   offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0xA0));
-       DECLARE("vmmppcXr21",                   offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0xA8));
-
-       DECLARE("vmmppcXr22",                   offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0xB0));
-       DECLARE("vmmppcXr23",                   offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0xB8));
-       DECLARE("vmmppcXr24",                   offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0xC0));
-       DECLARE("vmmppcXr25",                   offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0xC8));
-       DECLARE("vmmppcXr26",                   offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0xD0));
-       DECLARE("vmmppcXr27",                   offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0xD8));
-       DECLARE("vmmppcXr28",                   offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0xE0));
-       DECLARE("vmmppcXr29",                   offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0xE8));
-
-       DECLARE("vmmppcXr30",                   offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0xF0));
-       DECLARE("vmmppcXr31",                   offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0xF8));
-       DECLARE("vmmppcXcr",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcCR));
-       DECLARE("vmmppcXxer",                   offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcXER));
-       DECLARE("vmmppcXlr",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcLR));
-       DECLARE("vmmppcXctr",                   offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcCTR));
-       DECLARE("vmmppcXvrsave",                offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcVRSave));       
+       DECLARE("vmmppcFPSCRshadow",    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcFPSCRshadow));
+
+       DECLARE("vmmppcpc",                             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcPC));
+       DECLARE("vmmppcmsr",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcMSR));
+       DECLARE("vmmppcr0",                             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x00));
+       DECLARE("vmmppcr1",                             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x04));
+       DECLARE("vmmppcr2",                             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x08));
+       DECLARE("vmmppcr3",                             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x0C));
+       DECLARE("vmmppcr4",                             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x10));
+       DECLARE("vmmppcr5",                             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x14));
+
+       DECLARE("vmmppcr6",                             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x18));
+       DECLARE("vmmppcr7",                             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x1C));
+       DECLARE("vmmppcr8",                             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x20));
+       DECLARE("vmmppcr9",                             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x24));
+       DECLARE("vmmppcr10",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x28));
+       DECLARE("vmmppcr11",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x2C));
+       DECLARE("vmmppcr12",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x30));
+       DECLARE("vmmppcr13",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x34));
+
+       DECLARE("vmmppcr14",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x38));
+       DECLARE("vmmppcr15",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x3C));
+       DECLARE("vmmppcr16",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x40));
+       DECLARE("vmmppcr17",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x44));
+       DECLARE("vmmppcr18",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x48));
+       DECLARE("vmmppcr19",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x4C));
+       DECLARE("vmmppcr20",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x50));
+       DECLARE("vmmppcr21",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x54));
+
+       DECLARE("vmmppcr22",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x58));
+       DECLARE("vmmppcr23",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x5C));
+       DECLARE("vmmppcr24",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x60));
+       DECLARE("vmmppcr25",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x64));
+       DECLARE("vmmppcr26",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x68));
+       DECLARE("vmmppcr27",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x6C));
+       DECLARE("vmmppcr28",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x70));
+       DECLARE("vmmppcr29",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x74));
+
+       DECLARE("vmmppcr30",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x78));
+       DECLARE("vmmppcr31",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcGPRs+0x7C));
+       DECLARE("vmmppccr",                             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcCR));
+       DECLARE("vmmppcxer",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcXER));
+       DECLARE("vmmppclr",                             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcLR));
+       DECLARE("vmmppcctr",                    offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcCTR));
+       DECLARE("vmmppcmq",                             offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcMQ));
+       DECLARE("vmmppcvrsave",                 offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcVRSave)); 
 
        DECLARE("vmmppcvscr",                   offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcVSCR+0x00));      
        DECLARE("vmmppcfpscrpad",               offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcFPSCR));
        DECLARE("vmmppcfpscr",                  offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcFPSCR+4));
 
-       DECLARE("famguestr0",                   offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.guest_register));
-       DECLARE("famguestr1",                   offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.guest_register+0x4));
-       DECLARE("famguestr2",                   offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.guest_register+0x8));
-       DECLARE("famguestr3",                   offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.guest_register+0xC));
-       DECLARE("famguestr4",                   offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.guest_register+0x10));
-       DECLARE("famguestr5",                   offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.guest_register+0x14));
-       DECLARE("famguestr6",                   offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.guest_register+0x18));
-       DECLARE("famguestr7",                   offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.guest_register+0x1C));
-       DECLARE("famguestpc",                   offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.guest_pc));
-       DECLARE("famguestmsr",                  offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.guest_msr));
-       DECLARE("famdispcode",                  offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.fastassist_dispatch_code));
-       DECLARE("famrefcon",                    offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.fastassist_refcon));
-       DECLARE("famparam",                             offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.fastassist_parameter));
-       DECLARE("famhandler",                   offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.fastassist_dispatch));
-       DECLARE("famintercepts",                offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.fastassist_intercepts));
-
-       DECLARE("famguestXr0",                  offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.guest_register));
-       DECLARE("famguestXr1",                  offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.guest_register+0x8));
-       DECLARE("famguestXr2",                  offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.guest_register+0x10));
-       DECLARE("famguestXr3",                  offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.guest_register+0x18));
-       DECLARE("famguestXr4",                  offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.guest_register+0x20));
-       DECLARE("famguestXr5",                  offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.guest_register+0x28));
-       DECLARE("famguestXr6",                  offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.guest_register+0x30));
-       DECLARE("famguestXr7",                  offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.guest_register+0x38));
-       DECLARE("famguestXpc",                  offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.guest_pc));
-       DECLARE("famguestXmsr",                 offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.guest_msr));
-       DECLARE("famdispcodeX",                 offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.fastassist_dispatch_code));
-       DECLARE("famrefconX",                   offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.fastassist_refcon));
-       DECLARE("famparamX",                            offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.fastassist_parameter));
-       DECLARE("famhandlerX",                  offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.fastassist_dispatch));
-       DECLARE("faminterceptsX",               offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.fastassist_intercepts));
+       DECLARE("famguestr0",                   offsetof(struct vmm_state_page_t *, vmm_fastassist_state.guest_register));
+       DECLARE("famguestr1",                   offsetof(struct vmm_state_page_t *, vmm_fastassist_state.guest_register+0x4));
+       DECLARE("famguestr2",                   offsetof(struct vmm_state_page_t *, vmm_fastassist_state.guest_register+0x8));
+       DECLARE("famguestr3",                   offsetof(struct vmm_state_page_t *, vmm_fastassist_state.guest_register+0xC));
+       DECLARE("famguestr4",                   offsetof(struct vmm_state_page_t *, vmm_fastassist_state.guest_register+0x10));
+       DECLARE("famguestr5",                   offsetof(struct vmm_state_page_t *, vmm_fastassist_state.guest_register+0x14));
+       DECLARE("famguestr6",                   offsetof(struct vmm_state_page_t *, vmm_fastassist_state.guest_register+0x18));
+       DECLARE("famguestr7",                   offsetof(struct vmm_state_page_t *, vmm_fastassist_state.guest_register+0x1C));
+       DECLARE("famguestpc",                   offsetof(struct vmm_state_page_t *, vmm_fastassist_state.guest_pc));
+       DECLARE("famguestmsr",                  offsetof(struct vmm_state_page_t *, vmm_fastassist_state.guest_msr));
+
+       DECLARE("famdispcode",                  offsetof(struct vmm_state_page_t *, vmm_fastassist_state.fastassist_dispatch_code));
+       DECLARE("famrefcon",                    offsetof(struct vmm_state_page_t *, vmm_fastassist_state.fastassist_refcon));
+       DECLARE("famparam",                             offsetof(struct vmm_state_page_t *, vmm_fastassist_state.fastassist_parameter));
+       DECLARE("famhandler",                   offsetof(struct vmm_state_page_t *, vmm_fastassist_state.fastassist_dispatch));
+       DECLARE("famintercepts",                offsetof(struct vmm_state_page_t *, vmm_fastassist_state.fastassist_intercepts));
 
        DECLARE("vmmFloatCngd",                 vmmFloatCngd);
        DECLARE("vmmFloatCngdb",                vmmFloatCngdb);
@@ -718,6 +496,8 @@ int main(int argc, char *argv[])
        DECLARE("vmmVectCngdb",                 vmmVectCngdb);
        DECLARE("vmmTimerPop",                  vmmTimerPop);
        DECLARE("vmmTimerPopb",                 vmmTimerPopb);
+       DECLARE("vmmMapDone",                   vmmMapDone);
+       DECLARE("vmmMapDoneb",                  vmmMapDoneb);
        DECLARE("vmmFAMmode",                   vmmFAMmode);
        DECLARE("vmmFAMmodeb",                  vmmFAMmodeb);
        DECLARE("vmmSpfSave",                   vmmSpfSave);
@@ -732,15 +512,14 @@ int main(int argc, char *argv[])
        DECLARE("vmmVectVAssb",                 vmmVectVAssb);
        DECLARE("vmmXStart",                    vmmXStart);
        DECLARE("vmmXStartb",                   vmmXStartb);
-       DECLARE("vmmXStop",                             vmmXStop);
+       DECLARE("vmmXStop",                     vmmXStop);
        DECLARE("vmmXStopb",                    vmmXStopb);
-       DECLARE("vmmKey",                               vmmKey);
-       DECLARE("vmmKeyb",                              vmmKeyb);
+       DECLARE("vmmKey",                       vmmKey);
+       DECLARE("vmmKeyb",                      vmmKeyb);
        DECLARE("vmmFamSet",                    vmmFamSet);
        DECLARE("vmmFamSetb",                   vmmFamSetb);
        DECLARE("vmmFamEna",                    vmmFamEna);
        DECLARE("vmmFamEnab",                   vmmFamEnab);
-       DECLARE("vmm64Bit",                             vmm64Bit);
 
        /* values from kern/task.h */
        DECLARE("TASK_SYSCALLS_MACH",
@@ -752,50 +531,13 @@ int main(int argc, char *argv[])
        DECLARE("VMMAP_PMAP",   offsetof(struct vm_map *, pmap));
 
        /* values from machine/pmap.h */
-       DECLARE("pmapSpace",                    offsetof(struct pmap *, space));
-       DECLARE("spaceNum",                             offsetof(struct pmap *, spaceNum));
-       DECLARE("pmapSXlk",                             offsetof(struct pmap *, pmapSXlk));
-       DECLARE("pmapCCtl",                             offsetof(struct pmap *, pmapCCtl));
-    DECLARE("pmapCCtlVal",                     pmapCCtlVal);
-    DECLARE("pmapCCtlLck",                     pmapCCtlLck);
-    DECLARE("pmapCCtlLckb",                    pmapCCtlLckb);
-    DECLARE("pmapCCtlGen",                     pmapCCtlGen);
-    DECLARE("pmapSegCacheCnt",         pmapSegCacheCnt);
-    DECLARE("pmapSegCacheUse",         pmapSegCacheUse);
-       DECLARE("pmapvr",                               offsetof(struct pmap *, pmapvr));
-       DECLARE("pmapFlags",                    offsetof(struct pmap *, pmapFlags));
-    DECLARE("pmapKeys",                                pmapKeys);
-    DECLARE("pmapKeyDef",                      pmapKeyDef);
-       DECLARE("pmapSCSubTag",                 offsetof(struct pmap *, pmapSCSubTag));
-       DECLARE("pmapSegCache",                 offsetof(struct pmap *, pmapSegCache));
-       DECLARE("pmapCurLists",                 offsetof(struct pmap *, pmapCurLists));
-       DECLARE("pmapRandNum",                  offsetof(struct pmap *, pmapRandNum));
-       DECLARE("pmapSkipLists",                offsetof(struct pmap *, pmapSkipLists));
-       DECLARE("pmapSearchVisits",             offsetof(struct pmap *, pmapSearchVisits));
-       DECLARE("pmapSearchCnt",                offsetof(struct pmap *, pmapSearchCnt));
-       DECLARE("pmapSize",                             pmapSize);
-    DECLARE("kSkipListFanoutShift",    kSkipListFanoutShift);
-    DECLARE("kSkipListMaxLists",       kSkipListMaxLists);
-    DECLARE("invalSpace",                      invalSpace);
-
-       DECLARE("sgcESID",                              offsetof(struct sgc *, sgcESID));
-       DECLARE("sgcESmsk",                             sgcESmsk);
-       DECLARE("sgcVSID",                              offsetof(struct sgc *, sgcVSID));
-       DECLARE("sgcVSmsk",                             sgcVSmsk);
-       DECLARE("sgcVSKeys",                    sgcVSKeys);
-       DECLARE("sgcVSKeyUsr",                  sgcVSKeyUsr);
-       DECLARE("sgcVSNoEx",                    sgcVSNoEx);
-       DECLARE("pmapPAddr",                    offsetof(struct pmapTransTab *, pmapPAddr));
-       DECLARE("pmapVAddr",                    offsetof(struct pmapTransTab *, pmapVAddr));
-       DECLARE("pmapTransSize",                sizeof(pmapTransTab));
-       DECLARE("pmapResidentCnt",              offsetof(struct pmap *, stats.resident_count));
-
-       DECLARE("maxAdrSp",                             maxAdrSp);
-       DECLARE("maxAdrSpb",                    maxAdrSpb);
-
-       /* values from kern/processor.h */
-       DECLARE("psthreads",                    offsetof(struct processor_set *, threads));
-       DECLARE("psthreadcnt",                  offsetof(struct processor_set *, thread_count));
+       DECLARE("PMAP_SPACE",   offsetof(struct pmap *, space));
+       DECLARE("PMAP_BMAPS",   offsetof(struct pmap *, bmaps));
+       DECLARE("PMAP_PMAPVR",  offsetof(struct pmap *, pmapvr));
+       DECLARE("PMAP_VFLAGS",  offsetof(struct pmap *, vflags));
+       DECLARE("PMAP_USAGE",   offsetof(struct pmap *, pmapUsage));
+       DECLARE("PMAP_SEGS",    offsetof(struct pmap *, pmapSegs));
+       DECLARE("PMAP_SIZE",    pmapSize);
 
        /* values from kern/processor.h */
        DECLARE("psthreads",    offsetof(struct processor_set *, threads));
@@ -817,6 +559,13 @@ int main(int argc, char *argv[])
        
        DECLARE("PPCcallmax", sizeof(PPCcalls));
 
+       /* values from cpu_data.h */
+       DECLARE("CPU_ACTIVE_THREAD", offsetof(cpu_data_t *, active_thread));
+       DECLARE("CPU_PREEMPTION_LEVEL", offsetof(cpu_data_t *, preemption_level));
+       DECLARE("CPU_SIMPLE_LOCK_COUNT",
+               offsetof(cpu_data_t *, simple_lock_count));
+       DECLARE("CPU_INTERRUPT_LEVEL",offsetof(cpu_data_t *, interrupt_level));
+
        /* Misc values used by assembler */
        DECLARE("AST_ALL", AST_ALL);
        DECLARE("AST_URGENT", AST_URGENT);
@@ -852,8 +601,6 @@ int main(int argc, char *argv[])
        DECLARE("LTR_srr0",     offsetof(struct LowTraceRecord *, LTR_srr0));
        DECLARE("LTR_srr1",     offsetof(struct LowTraceRecord *, LTR_srr1));
        DECLARE("LTR_dar",      offsetof(struct LowTraceRecord *, LTR_dar));
-       DECLARE("LTR_dsisr",    offsetof(struct LowTraceRecord *, LTR_dsisr));
-       DECLARE("LTR_rsvd0",    offsetof(struct LowTraceRecord *, LTR_rsvd0));
        DECLARE("LTR_save",     offsetof(struct LowTraceRecord *, LTR_save));
        DECLARE("LTR_lr",       offsetof(struct LowTraceRecord *, LTR_lr));
        DECLARE("LTR_ctr",      offsetof(struct LowTraceRecord *, LTR_ctr));
@@ -863,7 +610,6 @@ int main(int argc, char *argv[])
        DECLARE("LTR_r3",       offsetof(struct LowTraceRecord *, LTR_r3));
        DECLARE("LTR_r4",       offsetof(struct LowTraceRecord *, LTR_r4));
        DECLARE("LTR_r5",       offsetof(struct LowTraceRecord *, LTR_r5));
-       DECLARE("LTR_r6",       offsetof(struct LowTraceRecord *, LTR_r6));
        DECLARE("LTR_size",     sizeof(struct LowTraceRecord));
 
 /*     Values from pexpert.h */
@@ -871,117 +617,58 @@ int main(int argc, char *argv[])
        DECLARE("PECFIbusrate", offsetof(struct clock_frequency_info_t *, bus_clock_rate_hz));
 
 /*     Values from pmap_internals.h and mappings.h */
-
-       DECLARE("mpFlags",              offsetof(struct mapping *, mpFlags));
-       DECLARE("mpBusy",               mpBusy);
-       DECLARE("mpPIndex",             mpPIndex);
-       DECLARE("mpSpecial",    mpSpecial);
-       DECLARE("mpSpecialb",   mpSpecialb);
-       DECLARE("mpFIP",                mpFIP);
-       DECLARE("mpFIPb",               mpFIPb);
-       DECLARE("mpRemovable",  mpRemovable);
-       DECLARE("mpRemovableb", mpRemovableb);
-       DECLARE("mpNest",               mpNest);
-       DECLARE("mpNestb",              mpNestb);
-       DECLARE("mpPerm",               mpPerm);
-       DECLARE("mpPermb",              mpPermb);
-       DECLARE("mpBlock",              mpBlock);
-       DECLARE("mpBlockb",             mpBlockb);
-       DECLARE("mpRIP",                mpRIP);
-       DECLARE("mpRIPb",               mpRIPb);
-       DECLARE("mpRSVD1",              mpRSVD1);
-       DECLARE("mpLists",              mpLists);
-       DECLARE("mpListsb",             mpListsb);
-
-       DECLARE("mpSpace",              offsetof(struct mapping *, mpSpace));
-       DECLARE("mpBSize",              offsetof(struct mapping *, mpBSize));
-       DECLARE("mpPte",                offsetof(struct mapping *, mpPte));
-       DECLARE("mpHValid",             mpHValid);
-       DECLARE("mpHValidb",    mpHValidb);
-
-       DECLARE("mpPAddr",              offsetof(struct mapping *, mpPAddr));
-       DECLARE("mpVAddr",              offsetof(struct mapping *, mpVAddr));
-       DECLARE("mpHWFlags",    mpHWFlags);
-       DECLARE("mpPP",                 mpPP);
-       DECLARE("mpPPb",                mpPPb);
-       DECLARE("mpKKN",                mpKKN);
-       DECLARE("mpKKNb",               mpKKNb);
-       DECLARE("mpWIMG",               mpWIMG);
-       DECLARE("mpWIMGb",              mpWIMGb);
-       DECLARE("mpW",                  mpW);
-       DECLARE("mpWb",                 mpWb);
-       DECLARE("mpI",                  mpI);
-       DECLARE("mpIb",                 mpIb);
-       DECLARE("mpM",                  mpM);
-       DECLARE("mpMb",                 mpMb);
-       DECLARE("mpG",                  mpG);
-       DECLARE("mpGb",                 mpGb);
-       DECLARE("mpWIMGe",              mpWIMGe);
-       DECLARE("mpC",                  mpC);
-       DECLARE("mpCb",                 mpCb);
-       DECLARE("mpR",                  mpR);
-       DECLARE("mpRb",                 mpRb);
-       DECLARE("mpAlias",              offsetof(struct mapping *, mpAlias));
-       DECLARE("mpNestReloc",  offsetof(struct mapping *, mpNestReloc));       
-       DECLARE("mpBlkRemCur",  offsetof(struct mapping *, mpBlkRemCur));       
-       DECLARE("mpList0",              offsetof(struct mapping *, mpList0));
-       DECLARE("mpList ",              offsetof(struct mapping *, mpList));
-       DECLARE("mpBasicSize",  mpBasicSize);
-       DECLARE("mpBasicLists", mpBasicLists);
-
+       DECLARE("mmnext",               offsetof(struct mapping *, next));
+       DECLARE("mmhashnext",   offsetof(struct mapping *, hashnext));
+       DECLARE("mmPTEhash",    offsetof(struct mapping *, PTEhash));
+       DECLARE("mmPTEent",             offsetof(struct mapping *, PTEent));
+       DECLARE("mmPTEv",               offsetof(struct mapping *, PTEv));
+       DECLARE("mmPTEr",               offsetof(struct mapping *, PTEr));
+       DECLARE("mmphysent",    offsetof(struct mapping *, physent));
+       DECLARE("mmpmap",               offsetof(struct mapping *, pmap));
+       
+       DECLARE("bmnext",               offsetof(struct blokmap *, next));
+       DECLARE("bmstart",              offsetof(struct blokmap *, start));
+       DECLARE("bmend",                offsetof(struct blokmap *, end));
+       DECLARE("bmcurrent",            offsetof(struct blokmap *, current));
+       DECLARE("bmPTEr",               offsetof(struct blokmap *, PTEr));
+       DECLARE("bmspace",              offsetof(struct blokmap *, space));
+       DECLARE("blkFlags",             offsetof(struct blokmap *, blkFlags));
+       DECLARE("blkPerm",              blkPerm);
+       DECLARE("blkRem",               blkRem);
+       DECLARE("blkPermbit",   blkPermbit);
+       DECLARE("blkRembit",    blkRembit);
+       DECLARE("BLKREMMAX",    BLKREMMAX);
+       
        DECLARE("mbvrswap",             offsetof(struct mappingblok *, mapblokvrswap));
        DECLARE("mbfree",               offsetof(struct mappingblok *, mapblokfree));
        DECLARE("mapcsize",             sizeof(struct mappingctl));
 
-       DECLARE("ppLink",               offsetof(struct phys_entry *, ppLink));
-       DECLARE("ppLock",               ppLock);
-       DECLARE("ppN",                  ppN);
-       DECLARE("ppFlags",              ppFlags);
-       DECLARE("ppI",                  ppI);
-       DECLARE("ppIb",                 ppIb);
-       DECLARE("ppG",                  ppG);
-       DECLARE("ppGb",                 ppGb);
-       DECLARE("ppR",                  ppR);
-       DECLARE("ppRb",                 ppRb);
-       DECLARE("ppC",                  ppC);
-       DECLARE("ppCb",                 ppCb);
-       DECLARE("ppPP",                 ppPP);
-       DECLARE("ppPPb",                ppPPb);
-       DECLARE("ppPPe",                ppPPe);
+       DECLARE("pephyslink",   offsetof(struct phys_entry *, phys_link));
+       DECLARE("pepte1",               offsetof(struct phys_entry *, pte1));
 
+       DECLARE("PCAlock",              offsetof(struct PCA *, PCAlock));
        DECLARE("PCAallo",              offsetof(struct PCA *, flgs.PCAallo));
        DECLARE("PCAfree",              offsetof(struct PCA *, flgs.PCAalflgs.PCAfree));
        DECLARE("PCAauto",              offsetof(struct PCA *, flgs.PCAalflgs.PCAauto));
-       DECLARE("PCAmisc",              offsetof(struct PCA *, flgs.PCAalflgs.PCAmisc));
-       DECLARE("PCAlock",              PCAlock);
-       DECLARE("PCAlockb",             PCAlockb);
+       DECLARE("PCAslck",              offsetof(struct PCA *, flgs.PCAalflgs.PCAslck));
        DECLARE("PCAsteal",             offsetof(struct PCA *, flgs.PCAalflgs.PCAsteal));
+       DECLARE("PCAgas",               offsetof(struct PCA *, PCAgas));
+       DECLARE("PCAhash",              offsetof(struct PCA *, PCAhash));
 
-       DECLARE("mrPhysTab",    offsetof(struct mem_region *, mrPhysTab));
-       DECLARE("mrStart",              offsetof(struct mem_region *, mrStart));
-       DECLARE("mrEnd",                offsetof(struct mem_region *, mrEnd));
-       DECLARE("mrAStart",             offsetof(struct mem_region *, mrAStart));
-       DECLARE("mrAEnd",               offsetof(struct mem_region *, mrAEnd));
-       DECLARE("mrSize",               sizeof(struct mem_region));
-
-       DECLARE("mapRemChunk",  mapRemChunk);
-
-       DECLARE("mapRetCode",   mapRetCode);
-       DECLARE("mapRtOK",              mapRtOK);
-       DECLARE("mapRtBadLk",   mapRtBadLk);
-       DECLARE("mapRtPerm",    mapRtPerm);
-       DECLARE("mapRtNotFnd",  mapRtNotFnd);
-       DECLARE("mapRtBlock",   mapRtBlock);
-       DECLARE("mapRtNest",    mapRtNest);
-       DECLARE("mapRtRemove",  mapRtRemove);
-       DECLARE("mapRtMapDup",  mapRtMapDup);
-
-#if 0
        DECLARE("MFpcaptr",             offsetof(struct mappingflush *, pcaptr));
        DECLARE("MFmappingcnt",         offsetof(struct mappingflush *, mappingcnt));
        DECLARE("MFmapping",            offsetof(struct mappingflush *, mapping));
        DECLARE("MFmappingSize",        sizeof(struct mfmapping));
-#endif
+
+       DECLARE("SVlock",               offsetof(struct Saveanchor *, savelock));
+       DECLARE("SVpoolfwd",    offsetof(struct Saveanchor *, savepoolfwd));
+       DECLARE("SVpoolbwd",    offsetof(struct Saveanchor *, savepoolbwd));
+       DECLARE("SVfree",               offsetof(struct Saveanchor *, savefree));
+       DECLARE("SVfreecnt",    offsetof(struct Saveanchor *, savefreecnt));
+       DECLARE("SVadjust",             offsetof(struct Saveanchor *, saveadjust));
+       DECLARE("SVinuse",              offsetof(struct Saveanchor *, saveinuse));
+       DECLARE("SVtarget",             offsetof(struct Saveanchor *, savetarget));
+       DECLARE("SVsize",               sizeof(struct Saveanchor));
 
 #if 1
        DECLARE("GDsave",               offsetof(struct GDWorkArea *, GDsave));
@@ -1001,6 +688,9 @@ int main(int argc, char *argv[])
        DECLARE("GDrowbuf2",    offsetof(struct GDWorkArea *, GDrowbuf2));
 #endif
 
+       DECLARE("dgLock",               offsetof(struct diagWork *, dgLock));
+       DECLARE("dgFlags",              offsetof(struct diagWork *, dgFlags));
+       DECLARE("dgMisc0",              offsetof(struct diagWork *, dgMisc0));
        DECLARE("enaExpTrace",  enaExpTrace);
        DECLARE("enaExpTraceb", enaExpTraceb);
        DECLARE("enaUsrFCall",  enaUsrFCall);
@@ -1011,8 +701,6 @@ int main(int argc, char *argv[])
        DECLARE("enaDiagSCsb",  enaDiagSCsb);
        DECLARE("enaDiagEM",    enaDiagEM);
        DECLARE("enaDiagEMb",   enaDiagEMb);
-       DECLARE("enaNotifyEM",  enaNotifyEM);
-       DECLARE("enaNotifyEMb", enaNotifyEMb);
        DECLARE("disLkType",    disLkType);
        DECLARE("disLktypeb",   disLktypeb);
        DECLARE("disLkThread",  disLkThread);
@@ -1027,6 +715,12 @@ int main(int argc, char *argv[])
        DECLARE("dgMisc4",              offsetof(struct diagWork *, dgMisc4));
        DECLARE("dgMisc5",              offsetof(struct diagWork *, dgMisc5));
 
+       DECLARE("traceMask",    offsetof(struct traceWork *, traceMask));
+       DECLARE("traceCurr",    offsetof(struct traceWork *, traceCurr));
+       DECLARE("traceStart",   offsetof(struct traceWork *, traceStart));
+       DECLARE("traceEnd",             offsetof(struct traceWork *, traceEnd));
+       DECLARE("traceMsnd",    offsetof(struct traceWork *, traceMsnd));
+
        DECLARE("SACnext",              offsetof(struct savearea_comm *, sac_next));
        DECLARE("SACprev",              offsetof(struct savearea_comm *, sac_prev));
        DECLARE("SACvrswap",    offsetof(struct savearea_comm *, sac_vrswap));
@@ -1052,16 +746,11 @@ int main(int argc, char *argv[])
        DECLARE("SAVflags",             offsetof(struct savearea_comm *, save_flags));
        DECLARE("SAVlevel",             offsetof(struct savearea_comm *, save_level));
        DECLARE("SAVtime",              offsetof(struct savearea_comm *, save_time));
-       DECLARE("savemisc0",    offsetof(struct savearea_comm *, save_misc0));
-       DECLARE("savemisc1",    offsetof(struct savearea_comm *, save_misc1));
-       DECLARE("savemisc2",    offsetof(struct savearea_comm *, save_misc2));
-       DECLARE("savemisc3",    offsetof(struct savearea_comm *, save_misc3));
-
        DECLARE("SAVsize",              sizeof(struct savearea));
        DECLARE("SAVsizefpu",   sizeof(struct savearea_vec));
        DECLARE("SAVsizevec",   sizeof(struct savearea_fpu));
        DECLARE("SAVcommsize",  sizeof(struct savearea_comm));
-       
+
        DECLARE("savesrr0",             offsetof(struct savearea *, save_srr0));
        DECLARE("savesrr1",             offsetof(struct savearea *, save_srr1));
        DECLARE("savecr",               offsetof(struct savearea *, save_cr));
@@ -1076,13 +765,6 @@ int main(int argc, char *argv[])
        DECLARE("savevrsave",   offsetof(struct savearea *, save_vrsave));      
        DECLARE("savevscr",             offsetof(struct savearea *, save_vscr));        
 
-       DECLARE("savemmcr0",    offsetof(struct savearea *, save_mmcr0));
-       DECLARE("savemmcr1",    offsetof(struct savearea *, save_mmcr1));
-       DECLARE("savemmcr2",    offsetof(struct savearea *, save_mmcr2));
-       DECLARE("savepmc",              offsetof(struct savearea *, save_pmc));
-       
-       DECLARE("saveinstr",    offsetof(struct savearea *, save_instr));
-
        DECLARE("saver0",               offsetof(struct savearea *, save_r0));
        DECLARE("saver1",               offsetof(struct savearea *, save_r1));
        DECLARE("saver2",               offsetof(struct savearea *, save_r2));
@@ -1116,6 +798,23 @@ int main(int argc, char *argv[])
        DECLARE("saver30",              offsetof(struct savearea *, save_r30));
        DECLARE("saver31",              offsetof(struct savearea *, save_r31));
 
+       DECLARE("savesr0",              offsetof(struct savearea *, save_sr0));
+       DECLARE("savesr1",              offsetof(struct savearea *, save_sr1));
+       DECLARE("savesr2",              offsetof(struct savearea *, save_sr2));
+       DECLARE("savesr3",              offsetof(struct savearea *, save_sr3));
+       DECLARE("savesr4",              offsetof(struct savearea *, save_sr4));
+       DECLARE("savesr5",              offsetof(struct savearea *, save_sr5));
+       DECLARE("savesr6",              offsetof(struct savearea *, save_sr6));
+       DECLARE("savesr7",              offsetof(struct savearea *, save_sr7));
+       DECLARE("savesr8",              offsetof(struct savearea *, save_sr8));
+       DECLARE("savesr9",              offsetof(struct savearea *, save_sr9));
+       DECLARE("savesr10",             offsetof(struct savearea *, save_sr10));
+       DECLARE("savesr11",             offsetof(struct savearea *, save_sr11));
+       DECLARE("savesr12",             offsetof(struct savearea *, save_sr12));
+       DECLARE("savesr13",             offsetof(struct savearea *, save_sr13));
+       DECLARE("savesr14",             offsetof(struct savearea *, save_sr14));
+       DECLARE("savesr15",             offsetof(struct savearea *, save_sr15));
+
        DECLARE("savefp0",              offsetof(struct savearea_fpu *, save_fp0));
        DECLARE("savefp1",              offsetof(struct savearea_fpu *, save_fp1));
        DECLARE("savefp2",              offsetof(struct savearea_fpu *, save_fp2));
@@ -1222,51 +921,25 @@ int main(int argc, char *argv[])
        DECLARE("procState",            offsetof(struct processor *, state));
        
        DECLARE("CPU_SUBTYPE_POWERPC_ALL",              CPU_SUBTYPE_POWERPC_ALL);
+       DECLARE("CPU_SUBTYPE_POWERPC_601",              CPU_SUBTYPE_POWERPC_601);
+       DECLARE("CPU_SUBTYPE_POWERPC_602",              CPU_SUBTYPE_POWERPC_602);
+       DECLARE("CPU_SUBTYPE_POWERPC_603",              CPU_SUBTYPE_POWERPC_603);
+       DECLARE("CPU_SUBTYPE_POWERPC_603e",             CPU_SUBTYPE_POWERPC_603e);
+       DECLARE("CPU_SUBTYPE_POWERPC_603ev",    CPU_SUBTYPE_POWERPC_603ev);
+       DECLARE("CPU_SUBTYPE_POWERPC_604",              CPU_SUBTYPE_POWERPC_604);
+       DECLARE("CPU_SUBTYPE_POWERPC_604e",             CPU_SUBTYPE_POWERPC_604e);
+       DECLARE("CPU_SUBTYPE_POWERPC_620",              CPU_SUBTYPE_POWERPC_620);
        DECLARE("CPU_SUBTYPE_POWERPC_750",              CPU_SUBTYPE_POWERPC_750);
        DECLARE("CPU_SUBTYPE_POWERPC_7400",             CPU_SUBTYPE_POWERPC_7400);
        DECLARE("CPU_SUBTYPE_POWERPC_7450",             CPU_SUBTYPE_POWERPC_7450);
-       DECLARE("CPU_SUBTYPE_POWERPC_970",              CPU_SUBTYPE_POWERPC_970);
 
        DECLARE("shdIBAT",      offsetof(struct shadowBAT *, IBATs));   
        DECLARE("shdDBAT",      offsetof(struct shadowBAT *, DBATs));   
        
-       /* Low Memory Globals */
-
-       DECLARE("lgVerCode",                    offsetof(struct lowglo *, lgVerCode));
-       DECLARE("lgPPStart",                    offsetof(struct lowglo *, lgPPStart));
-       DECLARE("trcWork",                              offsetof(struct lowglo *, lgTrcWork));
-       DECLARE("traceMask",                    offsetof(struct lowglo *, lgTrcWork.traceMask));
-       DECLARE("traceCurr",                    offsetof(struct lowglo *, lgTrcWork.traceCurr));
-       DECLARE("traceStart",                   offsetof(struct lowglo *, lgTrcWork.traceStart));
-       DECLARE("traceEnd",                             offsetof(struct lowglo *, lgTrcWork.traceEnd));
-       DECLARE("traceMsnd",                    offsetof(struct lowglo *, lgTrcWork.traceMsnd));
-
-       DECLARE("Zero",                                 offsetof(struct lowglo *, lgZero));
-       DECLARE("saveanchor",                   offsetof(struct lowglo *, lgSaveanchor));
-
-       DECLARE("SVlock",                               offsetof(struct lowglo *, lgSaveanchor.savelock));
-       DECLARE("SVpoolfwd",                    offsetof(struct lowglo *, lgSaveanchor.savepoolfwd));
-       DECLARE("SVpoolbwd",                    offsetof(struct lowglo *, lgSaveanchor.savepoolbwd));
-       DECLARE("SVfree",                               offsetof(struct lowglo *, lgSaveanchor.savefree));
-       DECLARE("SVfreecnt",                    offsetof(struct lowglo *, lgSaveanchor.savefreecnt));
-       DECLARE("SVadjust",                             offsetof(struct lowglo *, lgSaveanchor.saveadjust));
-       DECLARE("SVinuse",                              offsetof(struct lowglo *, lgSaveanchor.saveinuse));
-       DECLARE("SVtarget",                             offsetof(struct lowglo *, lgSaveanchor.savetarget));
-       DECLARE("SVsize",                               sizeof(struct Saveanchor));
-
-       DECLARE("tlbieLock",                    offsetof(struct lowglo *, lgTlbieLck));
-
-       DECLARE("dgFlags",                              offsetof(struct lowglo *, lgdgWork.dgFlags));
-       DECLARE("dgLock",                               offsetof(struct lowglo *, lgdgWork.dgLock));
-       DECLARE("dgMisc0",                              offsetof(struct lowglo *, lgdgWork.dgMisc0));
-       
-       DECLARE("lgKillResv",                   offsetof(struct lowglo *, lgKillResv));
-       
-       DECLARE("scomcpu",                              offsetof(struct scomcomm *, scomcpu));
-       DECLARE("scomfunc",                             offsetof(struct scomcomm *, scomfunc));
-       DECLARE("scomreg",                              offsetof(struct scomcomm *, scomreg));
-       DECLARE("scomstat",                             offsetof(struct scomcomm *, scomstat));
-       DECLARE("scomdata",                             offsetof(struct scomcomm *, scomdata));
 
+       
        return(0);  /* For ANSI C :-) */
+
+
+
 }
index e0906e06daf41c1fea307cd6f2e2fb57588133f1..ab499201d7b8cb3e4284c68fa317b4feb7b1fdd0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e501c2ab3250a9114d76129484f69001cf033438..91b3caf3e690cc96a322baa4decee8ae6edb1885 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
diff --git a/osfmk/ppc/hw_counters.h b/osfmk/ppc/hw_counters.h
new file mode 100644 (file)
index 0000000..8a7a5d3
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*
+ *
+ *             Hardware specific performance counters
+ */
+#ifndef _HW_COUNTERS_H_
+#define _HW_COUNTERS_H_
+
+#ifndef __ppc__
+#error This file is only useful on PowerPC.
+#endif
+
+
+typedef struct hw_counters {   
+
+       unsigned int hw_InVains;                                /* In vain */
+       unsigned int hw_Resets;                                 /* Reset */
+       unsigned int hw_MachineChecks;                  /* Machine check */
+       unsigned int hw_DSIs;                                   /* DSIs */
+       unsigned int hw_ISIs;                                   /* ISIs */
+       unsigned int hw_Externals;                              /* Externals */
+       unsigned int hw_Alignments;                     /* Alignment */
+       unsigned int hw_Programs;                               /* Program */
+       unsigned int hw_FloatPointUnavailable;  /* Floating point */
+       unsigned int hw_Decrementers;                   /* Decrementer */
+       unsigned int hw_IOErrors;                               /* I/O error */
+       unsigned int hw_rsvd0;                                  /* Reserved */
+       unsigned int hw_SystemCalls;                    /* System call */
+       unsigned int hw_Traces;                                 /* Trace */
+       unsigned int hw_FloatingPointAssists;   /* Floating point assist */
+       unsigned int hw_PerformanceMonitors;    /* Performance monitor */
+       unsigned int hw_Altivecs;                               /* VMX */
+       unsigned int hw_rsvd1;                                  /* Reserved */
+       unsigned int hw_rsvd2;                                  /* Reserved */
+       unsigned int hw_rsvd3;                                  /* Reserved */
+       unsigned int hw_InstBreakpoints;                /* Instruction breakpoint */
+       unsigned int hw_SystemManagements;              /* System management */
+       unsigned int hw_rsvd4;                                  /* Reserved */
+       unsigned int hw_AltivecAssists;                 /* Altivec Assist */
+       unsigned int hw_rsvd6;                                  /* Reserved */
+       unsigned int hw_rsvd7;                                  /* Reserved */
+       unsigned int hw_rsvd8;                                  /* Reserved */
+       unsigned int hw_rsvd9;                                  /* Reserved */
+       unsigned int hw_rsvd10;                                 /* Reserved */
+       unsigned int hw_rsvd11;                                 /* Reserved */
+       unsigned int hw_rsvd12;                                 /* Reserved */
+       unsigned int hw_rsvd13;                                 /* Reserved */
+       unsigned int hw_rsvd14;                                 /* Reserved */
+       unsigned int hw_Trace601;                               /* Trace */
+       unsigned int hw_SIGPs;                                  /* SIGP */
+       unsigned int hw_Preemptions;                    /* Preemption */
+       unsigned int hw_ContextSwitchs;                 /* Context switch */
+       
+       unsigned int hw_spare[27];                              /* Pad to 256 bytes */
+
+} hw_counters;
+
+extern hw_counters hw_counts(NCPUS);
+
+#endif /* _HW_COUNTERS_H_ */
index 5b3775d849f6318c9bb8a79b07988b0d12f38c4a..fc00437033f8922d27e9591269fd3d36ed63eebb 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -53,8 +50,7 @@
 
 #define VERIFYSAVE 0
 #define FPVECDBG 0
-#define INSTRUMENT 0
-
+       
 /*
  * thandler(type)
  *
@@ -108,7 +104,7 @@ LEXT(thandler)                                                                              ; Trap handler
                        lwz             r1,ACT_MACT_KSP(r13)                    ; Get the top of kernel stack
                        bnel-   checkassist                                             ; See if we should assist this
                        stw             r4,ACT_MACT_PCB(r13)                    ; Point to our savearea
-                       stw             r8,SAVprev+4(r4)                                ; Queue the new save area in the front 
+                       stw             r8,SAVprev(r4)                                  ; Queue the new save area in the front 
                        
 #if VERIFYSAVE
                        bl              versave                                                 ; (TEST/DEBUG)
@@ -117,17 +113,16 @@ LEXT(thandler)                                                                            ; Trap handler
                        lwz             r9,THREAD_KERNEL_STACK(r6)              ; Get our kernel stack start
                        cmpwi   cr1,r1,0                                                ; Are we already on kernel stack?
                        stw             r13,SAVact(r4)                                  ; Mark the savearea as belonging to this activation
-                       lwz             r26,saver1+4(r4)                                ; Get the stack at interrupt time
+                       lwz             r26,saver1(r4)                                  ; Get the stack at interrupt time
 
                        bne+    cr1,.L_kstackfree                               ; We are not on kernel stack yet...             
 
                        subi    r1,r26,FM_REDZONE                               ; Make a red zone on interrupt time kernel stack
 
 .L_kstackfree:
-                       lwz             r7,savesrr1+4(r4)                               ; Pick up the entry MSR 
+                       lwz             r7,savesrr1(r4)                                 ; Pick up the entry MSR 
                        sub             r9,r1,r9                                                ; Get displacment into the kernel stack
                        li              r0,0                                                    ; Make this 0
-                       rlwinm. r0,r9,0,28,31                                   ; Verify that we have a 16-byte aligned stack (and get a 0)
                        cmplwi  cr2,r9,KERNEL_STACK_SIZE                ; Do we still have room on the stack?
                        beq             cr1,.L_state_on_kstack                  ; using above test for pcb/stack
 
@@ -135,13 +130,12 @@ LEXT(thandler)                                                                            ; Trap handler
 
 .L_state_on_kstack:    
                        lwz             r9,savevrsave(r4)                               ; Get the VRSAVE register
-                       bne--   kernelStackUnaligned                    ; Stack is unaligned...
                        rlwinm. r6,r7,0,MSR_VEC_BIT,MSR_VEC_BIT ; Was vector on?
                        subi    r1,r1,FM_SIZE                                   ; Push a header onto the current stack 
-                       bgt--   cr2,kernelStackBad                              ; Kernel stack is bogus...
+                       bgt-    cr2,kernelStackBad                              ; Kernel stack is bogus...
 
 kernelStackNotBad:                                                                     ; Vector was off
-                       beq++   tvecoff                                                 ; Vector off, do not save vrsave...
+                       beq+    tvecoff                                                 ; Vector off, do not save vrsave...
                        stw             r9,liveVRS(r25)                                 ; Set the live value
 
 tvecoff:       stw             r26,FM_BACKPTR(r1)                              ; Link back to the previous frame
@@ -151,7 +145,7 @@ tvecoff:    stw             r26,FM_BACKPTR(r1)                              ; Link back to the previous frame
  * which links back to the trapped routine. The second is
  * that which the C routine below will need
  */
-                       lwz             r3,savesrr0+4(r4)                               ; Get the point of interruption
+                       lwz             r3,savesrr0(r4)                                 ; Get the point of interruption
                        stw             r3,FM_LR_SAVE(r1)                               ; save old instr ptr as LR value 
                        stwu    r1,     -FM_SIZE(r1)                            ; and make new frame 
 #endif /* DEBUG */
@@ -181,10 +175,9 @@ tvecoff:   stw             r26,FM_BACKPTR(r1)                              ; Link back to the previous frame
                        
                        crandc  cr0_eq,cr7_eq,cr0_eq                    ; Do not intercept if we are in the kernel (cr0_eq == 1 if yes)
                        
-                       lwz             r6,savedar(r4)                                  ; Get the DAR (top)
-                       lwz             r7,savedar+4(r4)                                ; Get the DAR (bottom)
+                       lwz             r6,savedar(r4)                                  ; Get the DAR 
        
-                       beq-    cr2,.L_call_trap                                ; Do not turn on interrupts for T_PREEMPT
+                       beq-    cr2, .L_call_trap                               ; Do not turn on interrupts for T_PREEMPT
                        beq-    exitFromVM                                              ; Any true trap but T_MACHINE_CHECK exits us from the VM...
 
 /* syscall exception might warp here if there's nothing left
@@ -195,10 +188,10 @@ tvecoff:  stw             r26,FM_BACKPTR(r1)                              ; Link back to the previous frame
 
                        bl      EXT(trap)
 
-                       lis             r10,hi16(MASK(MSR_VEC))                 ; Get the vector enable
                        mfmsr   r7                                                              ; Get the MSR
-                       ori             r10,r10,lo16(MASK(MSR_FP)|MASK(MSR_EE)) ; Add in FP and EE
-                       andc    r7,r7,r10                                               ; Turn off VEC, FP, and EE
+                       rlwinm  r7,r7,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r7,r7,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r7,r7,0,MSR_EE_BIT+1,MSR_EE_BIT-1       ; Clear the interrupt enable mask
                        mtmsr   r7                                                              ; Disable for interrupts
                        mfsprg  r10,0                                                   ; Restore the per_proc info
 /*
@@ -208,21 +201,21 @@ tvecoff:  stw             r26,FM_BACKPTR(r1)                              ; Link back to the previous frame
  */
 
 thread_return:
+                       lwz             r4,SAVprev(r3)                                  ; Pick up the previous savearea 
                        lwz             r11,SAVflags(r3)                                ; Get the flags of the current savearea
-                       lwz             r0,savesrr1+4(r3)                               ; Get the MSR we are going to
-                       lwz             r4,SAVprev+4(r3)                                ; Pick up the previous savearea 
-                       mfsprg  r8,1                                                    ; Get the current activation
-                       lwz             r1,PP_ACTIVE_THREAD(r10)                ; Get the active thread 
+                       lwz             r8,savesrr1(r3)                                 ; Get the MSR we are going to
                        rlwinm  r11,r11,0,15,13                                 ; Clear the syscall flag
-                       rlwinm. r0,r0,0,MSR_PR_BIT,MSR_PR_BIT   ; Are we going to the user?
+                       lwz             r1,PP_ACTIVE_THREAD(r10)                ; Get the active thread 
+                       rlwinm. r8,r8,0,MSR_PR_BIT,MSR_PR_BIT   ; Are we going to the user?
+                       mfsprg  r8,1                                                    ; Get the current activation
                        stw             r11,SAVflags(r3)                                ; Save back the flags (with reset stack cleared) 
 
-                       lwz             r5,THREAD_KERNEL_STACK(r1)              ; Get the base pointer to the stack 
                        stw             r4,ACT_MACT_PCB(r8)                             ; Point to the previous savearea (or 0 if none)
-                       addi    r5,r5,KERNEL_STACK_SIZE-FM_SIZE ; Reset to empty 
 
-                       beq--   chkfac                                                  ; We are not leaving the kernel yet...
+                       beq-    chkfac                                                  ; We are not leaving the kernel yet...
 
+                       lwz             r5,THREAD_KERNEL_STACK(r1)              ; Get the base pointer to the stack 
+                       addi    r5,r5,KERNEL_STACK_SIZE-FM_SIZE ; Reset to empty 
                        stw             r5,ACT_MACT_KSP(r8)                             ; Save the empty stack pointer 
                        b               chkfac                                                  ; Go end it all...
 
@@ -245,12 +238,6 @@ kernelStackBad:
                        li              r3,failStack                                    ; Bad stack code
                        sc                                                                              ; System ABEND
 
-kernelStackUnaligned:
-                       lis             r0,hi16(Choke)                                  ; Choke code
-                       ori             r0,r0,lo16(Choke)                               ; and the rest
-                       li              r3,failUnalignedStk                             ; Unaligned stack code
-                       sc                                                                              ; System ABEND
-
 
 /*
  * shandler(type)
@@ -286,44 +273,43 @@ kernelStackUnaligned:
                        .globl EXT(shandler)
 LEXT(shandler)                                                                         ; System call handler
 
-                       lwz             r7,savesrr1+4(r4)                               ; Get the SRR1 value
                        mfsprg  r25,0                                                   ; Get the per proc area 
-                       lwz             r0,saver0+4(r4)                                 ; Get the original syscall number
+                       lwz             r0,saver0(r4)                                   ; Get the original syscall number
                        lwz             r17,PP_ISTACKPTR(r25)                   ; Get interrupt stack pointer
                        rlwinm  r15,r0,0,0,19                                   ; Clear the bottom of call number for fast check
                        mr.             r17,r17                                                 ; Are we on interrupt stack?
+                       lwz             r7,savesrr1(r4)                                 ; Get the SRR1 value
+                       beq-    EXT(ihandler)                                   ; On interrupt stack, not allowed...
                        lwz             r9,savevrsave(r4)                               ; Get the VRsave register
-                       beq--   EXT(ihandler)                                   ; On interrupt stack, not allowed...
                        rlwinm. r6,r7,0,MSR_VEC_BIT,MSR_VEC_BIT ; Was vector on?
                        lwz             r16,PP_ACTIVE_THREAD(r25)               ; Get the thread pointer 
                        mfsprg  r13,1                                                   ; Pick up the active thread 
 
-                       beq++   svecoff                                                 ; Vector off, do not save vrsave...
+                       beq+    svecoff                                                 ; Vector off, do not save vrsave...
                        stw             r9,liveVRS(r25)                                 ; Set the live value
 ;
 ;                      Check if SCs are being redirected for the BlueBox or to VMM
 ;
 
 svecoff:       lwz             r6,ACT_MACT_SPF(r13)                    ; Pick up activation special flags
-                       mtcrf   0x40,r6                                                 ; Check special flags
-                       mtcrf   0x01,r6                                                 ; Check special flags
+                       mtcrf   0x41,r6                                                 ; Check special flags
                        crmove  cr6_eq,runningVMbit                             ; Remember if we are in VMM
-                       bne++   cr6,sVMchecked                                  ; Not running VM
+                       bne             cr6,sVMchecked                                  ; Not running VM
                        lwz             r18,spcFlags(r25)                               ; Load per_proc special flags
                        rlwinm. r18,r18,0,FamVMmodebit,FamVMmodebit     ; Is FamVMmodebit set?
                        beq             sVMchecked                                              ; Not in FAM
                        cmpwi   r0,0x6004                                               ; Is it vmm_dispatch syscall:
                        bne             sVMchecked
-                       lwz             r26,saver3+4(r4)                                ; Get the original syscall number
+                       lwz             r26,saver3(r4)                                  ; Get the original syscall number
                        cmpwi   cr6,r26,kvmmExitToHost                  ; vmm_exit_to_host request
 sVMchecked:
-                       bf++    bbNoMachSCbit,noassist                  ; Take branch if SCs are not redirected
+                       bf+             bbNoMachSCbit,noassist                  ; Take branch if SCs are not redirected
                        lwz             r26,ACT_MACT_BEDA(r13)                  ; Pick up the pointer to the blue box exception area
                        b               EXT(atomic_switch_syscall)              ; Go to the assist...
 
 noassist:      cmplwi  r15,0x7000                                              ; Do we have a fast path trap? 
                        lwz             r14,ACT_MACT_PCB(r13)                   ; Now point to the PCB 
-                       beql    fastpath                                                ; We think it is a fastpath... 
+                       beql+   fastpath                                                ; We think it is a fastpath... 
 
                        lwz             r1,ACT_MACT_KSP(r13)                    ; Get the kernel stack pointer 
 #if DEBUG
@@ -334,15 +320,15 @@ noassist: cmplwi  r15,0x7000                                              ; Do we have a fast path trap?
 
                        stw             r4,ACT_MACT_PCB(r13)                    ; Point to our savearea
                        li              r0,0                                                    ; Clear this out 
-                       stw             r14,SAVprev+4(r4)                               ; Queue the new save area in the front 
+                       stw             r14,SAVprev(r4)                                 ; Queue the new save area in the front 
                        stw             r13,SAVact(r4)                                  ; Point the savearea at its activation
                        
 #if VERIFYSAVE
                        bl              versave                                                 ; (TEST/DEBUG)
 #endif                 
                        
-                       lwz             r15,saver1+4(r4)                                ; Grab interrupt time stack 
                        mr              r30,r4                                                  ; Save pointer to the new context savearea
+                       lwz             r15,saver1(r4)                                  ; Grab interrupt time stack 
                        stw             r0,ACT_MACT_KSP(r13)                    ; Mark stack as busy with 0 val 
                        stw             r15,FM_BACKPTR(r1)                              ; Link stack frame backwards
                
@@ -351,31 +337,32 @@ noassist: cmplwi  r15,0x7000                                              ; Do we have a fast path trap?
  * which links back to the trapped routine. The second is
  * that which the C routine below will need
  */
-                       lwz             r8,savesrr0+4(r30)                              ; Get the point of interruption
+                       lwz             r8,savesrr0(r30)                                ; Get the point of interruption
                        stw             r8,FM_LR_SAVE(r1)                               ; Save old instr ptr as LR value
                        stwu    r1,     -FM_SIZE(r1)                            ; and make new frame
 #endif /* DEBUG */
 
-                       lwz             r15,SAVflags(r30)                               ; Get the savearea flags
-                       lwz             r0,saver0+4(r30)                                ; Get R0 back
                        mfmsr   r11                                                             ; Get the MSR
-                       stwu    r1,-(FM_SIZE+ARG_SIZE)(r1)              ; Make a stack frame
+                       lwz             r15,SAVflags(r30)                               ; Get the savearea flags
                        ori             r11,r11,lo16(MASK(MSR_EE))              ; Turn on interruption enabled bit
-                       rlwinm  r10,r0,0,0,19                                   ; Keep only the top part 
+                       lwz             r0,saver0(r30)                                  ; Get R0 back
                        oris    r15,r15,SAVsyscall >> 16                ; Mark that it this is a syscall
+                       rlwinm  r10,r0,0,0,19                                   ; Keep only the top part 
+                       stwu    r1,-(FM_SIZE+ARG_SIZE)(r1)              ; Make a stack frame
                        cmplwi  r10,0x6000                                              ; Is it the special ppc-only guy?
                        stw             r15,SAVflags(r30)                               ; Save syscall marker
-                       beq--   cr6,exitFromVM                                  ; It is time to exit from alternate context...
+                       beq-    cr6,exitFromVM                                  ; It is time to exit from alternate context...
                        
                        beq-    ppcscall                                                ; Call the ppc-only system call handler...
 
-                       mr.             r0,r0                                                   ; What kind is it?
                        mtmsr   r11                                                             ; Enable interruptions
 
-                       blt--   .L_kernel_syscall                               ; System call number if negative, this is a mach call...
+                       lwz             r0,saver0(r30)                                  ; Get the system call selector
+                       mr.             r0,r0                                                   ; What kind is it?
+                       blt-    .L_kernel_syscall                               ; System call number if negative, this is a mach call...
                                                                                        
                        cmpwi   cr0,r0,0x7FFA                                   ; Special blue box call?
-                       beq--   .L_notify_interrupt_syscall             ; Yeah, call it...
+                       beq-    .L_notify_interrupt_syscall             ; Yeah, call it...
                        
                        lwz     r8,ACT_TASK(r13)                                ; Get our task
                        lis     r10,hi16(EXT(c_syscalls_unix))  ; Get top half of counter address 
@@ -399,7 +386,7 @@ noassist:   cmplwi  r15,0x7000                                              ; Do we have a fast path trap?
                        b               EXT(doexception)                                ; Go away, never to return...
 
 .L_notify_interrupt_syscall:
-                       lwz             r3,saver3+4(r30)                                ; Get the new PC address to pass in
+                       lwz             r3,saver3(r30)                                  ; Get the new PC address to pass in
                        bl              EXT(syscall_notify_interrupt)
                        b               .L_syscall_return
        
@@ -445,19 +432,9 @@ ppcscall:  rlwinm  r11,r0,2,18,29                                  ; Make an index into the table
                        mr              r3,r30                                                  ; Pass the savearea
                        mr              r4,r13                                                  ; Pass the activation
                        mr.             r11,r11                                                 ; See if there is a function here
-                       mtctr   r11                                                             ; Set the function address
+                       mtlr    r11                                                             ; Set the function address
                        beq-    .L_call_server_syscall_exception        ; Disabled call...
-#if INSTRUMENT
-                       mfspr   r4,pmc1                                                 ; Get stamp
-                       stw             r4,0x6100+(9*16)+0x0(0)                 ; Save it
-                       mfspr   r4,pmc2                                                 ; Get stamp
-                       stw             r4,0x6100+(9*16)+0x4(0)                 ; Save it
-                       mfspr   r4,pmc3                                                 ; Get stamp
-                       stw             r4,0x6100+(9*16)+0x8(0)                 ; Save it
-                       mfspr   r4,pmc4                                                 ; Get stamp
-                       stw             r4,0x6100+(9*16)+0xC(0)                 ; Save it
-#endif
-                       bctrl                                                                   ; Call it
+                       blrl                                                                    ; Call it
        
                        .globl  EXT(ppcscret)
 
@@ -467,7 +444,7 @@ LEXT(ppcscret)
                        bgt+    .L_thread_syscall_ret_check_ast ; Take normal AST checking return....
                        mfsprg  r10,0                                                   ; Get the per_proc
                        blt+    .L_thread_syscall_return                ; Return, but no ASTs....
-                       lwz             r0,saver0+4(r30)                                ; Restore the system call number
+                       lwz             r0,saver0(r30)                                  ; Restore the system call number
                        b               .L_call_server_syscall_exception        ; Go to common exit...
 
 
@@ -486,68 +463,155 @@ LEXT(ppcscret)
 ; Call a function that can print out our syscall info 
 ; Note that we don t care about any volatiles yet
 ;
-                       lis             r8,hi16(EXT(kdebug_enable))     ; Get top of kdebug_enable 
-                       ori             r8,r8,lo16(EXT(kdebug_enable))  ; Get bottom of kdebug_enable 
-                       lwz             r0,saver0+4(r30)
-                       lwz             r8,0(r8)                                        ; Get kdebug_enable 
-                       lis             r29,hi16(EXT(mach_trap_count))  ; Get address of count
-                       neg             r31,r0                                          ; Make this positive
-                       ori             r29,r29,lo16(EXT(mach_trap_count))      ; Get address of count
-                       lis             r28,hi16(EXT(mach_trap_table))  ; Get address of table
-                       cmplwi  r8,0                                            ; Is kdebug_enable false?
-                       lwz             r29,0(r29)                                      ; Pick up the actual count of system calls
-                       slwi    r27,r31,MACH_TRAP_OFFSET_POW2   ; Convert index to offset
-                       ori             r28,r28,lo16(EXT(mach_trap_table))      ; Get address of table
-                       beq++   ksysnotrc                                       ; No tracing...
-                       mr              r4,r30                                          ; Pass in saved state
+                       mr              r4,r30 
                        bl      EXT(syscall_trace)
-                       
-ksysnotrc:     cmplw   r31,r29                                         ; Is this syscall in the table? 
-                       add             r31,r27,r28                                     ; Point right to the syscall table entry
+                       lwz             r0,saver0(r30)                                  ; Get the system call selector */
+                       neg             r31,r0                                                  ; Make system call number positive and put in r31
+                       lis             r29,hi16(EXT(mach_trap_count))  ; High part of valid trap number
+                       ori             r29,r29,lo16(EXT(mach_trap_count))      ; Low part of valid trap number
+                       lis             r28,hi16(EXT(mach_trap_table))  ; High part of trap table
+                       lwz             r29,0(r29)                                              ; Get the first invalid system call number
+                       ori             r28,r28,lo16(EXT(mach_trap_table))      ; Low part of trap table
+
+                       cmplw   r31,r29                                                 ; See if we have a valid system call number
+                       slwi    r31,r31,MACH_TRAP_OFFSET_POW2   ; Get offset into table
+               
+                       bge-    .L_call_server_syscall_exception        ; System call number of bogus
+
+                       add             r31,r31,r28                                             ; Point to the system call entry
+                       lis             r28,hi16(EXT(kern_invalid))             ; Get the high invalid routine address
+                       lwz             r0,MACH_TRAP_FUNCTION(r31)              ; Grab the system call routine address
+                       ori             r28,r28,lo16(EXT(kern_invalid)) ; Get the low part of the invalid routine address
+                       lwz             r29,MACH_TRAP_ARGC(r31)                 ; Get the number of arguments in the call
+                       cmplw   r0,r28                                                  ; Is this an invalid entry?
+                       beq-    .L_call_server_syscall_exception        ; Yes, it is invalid...
+               
+/* get arg count. If argc > 8 then not all args were in regs,
+ * so we must perform copyin.
+ */
+                       cmpwi   cr0,r29,8                                               ; Do we have more than 8 arguments?
+                       ble+    .L_syscall_got_args                             ; Nope, no copy in needed...
+
+/* argc > 8  - perform a copyin */
+/* if the syscall came from kernel space, we can just copy */
+
+                       lwz             r0,savesrr1(r30)                                ; Pick up exception time MSR
+                       andi.   r0,r0,MASK(MSR_PR)                              ; Check the priv bit
+                       bne+    .L_syscall_arg_copyin                   ; We are not priviliged...
+
+/* we came from a privilaged task, just do a copy */
+/* get user's stack pointer */
+
+                       lwz             r28,saver1(r30)                                 ; Get the stack pointer
 
-                       bge-    .L_call_server_syscall_exception        ; The syscall number is invalid
+                       subi    r29,r29,8                                               ; Get the number of arguments to copy 
+
+                       addi    r28,r28,COPYIN_ARG0_OFFSET-4    ; Point to source - 4 
+                       addi    r27,r1,FM_ARG0-4                        ; Point to sink - 4
+
+.L_syscall_copy_word_loop:
+                       addic.  r29,r29,-1                                              ; Count down the number of arguments left
+                       lwz             r0,4(r28)                                               ; Pick up the argument from the stack 
+                       addi    r28,r28,4                                               ; Point to the next source 
+                       stw             r0,4(r27)                                               ; Store the argument 
+                       addi    r27,r27,4                                               ; Point to the next sink 
+                       bne+    .L_syscall_copy_word_loop               ; Move all arguments... 
+                       b               .L_syscall_got_args                             ; Go call it now... 
+
+
+/* we came from a user task, pay the price of a real copyin */ 
+/* set recovery point */
+
+                       .align  5
+
+.L_syscall_arg_copyin:
+                       lwz             r8,ACT_VMMAP(r13)                               ; Get the vm_map for this activation
+                       lis             r28,hi16(.L_syscall_copyin_recover)
+                       lwz             r8,VMMAP_PMAP(r8)                               ; Get the pmap
+                       ori             r28,r28,lo16(.L_syscall_copyin_recover)
+                       addi    r8,r8,PMAP_SEGS                                 ; Point to the pmap SR slots
+                       stw             r28,THREAD_RECOVER(r16)                 ; R16 still holds thread ptr 
+
+/* We can manipulate the COPYIN segment register quite easily
+ * here, but we've also got to make sure we don't go over a
+ * segment boundary - hence some mess.
+ * Registers from 12-29 are free for our use.
+ */
        
-                       lwz             r0,MACH_TRAP_FUNCTION(r31)      ; Pick up the function address
 
-;
-;      NOTE: We do not support more than 8 parameters for PPC.  The only 
-;      system call to use more than 8 is mach_msg_overwrite_trap and it
-;      uses 9.  We pass a 0 in as number 9.
-;
-                       lwz             r8,ACT_TASK(r13)                        ; Get our task 
-                       lis             r29,hi16(EXT(kern_invalid))     ; Get high half of invalid syscall function
-                       ori             r29,r29,lo16(EXT(kern_invalid)) ; Get low half of invalid syscall function
-                       lwz             r7,TASK_SYSCALLS_MACH(r8)               ; Get the current count
-                       lis             r10,hi16(EXT(c_syscalls_mach))  ; Get top half of counter address 
-                       lwz             r3,saver3+4(r30)                        ; Restore r3 
-                       addi    r7,r7,1                                         ; Bump it
-                       cmp             cr0,r0,r29                                      ; Check if this is an invalid system call
-                       ori             r10,r10,lo16(EXT(c_syscalls_mach))      ; Get low half of counter address 
-                       beq-    .L_call_server_syscall_exception        ; We have a bad one...
-                       stw             r7,TASK_SYSCALLS_MACH(r8)       ; Save count
-                       lwz             r4,saver4+4(r30)                        ; Restore r4 
-                       lwz             r9,0(r10)                                       ; Get counter   
-                       mtctr   r0                                                      ; Set the function call address
-                       lwz             r5,saver5+4(r30)                        ; Restore r5 
-                       lwz             r6,saver6+4(r30)                        ; Restore r6
-                       addi    r9,r9,1                                         ; Add 1 
-                       lwz             r7,saver7+4(r30)                        ; Restore r7
-                       li              r0,0                                            ; Clear this out
-                       lwz             r8,saver8+4(r30)                        ; Restore r8 
-                       stw             r9,0(r10)                                       ; Save it back
-                       lwz             r9,saver9+4(r30)                        ; Restore r9 
-                       lwz             r10,saver10+4(r30)              ; Restore r10
-                       stw             r0,FM_ARG0(r1)                          ; Clear that 9th parameter just in case some fool uses it
-                       bctrl                                                           ; perform the actual syscall
+                       lwz             r28,saver1(r30)                                 ; Get the stack pointer 
+                       subi    r29,r29,8                                               ; Get the number of arguments to copy
+                       addi    r28,r28,COPYIN_ARG0_OFFSET              ; Set source in user land 
+
+/* set up SR_COPYIN to allow us to copy, we may need to loop
+ * around if we change segments. We know that this previously
+ * pointed to user space, so the sid doesn't need setting.
+ */
+
+                       rlwinm  r7,r28,6,26,29                                  ; Get index to the segment slot
+
+.L_syscall_copyin_seg_loop:                    
+                       lwzx    r10,r8,r7                                               ; Get the source SR value
+                       rlwinm  r26,r28,0,4,31                                  ; Clear the segment number from source address
+                       mtsr    SR_COPYIN,r10                                   ; Set the copyin SR
+                       isync
+
+                       oris    r26,r26,(SR_COPYIN_NUM << (28-16))      ; Insert the copyin segment number into source address
+       
+                       addi    r27,r1,FM_ARG0-4                                ; Point to area - 4 where we will store the arguments
        
-                       lis             r10,hi16(EXT(kdebug_enable))    ; Get top of kdebug_enable 
-                       ori             r10,r10,lo16(EXT(kdebug_enable))        ; Get bottom of kdebug_enable 
-                       lwz             r10,0(r10)                                      ; Get kdebug_enable 
-                       cmplwi  r10,0                                           ; Is kdebug_enable false?
+.L_syscall_copyin_word_loop:                   
+                       lwz             r0,0(r26)                                               ; MAY CAUSE PAGE FAULT!
+                       subi    r29,r29,1                                               ; Decrement count
+                       addi    r26,r26,4                                               ; Bump input
+                       stw             r0,4(r27)                                               ; Save the copied in word
+                       mr.             r29,r29                                                 ; Are they all moved?
+                       addi    r27,r27,4                                               ; Bump output
+                       beq+    .L_syscall_copyin_done                  ; Escape if we are done...
        
-                       beq++   .L_syscall_return                       ; No tracing...
-                       mr              r4,r30                                          ; Pass in the savearea
-                       bl              EXT(syscall_trace_end)          ; Trace the exit of the system call     
+                       rlwinm. r0,r26,0,4,29                                   ; Did we just step into a new segment?          
+                       addi    r28,r28,4                                               ; Bump up user state address also
+                       bne+    .L_syscall_copyin_word_loop             ; We are still on the same segment...
+
+                       addi    r7,r7,4                                                 ; Bump to next slot
+                       b               .L_syscall_copyin_seg_loop              ; On new segment! remap 
+
+/* Don't bother restoring SR_COPYIN, we can leave it trashed */
+/* clear thread recovery as we're done touching user data */
+
+                       .align  5
+
+.L_syscall_copyin_done:        
+                       li              r0,0
+                       stw             r0,THREAD_RECOVER(r16)                  ; R16 still holds thread ptr 
+
+.L_syscall_got_args:
+                       lwz             r0,MACH_TRAP_FUNCTION(r31)              ; Get function address
+                       lwz             r8,ACT_TASK(r13)                                ; Get our task 
+                       lis             r10,hi16(EXT(c_syscalls_mach))  ; Get top half of counter address
+                       lwz             r7,TASK_SYSCALLS_MACH(r8)               ; Get the current count
+                       lwz             r3,saver3(r30)                                  ; Restore r3
+                       addi    r7,r7,1                                                 ; Bump it
+                       ori             r10,r10,lo16(EXT(c_syscalls_mach)) ; Get low half of counter address 
+                       stw             r7,TASK_SYSCALLS_MACH(r8)               ; Save it
+                       lwz             r4,saver4(r30)                                  ; Restore r4 
+                       lwz             r9,0(r10)                                               ; Get counter   
+                       mtctr   r0                                                              ; Set function address
+                       lwz             r5,saver5(r30)                                  ; Restore r5 
+                       lwz             r6,saver6(r30)                                  ; Restore r6
+                       addi    r9,r9,1                                                 ; Add 1 
+                       lwz             r7,saver7(r30)                                  ; Restore r7 
+                       lwz             r8,saver8(r30)                                  ; Restore r8 
+                       stw             r9,0(r10)                                               ; Save it back  
+                       lwz             r9,saver9(r30)                                  ; Restore r9 
+                       lwz             r10,saver10(r30)                                ; Restore r10
+
+
+;
+;                      Note that all arguments from the system call are passed into the function
+;
+
+                       bctrl                                                                   ; Perform the actual syscall
 
 /* 'standard' syscall returns here - INTERRUPTS ARE STILL ON */
 
@@ -579,13 +643,16 @@ ksysnotrc:        cmplw   r31,r29                                         ; Is this syscall in the table?
 
 .L_syscall_return:     
                        mr              r31,r16                                                 ; Move the current thread pointer
-                       stw             r3,saver3+4(r30)                                ; Stash the return code
+                       stw             r3,saver3(r30)                                  ; Stash the return code
+       
+                       mr              r4,r30                                                  ; Pass in the savearea
+                       bl              EXT(syscall_trace_end)                  ; Trace the exit of the system call     
        
 .L_thread_syscall_ret_check_ast:       
-                       lis             r10,hi16(MASK(MSR_VEC))                 ; Get the vector enable
                        mfmsr   r12                                                             ; Get the current MSR 
-                       ori             r10,r10,lo16(MASK(MSR_FP)|MASK(MSR_EE)) ; Add in FP and EE
-                       andc    r12,r12,r10                                             ; Turn off VEC, FP, and EE
+                       rlwinm  r12,r12,0,MSR_FP_BIT+1,MSR_FP_BIT-1     ; Force floating point off
+                       rlwinm  r12,r12,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1   ; Force vectors off
+                       rlwinm  r12,r12,0,MSR_EE_BIT+1,MSR_EE_BIT-1     ; Turn off interruptions enable bit
                        mtmsr   r12                                                             ; Turn interruptions off
                        
                        mfsprg  r10,0                                                   ; Get the per_processor block
@@ -595,7 +662,7 @@ ksysnotrc:  cmplw   r31,r29                                         ; Is this syscall in the table?
                        lwz             r4,PP_NEED_AST(r10)                             ; Get the pointer to the ast requests
                        lwz             r4,0(r4)                                                ; Get the flags
                        cmpi    cr0,r4, 0                                               ; Any pending asts?
-                       beq++   cr0,.L_syscall_no_ast                   ; Nope...
+                       beq+    cr0,.L_syscall_no_ast                   ; Nope...
 
 /* Yes there is, call ast_taken 
  * pretending that the user thread took an AST exception here,
@@ -604,9 +671,9 @@ ksysnotrc:  cmplw   r31,r29                                         ; Is this syscall in the table?
 
 #if    DEBUG
 /* debug assert - make sure that we're not returning to kernel */
-                       lwz             r3,savesrr1+4(r30)
+                       lwz             r3,savesrr1(r30)
                        andi.   r3,r3,MASK(MSR_PR)
-                       bne++   scrnotkern                                              ; returning to user level, check 
+                       bne+    scrnotkern                                              ; returning to user level, check 
                        
                        lis             r0,hi16(Choke)                                  ; Choke code
                        ori             r0,r0,lo16(Choke)                               ; and the rest
@@ -636,17 +703,40 @@ scrnotkern:
 .L_thread_syscall_return:
 
                        mr              r3,r30                                                  ; Get savearea to the correct register for common exit
-                       lwz             r5,THREAD_KERNEL_STACK(r31)             ; Get the base pointer to the stack 
-                       lwz             r11,SAVflags(r30)                               ; Get the flags 
-                       lwz             r4,SAVprev+4(r30)                               ; Get the previous save area
                        mfsprg  r8,1                                                    ; Now find the current activation 
+
+                       lwz             r11,SAVflags(r30)                               ; Get the flags 
+                       lwz             r5,THREAD_KERNEL_STACK(r31)             ; Get the base pointer to the stack 
+                       rlwinm  r11,r11,0,15,13                                 ; Clear the syscall flag
+                       lwz             r4,SAVprev(r30)                                 ; Get the previous save area
+                       stw             r11,SAVflags(r30)                               ; Stick back the flags
                        addi    r5,r5,KERNEL_STACK_SIZE-FM_SIZE ; Reset to empty
                        stw             r4,ACT_MACT_PCB(r8)                             ; Save previous save area
-                       rlwinm  r11,r11,0,15,13                                 ; Clear the syscall flag
                        stw             r5,ACT_MACT_KSP(r8)                             ; Save the empty stack pointer
-                       stw             r11,SAVflags(r30)                               ; Stick back the flags
                        b               chkfac                                                  ; Go end it all...
 
+                       .align  5
+
+.L_syscall_copyin_recover:
+
+/* This is the catcher for any data faults in the copyin
+ * of arguments from the user's stack.
+ * r30 still holds a pointer to the PCB
+ *
+ * call syscall_error(EXC_BAD_ACCESS, EXC_PPC_VM_PROT_READ, sp, ssp),
+ *
+ * we already had a frame so we can do this
+ */    
+       
+                       li              r3,EXC_BAD_ACCESS                               ; Set bad access code
+                       li              r4,EXC_PPC_VM_PROT_READ                 ; Set protection exception
+                       lwz             r5,saver1(r30)                                  ; Point to the stack
+                       mr              r6,r30                                                  ; Pass savearea
+               
+                       bl              EXT(syscall_error)                              ; Generate error...
+                       b               .L_syscall_return                               ; Continue out...
+
+               
 /*
  * thread_exception_return()
  *
@@ -661,10 +751,10 @@ LEXT(thread_bootstrap_return)                                             ; NOTE: THIS IS GOING AWAY IN A FEW DAYS....
 LEXT(thread_exception_return)                                          ; Directly return to user mode
 
 .L_thread_exc_ret_check_ast:   
-                       lis             r10,hi16(MASK(MSR_VEC))                 ; Get the vector enable
                        mfmsr   r3                                                              ; Get the MSR 
-                       ori             r10,r10,lo16(MASK(MSR_FP)|MASK(MSR_EE)) ; Add in FP and EE
-                       andc    r3,r3,r10                                               ; Turn off VEC, FP, and EE
+                       rlwinm  r3,r3,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r3,r3,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r3,r3,0,MSR_EE_BIT+1,MSR_EE_BIT-1       ; Clear EE 
                        mtmsr   r3                                                              ; Disable interrupts
 
 /* Check to see if there's an outstanding AST */
@@ -675,16 +765,17 @@ LEXT(thread_exception_return)                                             ; Directly return to user mode
                
                        mfsprg  r10,0                                                   ; Get the per_processor block 
                        lwz             r4,PP_NEED_AST(r10)
-                       li              r3,AST_ALL
                        lwz             r4,0(r4)
                        cmpi    cr0,r4, 0
-                       li              r4,1
-                       beq+            cr0,.L_exc_ret_no_ast
+                       beq             cr0,.L_exc_ret_no_ast
                
 /* Yes there is, call ast_taken 
  * pretending that the user thread took an AST exception here,
  * ast_taken will save all state and bring us back here
  */
+       
+                       li              r3,AST_ALL
+                       li              r4,1
                        
                        bl              EXT(ast_taken)
                        b               .L_thread_exc_ret_check_ast             ; check for a second AST (rare)
@@ -706,7 +797,7 @@ LEXT(thread_exception_return)                                               ; Directly return to user mode
  * get the active thread's PCB pointer and thus pointer to user state
  */
                
-                       lwz             r3,savesrr1+4(r30)
+                       lwz             r3,savesrr1(r30)
                        andi.   r3,r3,MASK(MSR_PR)
                        bne+    ret_user2                                               ; We are ok...
 
@@ -723,9 +814,9 @@ ret_user2:
  * which takes PCB pointer in R3, not in r30!
  */
                        lwz             r0,SAVflags(r30)                                ; Grab the savearea flags
-                       andis.  r0,r0,SAVsyscall>>16                    ; Are we returning from a syscall?
                        mr              r3,r30                                                  ; Copy pcb pointer into r3 in case we need it
-                       beq--   cr0,thread_return                               ; Nope, must be a thread return...
+                       andis.  r0,r0,SAVsyscall>>16                    ; Are we returning from a syscall?
+                       beq-    cr0,thread_return                               ; Nope, must be a thread return...
                        b               .L_thread_syscall_return                ; Join up with the system call return...
 
 ;
@@ -741,7 +832,7 @@ makeDummyCtx:
                        li              r4,SAVgeneral                                   ; Get the general context type
                        li              r0,0                                                    ; Get a 0
                        stb             r4,SAVflags+2(r3)                               ; Set type
-                       addi    r2,r3,savefpscr+4                               ; Point past what we are clearing
+                       addi    r2,r3,savevscr                                  ; Point past what we are clearing
                        mr              r4,r3                                                   ; Save the start
                        
 cleardummy:    stw             r0,0(r4)                                                ; Clear stuff
@@ -751,7 +842,7 @@ cleardummy: stw             r0,0(r4)                                                ; Clear stuff
                        
                        lis             r2,hi16(MSR_EXPORT_MASK_SET)    ; Set the high part of the user MSR
                        ori             r2,r2,lo16(MSR_EXPORT_MASK_SET) ; And the low part
-                       stw             r2,savesrr1+4(r3)                               ; Set the default user MSR
+                       stw             r2,savesrr1(r3)                                 ; Set the default user MSR
        
                        b               thread_return                                   ; Go let em try to execute, hah!
        
@@ -775,7 +866,7 @@ LEXT(ihandler)                                                                              ; Interrupt handler */
  * interrupt stack.
  */
 
-                       lwz             r10,savesrr1+4(r4)                              ; Get SRR1 
+                       lwz             r10,savesrr1(r4)                                ; Get SRR1 
                        lwz             r7,savevrsave(r4)                               ; Get the VRSAVE register
                        mfsprg  r25,0                                                   ; Get the per_proc block
                        li              r14,0                                                   ; Zero this for now
@@ -787,15 +878,16 @@ LEXT(ihandler)                                                                            ; Interrupt handler */
                        beq+    ivecoff                                                 ; Vector off, do not save vrsave...
                        stw             r7,liveVRS(r25)                                 ; Set the live value
 
-ivecoff:       cmplwi  cr1,r16,0                                               ; Are we still booting? 
+ivecoff:       li              r0,0                                                    ; Get a constant 0
+                       cmplwi  cr1,r16,0                                               ; Are we still booting? 
 
 ifpoff:                mr.             r1,r1                                                   ; Is it active?
                        beq-    cr1,ihboot1                                             ; We are still coming up...
                        lwz             r13,THREAD_TOP_ACT(r16)                 ; Pick up the active thread
                        lwz             r14,ACT_MACT_PCB(r13)                   ; Now point to the PCB 
 
-ihboot1:       lwz             r9,saver1+4(r4)                                 ; Pick up the rupt time stack
-                       stw             r14,SAVprev+4(r4)                               ; Queue the new save area in the front
+ihboot1:       lwz             r9,saver1(r4)                                   ; Pick up the rupt time stack
+                       stw             r14,SAVprev(r4)                                 ; Queue the new save area in the front
                        stw             r13,SAVact(r4)                                  ; Point the savearea at its activation
                        beq-    cr1,ihboot4                                             ; We are still coming up...
                        stw             r4,ACT_MACT_PCB(r13)                    ; Point to our savearea 
@@ -817,27 +909,19 @@ ihboot4:  bne             .L_istackfree                                   ; Nope...
                        subi    r5,r5,KERNEL_STACK_SIZE-FM_SIZE ; Adjust to start of stack
                        sub             r5,r1,r5                                                ; Get displacement into debug stack
                        cmplwi  cr2,r5,KERNEL_STACK_SIZE-FM_SIZE        ; Check if we are on debug stack
-                       blt+    cr2,ihsetback                                   ; Yeah, that is ok too...
+                       blt+    ihsetback                                               ; Yeah, that is ok too...
 
                        lis             r0,hi16(Choke)                                  ; Choke code
                        ori             r0,r0,lo16(Choke)                               ; and the rest
                        li              r3,failStack                                    ; Bad stack code
                        sc                                                                              ; System ABEND
 
-intUnalignedStk:
-                       lis             r0,hi16(Choke)                                  ; Choke code
-                       ori             r0,r0,lo16(Choke)                               ; and the rest
-                       li              r3,failUnalignedStk                             ; Unaligned stack code
-                       sc                                                                              ; System ABEND
-
                        .align  5
                        
 .L_istackfree:
-                       rlwinm. r0,r1,0,28,31                                   ; Check if stack is aligned (and get 0)
-                       lwz             r10,SAVflags(r4)                                ; Get savearea flags
-                       bne--   intUnalignedStk                                 ; Stack is unaligned...
+                       lwz             r10,SAVflags(r4)                        
                        stw             r0,PP_ISTACKPTR(r25)                    ; Mark the stack in use 
-                       oris    r10,r10,hi16(SAVrststk)                 ; Indicate we reset stack when we return from this one 
+                       oris    r10,r10,HIGH_ADDR(SAVrststk)    ; Indicate we reset stack when we return from this one 
                        stw             r10,SAVflags(r4)                                ; Stick it back         
        
 /*
@@ -862,13 +946,13 @@ ihbootnover:                                                                              ; (TEST/DEBUG)
  * which links back to the trapped routine. The second is
  * that which the C routine below will need
  */
-                       lwz             r5,savesrr0+4(r4)                               ; Get interrupt address 
+                       lwz             r5,savesrr0(r4)                                 ; Get interrupt address 
                        stw             r5,FM_LR_SAVE(r1)                               ; save old instr ptr as LR value 
                        stwu    r1,-FM_SIZE(r1)                                 ; Make another new frame for C routine
 #endif /* DEBUG */
 
                        lwz             r5,savedsisr(r4)                                ; Get the DSISR
-                       lwz             r6,savedar+4(r4)                                ; Get the DAR 
+                       lwz             r6,savedar(r4)                                  ; Get the DAR 
                        
                        bl      EXT(interrupt)
 
@@ -881,22 +965,26 @@ ihbootnover:                                                                              ; (TEST/DEBUG)
 
 LEXT(ihandler_ret)                                                                     ; Marks our return point from debugger entry
 
-                       lis             r10,hi16(MASK(MSR_VEC))                 ; Get the vector enable
                        mfmsr   r0                                                              ; Get our MSR
-                       ori             r10,r10,lo16(MASK(MSR_FP)|MASK(MSR_EE)) ; Add in FP and EE
-                       andc    r0,r0,r10                                               ; Turn off VEC, FP, and EE
+                       rlwinm  r0,r0,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r0,r0,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r0,r0,0,MSR_EE_BIT+1,MSR_EE_BIT-1       ; Flip off the interrupt enabled bit
                        mtmsr   r0                                                              ; Make sure interrupts are disabled
                        mfsprg  r10,0                                                   ; Get the per_proc block
                
                        lwz             r7,SAVflags(r3)                                 ; Pick up the flags
                        lwz             r8,PP_ACTIVE_THREAD(r10)                ; and the active thread 
-                       lwz             r9,SAVprev+4(r3)                                        ; Get previous save area
+                       lwz             r9,SAVprev(r3)                                  ; Get previous save area
                        cmplwi  cr1,r8,0                                                ; Are we still initializing?
-                       lwz             r12,savesrr1+4(r3)                              ; Get the MSR we will load on return 
+                       lwz             r12,savesrr1(r3)                                ; Get the MSR we will load on return 
+                       beq-    cr1,ihboot2                                             ; Skip if we are still in init... 
                        lwz             r8,THREAD_TOP_ACT(r8)                   ; Pick up the active thread 
-                       andis.  r11,r7,hi16(SAVrststk)                  ; Is this the first on the stack?
+
+ihboot2:       andis.  r11,r7,hi16(SAVrststk)                  ; Is this the first on the stack?
+                       beq-    cr1,ihboot3                                             ; Skip if we are still in init... 
                        stw             r9,ACT_MACT_PCB(r8)                             ; Point to previous context savearea 
-                       mr              r4,r3                                                   ; Move the savearea pointer
+
+ihboot3:       mr              r4,r3                                                   ; Move the savearea pointer
                        beq             .L_no_int_ast2                                  ; Get going if not the top-o-stack...
 
 
@@ -909,7 +997,7 @@ LEXT(ihandler_ret)                                                                  ; Marks our return point from debugger entry
                        lwz             r9,PP_INTSTACK_TOP_SS(r10)              ; Get the empty stack value 
                        andc    r7,r7,r11                                               ; Remove the stack reset bit in case we pass this one
                        stw             r9,PP_ISTACKPTR(r10)                    ; Save that saved state ptr 
-                       lwz             r3,ACT_PREEMPT_CNT(r8)                  ; Get preemption level 
+                       lwz             r3,PP_PREEMPT_CNT(r10)          ; Get preemption level 
                        stw             r7,SAVflags(r4)                                 ; Save the flags
                        cmplwi  r3, 0                                                   ; Check for preemption
                        bne             .L_no_int_ast                                   ; Do not preempt if level is not zero
@@ -946,7 +1034,7 @@ LEXT(ihandler_ret)                                                                 ; Marks our return point from debugger entry
                        rlwinm  r7,r7,0,15,13                                   ; Clear the syscall flag
                        li              r4,0                                                    ; Assume for a moment that we are in init
                        stw             r7,SAVflags(r3)                                 ; Set the flags with cleared syscall flag
-                       beq--   cr1,chkfac                                              ; Jump away if we are in init...
+                       beq-    cr1,chkfac                                              ; Jump away if we are in init...
 
                        lwz             r4,ACT_MACT_PCB(r8)                             ; Get the new level marker
 
@@ -972,27 +1060,31 @@ LEXT(ihandler_ret)                                                                       ; Marks our return point from debugger entry
 ;                      are going to user state.  CR2_eq will be set to indicate deferred.
 ;
 
-chkfac:                lwz             r29,savesrr1+4(r3)                              ; Get the current MSR
-                       mr.             r28,r8                                                  ; Are we still in boot?
-                       mr              r31,r10                                                 ; Move per_proc address
+chkfac:                mr              r31,r10                                                 ; Move per_proc address
                        mr              r30,r4                                                  ; Preserve new level
+                       lwz             r29,savesrr1(r3)                                ; Get the current MSR
+                       mr.             r28,r8                                                  ; Are we still in boot?
                        mr              r27,r3                                                  ; Save the old level
-                       beq--   chkenax                                                 ; Yeah, skip it all...
+                       beq-    chkenax                                                 ; Yeah, skip it all...
                        
                        rlwinm. r0,r29,0,MSR_PR_BIT,MSR_PR_BIT  ; Are we going into user state?
 
+#if 0
+                       beq+    lllll                                                   ; (TEST/DEBUG)
+                       BREAKPOINT_TRAP                                                 ; (TEST/DEBUG)
+lllll:
+#endif
+                       
                        lwz             r20,curctx(r28)                                 ; Get our current context
                        lwz             r26,deferctx(r28)                               ; Get any deferred context switch
-                       li              r0,1                                                    ; Get set to hold off quickfret
                        rlwinm  r29,r29,0,MSR_FP_BIT+1,MSR_FP_BIT-1     ; Turn off floating point for now
                        lwz             r21,FPUlevel(r20)                               ; Get the facility level
                        cmplwi  cr2,r26,0                                               ; Are we going into a deferred context later?
                        rlwinm  r29,r29,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1   ; Turn off vector for now
                        crnor   cr2_eq,cr0_eq,cr2_eq                    ; Set cr2_eq if going to user state and there is deferred
-                       lhz             r19,PP_CPU_NUMBER(r31)                  ; Get our CPU number
                        cmplw   r27,r21                                                 ; Are we returning from the active level?
-                       stw             r0,holdQFret(r31)                               ; Make sure we hold off releasing quickfret
-                       bne++   fpuchkena                                               ; Nope...
+                       lhz             r19,PP_CPU_NUMBER(r31)                  ; Get our CPU number
+                       bne+    fpuchkena                                               ; Nope...
 
 ;
 ;                      First clean up any live context we are returning from
@@ -1003,28 +1095,21 @@ chkfac:         lwz             r29,savesrr1+4(r3)                              ; Get the current MSR
                        stw             r19,FPUcpu(r20)                                 ; Claim context for us
                        
                        eieio                                                                   ; Make sure this gets out before owner clear
-
-#if ppSize != 4096
-#error per_proc_info is not 4k in size
-#endif
                        
                        lis             r23,hi16(EXT(per_proc_info))    ; Set base per_proc
-                       slwi    r22,r22,12                                              ; FInd offset to the owner per_proc
+                       mulli   r22,r22,ppSize                                  ; Find offset to the owner per_proc                     
                        ori             r23,r23,lo16(EXT(per_proc_info))        ; Set base per_proc
                        li              r24,FPUowner                                    ; Displacement to FPU owner
                        add             r22,r23,r22                                             ; Point to the owner per_proc   
+                       li              r0,0                                                    ; We need this in a bit
                        
 fpuinvothr:    lwarx   r23,r24,r22                                             ; Get the owner
-
-                       sub             r0,r23,r20                                              ; Subtract one from the other
-                       sub             r21,r20,r23                                             ; Subtract the other from the one
-                       or              r21,r21,r0                                              ; Combine them
-                       srawi   r21,r21,31                                              ; Get a 0 if equal or -1 of not
-                       and             r23,r23,r21                                             ; Make 0 if same, unchanged if not
-                       stwcx.  r23,r24,r22                                             ; Try to invalidate it
-                       bne--   fpuinvothr                                              ; Try again if there was a collision...
-
-                       isync
+                       cmplw   r23,r20                                                 ; Does he still have this context?
+                       bne             fpuinvoths                                              ; Nope...               
+                       stwcx.  r0,r24,r22                                              ; Try to invalidate it
+                       bne-    fpuinvothr                                              ; Try again if there was a collision...
+                       
+fpuinvoths:    isync
 
 ;
 ;                      Now if there is a savearea associated with the popped context, release it.
@@ -1034,31 +1119,24 @@ fpuinvothr:     lwarx   r23,r24,r22                                             ; Get the owner
                        lwz             r22,FPUsave(r20)                                ; Get pointer to the first savearea
                        li              r21,0                                                   ; Assume we popped all the way out
                        mr.             r22,r22                                                 ; Is there anything there?
-                       beq++   fpusetlvl                                               ; No, see if we need to enable...
+                       beq+    fpusetlvl                                               ; No, see if we need to enable...
                        
                        lwz             r21,SAVlevel(r22)                               ; Get the level of that savearea
                        cmplw   r21,r27                                                 ; Is this the saved copy of the live stuff?
                        bne             fpusetlvl                                               ; No, leave as is...
                        
-                       lwz             r24,SAVprev+4(r22)                              ; Pick up the previous area
+                       lwz             r24,SAVprev(r22)                                ; Pick up the previous area
                        li              r21,0                                                   ; Assume we popped all the way out
                        mr.             r24,r24                                                 ; Any more context stacked?
-                       beq--   fpuonlyone                                              ; Nope...
+                       beq-    fpuonlyone                                              ; Nope...
                        lwz             r21,SAVlevel(r24)                               ; Get the level associated with save
 
 fpuonlyone:    stw             r24,FPUsave(r20)                                ; Dequeue this savearea
 
                        rlwinm  r3,r22,0,0,19                                   ; Find main savearea header
-
-                       lwz             r8,quickfret(r31)                               ; Get the first in quickfret list (top)                                 
-                       lwz             r9,quickfret+4(r31)                             ; Get the first in quickfret list (bottom)                                      
-                       lwz             r2,SACvrswap(r3)                                ; Get the virtual to real conversion (top)
-                       lwz             r3,SACvrswap+4(r3)                              ; Get the virtual to real conversion (bottom)
-                       stw             r8,SAVprev(r22)                                 ; Link the old in (top)                                 
-                       stw             r9,SAVprev+4(r22)                               ; Link the old in (bottom)                                      
+                       lwz             r3,SACvrswap(r3)                                ; Get the virtual to real conversion
+                       la              r9,quickfret(r31)                               ; Point to the quickfret chain header                                   
                        xor             r3,r22,r3                                               ; Convert to physical
-                       stw             r2,quickfret(r31)                               ; Set the first in quickfret list (top)                                 
-                       stw             r3,quickfret+4(r31)                             ; Set the first in quickfret list (bottom)                                      
                        
 #if FPVECDBG
                        lis             r0,HIGH_ADDR(CutTrace)                  ; (TEST/DEBUG)
@@ -1067,6 +1145,11 @@ fpuonlyone:      stw             r24,FPUsave(r20)                                ; Dequeue this savearea
                        sc                                                                              ; (TEST/DEBUG)
 #endif                         
 
+fpufpucdq:     lwarx   r0,0,r9                                                 ; Pick up the old chain head
+                       stw             r0,SAVprev(r22)                                 ; Move it to the current guy
+                       stwcx.  r3,0,r9                                                 ; Save it
+                       bne-    fpufpucdq                                               ; Someone chaged the list...
+
 fpusetlvl:     stw             r21,FPUlevel(r20)                               ; Save the level
                
 ;
@@ -1076,65 +1159,33 @@ fpusetlvl:      stw             r21,FPUlevel(r20)                               ; Save the level
 ;                      going into user state.
 ;
                        
-fpuchkena:     bt--    cr2_eq,fpuhasdfrd                               ; Skip if deferred, R26 already set up...
+fpuchkena:     bt-             cr2_eq,fpuhasdfrd                               ; Skip if deferred, R26 already set up...
                        mr              r26,r20                                                 ; Use the non-deferred value
                        
-fpuhasdfrd:    
-#if 0
-                       rlwinm. r0,r29,0,MSR_PR_BIT,MSR_PR_BIT  ; (TEST/DEBUG) Going into user state?
-                       beq             fpunusrstt                                              ; (TEST/DEBUG) Nope...  
-                       lwz             r23,FPUlevel(r26)                               ; (TEST/DEBUG) Get the level ID
-                       lwz             r24,FPUsave(r26)                                ; (TEST/DEBUG) Get the first savearea
-                       mr.             r23,r23                                                 ; (TEST/DEBUG) Should be level 0
-                       beq++   fpulvl0                                                 ; (TEST/DEBUG) Yes...
-                       BREAKPOINT_TRAP                                                 ; (TEST/DEBUG)
-                       
-fpulvl0:       mr.             r24,r24                                                 ; (TEST/DEBUG) Any context?
-                       beq             fpunusrstt                                              ; (TEST/DEBUG) No...
-                       lwz             r23,SAVlevel(r24)                               ; (TEST/DEBUG) Get level of context
-                       lwz             r21,SAVprev+4(r24)                              ; (TEST/DEBUG) Get previous pointer
-                       mr.             r23,r23                                                 ; (TEST/DEBUG) Is this our user context?
-                       beq++   fpulvl0b                                                ; (TEST/DEBUG) Yes...
-                       BREAKPOINT_TRAP                                                 ; (TEST/DEBUG)
-                       
-fpulvl0b:      mr.             r21,r21                                                 ; (TEST/DEBUG) Is there a forward chain?
-                       beq++   fpunusrstt                                              ; (TEST/DEBUG) Nope...
-                       BREAKPOINT_TRAP                                                 ; (TEST/DEBUG)
-                                               
-fpunusrstt:                                                                                    ; (TEST/DEBUG)
-#endif                         
-                       
-                       lwz             r21,FPUowner(r31)                               ; Get the ID of the live context
+fpuhasdfrd:    lwz             r21,FPUowner(r31)                               ; Get the ID of the live context
                        lwz             r23,FPUlevel(r26)                               ; Get the level ID
-                       lwz             r24,FPUcpu(r26)                                 ; Get the CPU that the context was last dispatched on
                        cmplw   cr3,r26,r21                                             ; Do we have the live context?
+                       lwz             r24,FPUcpu(r26)                                 ; Get the CPU that the context was last dispatched on
+                       bne-    cr3,chkvec                                              ; No, can not possibly enable...
                        cmplw   r30,r23                                                 ; Are we about to launch the live level?
-                       bne--   cr3,chkvec                                              ; No, can not possibly enable...
                        cmplw   cr1,r19,r24                                             ; Was facility used on this processor last?
-                       bne--   chkvec                                                  ; No, not live...
-                       bne--   cr1,chkvec                                              ; No, wrong cpu, have to enable later....
+                       bne-    chkvec                                                  ; No, not live...
+                       bne-    cr1,chkvec                                              ; No, wrong cpu, have to enable later....
                        
                        lwz             r24,FPUsave(r26)                                ; Get the first savearea
                        mr.             r24,r24                                                 ; Any savearea?
-                       beq++   fpuena                                                  ; Nope...
+                       beq+    fpuena                                                  ; Nope...
                        lwz             r25,SAVlevel(r24)                               ; Get the level of savearea
-                       lwz             r0,SAVprev+4(r24)                               ; Get the previous
+                       lwz             r0,SAVprev(r24)                                 ; Get the previous
                        cmplw   r30,r25                                                 ; Is savearea for the level we are launching?
-                       bne++   fpuena                                                  ; No, just go enable...
+                       bne+    fpuena                                                  ; No, just go enable...
                        
                        stw             r0,FPUsave(r26)                                 ; Pop the chain
 
                        rlwinm  r3,r24,0,0,19                                   ; Find main savearea header
-
-                       lwz             r8,quickfret(r31)                               ; Get the first in quickfret list (top)                                 
-                       lwz             r9,quickfret+4(r31)                             ; Get the first in quickfret list (bottom)                                      
-                       lwz             r2,SACvrswap(r3)                                ; Get the virtual to real conversion (top)
-                       lwz             r3,SACvrswap+4(r3)                              ; Get the virtual to real conversion (bottom)
-                       stw             r8,SAVprev(r24)                                 ; Link the old in (top)                                 
-                       stw             r9,SAVprev+4(r24)                               ; Link the old in (bottom)                                      
+                       lwz             r3,SACvrswap(r3)                                ; Get the virtual to real conversion
+                       la              r9,quickfret(r31)                               ; Point to the quickfret chain header                                   
                        xor             r3,r24,r3                                               ; Convert to physical
-                       stw             r2,quickfret(r31)                               ; Set the first in quickfret list (top)                                 
-                       stw             r3,quickfret+4(r31)                             ; Set the first in quickfret list (bottom)                                      
 
 #if FPVECDBG
                        lis             r0,HIGH_ADDR(CutTrace)                  ; (TEST/DEBUG)
@@ -1142,11 +1193,34 @@ fpunusrstt:                                                                                     ; (TEST/DEBUG)
                        oris    r0,r0,LOW_ADDR(CutTrace)                ; (TEST/DEBUG)
                        sc                                                                              ; (TEST/DEBUG)
 #endif                         
+                       
+fpuhascdq:     lwarx   r0,0,r9                                                 ; Pick up the old chain head
+                       stw             r0,SAVprev(r24)                                 ; Move it to the current guy
+                       stwcx.  r3,0,r9                                                 ; Save it
+                       bne-    fpuhascdq                                               ; Someone chaged the list...
 
 fpuena:                ori             r29,r29,lo16(MASK(MSR_FP))              ; Enable facility                       
                        
 chkvec:                
 
+#if 0
+                       rlwinm. r21,r29,0,MSR_PR_BIT,MSR_PR_BIT ; (TEST/DEBUG)
+                       beq+    ppppp                                                   ; (TEST/DEBUG)
+                       lwz             r21,FPUlevel(r26)                               ; (TEST/DEBUG)
+                       mr.             r21,r21                                                 ; (TEST/DEBUG)
+                       bne-    qqqqq                                                   ; (TEST/DEBUG)
+                       lwz             r21,FPUsave(r26)                                ; (TEST/DEBUG)
+                       mr.             r21,r21                                                 ; (TEST/DEBUG)
+                       beq+    ppppp                                                   ; (TEST/DEBUG)
+                       lwz             r22,SAVlevel(r21)                               ; (TEST/DEBUG)
+                       mr.             r22,r22                                                 ; (TEST/DEBUG)
+                       beq+    ppppp                                                   ; (TEST/DEBUG)
+qqqqq:
+                       BREAKPOINT_TRAP                                                 ; (TEST/DEBUG)
+
+ppppp:                                                                                         ; (TEST/DEBUG)
+#endif
+                       
                        lwz             r21,VMXlevel(r20)                               ; Get the facility level
                
                        cmplw   r27,r21                                                 ; Are we returning from the active level?
@@ -1164,22 +1238,19 @@ chkvec:
                        eieio                                                                   ; Make sure this gets out before owner clear
                        
                        lis             r23,hi16(EXT(per_proc_info))    ; Set base per_proc
-                       slwi    r22,r22,12                                              ; Find offset to the owner per_proc                     
+                       mulli   r22,r22,ppSize                                  ; Find offset to the owner per_proc                     
                        ori             r23,r23,lo16(EXT(per_proc_info))        ; Set base per_proc
                        li              r24,VMXowner                                    ; Displacement to VMX owner
                        add             r22,r23,r22                                             ; Point to the owner per_proc   
+                       li              r0,0                                                    ; We need this in a bit
                        
 vmxinvothr:    lwarx   r23,r24,r22                                             ; Get the owner
-
-                       sub             r0,r23,r20                                              ; Subtract one from the other
-                       sub             r21,r20,r23                                             ; Subtract the other from the one
-                       or              r21,r21,r0                                              ; Combine them
-                       srawi   r21,r21,31                                              ; Get a 0 if equal or -1 of not
-                       and             r23,r23,r21                                             ; Make 0 if same, unchanged if not
-                       stwcx.  r23,r24,r22                                             ; Try to invalidate it
-                       bne--   vmxinvothr                                              ; Try again if there was a collision...
-
-                       isync
+                       cmplw   r23,r20                                                 ; Does he still have this context?
+                       bne             vmxinvoths                                              ; Nope...               
+                       stwcx.  r0,r24,r22                                              ; Try to invalidate it
+                       bne-    vmxinvothr                                              ; Try again if there was a collision...
+                       
+vmxinvoths:    isync
 
 ;
 ;                      Now if there is a savearea associated with the popped context, release it.
@@ -1189,31 +1260,24 @@ vmxinvothr:     lwarx   r23,r24,r22                                             ; Get the owner
                        lwz             r22,VMXsave(r20)                                ; Get pointer to the first savearea
                        li              r21,0                                                   ; Assume we popped all the way out
                        mr.             r22,r22                                                 ; Is there anything there?
-                       beq++   vmxsetlvl                                               ; No, see if we need to enable...
+                       beq+    vmxsetlvl                                               ; No, see if we need to enable...
                        
                        lwz             r21,SAVlevel(r22)                               ; Get the level of that savearea
                        cmplw   r21,r27                                                 ; Is this the saved copy of the live stuff?
                        bne             vmxsetlvl                                               ; No, leave as is...
                        
-                       lwz             r24,SAVprev+4(r22)                              ; Pick up the previous area
+                       lwz             r24,SAVprev(r22)                                ; Pick up the previous area
                        li              r21,0                                                   ; Assume we popped all the way out
                        mr.             r24,r24                                                 ; Any more context?
-                       beq--   vmxonlyone                                              ; Nope...
+                       beq-    vmxonlyone                                              ; Nope...
                        lwz             r21,SAVlevel(r24)                               ; Get the level associated with save
 
 vmxonlyone:    stw             r24,VMXsave(r20)                                ; Dequeue this savearea
                        
                        rlwinm  r3,r22,0,0,19                                   ; Find main savearea header
-
-                       lwz             r8,quickfret(r31)                               ; Get the first in quickfret list (top)                                 
-                       lwz             r9,quickfret+4(r31)                             ; Get the first in quickfret list (bottom)                                      
-                       lwz             r2,SACvrswap(r3)                                ; Get the virtual to real conversion (top)
-                       lwz             r3,SACvrswap+4(r3)                              ; Get the virtual to real conversion (bottom)
-                       stw             r8,SAVprev(r22)                                 ; Link the old in (top)                                 
-                       stw             r9,SAVprev+4(r22)                               ; Link the old in (bottom)                                      
-                       xor             r3,r24,r3                                               ; Convert to physical
-                       stw             r2,quickfret(r31)                               ; Set the first in quickfret list (top)                                 
-                       stw             r3,quickfret+4(r31)                             ; Set the first in quickfret list (bottom)                                      
+                       lwz             r3,SACvrswap(r3)                                ; Get the virtual to real conversion
+                       la              r9,quickfret(r31)                               ; Point to the quickfret chain header                                   
+                       xor             r3,r22,r3                                               ; Convert to physical
 
 #if FPVECDBG
                        lis             r0,HIGH_ADDR(CutTrace)                  ; (TEST/DEBUG)
@@ -1221,6 +1285,11 @@ vmxonlyone:      stw             r24,VMXsave(r20)                                ; Dequeue this savearea
                        oris    r0,r0,LOW_ADDR(CutTrace)                ; (TEST/DEBUG)
                        sc                                                                              ; (TEST/DEBUG)
 #endif                         
+                       
+vmxhscdq:      lwarx   r0,0,r9                                                 ; Pick up the old chain head
+                       stw             r0,SAVprev(r22)                                 ; Move it to the current guy
+                       stwcx.  r3,0,r9                                                 ; Save it
+                       bne-    vmxhscdq                                                ; Someone chaged the list...
 
 vmxsetlvl:     stw             r21,VMXlevel(r20)                               ; Save the level
                
@@ -1232,33 +1301,26 @@ vmxchkena:      lwz             r21,VMXowner(r31)                               ; Get the ID of the live context
                        lwz             r23,VMXlevel(r26)                               ; Get the level ID
                        cmplw   r26,r21                                                 ; Do we have the live context?
                        lwz             r24,VMXcpu(r26)                                 ; Get the CPU that the context was last dispatched on
-                       bne--   setena                                                  ; No, can not possibly enable...
+                       bne-    setena                                                  ; No, can not possibly enable...
                        cmplw   r30,r23                                                 ; Are we about to launch the live level?
                        cmplw   cr1,r19,r24                                             ; Was facility used on this processor last?
-                       bne--   setena                                                  ; No, not live...
-                       bne--   cr1,setena                                              ; No, wrong cpu, have to enable later....
+                       bne-    setena                                                  ; No, not live...
+                       bne-    cr1,setena                                              ; No, wrong cpu, have to enable later....
                        
                        lwz             r24,VMXsave(r26)                                ; Get the first savearea
                        mr.             r24,r24                                                 ; Any savearea?
-                       beq++   vmxena                                                  ; Nope...
+                       beq+    vmxena                                                  ; Nope...
                        lwz             r25,SAVlevel(r24)                               ; Get the level of savearea
-                       lwz             r0,SAVprev+4(r24)                               ; Get the previous
+                       lwz             r0,SAVprev(r24)                                 ; Get the previous
                        cmplw   r30,r25                                                 ; Is savearea for the level we are launching?
-                       bne++   vmxena                                                  ; No, just go enable...
+                       bne+    vmxena                                                  ; No, just go enable...
 
                        stw             r0,VMXsave(r26)                                 ; Pop the chain
                        
                        rlwinm  r3,r24,0,0,19                                   ; Find main savearea header
-
-                       lwz             r8,quickfret(r31)                               ; Get the first in quickfret list (top)                                 
-                       lwz             r9,quickfret+4(r31)                             ; Get the first in quickfret list (bottom)                                      
-                       lwz             r2,SACvrswap(r3)                                ; Get the virtual to real conversion (top)
-                       lwz             r3,SACvrswap+4(r3)                              ; Get the virtual to real conversion (bottom)
-                       stw             r8,SAVprev(r24)                                 ; Link the old in (top)                                 
-                       stw             r9,SAVprev+4(r24)                               ; Link the old in (bottom)                                      
+                       lwz             r3,SACvrswap(r3)                                ; Get the virtual to real conversion
+                       la              r9,quickfret(r31)                               ; Point to the quickfret chain header                                   
                        xor             r3,r24,r3                                               ; Convert to physical
-                       stw             r2,quickfret(r31)                               ; Set the first in quickfret list (top)                                 
-                       stw             r3,quickfret+4(r31)                             ; Set the first in quickfret list (bottom)                                      
 
 #if FPVECDBG
                        lis             r0,HIGH_ADDR(CutTrace)                  ; (TEST/DEBUG)
@@ -1267,19 +1329,20 @@ vmxchkena:      lwz             r21,VMXowner(r31)                               ; Get the ID of the live context
                        sc                                                                              ; (TEST/DEBUG)
 #endif                         
                        
+vmxckcdq:      lwarx   r0,0,r9                                                 ; Pick up the old chain head
+                       stw             r0,SAVprev(r24)                                 ; Move it to the current guy
+                       stwcx.  r3,0,r9                                                 ; Save it
+                       bne-    vmxckcdq                                                ; Someone chaged the list...
+                       
 vmxena:                oris    r29,r29,hi16(MASK(MSR_VEC))             ; Enable facility
 
-setena:                lwz             r18,cioSpace(r28)                               ; Get the space ID in case we are launching user
-                       rlwinm. r0,r29,0,MSR_PR_BIT,MSR_PR_BIT  ; Are we about to launch user state?
-                       li              r0,0                                                    ; Get set to release quickfret holdoff
+
+setena:                rlwinm. r0,r29,0,MSR_PR_BIT,MSR_PR_BIT  ; Are we about to launch user state?
+                       rlwinm  r20,r29,(((31-vectorCngbit)+(MSR_VEC_BIT+1))&31),vectorCngbit,vectorCngbit      ; Set flag if we enabled vector
+                       stw             r29,savesrr1(r27)                               ; Turn facility on or off
                        crmove  cr7_eq,cr0_eq                                   ; Remember if we are going to user state
-                       rlwimi. r20,r29,(((31-floatCngbit)+(MSR_FP_BIT+1))&31),floatCngbit,floatCngbit  ; Set flag if we enabled floats
                        lwz             r19,deferctx(r28)                               ; Get any deferred facility context switch
-                       rlwinm  r20,r29,(((31-vectorCngbit)+(MSR_VEC_BIT+1))&31),vectorCngbit,vectorCngbit      ; Set flag if we enabled vector
-                       stw             r29,savesrr1+4(r27)                             ; Turn facility on or off
-                       stw             r0,holdQFret(r31)                               ; Release quickfret
-                       oris    r18,r18,hi16(cioSwitchAway)             ; Set the switch-away bit in case we go to user
-
+                       rlwimi. r20,r29,(((31-floatCngbit)+(MSR_FP_BIT+1))&31),floatCngbit,floatCngbit  ; Set flag if we enabled floats
                        beq             setenaa                                                 ; Neither float nor vector turned on....
                        
                        lwz             r5,ACT_MACT_SPF(r28)                    ; Get activation copy
@@ -1299,15 +1362,15 @@ setenaa:        mfdec   r24                                                             ; Get decrementer
 nodefer:       lwz             r22,qactTimer(r28)                              ; Get high order quick activation timer
                        mr.             r24,r24                                                 ; See if it has popped already...
                        lwz             r23,qactTimer+4(r28)                    ; Get low order qact timer
-                       ble-    chkifuser                                               ; We have popped or are just about to...
+                       ble-    chkenax                                                 ; We have popped or are just about to...
                        
 segtb:         mftbu   r20                                                             ; Get the upper time base
                        mftb    r21                                                             ; Get the low
                        mftbu   r19                                                             ; Get upper again
                        or.             r0,r22,r23                                              ; Any time set?
                        cmplw   cr1,r20,r19                                             ; Did they change?
-                       beq++   chkifuser                                               ; No time set....
-                       bne--   cr1,segtb                                               ; Timebase ticked, get them again...
+                       beq+    chkenax                                                 ; No time set....
+                       bne-    cr1,segtb                                               ; Timebase ticked, get them again...
                        
                        subfc   r6,r21,r23                                              ; Subtract current from qact time
                        li              r0,0                                                    ; Make a 0
@@ -1315,15 +1378,12 @@ segtb:          mftbu   r20                                                             ; Get the upper time base
                        subfze  r0,r0                                                   ; Get a 0 if qact was bigger than current, -1 otherwise
                        andc.   r12,r5,r0                                               ; Set 0 if qact has passed
                        andc    r13,r6,r0                                               ; Set 0 if qact has passed
-                       bne             chkifuser                                               ; If high order is non-zero, this is too big for a decrementer
+                       bne             chkenax                                                 ; If high order is non-zero, this is too big for a decrementer
                        cmplw   r13,r24                                                 ; Is this earlier than the decrementer? (logical compare takes care of high bit on)
-                       bge++   chkifuser                                               ; No, do not reset decrementer...
+                       bge+    chkenax                                                 ; No, do not reset decrementer...
                        
                        mtdec   r13                                                             ; Set our value
 
-chkifuser:     beq--   cr7,chkenax                                             ; Skip this if we are going to kernel...
-                       stw             r18,cioSpace(r28)                               ; Half-invalidate to force MapUserAddressSpace to reload SRs
-
 chkenax:       
 
        
@@ -1345,40 +1405,13 @@ chkenax:
 yeswereok:
 #endif
        
-                       mr              r3,r27                                                  ; Pass savearea back
+                       rlwinm  r5,r27,0,0,19                                   ; Round savearea down to page bndry
+                       lwz             r5,SACvrswap(r5)                                ; Get the conversion from virtual to real
+                       xor             r3,r27,r5                                               ; Flip to physical address
                        b               EXT(exception_exit)                             ; We are all done now...
 
 
 
-;
-;                      Null PPC call - performance testing, does absolutely nothing
-;
-
-                       .align  5
-                       
-                       .globl  EXT(ppcNull)
-                       
-LEXT(ppcNull)
-
-                       li              r3,-1                                                   ; Make sure we test no asts
-                       blr
-
-
-;
-;                      Instrumented null PPC call - performance testing, does absolutely nothing
-;                      Forces various timestamps to be returned.
-;
-
-                       .align  5
-                       
-                       .globl  EXT(ppcNullinst)
-                       
-LEXT(ppcNullinst)
-
-                       li              r3,-1                                                   ; Make sure we test no asts
-                       blr
-
-
 /*
  *                     Here's where we handle the fastpath stuff
  *                     We'll do what we can here because registers are already
@@ -1397,10 +1430,8 @@ LEXT(ppcNullinst)
 
                        .align  5
 
-fastpath:      cmplwi  cr3,r0,0x7FF5                           ; Is this a null fastpath?
-                       beq--   cr3,fastexutl                           ; Yes, bail fast...
-                       cmplwi  cr3,r0,0x7FF1                           ; Is it CthreadSetSelfNumber?   
-                       bnelr-- cr3                                                     ; Not a fast path...
+fastpath:      cmplwi  cr3,r0,0x7FF1                           ; Is it CthreadSetSelfNumber?   
+                       bnelr-  cr3                                                     ; Not a fast path...
 
 /*
  * void cthread_set_self(cproc_t p)
@@ -1416,15 +1447,17 @@ fastpath:       cmplwi  cr3,r0,0x7FF5                           ; Is this a null fastpath?
 
 CthreadSetSelfNumber:
 
-                       lwz             r5,saver3+4(r4)                         /* Retrieve the self number */
+                       lwz             r5,saver3(r4)                           /* Retrieve the self number */
                        stw             r5,CTHREAD_SELF(r13)            /* Remember it */
                        stw             r5,UAW(r25)                                     /* Prime the per_proc_info with it */
 
 
                        .globl  EXT(fastexit)
 EXT(fastexit):
-fastexutl:     mr              r3,r4                                           ; Pass back savearea
-                       b               EXT(exception_exit)                     ; Go back to the caller...
+                       rlwinm  r9,r4,0,0,19                            /* Round down to the base savearea block */
+                       lwz             r9,SACvrswap(r9)                        /* Get the conversion from virtual to real */
+                       xor             r3,r4,r9                                        /* Switch savearea to physical addressing */
+                       b               EXT(exception_exit)                     /* Go back to the caller... */
 
 
 /*
@@ -1438,12 +1471,12 @@ fastexutl:      mr              r3,r4                                           ; Pass back savearea
                        
 checkassist:
                        lwz             r0,saveexception(r4)            ; Get the exception code
-                       lwz             r23,savesrr1+4(r4)                      ; Get the interrupted MSR 
+                       lwz             r23,savesrr1(r4)                        ; Get the interrupted MSR 
                        lwz             r26,ACT_MACT_BEDA(r13)          ; Get Blue Box Descriptor Area
                        mtcrf   0x18,r23                                        ; Check what SRR1 says
                        lwz             r24,ACT_MACT_BTS(r13)           ; Get the table start 
                        cmplwi  r0,T_AST                                        ; Check for T_AST trap 
-                       lwz             r27,savesrr0+4(r4)                      ; Get trapped address 
+                       lwz             r27,savesrr0(r4)                        ; Get trapped address 
                        crnand  cr1_eq,SRR1_PRG_TRAP_BIT,MSR_PR_BIT     ; We need both trap and user state
                        sub             r24,r27,r24                                     ; See how far into it we are 
                        cror    cr0_eq,cr0_eq,cr1_eq            ; Need to bail if AST or not trap or not user state
@@ -1473,7 +1506,7 @@ exitFromVM:       mr              r30,r4                                          ; Get the savearea
 LEXT(retFromVM)
                        mfsprg  r10,0                                           ; Restore the per_proc info
                        mr              r8,r3                                           ; Get the activation
-                       lwz             r4,SAVprev+4(r30)                       ; Pick up the previous savearea
+                       lwz             r4,SAVprev(r30)                         ; Pick up the previous savearea
                        mr              r3,r30                                          ; Put savearea in proper register for common code
                        lwz             r11,SAVflags(r30)                       ; Get the flags of the current savearea
                        rlwinm  r11,r11,0,15,13                         ; Clear the syscall flag 
@@ -1507,13 +1540,15 @@ LEXT(retFromVM)
 
                        .align  5
                        .globl EXT(chandler)
-LEXT(chandler)                                                                 ; Choke handler
+LEXT(chandler)                                                                 /* Choke handler */
 
-                       li              r31,0                                           ; Get a 0
-                       mfsprg  r25,0                                           ; Get the per_proc 
-                       stw             r31,traceMask(0)                        ; Force tracing off right now
+                       lis             r25,hi16(EXT(trcWork))          ; (TEST/DEBUG)
+                       li              r31,0                                           ; (TEST/DEBUG)
+                       ori             r25,r25,lo16(EXT(trcWork))      ; (TEST/DEBUG)
+                       stw             r31,traceMask(r25)                      ; (TEST/DEBUG)
                
                
+                       mfsprg  r25,0                                           ; Get the per_proc 
                
                        lwz             r1,PP_DEBSTACKPTR(r25)          ; Get debug stack pointer
                        cmpwi   r1,-1                                           ; Are we already choking?
@@ -1529,7 +1564,7 @@ chokespin:        addi    r31,r31,1                                       ; Spin and hope for an analyzer connection...
                        
 chokefirst:    li              r0,-1                                           ; Set choke value
                        mr.             r1,r1                                           ; See if we are on debug stack yet
-                       lwz             r10,saver1+4(r4)                        ; 
+                       lwz             r10,saver1(r4)                          ; 
                        stw             r0,PP_DEBSTACKPTR(r25)          ; Show we are choking
                        bne             chokestart                                      ; We are not on the debug stack yet...
                        
@@ -1554,22 +1589,7 @@ chokestart:      li              r0,0                                            ; Get a zero
 ;
                
 versave:       
-#if 0
-                       lis             r22,hi16(EXT(DebugWork))                ; (TEST/DEBUG)
-                       ori             r22,r22,lo16(EXT(DebugWork))    ; (TEST/DEBUG)
-                       lwz             r23,0(r22)                                              ; (TEST/DEBUG)
-                       mr.             r23,r23                                                 ; (TEST/DEBUG)
-                       beqlr-                                                                  ; (TEST/DEBUG)
-                       mfsprg  r20,0                                                   ; (TEST/DEBUG)
-                       lwz             r21,pfAvailable(r20)                    ; (TEST/DEBUG)
-                       mr.             r21,r21                                                 ; (TEST/DEBUG)
-                       bnelr+                                                                  ; (TEST/DEBUG)
-                       
-                       stw             r22,0(r22)                                              ; (TEST/DEBUG) Lock out more checks
-                       BREAKPOINT_TRAP                                                 ; (TEST/DEBUG) Get into debugger
-#endif
-
-#if 0
+#if 1
 ;
 ;                      Make sure that all savearea chains have the right type on them
 ;
@@ -1648,9 +1668,190 @@ versavetype:
                        stw             r22,0(r22)                                              ; (TEST/DEBUG) Lock out more checks
                        BREAKPOINT_TRAP                                                 ; (TEST/DEBUG) Get into debugger
                        
-versvok:       lwz             r20,SAVprev+4(r20)                              ; (TEST/DEBUG) Get the previous one
+versvok:       lwz             r20,SAVprev(r20)                                ; (TEST/DEBUG) Get the previous one
                        b               versavetype                                             ; (TEST/DEBUG) Go check its type...
 #endif
 
+#if 0
+;
+;                      Make sure there are no circular links in the float chain
+;                      And that FP is marked busy in it.
+;                      And the only the top is marked invalid.
+;                      And that the owning PCB is correct.
+;
 
+                       lis             r28,hi16(EXT(default_pset))             ; (TEST/DEBUG)
+                       lis             r27,hi16(EXT(DebugWork))                ; (TEST/DEBUG)
+                       ori             r28,r28,lo16(EXT(default_pset)) ; (TEST/DEBUG)
+                       ori             r27,r27,lo16(EXT(DebugWork))    ; (TEST/DEBUG)
+                       li              r20,0                                                   ; (TEST/DEBUG)
+                       lwz             r26,0(r27)                                              ; (TEST/DEBUG)
+                       lwz             r27,psthreadcnt(r28)                    ; (TEST/DEBUG)
+                       mr.             r26,r26                                                 ; (TEST/DEBUG)
+                       lwz             r28,psthreads(r28)                              ; (TEST/DEBUG)
+                       bnelr-                                                                  ; (TEST/DEBUG)
+                       
+fcknxtth:      mr.             r27,r27                                                 ; (TEST/DEBUG)
+                       beqlr-                                                                  ; (TEST/DEBUG)
+                       
+                       lwz             r26,THREAD_TOP_ACT(r28)                 ; (TEST/DEBUG)
+
+fckact:                mr.             r26,r26                                                 ; (TEST/DEBUG)
+                       bne+    fckact2                                                 ; (TEST/DEBUG)
+                       
+                       lwz             r28,THREAD_PSTHRN(r28)                  ; (TEST/DEBUG) Next in line
+                       subi    r27,r27,1                                               ; (TEST/DEBUG)
+                       b               fcknxtth                                                ; (TEST/DEBUG) 
+       
+fckact2:       lwz             r20,ACT_MACT_FPU(r26)                   ; (TEST/DEBUG) Get FPU chain
+                       li              r29,1                                                   ; (TEST/DEBUG)
+                       li              r22,0                                                   ; (TEST/DEBUG)
+
+fckact3:       mr.             r20,r20                                                 ; (TEST/DEBUG) Are there any?
+                       beq+    fckact5                                                 ; (TEST/DEBUG) No...
+                       
+                       addi    r22,r22,1                                               ; (TEST/DEBUG) Count chain depth
+                       
+                       lwz             r21,SAVflags(r20)                               ; (TEST/DEBUG) Get the flags
+                       rlwinm. r21,r21,0,1,1                                   ; (TEST/DEBUG) FP busy?
+                       bne+    fckact3a                                                ; (TEST/DEBUG) Yeah...
+                       lis             r27,hi16(EXT(DebugWork))                ; (TEST/DEBUG)
+                       ori             r27,r27,lo16(EXT(DebugWork))    ; (TEST/DEBUG)
+                       stw             r27,0(r27)                                              ; (TEST/DEBUG)
+                       BREAKPOINT_TRAP                                                 ; (TEST/DEBUG) Die
+                       
+fckact3a:      cmplwi  r22,1                                                   ; (TEST/DEBUG) At first SA?
+                       beq+    fckact3b                                                ; (TEST/DEBUG) Yeah, invalid is ok...
+                       lwz             r21,SAVlvlfp(r20)                               ; (TEST/DEBUG) Get level
+                       cmplwi  r21,1                                                   ; (TEST/DEBUG) Is it invalid?
+                       bne+    fckact3b                                                ; (TEST/DEBUG) Nope, it is ok...
+                       lis             r27,hi16(EXT(DebugWork))                ; (TEST/DEBUG)
+                       ori             r27,r27,lo16(EXT(DebugWork))    ; (TEST/DEBUG)
+                       stw             r27,0(r27)                                              ; (TEST/DEBUG)
+                       BREAKPOINT_TRAP                                                 ; (TEST/DEBUG) Die
+                       
+fckact3b:      lwz             r21,SAVact(r20)                                 ; (TEST/DEBUG) Get the owner
+                       cmplw   r21,r26                                                 ; (TEST/DEBUG) Correct activation?
+                       beq+    fckact3c                                                ; (TEST/DEBUG) Yup...
+                       lis             r27,hi16(EXT(DebugWork))                ; (TEST/DEBUG)
+                       ori             r27,r27,lo16(EXT(DebugWork))    ; (TEST/DEBUG)
+                       stw             r27,0(r27)                                              ; (TEST/DEBUG)
+                       BREAKPOINT_TRAP                                                 ; (TEST/DEBUG) Die
+
+fckact3c:                                                                                      ; (TEST/DEBUG)
+                       lbz             r21,SAVflags+3(r20)                             ; (TEST/DEBUG) Pick up the test byte
+                       mr.             r21,r21                                                 ; (TEST/DEBUG) marked?
+                       beq+    fckact4                                                 ; (TEST/DEBUG) No, good...
+                       
+                       lis             r27,hi16(EXT(DebugWork))                ; (TEST/DEBUG)
+                       ori             r27,r27,lo16(EXT(DebugWork))    ; (TEST/DEBUG)
+                       stw             r27,0(r27)                                              ; (TEST/DEBUG)
+                       BREAKPOINT_TRAP                                                 ; (TEST/DEBUG)
+                       
+fckact4:       stb             r29,SAVflags+3(r20)                             ; (TEST/DEBUG) Set the test byte
+                       lwz             r20,SAVprefp(r20)                               ; (TEST/DEBUG) Next in list
+                       b               fckact3                                                 ; (TEST/DEBUG) Try it...
+
+fckact5:       lwz             r20,ACT_MACT_FPU(r26)                   ; (TEST/DEBUG) Get FPU chain
+                       li              r29,0                                                   ; (TEST/DEBUG)
+
+fckact6:       mr.             r20,r20                                                 ; (TEST/DEBUG) Are there any?
+                       beq+    fcknact                                                 ; (TEST/DEBUG) No...
+                       
+                       stb             r29,SAVflags+3(r20)                             ; (TEST/DEBUG) Clear the test byte
+                       lwz             r20,SAVprefp(r20)                               ; (TEST/DEBUG) Next in list
+                       b               fckact6                                                 ; (TEST/DEBUG) Try it...
+                       
+fcknact:       lwz             r26,ACT_LOWER(r26)                              ; (TEST/DEBUG) Next activation
+                       b               fckact                                                  ; (TEST/DEBUG)
+#endif
+
+
+#if 0
+;
+;                      Make sure in use count matches found savearea.  This is
+;                      not always accurate.  There is a variable "fuzz" factor in count.
+
+                       lis             r28,hi16(EXT(default_pset))             ; (TEST/DEBUG)
+                       lis             r27,hi16(EXT(DebugWork))                ; (TEST/DEBUG)
+                       ori             r28,r28,lo16(EXT(default_pset)) ; (TEST/DEBUG)
+                       ori             r27,r27,lo16(EXT(DebugWork))    ; (TEST/DEBUG)
+                       li              r20,0                                                   ; (TEST/DEBUG)
+                       lwz             r26,0(r27)                                              ; (TEST/DEBUG)
+                       lwz             r27,psthreadcnt(r28)                    ; (TEST/DEBUG)
+                       mr.             r26,r26                                                 ; (TEST/DEBUG)
+                       lwz             r28,psthreads(r28)                              ; (TEST/DEBUG)
+                       bnelr-                                                                  ; (TEST/DEBUG)
+                       
+cknxtth:       mr.             r27,r27                                                 ; (TEST/DEBUG)
+                       beq-    cktotal                                                 ; (TEST/DEBUG)
+                       
+                       lwz             r26,THREAD_TOP_ACT(r28)                 ; (TEST/DEBUG)
+
+ckact:         mr.             r26,r26                                                 ; (TEST/DEBUG)
+                       bne+    ckact2                                                  ; (TEST/DEBUG)
+                       
+                       lwz             r28,THREAD_PSTHRN(r28)                  ; (TEST/DEBUG) Next in line
+                       subi    r27,r27,1                                               ; (TEST/DEBUG)
+                       b               cknxtth                                                 ; (TEST/DEBUG) 
+                       
+ckact2:                lwz             r29,ACT_MACT_PCB(r26)                   ; (TEST/DEBUG)
+                       
+cknorm:                mr.             r29,r29                                                 ; (TEST/DEBUG)
+                       beq-    cknormd                                                 ; (TEST/DEBUG)
+                       
+                       addi    r20,r20,1                                               ; (TEST/DEBUG) Count normal savearea
+                       
+                       lwz             r29,SAVprev(r29)                                ; (TEST/DEBUG)
+                       b               cknorm                                                  ; (TEST/DEBUG)
+                       
+cknormd:       lwz             r29,ACT_MACT_FPU(r26)                   ; (TEST/DEBUG)
+
+ckfpu:         mr.             r29,r29                                                 ; (TEST/DEBUG)
+                       beq-    ckfpud                                                  ; (TEST/DEBUG)
+                       
+                       lwz             r21,SAVflags(r29)                               ; (TEST/DEBUG)
+                       rlwinm. r21,r21,0,0,0                                   ; (TEST/DEBUG) See if already counted
+                       bne-    cknfpu                                                  ; (TEST/DEBUG)
+                       
+                       addi    r20,r20,1                                               ; (TEST/DEBUG) Count fpu savearea
+                       
+cknfpu:                lwz             r29,SAVprefp(r29)                               ; (TEST/DEBUG)
+                       b               ckfpu                                                   ; (TEST/DEBUG)
+                       
+ckfpud:                lwz             r29,ACT_MACT_VMX(r26)                   ; (TEST/DEBUG)
+
+ckvmx:         mr.             r29,r29                                                 ; (TEST/DEBUG)
+                       beq-    ckvmxd                                                  ; (TEST/DEBUG)
+                       
+                       lwz             r21,SAVflags(r29)                               ; (TEST/DEBUG)
+                       rlwinm. r21,r21,0,0,1                                   ; (TEST/DEBUG) See if already counted
+                       bne-    cknvmx                                                  ; (TEST/DEBUG)
+                       
+                       addi    r20,r20,1                                               ; (TEST/DEBUG) Count vector savearea
+                       
+cknvmx:                lwz             r29,SAVprevec(r29)                              ; (TEST/DEBUG)
+                       b               ckvmx                                                   ; (TEST/DEBUG)
+                       
+ckvmxd:                lwz             r26,ACT_LOWER(r26)                              ; (TEST/DEBUG) Next activation
+                       b               ckact                                                   ; (TEST/DEBUG)
+
+cktotal:       lis             r28,hi16(EXT(saveanchor))               ; (TEST/DEBUG)
+                       lis             r27,hi16(EXT(real_ncpus))               ; (TEST/DEBUG)
+                       ori             r28,r28,lo16(EXT(saveanchor))   ; (TEST/DEBUG)
+                       ori             r27,r27,lo16(EXT(real_ncpus))   ; (TEST/DEBUG)
+
+                       lwz             r21,SVinuse(r28)                                ; (TEST/DEBUG)
+                       lwz             r27,0(r27)                                              ; (TEST/DEBUG) Get the number of CPUs
+                       sub.    r29,r21,r20                                             ; (TEST/DEBUG) Get number accounted for
+                       blt-    badsave                                                 ; (TEST/DEBUG) Have too many in use...
+                       sub             r26,r29,r27                                             ; (TEST/DEBUG) Should be 1 unaccounted for for each processor
+                       cmpwi   r26,10                                                  ; (TEST/DEBUG) Allow a 10 area slop factor
+                       bltlr+                                                                  ; (TEST/DEBUG)
+                       
+badsave:       lis             r27,hi16(EXT(DebugWork))                ; (TEST/DEBUG)
+                       ori             r27,r27,lo16(EXT(DebugWork))    ; (TEST/DEBUG)
+                       stw             r27,0(r27)                                              ; (TEST/DEBUG)
+                       BREAKPOINT_TRAP                                                 ; (TEST/DEBUG)
+#endif
 #endif 
index 08605f5f78026af1e814fdce67489a6ef77b2f1f..ec68b45a894e2f3c40f34610d261fb55f0781816 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -27,6 +24,9 @@
 #include <mach_assert.h>
 #include <mach_ldebug.h>
 #include <mach_rt.h>
+
+#include <kern/etap_options.h>
+       
 #include <ppc/asm.h>
 #include <ppc/proc_reg.h>
 #include <assym.s>
 
 #define        ILK_LOCKED              0x01
 #define        WAIT_FLAG               0x02
+#define        SLOCK_FAST              0x02
 #define TH_FN_OWNED            0x01
 
+;
+;              NOTE: make sure that PREEMPTSTACK in aligned_data is
+;              set the same as it is here.  This is the number of
+;              traceback entries we can handle per processor
+;
+;              A value of 0 disables the stack.
+;
+#define PREEMPTSTACK 0
 #define CHECKNMI 0
 #define CHECKLOCKS 1
 
-#define PROLOG(space)                                                                                  \
-                       stwu    r1,-(FM_ALIGN(space)+FM_SIZE)(r1)       __ASMNL__       \
-                       mflr    r0                                                              __ASMNL__       \
-                       stw             r3,FM_ARG0(r1)                                  __ASMNL__       \
+#include <ppc/POWERMAC/mp/mp.h>
+
+#define PROLOG(space)                                                    \
+                       stwu    r1,-(FM_ALIGN(space)+FM_SIZE)(r1)       __ASMNL__ \
+                       mflr    r0                                                      __ASMNL__ \
+                       stw             r3,FM_ARG0(r1)                          __ASMNL__ \
                        stw             r0,(FM_ALIGN(space)+FM_SIZE+FM_LR_SAVE)(r1)     __ASMNL__
        
-#define EPILOG                                                                                                 \
-                       lwz             r1,0(r1)                                                __ASMNL__       \
-                       lwz             r0,FM_LR_SAVE(r1)                               __ASMNL__       \
-                       mtlr    r0                                                              __ASMNL__
+#define EPILOG                                                                   \
+                       lwz             r1,0(r1)                                        __ASMNL__ \
+                       lwz             r0,FM_LR_SAVE(r1)                       __ASMNL__ \
+                       mtlr    r0                                                      __ASMNL__                                       
 
 #if    MACH_LDEBUG && CHECKLOCKS
 /*
  * Routines for general lock debugging.
  */
 
-/* 
- * Gets lock check flags in CR6: CR bits 24-27
- */
+/* Gets lock check flags in CR6: CR bits 24-27 */
 
-#define CHECK_SETUP(rg)                                                                                        \
-                       lbz             rg,dgFlags(0)                                   __ASMNL__       \
-                       mtcrf   2,rg                                                    __ASMNL__ 
+#define CHECK_SETUP(rg)                                                                        \
+                       lis             rg,hi16(EXT(dgWork))    __ASMNL__       \
+                       ori             rg,rg,lo16(EXT(dgWork)) __ASMNL__       \
+                       lbz             rg,dgFlags(rg)                  __ASMNL__       \
+                       mtcrf   2,rg                                    __ASMNL__ 
 
 
 /*
  * mismatch.  Detects calls to Mutex functions with
  * type simplelock and vice versa.
  */
-#define        CHECK_MUTEX_TYPE()                                                                              \
-                       bt              24+disLktypeb,1f                                __ASMNL__       \
-                       lwz             r10,MUTEX_TYPE(r3)                              __ASMNL__       \
-                       cmpwi   r10,MUTEX_TAG                                   __ASMNL__       \
-                       beq+    1f                                                              __ASMNL__       \
-                       lis             r3,hi16(not_a_mutex)                    __ASMNL__       \
-                       ori             r3,r3,lo16(not_a_mutex)                 __ASMNL__       \
-                       bl              EXT(panic)                                              __ASMNL__       \
-                       lwz             r3,FM_ARG0(r1)                                  __ASMNL__       \
+#define        CHECK_MUTEX_TYPE()                                                      \
+                       bt              24+disLktypeb,1f                        __ASMNL__       \
+                       lwz             r10,MUTEX_TYPE(r3)                      __ASMNL__       \
+                       cmpwi   r10,MUTEX_TAG                           __ASMNL__       \
+                       beq+    1f                                                      __ASMNL__       \
+                       lis             r3,hi16(not_a_mutex)            __ASMNL__       \
+                       ori             r3,r3,lo16(not_a_mutex)         __ASMNL__       \
+                       bl              EXT(panic)                                      __ASMNL__       \
+                       lwz             r3,FM_ARG0(r1)                          __ASMNL__       \
 1:
        
        .data
@@ -90,15 +101,15 @@ not_a_mutex:
                        STRINGD "not a mutex!\n\000"
                        .text
 
-#define CHECK_SIMPLE_LOCK_TYPE()                                                               \
-                       bt              24+disLktypeb,1f                                __ASMNL__       \
-                       lhz             r10,SLOCK_TYPE(r3)                              __ASMNL__       \
-                       cmpwi   r10,USLOCK_TAG                                  __ASMNL__       \
-                       beq+    1f                                                              __ASMNL__       \
-                       lis             r3,hi16(not_a_slock)                    __ASMNL__       \
-                       ori             r3,r3,lo16(not_a_slock)                 __ASMNL__       \
-                       bl              EXT(panic)                                              __ASMNL__       \
-                       lwz             r3,FM_ARG0(r1)                                  __ASMNL__       \
+#define CHECK_SIMPLE_LOCK_TYPE()                                       \
+                       bt              24+disLktypeb,1f                        __ASMNL__       \
+                       lwz             r10,SLOCK_TYPE(r3)                      __ASMNL__       \
+                       cmpwi   r10,USLOCK_TAG                          __ASMNL__       \
+                       beq+    1f                                                      __ASMNL__       \
+                       lis             r3,hi16(not_a_slock)            __ASMNL__       \
+                       ori             r3,r3,lo16(not_a_slock)         __ASMNL__       \
+                       bl              EXT(panic)                                      __ASMNL__       \
+                       lwz             r3,FM_ARG0(r1)                          __ASMNL__       \
 1:
        
        .data
@@ -106,26 +117,24 @@ not_a_slock:
                        STRINGD "not a simple lock!\n\000"
                        .text
 
-#define CHECK_NO_SIMPLELOCKS()                                                                 \
-                       bt              24+disLkNmSimpb,2f                              __ASMNL__       \
-                       lis             r10,hi16(MASK(MSR_VEC))                 __ASMNL__       \
-                       ori             r10,r10,lo16(MASK(MSR_FP))              __ASMNL__       \
-                       mfmsr   r11                                                             __ASMNL__       \
-                       andc    r11,r11,r10                                             __ASMNL__       \
-                       ori             r10,r10,lo16(MASK(MSR_EE))              __ASMNL__       \
-                       andc    r10,r11,r10                                             __ASMNL__       \
-                       mtmsr   r10                                                             __ASMNL__       \
-                       isync                                                                   __ASMNL__       \
-                       mfsprg  r10,0                                                   __ASMNL__       \
-                       lwz             r10,PP_SIMPLE_LOCK_CNT(r10)             __ASMNL__       \
-                       cmpwi   r10,0                                                   __ASMNL__       \
-                       beq+    1f                                                              __ASMNL__       \
-                       lis             r3,hi16(simple_locks_held)              __ASMNL__       \
-                       ori             r3,r3,lo16(simple_locks_held)   __ASMNL__       \
-                       bl              EXT(panic)                                              __ASMNL__       \
-                       lwz             r3,FM_ARG0(r1)                                  __ASMNL__       \
-1:                                                                                                     __ASMNL__       \
-                       mtmsr   r11                                                             __ASMNL__       \
+#define CHECK_NO_SIMPLELOCKS()                                                 \
+                       bt              24+disLkNmSimpb,2f                      __ASMNL__       \
+                       mfmsr   r11                                                     __ASMNL__       \
+                       rlwinm  r11,r11,0,MSR_FP_BIT+1,MSR_FP_BIT-1     __ASMNL__       \
+                       rlwinm  r11,r11,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1   __ASMNL__       \
+                       rlwinm  r10,r11,0,MSR_EE_BIT+1,MSR_EE_BIT-1     __ASMNL__       \
+                       mtmsr   r10                                                     __ASMNL__       \
+                       isync                                                           __ASMNL__       \
+                       mfsprg  r10,0                                           __ASMNL__       \
+                       lwz             r10,PP_SIMPLE_LOCK_CNT(r10) __ASMNL__   \
+                       cmpwi   r10,0                                           __ASMNL__       \
+                       beq+    1f                                                      __ASMNL__       \
+                       lis             r3,hi16(simple_locks_held) __ASMNL__    \
+                       ori             r3,r3,lo16(simple_locks_held) __ASMNL__ \
+                       bl              EXT(panic)                                      __ASMNL__       \
+                       lwz             r3,FM_ARG0(r1)                          __ASMNL__       \
+1:                                                                                             __ASMNL__       \
+                       mtmsr   r11                                                     __ASMNL__       \
 2:     
        
        .data
@@ -136,58 +145,55 @@ simple_locks_held:
 /* 
  * Verifies return to the correct thread in "unlock" situations.
  */
-#define CHECK_THREAD(thread_offset)                                                            \
-                       bt              24+disLkThreadb,2f                              __ASMNL__       \
-                       lis             r10,hi16(MASK(MSR_VEC))                 __ASMNL__       \
-                       ori             r10,r10,lo16(MASK(MSR_FP))              __ASMNL__       \
-                       mfmsr   r11                                                             __ASMNL__       \
-                       andc    r11,r11,r10                                             __ASMNL__       \
-                       ori             r10,r10,lo16(MASK(MSR_EE))              __ASMNL__       \
-                       andc    r10,r11,r10                                             __ASMNL__       \
-                       mtmsr   r10                                                             __ASMNL__       \
-                       isync                                                                   __ASMNL__       \
-                       mfsprg  r10,0                                                   __ASMNL__       \
-                       lwz             r10,PP_ACTIVE_THREAD(r10)               __ASMNL__       \
-                       cmpwi   r10,0                                                   __ASMNL__       \
-                       beq-    1f                                                              __ASMNL__       \
-                       lwz             r9,thread_offset(r3)                    __ASMNL__       \
-                       cmpw    r9,r10                                                  __ASMNL__       \
-                       beq+    1f                                                              __ASMNL__       \
-                       lis             r3,hi16(wrong_thread)                   __ASMNL__       \
-                       ori             r3,r3,lo16(wrong_thread)                __ASMNL__       \
-                       bl              EXT(panic)                                              __ASMNL__       \
-                       lwz             r3,FM_ARG0(r1)                                  __ASMNL__       \
-1:                                                                                                     __ASMNL__       \
-                       mtmsr   r11                                                             __ASMNL__       \
+
+#define CHECK_THREAD(thread_offset)                                            \
+                       bt              24+disLkThreadb,2f                      __ASMNL__       \
+                       mfmsr   r11                                                     __ASMNL__       \
+                       rlwinm  r11,r11,0,MSR_FP_BIT+1,MSR_FP_BIT-1     __ASMNL__       \
+                       rlwinm  r11,r11,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1   __ASMNL__       \
+                       rlwinm  r10,r11,0,MSR_EE_BIT+1,MSR_EE_BIT-1     __ASMNL__       \
+                       mtmsr   r10                                                     __ASMNL__       \
+                       isync                                                           __ASMNL__       \
+                       mfsprg  r10,0                                           __ASMNL__       \
+                       lwz             r10,PP_ACTIVE_THREAD(r10)       __ASMNL__       \
+                       cmpwi   r10,0                                           __ASMNL__       \
+                       beq-    1f                                                      __ASMNL__       \
+                       lwz             r9,thread_offset(r3)            __ASMNL__       \
+                       cmpw    r9,r10                                          __ASMNL__       \
+                       beq+    1f                                                      __ASMNL__       \
+                       lis             r3,hi16(wrong_thread)           __ASMNL__       \
+                       ori             r3,r3,lo16(wrong_thread)        __ASMNL__       \
+                       bl              EXT(panic)                                      __ASMNL__       \
+                       lwz             r3,FM_ARG0(r1)                          __ASMNL__       \
+1:                                                                                             __ASMNL__       \
+                       mtmsr   r11                                                     __ASMNL__       \
 2:     
        .data
 wrong_thread:
        STRINGD "wrong thread!\n\000"
        .text
 
-#define CHECK_MYLOCK(thread_offset)                                                            \
-                       bt              24+disLkMyLckb,2f                               __ASMNL__       \
-                       lis             r10,hi16(MASK(MSR_VEC))                 __ASMNL__       \
-                       ori             r10,r10,lo16(MASK(MSR_FP))              __ASMNL__       \
-                       mfmsr   r11                                                             __ASMNL__       \
-                       andc    r11,r11,r10                                             __ASMNL__       \
-                       ori             r10,r10,lo16(MASK(MSR_EE))              __ASMNL__       \
-                       andc    r10,r11,r10                                             __ASMNL__       \
-                       mtmsr   r10                                                             __ASMNL__       \
-                       isync                                                                   __ASMNL__       \
-                       mfsprg  r10,0                                                   __ASMNL__       \
-                       lwz             r10,PP_ACTIVE_THREAD(r10)               __ASMNL__       \
-                       cmpwi   r10,0                                                   __ASMNL__       \
-                       beq-    1f                                                              __ASMNL__       \
-                       lwz             r9,     thread_offset(r3)                       __ASMNL__       \
-                       cmpw    r9,r10                                                  __ASMNL__       \
-                       bne+    1f                                                              __ASMNL__       \
-                       lis             r3,     hi16(mylock_attempt)            __ASMNL__       \
-                       ori             r3,r3,lo16(mylock_attempt)              __ASMNL__       \
-                       bl              EXT(panic)                                              __ASMNL__       \
-                       lwz             r3,FM_ARG0(r1)                                  __ASMNL__       \
-1:                                                                                                     __ASMNL__       \
-                       mtmsr   r11                                                             __ASMNL__       \
+#define CHECK_MYLOCK(thread_offset)                                    \
+                       bt              24+disLkMyLckb,2f                       __ASMNL__       \
+                       mfmsr   r11                                                     __ASMNL__       \
+                       rlwinm  r11,r11,0,MSR_FP_BIT+1,MSR_FP_BIT-1     __ASMNL__       \
+                       rlwinm  r11,r11,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1   __ASMNL__       \
+                       rlwinm  r10,r11,0,MSR_EE_BIT+1,MSR_EE_BIT-1     __ASMNL__       \
+                       mtmsr   r10                                                     __ASMNL__       \
+                       isync                                                           __ASMNL__       \
+                       mfsprg  r10,0                                           __ASMNL__       \
+                       lwz             r10,PP_ACTIVE_THREAD(r10)       __ASMNL__       \
+                       cmpwi   r10,0                                           __ASMNL__       \
+                       beq-    1f                                                      __ASMNL__       \
+                       lwz             r9,     thread_offset(r3)               __ASMNL__       \
+                       cmpw    r9,r10                                          __ASMNL__       \
+                       bne+    1f                                                      __ASMNL__       \
+                       lis             r3,     HIGH_ADDR(mylock_attempt) __ASMNL__     \
+                       ori             r3,r3,LOW_ADDR(mylock_attempt) __ASMNL__        \
+                       bl              EXT(panic)                                      __ASMNL__       \
+                       lwz             r3,FM_ARG0(r1)                          __ASMNL__       \
+1:                                                                                             __ASMNL__       \
+                       mtmsr   r11                                                     __ASMNL__       \
 2:
        
        .data
@@ -207,17 +213,16 @@ mylock_attempt:
 #endif /* MACH_LDEBUG */
        
 /*
- *             void hw_lock_init(hw_lock_t)
+ *      void hw_lock_init(hw_lock_t)
  *
- *                     Initialize a hardware lock.
+ *      Initialize a hardware lock.  These locks should be cache aligned and a multiple
+ *             of cache size.
  */
-                       .align  5
-                       .globl  EXT(hw_lock_init)
 
-LEXT(hw_lock_init)
+ENTRY(hw_lock_init, TAG_NO_FRAME_USED)
 
-                       li      r0,     0                                                               ; set lock to free == 0 
-                       stw     r0,     0(r3)                                                   ; Initialize the lock 
+                       li      r0,     0                                                       /* set lock to free == 0 */
+                       stw     r0,     0(r3)                                           /* Initialize the lock */
                        blr
        
 /*
@@ -226,409 +231,429 @@ LEXT(hw_lock_init)
  *      Unconditionally release lock.
  *      Release preemption level.
  */
+
+
                        .align  5
                        .globl  EXT(hw_lock_unlock)
 
 LEXT(hw_lock_unlock)
 
-                       .globl  EXT(hwulckPatch_isync)
-LEXT(hwulckPatch_isync)   
-                       isync 
-                       .globl  EXT(hwulckPatch_eieio)
-LEXT(hwulckPatch_eieio)
-                       eieio
-                       li      r0,     0                                                               ; set lock to free
+#if 0
+                       lis             r0,HIGH_ADDR(CutTrace)          /* (TEST/DEBUG) */
+                       lis             r5,0xFFFF                                       /* (TEST/DEBUG) */
+                       oris    r0,r0,LOW_ADDR(CutTrace)        /* (TEST/DEBUG) */
+                       sc                                                                      /* (TEST/DEBUG) */
+#endif
+                       sync                                                            /* Flush writes done under lock */
+                       li      r0,     0                                                       /* set lock to free */
                        stw     r0,     0(r3)
 
-                       b               epStart                                                 ; Go enable preemption...
+                       b               epStart                                         /* Go enable preemption... */
+
+
+/* 
+ *             Special case for internal use.  Uses same lock code, but sets up so 
+ *             that there will be no disabling of preemption after locking.  Generally
+ *             used for mutex locks when obtaining the interlock although there is
+ *             nothing stopping other uses.
+ */
 
+lockLock:      lis             r4,HIGH_ADDR(EXT(LockTimeOut))  /* Get the high part */
+                       ori             r4,r4,LOW_ADDR(EXT(LockTimeOut))        /* And the low part */
+                       cmplwi  cr1,r1,0                                        /* Set flag to disable disable preemption */
+                       lwz             r4,0(r4)                                        /* Get the timerout value */
+                       b               lockComm                                        /* Join on up... */
+       
 /*
  *      void hw_lock_lock(hw_lock_t)
  *
- *                     Acquire lock, spinning until it becomes available.
- *                     Return with preemption disabled.
- *                     We will just set a default timeout and jump into the NORMAL timeout lock.
+ *      Acquire lock, spinning until it becomes available.
+ *      Return with preemption disabled.
+ *             Apparently not used except by mach_perf.
+ *             We will just set a default timeout and jump into the NORMAL timeout lock.
  */
+
                        .align  5
                        .globl  EXT(hw_lock_lock)
 
 LEXT(hw_lock_lock)
-lockDisa:
-                       li              r4,0                                                    ; no timeout value
-                       b               lckcomm                                                 ; Join on up...
+
+lockDisa:      lis             r4,HIGH_ADDR(EXT(LockTimeOut))  /* Get the high part */
+                       ori             r4,r4,LOW_ADDR(EXT(LockTimeOut))        /* And the low part */
+                       cmplw   cr1,r1,r1                                       /* Set flag to enable disable preemption */
+                       lwz             r4,0(r4)                                        /* Get the timerout value */
+                       b               lockComm                                        /* Join on up... */
 
 /*
- *             unsigned int hw_lock_to(hw_lock_t, unsigned int timeout)
+ *      unsigned int hw_lock_to(hw_lock_t, unsigned int timeout)
+ *
+ *      Try to acquire spin-lock. Return success (1) or failure (0).
+ *      Attempt will fail after timeout ticks of the timebase.
+ *             We try fairly hard to get this lock.  We disable for interruptions, but
+ *             reenable after a "short" timeout (128 ticks, we may want to change this).
+ *             After checking to see if the large timeout value (passed in) has expired and a
+ *             sufficient number of cycles have gone by (to insure pending 'rupts are taken),
+ *             we return either in abject failure, or disable and go back to the lock sniff routine.
+ *             If the sniffer finds the lock free, it jumps right up and tries to grab it.
+ *
+ *             One programming note: NEVER DO NOTHING IN HERE NO HOW THAT WILL FORCE US TO CALL
+ *             THIS WITH TRANSLATION OR INTERRUPTIONS EITHER ON OR OFF, GOSH DARN IT!
  *
- *                     Try to acquire spin-lock. Return success (1) or failure (0).
- *                     Attempt will fail after timeout ticks of the timebase.
- *                     We try fairly hard to get this lock.  We disable for interruptions, but
- *                     reenable after a "short" timeout (128 ticks, we may want to change this).
- *                     After checking to see if the large timeout value (passed in) has expired and a
- *                     sufficient number of cycles have gone by (to insure pending 'rupts are taken),
- *                     we return either in abject failure, or disable and go back to the lock sniff routine.
- *                     If the sniffer finds the lock free, it jumps right up and tries to grab it.
  */
                        .align  5
                        .globl  EXT(hw_lock_to)
 
 LEXT(hw_lock_to)
 
+#if 0
+                       lis             r0,HIGH_ADDR(CutTrace)          /* (TEST/DEBUG) */
+                       lis             r5,0xEEEE                                       /* (TEST/DEBUG) */
+                       oris    r0,r0,LOW_ADDR(CutTrace)        /* (TEST/DEBUG) */
+                       sc                                                                      /* (TEST/DEBUG) */
+#endif
+
 #if CHECKNMI
-                       mflr    r12                                                             ; (TEST/DEBUG) 
-                       bl              EXT(ml_sense_nmi)                               ; (TEST/DEBUG)
-                       mtlr    r12                                                             ; (TEST/DEBUG)
+                       mflr    r12                                                     ; (TEST/DEBUG) 
+                       bl              EXT(ml_sense_nmi)                       ; (TEST/DEBUG)
+                       mtlr    r12                                                     ; (TEST/DEBUG)
 #endif
 
-lckcomm:
-                       mfsprg  r6,1                                                    ; Get the current activation 
-                       lwz             r5,ACT_PREEMPT_CNT(r6)                  ; Get the preemption level
-                       addi    r5,r5,1                                                 ; Bring up the disable count
-                       stw             r5,ACT_PREEMPT_CNT(r6)                  ; Save it back 
-                       mr              r5,r3                                                   ; Get the address of the lock
-                       li              r8,0                                                    ; Set r8 to zero
-
-lcktry:                lwarx   r6,0,r5                                                 ; Grab the lock value
-                       andi.   r3,r6,ILK_LOCKED                                ; Is it locked?
-                       ori             r6,r6,ILK_LOCKED                                ; Set interlock 
-                       bne--   lckspin                                                 ; Yeah, wait for it to clear...
-                       stwcx.  r6,0,r5                                                 ; Try to seize that there durn lock
-                       bne--   lcktry                                                  ; Couldn't get it...
-                       li              r3,1                                                    ; return true 
-                       isync                                                                   ; Make sure we don't use a speculativily loaded value
-                       blr                                                                             ; Go on home...
-
-lckspin:       li              r6,lgKillResv                                   ; Get killing field     
-                       stwcx.  r6,0,r6                                                 ; Kill reservation
-                       
-                       mr.             r4,r4                                                   ; Test timeout value
-                       bne++   lockspin0
-                       lis             r4,hi16(EXT(LockTimeOut))               ; Get the high part 
-                       ori             r4,r4,lo16(EXT(LockTimeOut))    ; And the low part
-                       lwz             r4,0(r4)                                                ; Get the timeout value
-lockspin0:
-                       mr.             r8,r8                                                   ; Is r8 set to zero
-                       bne++   lockspin1                                               ; If yes, first spin attempt
-                       lis             r0,hi16(MASK(MSR_VEC))                  ; Get vector enable
-                       mfmsr   r9                                                              ; Get the MSR value
-                       ori             r0,r0,lo16(MASK(MSR_FP))                ; Get FP enable
-                       ori             r7,r0,lo16(MASK(MSR_EE))                ; Get EE bit on too
-                       andc    r9,r9,r0                                                ; Clear FP and VEC
-                       andc    r7,r9,r7                                                ; Clear EE as well
-                       mtmsr   r7                                                              ; Turn off interruptions 
-                       isync                                                                   ; May have turned off vec and fp here 
-                       mftb    r8                                                              ; Get timestamp on entry
-                       b               lcksniff
-
-lockspin1:     mtmsr   r7                                                              ; Turn off interruptions 
-                       mftb    r8                                                              ; Get timestamp on entry
-
-lcksniff:      lwz             r3,0(r5)                                                ; Get that lock in here
-                       andi.   r3,r3,ILK_LOCKED                                ; Is it free yet?
-                       beq++   lckretry                                                ; Yeah, try for it again...
+                       cmplw   cr1,r1,r1                                       /* Set flag to enable disable preemption */
+
+lockComm:      mfmsr   r9                                                      /* Get the MSR value */
+                       rlwinm  r9,r9,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       mr              r5,r3                                           /* Get the address of the lock */
+                       rlwinm  r9,r9,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r7,r9,0,MSR_EE_BIT+1,MSR_EE_BIT-1       /* Get MSR that is uninterruptible */
+       
+                       mtmsr   r7                                                      /* Turn off interruptions */
+                       isync                                                           ; May have turned off vec and fp here 
+                       mftb    r8                                                      /* Get the low part of the time base */
                        
-                       mftb    r10                                                             ; Time stamp us now
-                       sub             r10,r10,r8                                              ; Get the elapsed time
-                       cmplwi  r10,128                                                 ; Have we been spinning for 128 tb ticks?
-                       blt++   lcksniff                                                ; Not yet...
+lcktry:                lwarx   r6,0,r5                                         /* Grab the lock value */
+                       andi.   r3,r6,ILK_LOCKED                        /* Is it locked? */
+                       ori             r6,r6,ILK_LOCKED                        /* Set interlock */
+                       bne-    lcksniff                                        /* Yeah, wait for it to clear... */
+                       stwcx.  r6,0,r5                                         /* Try to seize that there durn lock */
+                       bne-    lcktry                                          /* Couldn't get it... */
+                       li              r3,1                                            /* return true */
+                       isync                                                           /* Make sure we don't use a speculativily loaded value */
+                       beq+    cr1,daPreComm                           /* We got it, go disable preemption if we're supposed to... */
+                       mtmsr   r9                                                      ; Restore interrupt state
+                       blr                                                                     /* Go on home... */
                        
-                       mtmsr   r9                                                              ; Say, any interrupts pending?
+                       .align  5
 
-;                      The following instructions force the pipeline to be interlocked to that only one
-;                      instruction is issued per cycle.  The insures that we stay enabled for a long enough
-;                      time; if it's too short, pending interruptions will not have a chance to be taken
+lcksniff:      lwz             r3,0(r5)                                        /* Get that lock in here */
+                       andi.   r3,r3,ILK_LOCKED                        /* Is it free yet? */
+                       beq+    lcktry                                          /* Yeah, try for it again... */
+                       
+                       mftb    r10                                                     /* Time stamp us now */
+                       sub             r10,r10,r8                                      /* Get the elapsed time */
+                       cmplwi  r10,128                                         /* Have we been spinning for 128 tb ticks? */
+                       blt+    lcksniff                                        /* Not yet... */
+                       
+                       mtmsr   r9                                                      /* Say, any interrupts pending? */                      
 
-                       subi    r4,r4,128                                               ; Back off elapsed time from timeout value
-                       or              r4,r4,r4                                                ; Do nothing here but force a single cycle delay
-                       mr.             r4,r4                                                   ; See if we used the whole timeout
-                       li              r3,0                                                    ; Assume a timeout return code
-                       or              r4,r4,r4                                                ; Do nothing here but force a single cycle delay
+/*                     The following instructions force the pipeline to be interlocked to that only one
+                       instruction is issued per cycle.  The insures that we stay enabled for a long enough
+                       time; if it's too short, pending interruptions will not have a chance to be taken */
                        
-                       ble--   lckfail                                                 ; We failed
-                       b               lockspin1                                               ; Now that we've opened an enable window, keep trying...
-lckretry:
-                       mtmsr   r9                                                              ; Restore interrupt state
-                       li              r8,1                                                    ; Insure that R8 is not 0
-                       b               lcktry
-lckfail:                                                                                       ; We couldn't get the lock
-                       li              r3,0                                                    ; Set failure return code
-                       blr                                                                             ; Return, head hanging low...
+                       subi    r4,r4,128                                       /* Back off elapsed time from timeout value */
+                       or              r4,r4,r4                                        /* Do nothing here but force a single cycle delay */
+                       mr.             r4,r4                                           /* See if we used the whole timeout     */
+                       li              r3,0                                            /* Assume a timeout return code */
+                       or              r4,r4,r4                                        /* Do nothing here but force a single cycle delay */
+                       
+                       ble-    lckfail                                         /* We failed */
+                       mtmsr   r7                                                      /* Disable for interruptions */
+                       mftb    r8                                                      /* Get the low part of the time base */
+                       b               lcksniff                                        /* Now that we've opened an enable window, keep trying... */
+
+lckfail:                                                                               /* We couldn't get the lock */                  
+                       li              r3,0                                            /* Set failure return code */
+                       blr                                                                     /* Return, head hanging low... */
 
 
 /*
- *             unsigned int hw_lock_bit(hw_lock_t, unsigned int bit, unsigned int timeout)
+ *      unsigned int hw_lock_bit(hw_lock_t, unsigned int bit, unsigned int timeout)
+ *
+ *      Try to acquire spin-lock. The second parameter is the bit mask to test and set.
+ *             multiple bits may be set. Return success (1) or failure (0).
+ *      Attempt will fail after timeout ticks of the timebase.
+ *             We try fairly hard to get this lock.  We disable for interruptions, but
+ *             reenable after a "short" timeout (128 ticks, we may want to shorten this).
+ *             After checking to see if the large timeout value (passed in) has expired and a
+ *             sufficient number of cycles have gone by (to insure pending 'rupts are taken),
+ *             we return either in abject failure, or disable and go back to the lock sniff routine.
+ *             If the sniffer finds the lock free, it jumps right up and tries to grab it.
+ *
+ *             NOTE WELL!!!!  THE ROUTINE hw_lock_phys_vir KNOWS WHAT REGISTERS THIS GUY
+ *             USES. THIS SAVES A TRANSLATION OFF TO ON TRANSITION AND BACK AND A SAVE AND
+ *             RESTORE FROM THE STACK.
  *
- *                     Try to acquire spin-lock. The second parameter is the bit mask to test and set.
- *                     multiple bits may be set. Return success (1) or failure (0).
- *                     Attempt will fail after timeout ticks of the timebase.
- *                     We try fairly hard to get this lock.  We disable for interruptions, but
- *                     reenable after a "short" timeout (128 ticks, we may want to shorten this).
- *                     After checking to see if the large timeout value (passed in) has expired and a
- *                     sufficient number of cycles have gone by (to insure pending 'rupts are taken),
- *                     we return either in abject failure, or disable and go back to the lock sniff routine.
- *                     If the sniffer finds the lock free, it jumps right up and tries to grab it.
  */
+
                        .align  5
+                       
+                       nop                                                                     ; Force loop alignment to cache line
+                       nop
+                       nop
+                       nop
+                       
                        .globl  EXT(hw_lock_bit)
 
 LEXT(hw_lock_bit)
 
-                       li              r10,0                   
+                       mfmsr   r9                                                      /* Get the MSR value */
+                       rlwinm  r9,r9,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r9,r9,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r7,r9,0,MSR_EE_BIT+1,MSR_EE_BIT-1       /* Get MSR that is uninterruptible */   
 
-bittry:                lwarx   r6,0,r3                                                 ; Grab the lock value 
-                       and.    r0,r6,r4                                                ; See if any of the lock bits are on 
-                       or              r6,r6,r4                                                ; Turn on the lock bits 
-                       bne--   bitspin                                                 ; Yeah, wait for it to clear... 
-                       stwcx.  r6,0,r3                                                 ; Try to seize that there durn lock 
-                       bne--   bittry                                                  ; Just start up again if the store failed...
-               
-                       li              r3,1                                                    ; Set good return code 
-                       isync                                                                   ; Make sure we don't use a speculativily loaded value 
-                       blr
-
-                       .align  5
+                       mtmsr   r7                                                      /* Turn off interruptions */
+                       isync                                                           ; May have turned off vec and fp here 
 
-bitspin:       li              r11,lgKillResv                                  ; Get killing field     
-                       stwcx.  r11,0,r11                                               ; Kill reservation
+                       mftb    r8                                                      /* Get the low part of the time base */
                        
-                       mr.             r10,r10                                                 ; Is r8 set to zero
-                       li              r10,1                                                   ; Close gate
-                       beq--   bit1sttime                                              ; If yes, first spin attempt
+bittry:                lwarx   r6,0,r3                                         /* Grab the lock value */
+                       and.    r0,r6,r4                                        /* See if any of the lock bits are on */
+                       or              r6,r6,r4                                        /* Turn on the lock bits */
+                       bne-    bitsniff                                        /* Yeah, wait for it to clear... */
+                       stwcx.  r6,0,r3                                         /* Try to seize that there durn lock */
+                       beq+    bitgot                                          /* We got it, yahoo... */
+                       b               bittry                                          /* Just start up again if the store failed... */
 
-bitspin0:      mtmsr   r7                                                              ; Turn off interruptions 
-                       mftb    r8                                                              ; Get the low part of the time base 
-
-bitsniff:      lwz             r6,0(r3)                                                ; Get that lock in here 
-                       and.    r0,r6,r4                                                ; See if any of the lock bits are on 
-                       beq++   bitretry                                                ; Yeah, try for it again...
+                       .align  5
                        
-                       mftb    r6                                                              ; Time stamp us now 
-                       sub             r6,r6,r8                                                ; Get the elapsed time 
-                       cmplwi  r6,128                                                  ; Have we been spinning for 128 tb ticks? 
-                       blt++   bitsniff                                                ; Not yet... 
+bitsniff:      lwz             r6,0(r3)                                        /* Get that lock in here */
+                       and.    r0,r6,r4                                        /* See if any of the lock bits are on */
+                       beq+    bittry                                          /* Yeah, try for it again... */
                        
-                       mtmsr   r9                                                              ; Say, any interrupts pending? 
-
-;                      The following instructions force the pipeline to be interlocked to that only one
-;                      instruction is issued per cycle.  The insures that we stay enabled for a long enough
-;                      time. If it's too short, pending interruptions will not have a chance to be taken 
+                       mftb    r6                                                      /* Time stamp us now */
+                       sub             r6,r6,r8                                        /* Get the elapsed time */
+                       cmplwi  r6,128                                          /* Have we been spinning for 128 tb ticks? */
+                       blt+    bitsniff                                        /* Not yet... */
+                       
+                       mtmsr   r9                                                      /* Say, any interrupts pending? */                      
 
-                       subi    r5,r5,128                                               ; Back off elapsed time from timeout value
-                       or              r5,r5,r5                                                ; Do nothing here but force a single cycle delay
-                       mr.             r5,r5                                                   ; See if we used the whole timeout
-                       or              r5,r5,r5                                                ; Do nothing here but force a single cycle delay
+/*                     The following instructions force the pipeline to be interlocked to that only one
+                       instruction is issued per cycle.  The insures that we stay enabled for a long enough
+                       time. If it's too short, pending interruptions will not have a chance to be taken 
+*/
                        
-                       bgt++   bitspin0                                                ; Now that we've opened an enable window, keep trying...
-               
-                       li              r3,0                                                    ; Set failure return code
-                       blr                                                                             ; Return, head hanging low...
-
-bitretry:      mtmsr   r9                                                              ; Enable for interruptions
-                       b               bittry
-
-bit1sttime:    lis             r0,hi16(MASK(MSR_VEC))                  ; Get vector enable
-                       mfmsr   r9                                                              ; Get the MSR value
-                       ori             r0,r0,lo16(MASK(MSR_FP))                ; Get FP enable
-                       ori             r7,r0,lo16(MASK(MSR_EE))                ; Get EE bit on too
-                       andc    r9,r9,r0                                                ; Clear FP and VEC
-                       andc    r7,r9,r7                                                ; Clear EE as well
-                       mtmsr   r7                                                              ; Turn off interruptions 
-                       isync                                                                   ; May have turned off vec and fp here 
-                       mftb    r8                                                              ; Get the low part of the time base 
-                       b               bitsniff
+                       subi    r5,r5,128                                       /* Back off elapsed time from timeout value */
+                       or              r5,r5,r5                                        /* Do nothing here but force a single cycle delay */
+                       mr.             r5,r5                                           /* See if we used the whole timeout     */
+                       or              r5,r5,r5                                        /* Do nothing here but force a single cycle delay */
+                       
+                       ble-    bitfail                                         /* We failed */
+                       mtmsr   r7                                                      /* Disable for interruptions */
+                       mftb    r8                                                      /* Get the low part of the time base */
+                       b               bitsniff                                        /* Now that we've opened an enable window, keep trying... */
 
                        .align  5
 
+bitgot:                mtmsr   r9                                                      /* Enable for interruptions */
+                       li              r3,1                                            /* Set good return code */
+                       isync                                                           /* Make sure we don't use a speculativily loaded value */
+                       blr
+
+bitfail:       li              r3,0                                            /* Set failure return code */
+                       blr                                                                     /* Return, head hanging low... */
+                       
 
 /*
- *             unsigned int hw_unlock_bit(hw_lock_t, unsigned int bit)
+ *      unsigned int hw_unlock_bit(hw_lock_t, unsigned int bit)
  *
- *                     Release bit based spin-lock. The second parameter is the bit mask to clear.
- *                     Multiple bits may be cleared.
+ *      Release bit based spin-lock. The second parameter is the bit mask to clear.
+ *             Multiple bits may be cleared.
  *
+ *             NOTE WELL!!!!  THE ROUTINE hw_lock_phys_vir KNOWS WHAT REGISTERS THIS GUY
+ *             USES. THIS SAVES A TRANSLATION OFF TO ON TRANSITION AND BACK AND A SAVE AND
+ *             RESTORE FROM THE STACK.
  */
+
                        .align  5
                        .globl  EXT(hw_unlock_bit)
 
 LEXT(hw_unlock_bit)
 
-                       .globl  EXT(hwulckbPatch_isync)
-LEXT(hwulckbPatch_isync)   
-                       isync 
-                       .globl  EXT(hwulckbPatch_eieio)
-LEXT(hwulckbPatch_eieio)
-                       eieio
-ubittry:       lwarx   r0,0,r3                                                 ; Grab the lock value
-                       andc    r0,r0,r4                                                ; Clear the lock bits
-                       stwcx.  r0,0,r3                                                 ; Try to clear that there durn lock
-                       bne-    ubittry                                                 ; Try again, couldn't save it...
+                       sync
+
+ubittry:       lwarx   r0,0,r3                                         /* Grab the lock value */
+                       andc    r0,r0,r4                                        /* Clear the lock bits */
+                       stwcx.  r0,0,r3                                         /* Try to clear that there durn lock */
+                       bne-    ubittry                                         /* Try again, couldn't save it... */
 
-                       blr                                                                             ; Leave...
+                       blr                                                                     /* Leave... */                  
 
 /*
- *             unsigned int hw_lock_mbits(hw_lock_t, unsigned int bits, unsigned int value, 
+ *      unsigned int hw_lock_mbits(hw_lock_t, unsigned int bits, unsigned int value, 
  *                     unsigned int newb, unsigned int timeout)
  *
- *                     Try to acquire spin-lock. The second parameter is the bit mask to check.
- *                     The third is the value of those bits and the 4th is what to set them to.
- *                     Return success (1) or failure (0).
- *                     Attempt will fail after timeout ticks of the timebase.
- *                     We try fairly hard to get this lock.  We disable for interruptions, but
- *                     reenable after a "short" timeout (128 ticks, we may want to shorten this).
- *                     After checking to see if the large timeout value (passed in) has expired and a
- *                     sufficient number of cycles have gone by (to insure pending 'rupts are taken),
- *                     we return either in abject failure, or disable and go back to the lock sniff routine.
- *                     If the sniffer finds the lock free, it jumps right up and tries to grab it.
+ *      Try to acquire spin-lock. The second parameter is the bit mask to check.
+ *             The third is the value of those bits and the 4th is what to set them to.
+ *             Return success (1) or failure (0).
+ *      Attempt will fail after timeout ticks of the timebase.
+ *             We try fairly hard to get this lock.  We disable for interruptions, but
+ *             reenable after a "short" timeout (128 ticks, we may want to shorten this).
+ *             After checking to see if the large timeout value (passed in) has expired and a
+ *             sufficient number of cycles have gone by (to insure pending 'rupts are taken),
+ *             we return either in abject failure, or disable and go back to the lock sniff routine.
+ *             If the sniffer finds the lock free, it jumps right up and tries to grab it.
+ *
  */
+
                        .align  5
+                       
+                       nop                                                                     ; Force loop alignment to cache line
+                       nop
+                       nop
+                       nop
+                       
                        .globl  EXT(hw_lock_mbits)
 
 LEXT(hw_lock_mbits)
 
-                       li              r10,0                   
+                       mfmsr   r9                                                      ; Get the MSR value
+                       rlwinm  r9,r9,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r9,r9,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r8,r9,0,MSR_EE_BIT+1,MSR_EE_BIT-1       ; Get MSR that is uninterruptible       
 
-mbittry:       lwarx   r12,0,r3                                                ; Grab the lock value
-                       and             r0,r12,r4                                               ; Clear extra bits
-                       andc    r12,r12,r4                                              ; Clear all bits in the bit mask
-                       or              r12,r12,r6                                              ; Turn on the lock bits
-                       cmplw   r0,r5                                                   ; Are these the right bits?
-                       bne--   mbitspin                                                ; Nope, wait for it to clear...
-                       stwcx.  r12,0,r3                                                ; Try to seize that there durn lock
-                       beq++   mbitgot                                                 ; We got it, yahoo...
-                       b               mbittry                                                 ; Just start up again if the store failed...
+                       mtmsr   r8                                                      ; Turn off interruptions
+                       isync                                                           ; May have turned off vectors or float here
+                       mftb    r10                                                     ; Get the low part of the time base
+                       
+mbittry:       lwarx   r12,0,r3                                        ; Grab the lock value
+                       and             r0,r12,r4                                       ; Clear extra bits
+                       andc    r12,r12,r4                                      ; Clear all bits in the bit mask
+                       or              r12,r12,r6                                      ; Turn on the lock bits
+                       cmplw   r0,r5                                           ; Are these the right bits?
+                       bne-    mbitsniff                                       ; Nope, wait for it to clear...
+                       stwcx.  r12,0,r3                                        ; Try to seize that there durn lock
+                       beq+    mbitgot                                         ; We got it, yahoo...
+                       b               mbittry                                         ; Just start up again if the store failed...
 
                        .align  5
-mbitspin:      li              r11,lgKillResv                                  ; Point to killing field
-                       stwcx.  r11,0,r11                                               ; Kill it
                        
-                       mr.             r10,r10                                                 ; Is r10 set to zero
-                       bne++   mbitspin0                                               ; If yes, first spin attempt
-                       lis             r0,hi16(MASK(MSR_VEC))                  ; Get vector enable
-                       mfmsr   r9                                                              ; Get the MSR value
-                       ori             r0,r0,lo16(MASK(MSR_FP))                ; Get FP enable
-                       ori             r8,r0,lo16(MASK(MSR_EE))                ; Get EE bit on too
-                       andc    r9,r9,r0                                                ; Clear FP and VEC
-                       andc    r8,r9,r8                                                ; Clear EE as well
-                       mtmsr   r8                                                              ; Turn off interruptions
-                       isync                                                                   ; May have turned off vectors or float here
-                       mftb    r10                                                             ; Get the low part of the time base
-                       b               mbitsniff
-mbitspin0:
-                       mtmsr   r8                                                              ; Turn off interruptions
-                       mftb    r10                                                             ; Get the low part of the time base
-mbitsniff:
-                       lwz             r12,0(r3)                                               ; Get that lock in here
-                       and             r0,r12,r4                                               ; Clear extra bits
-                       cmplw   r0,r5                                                   ; Are these the right bits?
-                       beq++   mbitretry                                               ; Yeah, try for it again...
+mbitsniff:     lwz             r12,0(r3)                                       ; Get that lock in here
+                       and             r0,r12,r4                                       ; Clear extra bits
+                       cmplw   r0,r5                                           ; Are these the right bits?
+                       beq+    mbittry                                         ; Yeah, try for it again...
                        
-                       mftb    r11                                                             ; Time stamp us now
-                       sub             r11,r11,r10                                             ; Get the elapsed time
-                       cmplwi  r11,128                                                 ; Have we been spinning for 128 tb ticks?
-                       blt++   mbitsniff                                               ; Not yet...
+                       mftb    r11                                                     ; Time stamp us now
+                       sub             r11,r11,r10                                     ; Get the elapsed time
+                       cmplwi  r11,128                                         ; Have we been spinning for 128 tb ticks?
+                       blt+    mbitsniff                                       ; Not yet...
                        
-                       mtmsr   r9                                                              ; Say, any interrupts pending?                  
+                       mtmsr   r9                                                      ; Say, any interrupts pending?                  
 
 ;                      The following instructions force the pipeline to be interlocked to that only one
 ;                      instruction is issued per cycle.  The insures that we stay enabled for a long enough
 ;                      time. If it is too short, pending interruptions will not have a chance to be taken 
                        
-                       subi    r7,r7,128                                               ; Back off elapsed time from timeout value
-                       or              r7,r7,r7                                                ; Do nothing here but force a single cycle delay
-                       mr.             r7,r7                                                   ; See if we used the whole timeout
-                       or              r7,r7,r7                                                ; Do nothing here but force a single cycle delay
+                       subi    r7,r7,128                                       ; Back off elapsed time from timeout value
+                       or              r7,r7,r7                                        ; Do nothing here but force a single cycle delay
+                       mr.             r7,r7                                           ; See if we used the whole timeout
+                       or              r7,r7,r7                                        ; Do nothing here but force a single cycle delay
                        
-                       ble--   mbitfail                                                ; We failed
-                       b               mbitspin0                                               ; Now that we have opened an enable window, keep trying...
-mbitretry:
-                       mtmsr   r9                                                              ; Enable for interruptions
-                       li              r10,1                                                   ; Make sure this is non-zero
-                       b               mbittry
+                       ble-    mbitfail                                        ; We failed
+                       mtmsr   r8                                                      ; Disable for interruptions
+                       mftb    r10                                                     ; Get the low part of the time base
+                       b               mbitsniff                                       ; Now that we have opened an enable window, keep trying...
 
                        .align  5
-mbitgot:       
-                       li              r3,1                                                    ; Set good return code
-                       isync                                                                   ; Make sure we do not use a speculativily loaded value
+
+mbitgot:       mtmsr   r9                                                      ; Enable for interruptions
+                       li              r3,1                                            ; Set good return code
+                       isync                                                           ; Make sure we do not use a speculativily loaded value
                        blr
 
-mbitfail:      li              r3,0                                                    ; Set failure return code
-                       blr                                                                             ; Return, head hanging low...
+mbitfail:      li              r3,0                                            ; Set failure return code
+                       blr                                                                     ; Return, head hanging low...
+                       
 
 /*
  *      unsigned int hw_cpu_sync(unsigned int *, unsigned int timeout)
  *
- *                     Spin until word hits 0 or timeout. 
- *                     Return success (1) or failure (0).
- *                     Attempt will fail after timeout ticks of the timebase.
+ *      Spin until word hits 0 or timeout. 
+ *             Return success (1) or failure (0).
+ *      Attempt will fail after timeout ticks of the timebase.
+ *
+ *             The theory is that a processor will bump a counter as it signals
+ *             other processors.  Then it will spin untl the counter hits 0 (or
+ *             times out).  The other processors, as it receives the signal will 
+ *             decrement the counter.
  *
- *                     The theory is that a processor will bump a counter as it signals
- *                     other processors.  Then it will spin untl the counter hits 0 (or
- *                     times out).  The other processors, as it receives the signal will 
- *                     decrement the counter.
+ *             The other processors use interlocked update to decrement, this one
+ *             does not need to interlock.
  *
- *                     The other processors use interlocked update to decrement, this one
- *                     does not need to interlock.
  */
+
                        .align  5
+                       
                        .globl  EXT(hw_cpu_sync)
 
 LEXT(hw_cpu_sync)
 
-                       mftb    r10                                                             ; Get the low part of the time base
-                       mr              r9,r3                                                   ; Save the sync word address
-                       li              r3,1                                                    ; Assume we work
+                       mftb    r10                                                     ; Get the low part of the time base
+                       mr              r9,r3                                           ; Save the sync word address
+                       li              r3,1                                            ; Assume we work
 
-csynctry:      lwz             r11,0(r9)                                               ; Grab the sync value
-                       mr.             r11,r11                                                 ; Counter hit 0?
-                       beqlr-                                                                  ; Yeah, we are sunk...
-                       mftb    r12                                                             ; Time stamp us now
+csynctry:      lwz             r11,0(r9)                                       ; Grab the sync value
+                       mr.             r11,r11                                         ; Counter hit 0?
+                       beqlr-                                                          ; Yeah, we are sunk...
+                       mftb    r12                                                     ; Time stamp us now
 
-                       sub             r12,r12,r10                                             ; Get the elapsed time
-                       cmplw   r4,r12                                                  ; Have we gone too long?
-                       bge+    csynctry                                                ; Not yet...
+                       sub             r12,r12,r10                                     ; Get the elapsed time
+                       cmplw   r4,r12                                          ; Have we gone too long?
+                       bge+    csynctry                                        ; Not yet...
                        
-                       li              r3,0                                                    ; Set failure...
-                       blr                                                                             ; Return, head hanging low...
+                       li              r3,0                                            ; Set failure...
+                       blr                                                                     ; Return, head hanging low...
 
 /*
  *      unsigned int hw_cpu_wcng(unsigned int *, unsigned int, unsigned int timeout)
  *
- *                     Spin until word changes or timeout. 
- *                     Return success (1) or failure (0).
- *                     Attempt will fail after timeout ticks of the timebase.
+ *      Spin until word changes or timeout. 
+ *             Return success (1) or failure (0).
+ *      Attempt will fail after timeout ticks of the timebase.
+ *
+ *             This is used to insure that a processor passes a certain point.
+ *             An example of use is to monitor the last interrupt time in the 
+ *             per_proc block.  This can be used to insure that the other processor
+ *             has seen at least one interrupt since a specific time.
  *
- *                     This is used to insure that a processor passes a certain point.
- *                     An example of use is to monitor the last interrupt time in the 
- *                     per_proc block.  This can be used to insure that the other processor
- *                     has seen at least one interrupt since a specific time.
  */
+
                        .align  5
+                       
                        .globl  EXT(hw_cpu_wcng)
 
 LEXT(hw_cpu_wcng)
 
-                       mftb    r10                                                             ; Get the low part of the time base
-                       mr              r9,r3                                                   ; Save the sync word address
-                       li              r3,1                                                    ; Assume we work
+                       mftb    r10                                                     ; Get the low part of the time base
+                       mr              r9,r3                                           ; Save the sync word address
+                       li              r3,1                                            ; Assume we work
 
-wcngtry:       lwz             r11,0(r9)                                               ; Grab the  value
-                       cmplw   r11,r4                                                  ; Do they still match?
-                       bnelr-                                                                  ; Nope, cool...
-                       mftb    r12                                                             ; Time stamp us now
+wcngtry:       lwz             r11,0(r9)                                       ; Grab the  value
+                       cmplw   r11,r4                                          ; Do they still match?
+                       bnelr-                                                          ; Nope, cool...
+                       mftb    r12                                                     ; Time stamp us now
 
-                       sub             r12,r12,r10                                             ; Get the elapsed time
-                       cmplw   r5,r12                                                  ; Have we gone too long?
-                       bge+    wcngtry                                                 ; Not yet...
+                       sub             r12,r12,r10                                     ; Get the elapsed time
+                       cmplw   r5,r12                                          ; Have we gone too long?
+                       bge+    wcngtry                                         ; Not yet...
                        
-                       li              r3,0                                                    ; Set failure...
-                       blr                                                                             ; Return, head hanging low...
+                       li              r3,0                                            ; Set failure...
+                       blr                                                                     ; Return, head hanging low...
                        
 
 /*
- *             unsigned int hw_lock_try(hw_lock_t)
+ *      unsigned int hw_lock_try(hw_lock_t)
  *
- *                     Try to acquire spin-lock. Return success (1) or failure (0)
- *                     Returns with preemption disabled on success.
+ *      Try to acquire spin-lock. Return success (1) or failure (0)
+ *      Returns with preemption disabled on success.
  *
  */
                        .align  5
@@ -636,101 +661,115 @@ wcngtry:        lwz             r11,0(r9)                                               ; Grab the  value
 
 LEXT(hw_lock_try)
 
-                       lis             r0,hi16(MASK(MSR_VEC))                  ; Get vector enable
-                       mfmsr   r9                                                              ; Get the MSR value 
-                       ori             r0,r0,lo16(MASK(MSR_FP))                ; Get FP enable
-                       ori             r7,r0,lo16(MASK(MSR_EE))                ; Get EE bit on too
-                       andc    r9,r9,r0                                                ; Clear FP and VEC
-                       andc    r7,r9,r7                                                ; Clear EE as well
+#if 0
+                       lis             r0,HIGH_ADDR(CutTrace)          /* (TEST/DEBUG) */
+                       lis             r5,0x9999                                       /* (TEST/DEBUG) */
+                       oris    r0,r0,LOW_ADDR(CutTrace)        /* (TEST/DEBUG) */
+                       sc                                                                      /* (TEST/DEBUG) */
+#endif
+                       mfmsr   r9                                                      /* Save the MSR value */
+                       rlwinm  r9,r9,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r9,r9,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r7,r9,0,MSR_EE_BIT+1,MSR_EE_BIT-1       /* Clear interruption bit */
 
-                       mtmsr   r7                                                              ; Disable interruptions and thus, preemption
+#if    MACH_LDEBUG
+                       lis     r5,     0x10                                            /* roughly 1E6 */
+                       mtctr   r5
+#endif /* MACH_LDEBUG */
+                       
+                       mtmsr   r7                                                      /* Disable interruptions and thus, preemption */
+                       isync                                                           ; May have turned off fp/vec here
+.L_lock_try_loop:      
 
-                       lwz             r5,0(r3)                                                ; Quick load
-                       andi.   r6,r5,ILK_LOCKED                                ; TEST...
-                       bne--   .L_lock_try_failed                              ; No go...
+#if    MACH_LDEBUG
+                       bdnz+   0f                                                      /* Count attempts */
+                       mtmsr   r9                                                      /* Restore enablement */
+                       BREAKPOINT_TRAP                                         /* Get to debugger */
+                       mtmsr   r7                                                      /* Disable interruptions and thus, preemption */
+0:     
+#endif /* MACH_LDEBUG */
 
-.L_lock_try_loop:      
-                       lwarx   r5,0,r3                                                 ; Ld from addr of arg and reserve
+                       lwarx   r5,0,r3                                         /* Ld from addr of arg and reserve */
 
-                       andi.   r6,r5,ILK_LOCKED                                ; TEST...
+                       andi.   r6,r5,ILK_LOCKED                        /* TEST... */
                        ori             r5,r5,ILK_LOCKED
-                       bne--   .L_lock_try_failedX                             ; branch if taken. Predict free 
+                       bne-    .L_lock_try_failed                      /* branch if taken. Predict free */
        
-                       stwcx.  r5,0,r3                                                 ; And SET (if still reserved)
-                       bne--   .L_lock_try_loop                                ; If set failed, loop back 
+                       stwcx.  r5,0,r3                                         /* And SET (if still reserved) */
+                       mfsprg  r6,0                                            /* Get the per_proc block */                    
+                       bne-    .L_lock_try_loop                        /* If set failed, loop back */
                        
                        isync
 
-                       mfsprg  r6,1                                                    ; Get current activation 
-                       lwz             r5,ACT_PREEMPT_CNT(r6)                  ; Get the preemption level
-                       addi    r5,r5,1                                                 ; Bring up the disable count 
-                       stw             r5,ACT_PREEMPT_CNT(r6)                  ; Save it back
+                       lwz             r5,PP_PREEMPT_CNT(r6)           /* Get the preemption level */
+                       addi    r5,r5,1                                         /* Bring up the disable count */
+                       stw             r5,PP_PREEMPT_CNT(r6)           /* Save it back */
 
-                       mtmsr   r9                                                              ; Allow interruptions now 
-                       li              r3,1                                                    ; Set that the lock was free 
+                       mtmsr   r9                                                      /* Allow interruptions now */
+                       li              r3,1                                            /* Set that the lock was free */
                        blr
 
-.L_lock_try_failedX:
-                       li              r6,lgKillResv                                   ; Killing field
-                       stwcx.  r6,0,r6                                                 ; Kill reservation
-                       
 .L_lock_try_failed:
-                       mtmsr   r9                                                              ; Allow interruptions now 
-                       li              r3,0                                                    ; FAILURE - lock was taken 
+                       mtmsr   r9                                                      /* Allow interruptions now */
+                       li              r3,0                                            /* FAILURE - lock was taken */
                        blr
 
 /*
- *             unsigned int hw_lock_held(hw_lock_t)
+ *      unsigned int hw_lock_held(hw_lock_t)
+ *
+ *      Return 1 if lock is held
+ *      Doesn't change preemption state.
+ *      N.B.  Racy, of course.
  *
- *                     Return 1 if lock is held
- *                     Doesn't change preemption state.
- *                     N.B.  Racy, of course.
  */
                        .align  5
                        .globl  EXT(hw_lock_held)
 
 LEXT(hw_lock_held)
 
-                       isync                                                                   ; Make sure we don't use a speculativily fetched lock 
-                       lwz             r3, 0(r3)                                               ; Get lock value 
-                       andi.   r6,r3,ILK_LOCKED                                ; Extract the ILK_LOCKED bit
+#if 0
+                       lis             r0,HIGH_ADDR(CutTrace)          /* (TEST/DEBUG) */
+                       lis             r5,0x8888                                       /* (TEST/DEBUG) */
+                       oris    r0,r0,LOW_ADDR(CutTrace)        /* (TEST/DEBUG) */
+                       sc                                                                      /* (TEST/DEBUG) */
+#endif
+                       isync                                                   /* Make sure we don't use a speculativily fetched lock */
+                       lwz             r3, 0(r3)                               /* Return value of lock */
                        blr
 
 /*
  *             uint32_t hw_compare_and_store(uint32_t oldval, uint32_t newval, uint32_t *dest)
  *
- *                     Compare old to area if equal, store new, and return true
- *                     else return false and no store
- *                     This is an atomic operation
+ *             Compare old to area if equal, store new, and return true
+ *             else return false and no store
+ *             This is an atomic operation
+ *
  */
                        .align  5
                        .globl  EXT(hw_compare_and_store)
 
 LEXT(hw_compare_and_store)
 
-                       mr              r6,r3                                                   ; Save the old value
+                       mr              r6,r3                                           /* Save the old value */                        
 
-cstry:         lwarx   r9,0,r5                                                 ; Grab the area value
-                       li              r3,1                                                    ; Assume it works
-                       cmplw   cr0,r9,r6                                               ; Does it match the old value?
-                       bne--   csfail                                                  ; No, it must have changed...
-                       stwcx.  r4,0,r5                                                 ; Try to save the new value
-                       bne--   cstry                                                   ; Didn't get it, try again...
-                       isync                                                                   ; Just hold up prefetch
-                       blr                                                                             ; Return...
+cstry:         lwarx   r9,0,r5                                         /* Grab the area value */
+                       li              r3,1                                            /* Assume it works */
+                       cmplw   cr0,r9,r6                                       /* Does it match the old value? */
+                       bne-    csfail                                          /* No, it must have changed... */
+                       stwcx.  r4,0,r5                                         /* Try to save the new value */
+                       bne-    cstry                                           /* Didn't get it, try again... */
+                       isync                                                           /* Just hold up prefetch */
+                       blr                                                                     /* Return... */
                        
-csfail:                li              r3,lgKillResv                                   ; Killing field
-                       stwcx.  r3,0,r3                                                 ; Blow reservation
-                       
-                       li              r3,0                                                    ; Set failure
-                       blr                                                                             ; Better luck next time...
+csfail:                li              r3,0                                            /* Set failure */
+                       blr                                                                     /* Better luck next time... */
 
 
 /*
  *             uint32_t hw_atomic_add(uint32_t *dest, uint32_t delt)
  *
- *                     Atomically add the second parameter to the first.
- *                     Returns the result.
+ *             Atomically add the second parameter to the first.
+ *             Returns the result.
  *
  */
                        .align  5
@@ -738,20 +777,20 @@ csfail:           li              r3,lgKillResv                                   ; Killing field
 
 LEXT(hw_atomic_add)
 
-                       mr              r6,r3                                                   ; Save the area
+                       mr              r6,r3                                           /* Save the area */                     
 
-addtry:                lwarx   r3,0,r6                                                 ; Grab the area value
-                       add             r3,r3,r4                                                ; Add the value
-                       stwcx.  r3,0,r6                                                 ; Try to save the new value
-                       bne--   addtry                                                  ; Didn't get it, try again...
-                       blr                                                                             ; Return...
+addtry:                lwarx   r3,0,r6                                         /* Grab the area value */
+                       add             r3,r3,r4                                        /* Add the value */
+                       stwcx.  r3,0,r6                                         /* Try to save the new value */
+                       bne-    addtry                                          /* Didn't get it, try again... */
+                       blr                                                                     /* Return... */
 
 
 /*
  *             uint32_t hw_atomic_sub(uint32_t *dest, uint32_t delt)
  *
- *                     Atomically subtract the second parameter from the first.
- *                     Returns the result.
+ *             Atomically subtract the second parameter from the first.
+ *             Returns the result.
  *
  */
                        .align  5
@@ -759,40 +798,41 @@ addtry:           lwarx   r3,0,r6                                                 ; Grab the area value
 
 LEXT(hw_atomic_sub)
 
-                       mr              r6,r3                                                   ; Save the area
+                       mr              r6,r3                                           /* Save the area */                     
 
-subtry:                lwarx   r3,0,r6                                                 ; Grab the area value
-                       sub             r3,r3,r4                                                ; Subtract the value
-                       stwcx.  r3,0,r6                                                 ; Try to save the new value
-                       bne--   subtry                                                  ; Didn't get it, try again...
-                       blr                                                                             ; Return...
+subtry:                lwarx   r3,0,r6                                         /* Grab the area value */
+                       sub             r3,r3,r4                                        /* Subtract the value */
+                       stwcx.  r3,0,r6                                         /* Try to save the new value */
+                       bne-    subtry                                          /* Didn't get it, try again... */
+                       blr                                                                     /* Return... */
 
 
 /*
  *             uint32_t hw_atomic_or(uint32_t *dest, uint32_t mask)
  *
- *                     Atomically ORs the second parameter into the first.
- *                     Returns the result.
+ *             Atomically ORs the second parameter into the first.
+ *             Returns the result.
+ *
  */
                        .align  5
                        .globl  EXT(hw_atomic_or)
 
 LEXT(hw_atomic_or)
 
-                       mr              r6,r3                                                   ; Save the area                 
+                       mr              r6,r3                                           ; Save the area                 
 
-ortry:         lwarx   r3,0,r6                                                 ; Grab the area value
-                       or              r3,r3,r4                                                ; OR the value 
-                       stwcx.  r3,0,r6                                                 ; Try to save the new value
-                       bne--   ortry                                                   ; Did not get it, try again...
-                       blr                                                                             ; Return...
+ortry:         lwarx   r3,0,r6                                         ; Grab the area value
+                       or              r3,r3,r4                                        ; OR the value 
+                       stwcx.  r3,0,r6                                         ; Try to save the new value
+                       bne-    ortry                                           ; Did not get it, try again...
+                       blr                                                                     ; Return...
 
 
 /*
  *             uint32_t hw_atomic_and(uint32_t *dest, uint32_t mask)
  *
- *                     Atomically ANDs the second parameter with the first.
- *                     Returns the result.
+ *             Atomically ANDs the second parameter with the first.
+ *             Returns the result.
  *
  */
                        .align  5
@@ -800,22 +840,22 @@ ortry:            lwarx   r3,0,r6                                                 ; Grab the area value
 
 LEXT(hw_atomic_and)
 
-                       mr              r6,r3                                                   ; Save the area                 
+                       mr              r6,r3                                           ; Save the area                 
 
-andtry:                lwarx   r3,0,r6                                                 ; Grab the area value
-                       and             r3,r3,r4                                                ; AND the value 
-                       stwcx.  r3,0,r6                                                 ; Try to save the new value
-                       bne--   andtry                                                  ; Did not get it, try again...
-                       blr                                                                             ; Return...
+andtry:                lwarx   r3,0,r6                                         ; Grab the area value
+                       and             r3,r3,r4                                        ; AND the value 
+                       stwcx.  r3,0,r6                                         ; Try to save the new value
+                       bne-    andtry                                          ; Did not get it, try again...
+                       blr                                                                     ; Return...
 
 
 /*
  *             void hw_queue_atomic(unsigned int * anchor, unsigned int * elem, unsigned int disp)
  *
- *                     Atomically inserts the element at the head of the list
- *                     anchor is the pointer to the first element
- *                     element is the pointer to the element to insert
- *                     disp is the displacement into the element to the chain pointer
+ *             Atomically inserts the element at the head of the list
+ *             anchor is the pointer to the first element
+ *             element is the pointer to the element to insert
+ *             disp is the displacement into the element to the chain pointer
  *
  */
                        .align  5
@@ -823,92 +863,91 @@ andtry:           lwarx   r3,0,r6                                                 ; Grab the area value
 
 LEXT(hw_queue_atomic)
 
-                       mr              r7,r4                                                   ; Make end point the same as start
-                       mr              r8,r5                                                   ; Copy the displacement also
-                       b               hw_queue_comm                                   ; Join common code...
+                       mr              r7,r4                                           /* Make end point the same as start */
+                       mr              r8,r5                                           /* Copy the displacement also */
+                       b               hw_queue_comm                           /* Join common code... */
 
 /*
  *             void hw_queue_atomic_list(unsigned int * anchor, unsigned int * first, unsigned int * last, unsigned int disp)
  *
- *                     Atomically inserts the list of elements at the head of the list
- *                     anchor is the pointer to the first element
- *                     first is the pointer to the first element to insert
- *                     last is the pointer to the last element to insert
- *                     disp is the displacement into the element to the chain pointer
+ *             Atomically inserts the list of elements at the head of the list
+ *             anchor is the pointer to the first element
+ *             first is the pointer to the first element to insert
+ *             last is the pointer to the last element to insert
+ *             disp is the displacement into the element to the chain pointer
+ *
  */
                        .align  5
                        .globl  EXT(hw_queue_atomic_list)
 
 LEXT(hw_queue_atomic_list)
 
-                       mr              r7,r5                                                   ; Make end point the same as start
-                       mr              r8,r6                                                   ; Copy the displacement also
+                       mr              r7,r5                                           /* Make end point the same as start */
+                       mr              r8,r6                                           /* Copy the displacement also */
 
 hw_queue_comm:
-                       lwarx   r9,0,r3                                                 ; Pick up the anchor
-                       stwx    r9,r8,r7                                                ; Chain that to the end of the new stuff
-                       eieio                                                                   ; Make sure this store makes it before the anchor update
-                       stwcx.  r4,0,r3                                                 ; Try to chain into the front
-                       bne--   hw_queue_comm                                   ; Didn't make it, try again...
-
-                       blr                                                                             ; Return...
+                       lwarx   r9,0,r3                                         /* Pick up the anchor */
+                       stwx    r9,r8,r7                                        /* Chain that to the end of the new stuff */
+                       eieio                                                           ; Make sure this store makes it before the anchor update
+                       stwcx.  r4,0,r3                                         /* Try to chain into the front */
+                       bne-    hw_queue_comm                           /* Didn't make it, try again... */
+                       
+                       blr                                                                     /* Return... */
 
 /*
  *             unsigned int *hw_dequeue_atomic(unsigned int *anchor, unsigned int disp)
  *
- *                     Atomically removes the first element in a list and returns it.
- *                     anchor is the pointer to the first element
- *                     disp is the displacement into the element to the chain pointer
- *                     Returns element if found, 0 if empty.
+ *             Atomically removes the first element in a list and returns it.
+ *             anchor is the pointer to the first element
+ *             disp is the displacement into the element to the chain pointer
+ *             Returns element if found, 0 if empty.
+ *
  */
                        .align  5
                        .globl  EXT(hw_dequeue_atomic)
 
 LEXT(hw_dequeue_atomic)
 
-                       mr              r5,r3                                                   ; Save the anchor
+                       mr              r5,r3                                           /* Save the anchor */
 
 hw_dequeue_comm:
-                       lwarx   r3,0,r5                                                 ; Pick up the anchor
-                       mr.             r3,r3                                                   ; Is the list empty?
-                       beq--   hdcFail                                                 ; Leave it list empty...
-                       lwzx    r9,r4,r3                                                ; Get the next in line
-                       stwcx.  r9,0,r5                                                 ; Try to chain into the front
-                       beqlr++                                                                 ; Got the thing, go away with it...
-                       b               hw_dequeue_comm                                 ; Did not make it, try again...
-
-hdcFail:       li              r4,lgKillResv                                   ; Killing field
-                       stwcx.  r4,0,r4                                                 ; Dump reservation
-                       blr                                                                             ; Leave...
-
+                       lwarx   r3,0,r5                                         /* Pick up the anchor */
+                       mr.             r3,r3                                           /* Is the list empty? */
+                       beqlr-                                                          /* Leave it list empty... */
+                       lwzx    r9,r4,r3                                        /* Get the next in line */
+                       stwcx.  r9,0,r5                                         /* Try to chain into the front */
+                       beqlr+                                                          ; Got the thing, go away with it...
+                       b               hw_dequeue_comm                         ; Did not make it, try again...
 
 /*
- *             void mutex_init(mutex_t* l, etap_event_t etap)
- *
+ *     void mutex_init(mutex_t* l, etap_event_t etap)
  */
-                       .align  5
-                       .globl  EXT(mutex_init)
 
-LEXT(mutex_init)
+ENTRY(mutex_init,TAG_NO_FRAME_USED)
 
                        PROLOG(0)
                        li      r10,    0
-                       stw     r10,    LOCK_DATA(r3)                           ; clear lock word
-                       sth     r10,    MUTEX_WAITERS(r3)                       ; init waiter count
+                       stw     r10,    LOCK_DATA(r3)           /* clear lock word */
+                       sth     r10,    MUTEX_WAITERS(r3)       /* init waiter count */
                        sth     r10,    MUTEX_PROMOTED_PRI(r3)
 #if    MACH_LDEBUG
-                       stw     r10,    MUTEX_PC(r3)                            ; init caller pc
-                       stw     r10,    MUTEX_THREAD(r3)                        ; and owning thread
+                       stw     r10,    MUTEX_PC(r3)            /* init caller pc */
+                       stw     r10,    MUTEX_THREAD(r3)        /* and owning thread */
                        li      r10,    MUTEX_TAG
-                       stw     r10,    MUTEX_TYPE(r3)                          ; set lock type
+                       stw     r10,    MUTEX_TYPE(r3)          /* set lock type */
 #endif /* MACH_LDEBUG */
+
+#if    ETAP_LOCK_TRACE
+                       bl      EXT(etap_mutex_init)            /* init ETAP data */
+#endif /* ETAP_LOCK_TRACE */
+
                        EPILOG
                        blr
 
 /*
- *             void mutex_lock(mutex_t*)
- *
+ *     void mutex_lock(mutex_t*)
  */
+
                        .align  5
                        .globl  EXT(mutex_lock)
 LEXT(mutex_lock)
@@ -917,30 +956,21 @@ LEXT(mutex_lock)
 LEXT(_mutex_lock)
 
 #if    !MACH_LDEBUG
-                       mfsprg  r6,1                                                    ; load the current thread
-                       lwz             r5,0(r3)                                                ; Get the lock quickly
-                       mr.             r5,r5                                                   ; Quick check
-                       bne--   L_mutex_lock_slow                               ; Can not get it right now...
-
+                       mfsprg  r6,1                                    /* load the current thread */
 L_mutex_lock_loop:
-                       lwarx   r5,0,r3                                                 ; load the mutex lock
+                       lwarx   r5,0,r3                                 /* load the mutex lock */
                        mr.             r5,r5
-                       bne--   L_mutex_lock_slowX                              ; go to the slow path
-                       stwcx.  r6,0,r3                                                 ; grab the lock
-                       bne--   L_mutex_lock_loop                               ; loop back if failed
-                       isync                                                                   ; stop prefeteching
+                       bne-    L_mutex_lock_slow               /* go to the slow path */
+                       stwcx.  r6,0,r3                                 /* grab the lock */
+                       bne-    L_mutex_lock_loop               /* loop back if failed */
+                       isync                                                   /* stop prefeteching */
                        blr
-
-L_mutex_lock_slowX:
-                       li              r5,lgKillResv                                   ; Killing field
-                       stwcx.  r5,0,r5                                                 ; Kill reservation
-
 L_mutex_lock_slow:
 #endif
 #if CHECKNMI
-                       mflr    r12                                                             ; (TEST/DEBUG) 
-                       bl              EXT(ml_sense_nmi)                               ; (TEST/DEBUG)
-                       mtlr    r12                                                             ; (TEST/DEBUG)
+                       mflr    r12                                                     ; (TEST/DEBUG) 
+                       bl              EXT(ml_sense_nmi)                       ; (TEST/DEBUG)
+                       mtlr    r12                                                     ; (TEST/DEBUG)
 #endif
 
                        PROLOG(12)
@@ -960,19 +990,37 @@ L_mutex_lock_assert_wait_panic_str:
 L_mutex_lock_assert_wait_1:
                        lwz             r3,FM_ARG0(r1)
 #endif
+       
+#if    ETAP_LOCK_TRACE
+                       li              r0,     0
+                       stw             r0,SWT_HI(r1)                   /* set wait time to 0 (HI) */
+                       stw             r0,SWT_LO(r1)                   /* set wait time to 0 (LO) */
+                       stw             r0,MISSED(r1)                   /* clear local miss marker */
+#endif /* ETAP_LOCK_TRACE */
+
                        CHECK_SETUP(r12)        
                        CHECK_MUTEX_TYPE()
                        CHECK_NO_SIMPLELOCKS()
+
 .L_ml_retry:
-                       bl              lockDisa                                                ; Go get a lock on the mutex's interlock lock
-                       mr.             r4,r3                                                   ; Did we get it?
-                       lwz             r3,FM_ARG0(r1)                                  ; Restore the lock address
-                       bne+    mlGotInt                                                ; We got it just fine...
-
-                       lis             r3,hi16(mutex_failed1)                  ; Get the failed mutex message
-                       ori             r3,r3,lo16(mutex_failed1)               ; Get the failed mutex message
-                       bl              EXT(panic)                                              ; Call panic
-                       BREAKPOINT_TRAP                                                 ; We die here anyway, can not get the lock
+#if 0
+                       mfsprg  r4,0                                            /* (TEST/DEBUG) */
+                       lis             r0,HIGH_ADDR(CutTrace)          /* (TEST/DEBUG) */
+                       lwz             r4,PP_ACTIVE_THREAD(r4)         /* (TEST/DEBUG) */
+                       lis             r5,0xAAAA                                       /* (TEST/DEBUG) */
+                       oris    r0,r0,LOW_ADDR(CutTrace)        /* (TEST/DEBUG) */
+                       sc                                                                      /* (TEST/DEBUG) */
+#endif
+
+                       bl              lockDisa                                /* Go get a lock on the mutex's interlock lock */
+                       mr.             r4,r3                                   /* Did we get it? */
+                       lwz             r3,FM_ARG0(r1)                  /* Restore the lock address */
+                       bne+    mlGotInt                                /* We got it just fine... */
+
+                       lis             r3,HIGH_ADDR(mutex_failed1)     ; Get the failed mutex message
+                       ori             r3,r3,LOW_ADDR(mutex_failed1)   ; Get the failed mutex message
+                       bl              EXT(panic)                              ; Call panic
+                       BREAKPOINT_TRAP                                 ; We die here anyway, can not get the lock
        
                        .data
 mutex_failed1:
@@ -981,30 +1029,29 @@ mutex_failed1:
                        
 mlGotInt:
                        
-                     Note that there is no reason to do a load and reserve here.  We already
-;                      hold the interlock lock and no one can touch this field unless they 
-;                      have that, so, we're free to play
-
-                       lwz             r4,LOCK_DATA(r3)                                ; Get the mutex's lock field
-                       rlwinm. r9,r4,30,2,31                                   ; So, can we have it?
-                       bne-    mlInUse                                                 ; Nope, sombody's playing already...
+/*                     Note that there is no reason to do a load and reserve here.  We already
+                       hold the interlock lock and no one can touch this field unless they 
+                       have that, so, we're free to play */
+                       
+                       lwz             r4,LOCK_DATA(r3)                /* Get the mutex's lock field */
+                       rlwinm. r9,r4,30,2,31                   /* So, can we have it? */
+                       bne-    mlInUse                                 /* Nope, sombody's playing already... */
 
 #if    MACH_LDEBUG
-                       li              r5,lo16(MASK(MSR_EE))                   ; Get the EE bit
-                       mfmsr   r11                                                             ; Note: no need to deal with fp or vec here
-                       andc    r5,r11,r5
+                       mfmsr   r11                                             ; Note: no need to deal with fp or vec here
+                       rlwinm  r5,r11,0,MSR_EE_BIT+1,MSR_EE_BIT-1
                        mtmsr   r5
-                       mfsprg  r9,0                                                    ; Get the per_proc block
-                       lwz             r5,0(r1)                                                ; Get previous save frame
-                       lwz             r5,FM_LR_SAVE(r5)                               ; Get our caller's address
-                       lwz             r8,     PP_ACTIVE_THREAD(r9)            ; Get the active thread
-                       stw             r5,MUTEX_PC(r3)                                 ; Save our caller
-                       mr.             r8,r8                                                   ; Is there any thread?
-                       stw             r8,MUTEX_THREAD(r3)                             ; Set the mutex's holding thread
-                       beq-    .L_ml_no_active_thread                  ; No owning thread...
-                       lwz             r9,THREAD_MUTEX_COUNT(r8)               ; Get the mutex count 
-                       addi    r9,r9,1                                                 ; Bump it up 
-                       stw             r9,THREAD_MUTEX_COUNT(r8)               ; Stash it back 
+                       mfsprg  r9,0                                    /* Get the per_proc block */
+                       lwz             r5,0(r1)                                /* Get previous save frame */
+                       lwz             r5,FM_LR_SAVE(r5)               /* Get our caller's address */
+                       lwz             r8,     PP_ACTIVE_THREAD(r9)    /* Get the active thread */
+                       stw             r5,MUTEX_PC(r3)         /* Save our caller */
+                       mr.             r8,r8                                   /* Is there any thread? */
+                       stw             r8,MUTEX_THREAD(r3)             /* Set the mutex's holding thread */
+                       beq-    .L_ml_no_active_thread  /* No owning thread... */
+                       lwz             r9,THREAD_MUTEX_COUNT(r8)       /* Get the mutex count */
+                       addi    r9,r9,1                                 /* Bump it up */
+                       stw             r9,THREAD_MUTEX_COUNT(r8)       /* Stash it back */
 .L_ml_no_active_thread:
                        mtmsr   r11
 #endif /* MACH_LDEBUG */
@@ -1015,85 +1062,112 @@ mlGotInt:
                        lwz             r3,FM_ARG0(r1)
                        beq             mlUnlock
                        ori             r5,r5,WAIT_FLAG
+mlUnlock:
+                       sync
+                       stw     r5,LOCK_DATA(r3)                        /* grab the mutexlock and free the interlock */
 
-mlUnlock:      eieio   
-                       stw     r5,LOCK_DATA(r3)                                        ; grab the mutexlock and free the interlock
+#if    ETAP_LOCK_TRACE
+                       mflr    r4
+                       lwz             r5,SWT_HI(r1)
+                       lwz             r6,SWT_LO(r1)
+                       bl      EXT(etap_mutex_hold)            /* collect hold timestamp */
+#endif /* ETAP_LOCK_TRACE */
 
-                       EPILOG                                                                  ; Restore all saved registers
-                       b               epStart                                                 ; Go enable preemption...
+                       EPILOG                                                  /* Restore all saved registers */
 
-;                      We come to here when we have a resource conflict.  In other words,
-;                      the mutex is held.
+                       b               epStart                                 /* Go enable preemption... */
+
+/*
+ *                     We come to here when we have a resource conflict.  In other words,
+ *                     the mutex is held.
+ */
 
 mlInUse:
 
-                       CHECK_SETUP(r12)        
-                       CHECK_MYLOCK(MUTEX_THREAD)                              ; Assert we don't own the lock already */
+#if    ETAP_LOCK_TRACE
+                       lwz             r7,MISSED(r1)
+                       cmpwi   r7,0                                    /* did we already take a wait timestamp ? */
+                       bne             .L_ml_block                             /* yup. carry-on */
+                       bl              EXT(etap_mutex_miss)    /* get wait timestamp */
+                       stw             r3,SWT_HI(r1)                   /* store timestamp */
+                       stw             r4,SWT_LO(r1)
+                       li              r7,     1                                       /* mark wait timestamp as taken */
+                       stw             r7,MISSED(r1)
+                       lwz             r3,FM_ARG0(r1)                  /* restore r3 (saved in prolog) */
+.L_ml_block:
+#endif /* ETAP_LOCK_TRACE */
 
-;                      Note that we come in here with the interlock set.  The wait routine
-;                      will unlock it before waiting.
+                       CHECK_SETUP(r12)        
+                       CHECK_MYLOCK(MUTEX_THREAD)              /* Assert we don't own the lock already */
+       
 
-                       ori             r4,r4,WAIT_FLAG                                 ; Set the wait flag
-                       stw             r4,LOCK_DATA(r3)
-                       rlwinm  r4,r4,0,0,29                                    ; Extract the lock owner
-                       bl              EXT(mutex_lock_wait)                    ; Wait for our turn at the lock
+/*                     Note that we come in here with the interlock set.  The wait routine
+ *                     will unlock it before waiting.
+ */
+                       ori             r4,r4,WAIT_FLAG                 /* Set the wait flag */
+                       stw     r4,LOCK_DATA(r3)
+                       rlwinm  r4,r4,0,0,29                    /* Extract the lock owner */
+                       bl      EXT(mutex_lock_wait)            /* Wait for our turn at the lock */
                        
-                       lwz             r3,FM_ARG0(r1)                                  ; restore r3 (saved in prolog)
-                       b               .L_ml_retry                                             ; and try again...
+                       lwz     r3,FM_ARG0(r1)                          /* restore r3 (saved in prolog) */
+                       b       .L_ml_retry                                     /* and try again... */
 
        
 /*
- *             void _mutex_try(mutex_t*)
+ *     void _mutex_try(mutex_t*)
  *
  */
+       
                        .align  5
                        .globl  EXT(mutex_try)
 LEXT(mutex_try)
                        .globl  EXT(_mutex_try)
 LEXT(_mutex_try)
 #if    !MACH_LDEBUG
-                       mfsprg  r6,1                                                    ; load the current thread
-                       lwz             r5,0(r3)                                                ; Get the lock value
-                       mr.             r5,r5                                                   ; Quick check
-                       bne--   L_mutex_try_slow                                ; Can not get it now...
-
+                       mfsprg  r6,1                                    /* load the current thread */
 L_mutex_try_loop:
-                       lwarx   r5,0,r3                                                 ; load the lock value
+                       lwarx   r5,0,r3                                 /* load the lock value */
                        mr.             r5,r5
-                       bne--   L_mutex_try_slowX                               ; branch to the slow path
-                       stwcx.  r6,0,r3                                                 ; grab the lock
-                       bne--   L_mutex_try_loop                                ; retry if failed
-                       isync                                                                   ; stop prefetching
+                       bne-    L_mutex_try_slow                /* branch to the slow  path */
+                       stwcx.  r6,0,r3                                 /* grab the lock */
+                       bne-    L_mutex_try_loop                /* retry if failed */
+                       isync                                                   /* stop prefetching */
                        li              r3, 1
                        blr
-
-L_mutex_try_slowX:
-                       li              r5,lgKillResv                                   ; Killing field
-                       stwcx.  r5,0,r5                                                 ; Kill reservation
-
 L_mutex_try_slow:
-
 #endif
 
-                       PROLOG(8)                                                               ; reserve space for SWT_HI and SWT_LO
+                       PROLOG(8)                                               /* reserve space for SWT_HI and SWT_LO */
        
+#if    ETAP_LOCK_TRACE
+                       li      r5,     0
+                       stw     r5,     STW_HI(r1)                              /* set wait time to 0 (HI) */
+                       stw     r5,     SWT_LO(r1)                              /* set wait time to 0 (LO) */
+#endif /* ETAP_LOCK_TRACE */
+
+#if 0
+                       lis             r0,HIGH_ADDR(CutTrace)          /* (TEST/DEBUG) */
+                       lis             r5,0xBBBB                                       /* (TEST/DEBUG) */
+                       oris    r0,r0,LOW_ADDR(CutTrace)        /* (TEST/DEBUG) */
+                       sc                                                                      /* (TEST/DEBUG) */
+#endif
                        CHECK_SETUP(r12)        
                        CHECK_MUTEX_TYPE()
                        CHECK_NO_SIMPLELOCKS()
                        
-                       lwz             r6,LOCK_DATA(r3)                                ; Quick check
-                       rlwinm. r6,r6,30,2,31                                   ; to see if someone has this lock already
-                       bne-    mtFail                                                  ; Someone's got it already...
-
-                       bl              lockDisa                                                ; Go get a lock on the mutex's interlock lock
-                       mr.             r4,r3                                                   ; Did we get it? */
-                       lwz             r3,FM_ARG0(r1)                                  ; Restore the lock address
-                       bne+    mtGotInt                                                ; We got it just fine...
-
-                       lis             r3,hi16(mutex_failed2)                  ; Get the failed mutex message
-                       ori             r3,r3,lo16(mutex_failed2)               ; Get the failed mutex message
-                       bl              EXT(panic)                                              ; Call panic
-                       BREAKPOINT_TRAP                                                 ; We die here anyway, can not get the lock
+                       lwz             r6,LOCK_DATA(r3)                /* Quick check */
+                       rlwinm. r6,r6,30,2,31                   /* to see if someone has this lock already */
+                       bne-    mtFail                                  /* Someone's got it already... */
+
+                       bl              lockDisa                                /* Go get a lock on the mutex's interlock lock */
+                       mr.             r4,r3                                   /* Did we get it? */
+                       lwz             r3,FM_ARG0(r1)                  /* Restore the lock address */
+                       bne+    mtGotInt                                /* We got it just fine... */
+
+                       lis             r3,HIGH_ADDR(mutex_failed2)     ; Get the failed mutex message
+                       ori             r3,r3,LOW_ADDR(mutex_failed2)   ; Get the failed mutex message
+                       bl              EXT(panic)                              ; Call panic
+                       BREAKPOINT_TRAP                                 ; We die here anyway, can not get the lock
        
                        .data
 mutex_failed2:
@@ -1102,34 +1176,29 @@ mutex_failed2:
                        
 mtGotInt:
                        
-                     Note that there is no reason to do a load and reserve here.  We already
-;                      hold the interlock and no one can touch at this field unless they 
-;                      have that, so, we're free to play 
+/*                     Note that there is no reason to do a load and reserve here.  We already
+                       hold the interlock and no one can touch at this field unless they 
+                       have that, so, we're free to play */
                        
-                       lwz             r4,LOCK_DATA(r3)                                ; Get the mutex's lock field
-                       rlwinm. r9,r4,30,2,31                                   ; So, can we have it?
-                       bne-    mtInUse                                                 ; Nope, sombody's playing already...
+                       lwz             r4,LOCK_DATA(r3)                /* Get the mutex's lock field */
+                       rlwinm. r9,r4,30,2,31                   /* So, can we have it? */
+                       bne-    mtInUse                                 /* Nope, sombody's playing already... */
                        
 #if    MACH_LDEBUG
-                       lis             r9,hi16(MASK(MSR_VEC))                  ; Get vector enable
-                       mfmsr   r11                                                             ; Get the MSR value
-                       ori             r9,r9,lo16(MASK(MSR_FP))                ; Get FP enable
-                       ori             r5,r9,lo16(MASK(MSR_EE))                ; Get EE bit on too
-                       andc    r11,r11,r9                                              ; Clear FP and VEC
-                       andc    r5,r11,r5                                               ; Clear EE as well
-
+                       mfmsr   r11
+                       rlwinm  r5,r11,0,MSR_EE_BIT+1,MSR_EE_BIT-1
                        mtmsr   r5
-                       mfsprg  r9,0                                                    ; Get the per_proc block
-                       lwz             r5,0(r1)                                                ; Get previous save frame
-                       lwz             r5,FM_LR_SAVE(r5)                               ; Get our caller's address
-                       lwz             r8,     PP_ACTIVE_THREAD(r9)            ; Get the active thread
-                       stw             r5,MUTEX_PC(r3)                                 ; Save our caller
-                       mr.             r8,r8                                                   ; Is there any thread?
-                       stw             r8,MUTEX_THREAD(r3)                             ; Set the mutex's holding thread
-                       beq-    .L_mt_no_active_thread                  ; No owning thread...
-                       lwz             r9,     THREAD_MUTEX_COUNT(r8)          ; Get the mutex count
-                       addi    r9,     r9,     1                                               ; Bump it up 
-                       stw             r9,     THREAD_MUTEX_COUNT(r8)          ; Stash it back 
+                       mfsprg  r9,0                                    /* Get the per_proc block */
+                       lwz             r5,0(r1)                                /* Get previous save frame */
+                       lwz             r5,FM_LR_SAVE(r5)               /* Get our caller's address */
+                       lwz             r8,     PP_ACTIVE_THREAD(r9)    /* Get the active thread */
+                       stw             r5,MUTEX_PC(r3)         /* Save our caller */
+                       mr.             r8,r8                                   /* Is there any thread? */
+                       stw             r8,MUTEX_THREAD(r3)             /* Set the mutex's holding thread */
+                       beq-    .L_mt_no_active_thread  /* No owning thread... */
+                       lwz             r9,     THREAD_MUTEX_COUNT(r8)  /* Get the mutex count */
+                       addi    r9,     r9,     1                               /* Bump it up */
+                       stw             r9,     THREAD_MUTEX_COUNT(r8)  /* Stash it back */
 .L_mt_no_active_thread:
                        mtmsr   r11
 #endif /* MACH_LDEBUG */
@@ -1140,107 +1209,87 @@ mtGotInt:
                        lwz             r3,FM_ARG0(r1)
                        beq             mtUnlock
                        ori             r5,r5,WAIT_FLAG
+mtUnlock:
+                       sync                                                    /* Push it all out */
+                       stw     r5,LOCK_DATA(r3)                        /* grab the mutexlock and free the interlock */
 
-mtUnlock:      eieio
-                       stw     r5,LOCK_DATA(r3)                                        ; grab the mutexlock and free the interlock
+#if    ETAP_LOCK_TRACE
+                       lwz             r4,0(r1)                                /* Back chain the stack */
+                       lwz             r5,SWT_HI(r1)
+                       lwz             r4,FM_LR_SAVE(r4)               /* Get our caller's address */
+                       lwz             r6,SWT_LO(r1)
+                       bl      EXT(etap_mutex_hold)            /* collect hold timestamp */
+#endif /* ETAP_LOCK_TRACE */
 
-                       bl              epStart                                                 ; Go enable preemption...
+                       bl              epStart                                 /* Go enable preemption... */
 
                        li              r3, 1
-                       EPILOG                                                                  ; Restore all saved registers
-                       blr                                                                             ; Return...
+                       EPILOG                                                  /* Restore all saved registers */
+                       blr                                                             /* Return... */
 
-;                      We come to here when we have a resource conflict.  In other words,
-;                      the mutex is held.
+/*
+ *                     We come to here when we have a resource conflict.  In other words,
+ *                     the mutex is held.
+ */
 
 mtInUse:       
-                       rlwinm  r4,r4,0,0,30                                    ; Get the unlock value
-                       stw             r4,LOCK_DATA(r3)                                ; free the interlock
-                       bl              epStart                                                 ; Go enable preemption...
+                       rlwinm  r4,r4,0,0,30                    /* Get the unlock value */
+                       stw             r4,LOCK_DATA(r3)                /* free the interlock */
+                       bl              epStart                                 /* Go enable preemption... */
 
-mtFail:                li              r3,0                                                    ; Set failure code
-                       EPILOG                                                                  ; Restore all saved registers
-                       blr                                                                             ; Return...
+mtFail:                li              r3,0                                    /* Set failure code */
+                       EPILOG                                                  /* Restore all saved registers */
+                       blr                                                             /* Return... */
 
                
 /*
- *             void mutex_unlock_rwcmb(mutex_t* l)
- *
+ *     void mutex_unlock(mutex_t* l)
  */
-                       .align  5
-                       .globl  EXT(mutex_unlock_rwcmb)
-
-LEXT(mutex_unlock_rwcmb)
-                       .globl  EXT(mulckPatch_isync)
-LEXT(mulckPatch_isync)
-                       isync
-                       .globl  EXT(mulckPatch_eieio)     
-LEXT(mulckPatch_eieio)
-                       eieio
 
-                       lwz             r5,0(r3)                                                ; Get the lock
-                       rlwinm. r4,r5,0,30,31                                   ; Quick check
-                       bne--   L_mutex_unlock_slow                             ; Can not get it now...
-
-L_mutex_unlock_rwcmb_loop:
-                       lwarx   r5,0,r3
-                       rlwinm. r4,r5,0,30,31                                   ; Bail if pending waiter or interlock set
-                       li              r5,0                                                    ; Clear the mutexlock
-                       bne--   L_mutex_unlock_rwcmb_slowX
-                       stwcx.  r5,0,r3
-                       bne--   L_mutex_unlock_rwcmb_loop
-                       blr
-
-L_mutex_unlock_rwcmb_slowX:
-                       li              r5,lgKillResv                                   ; Killing field
-                       stwcx.  r5,0,r5                                                 ; Dump reservation
-                       b               L_mutex_unlock_slow                             ; Join slow path...
-
-/*
- *             void mutex_unlock(mutex_t* l)
- *
- */
                        .align  5
                        .globl  EXT(mutex_unlock)
 
 LEXT(mutex_unlock)
 #if    !MACH_LDEBUG
                        sync
-                       lwz             r5,0(r3)                                                ; Get the lock
-                       rlwinm. r4,r5,0,30,31                                   ; Quick check
-                       bne--   L_mutex_unlock_slow                             ; Can not get it now...
-
 L_mutex_unlock_loop:
                        lwarx   r5,0,r3
-                       rlwinm. r4,r5,0,30,31                                   ; Bail if pending waiter or interlock set
-                       li              r5,0                                                    ; Clear the mutexlock
-                       bne--   L_mutex_unlock_slowX
+                       rlwinm. r4,r5,0,30,31                   /* Bail if pending waiter or interlock set */
+                       li              r5,0                                    /* Clear the mutexlock */
+                       bne-    L_mutex_unlock_slow
                        stwcx.  r5,0,r3
-                       bne--   L_mutex_unlock_loop
+                       bne-    L_mutex_unlock_loop
                        blr
-L_mutex_unlock_slowX:
-                       li              r5,lgKillResv                                   ; Killing field
-                       stwcx.  r5,0,r5                                                 ; Dump reservation
-
-#endif
-
 L_mutex_unlock_slow:
-                       
+#endif
                        PROLOG(0)
        
+#if    ETAP_LOCK_TRACE
+                       bl              EXT(etap_mutex_unlock)  /* collect ETAP data */
+                       lwz             r3,FM_ARG0(r1)                  /* restore r3 (saved in prolog) */
+#endif /* ETAP_LOCK_TRACE */
+
                        CHECK_SETUP(r12)        
                        CHECK_MUTEX_TYPE()
                        CHECK_THREAD(MUTEX_THREAD)
 
-                       bl              lockDisa                                                ; Go get a lock on the mutex's interlock lock
-                       mr.             r4,r3                                                   ; Did we get it?
-                       lwz             r3,FM_ARG0(r1)                                  ; Restore the lock address
-                       bne+    muGotInt                                                ; We got it just fine...
-
-                       lis             r3,hi16(mutex_failed3)                  ; Get the failed mutex message
-                       ori             r3,r3,lo16(mutex_failed3)               ; Get the failed mutex message
-                       bl              EXT(panic)                                              ; Call panic
-                       BREAKPOINT_TRAP                                                 ; We die here anyway, can not get the lock
+#if 0
+                       mfsprg  r4,0                                            /* (TEST/DEBUG) */
+                       lis             r0,HIGH_ADDR(CutTrace)          /* (TEST/DEBUG) */
+                       lwz             r4,PP_ACTIVE_THREAD(r4) /* (TEST/DEBUG) */
+                       lis             r5,0xCCCC                                       /* (TEST/DEBUG) */
+                       oris    r0,r0,LOW_ADDR(CutTrace)        /* (TEST/DEBUG) */
+                       sc                                                                      /* (TEST/DEBUG) */
+#endif
+                       bl              lockDisa                                /* Go get a lock on the mutex's interlock lock */
+                       mr.             r4,r3                                   /* Did we get it? */
+                       lwz             r3,FM_ARG0(r1)                  /* Restore the lock address */
+                       bne+    muGotInt                                /* We got it just fine... */
+
+                       lis             r3,HIGH_ADDR(mutex_failed3)     ; Get the failed mutex message
+                       ori             r3,r3,LOW_ADDR(mutex_failed3)   ; Get the failed mutex message
+                       bl              EXT(panic)                              ; Call panic
+                       BREAKPOINT_TRAP                                 ; We die here anyway, can not get the lock
        
                        .data
 mutex_failed3:
@@ -1250,27 +1299,22 @@ mutex_failed3:
                        
 muGotInt:
                        lwz             r4,LOCK_DATA(r3)
-                       andi.   r5,r4,WAIT_FLAG                                 ; are there any waiters ?
+                       andi.   r5,r4,WAIT_FLAG                 /* are there any waiters ? */
                        rlwinm  r4,r4,0,0,29
-                       beq+    muUnlock                                                ; Nope, we're done...
+                       beq+    muUnlock                                /* Nope, we're done... */
 
-                       bl              EXT(mutex_unlock_wakeup)                ; yes, wake a thread
-                       lwz             r3,FM_ARG0(r1)                                  ; restore r3 (saved in prolog)
-                       lwz             r5,LOCK_DATA(r3)                                ; load the lock
+                       bl              EXT(mutex_unlock_wakeup)        /* yes, wake a thread */
+                       lwz             r3,FM_ARG0(r1)                  /* restore r3 (saved in prolog) */
+                       lwz             r5,LOCK_DATA(r3)                /* load the lock */
 
 muUnlock:
 #if    MACH_LDEBUG
-                       lis             r8,hi16(MASK(MSR_VEC))                  ; Get vector enable
-                       mfmsr   r11                                                             ; Get the MSR value
-                       ori             r8,r8,lo16(MASK(MSR_FP))                ; Get FP enable
-                       ori             r9,r8,lo16(MASK(MSR_EE))                ; Get EE bit on too
-                       andc    r11,r11,r8                                              ; Clear FP and VEC
-                       andc    r9,r11,r9                                               ; Clear EE as well
-
+                       mfmsr   r11
+                       rlwinm  r9,r11,0,MSR_EE_BIT+1,MSR_EE_BIT-1
                        mtmsr   r9
                        mfsprg  r9,0                                    
                        lwz             r9,PP_ACTIVE_THREAD(r9)
-                       stw             r9,MUTEX_THREAD(r3)                             ; disown thread
+                       stw             r9,MUTEX_THREAD(r3)     /* disown thread */
                        cmpwi   r9,0
                        beq-    .L_mu_no_active_thread
                        lwz             r8,THREAD_MUTEX_COUNT(r9)
@@ -1280,115 +1324,139 @@ muUnlock:
                        mtmsr   r11
 #endif /* MACH_LDEBUG */
 
-                       andi.   r5,r5,WAIT_FLAG                                 ; Get the unlock value
-                       eieio
-                       stw             r5,LOCK_DATA(r3)                                ; unlock the interlock and lock
-
-                       EPILOG                                                                  ; Deal with the stack now, enable_preemption doesn't always want one
-                       b               epStart                                                 ; Go enable preemption...
+                       andi.   r5,r5,WAIT_FLAG                 /* Get the unlock value */
+                       sync                                                    /* Make sure it's all there before we release */
+                       stw             r5,LOCK_DATA(r3)                /* unlock the interlock and lock */
+               
+                       EPILOG                                                  /* Deal with the stack now, enable_preemption doesn't always want one */
+                       b               epStart                                 /* Go enable preemption... */
 
 /*
- *             void interlock_unlock(hw_lock_t lock)
+ *     void interlock_unlock(hw_lock_t lock)
  */
+
                        .align  5
                        .globl  EXT(interlock_unlock)
 
 LEXT(interlock_unlock)
 
+#if 0
+                       lis             r0,HIGH_ADDR(CutTrace)          /* (TEST/DEBUG) */
+                       lis             r5,0xDDDD                                       /* (TEST/DEBUG) */
+                       oris    r0,r0,LOW_ADDR(CutTrace)        /* (TEST/DEBUG) */
+                       sc                                                                      /* (TEST/DEBUG) */
+#endif
                        lwz             r10,LOCK_DATA(r3)
                        rlwinm  r10,r10,0,0,30
-                       eieio
+                       sync
                        stw             r10,LOCK_DATA(r3)
 
-                       b               epStart                                                 ; Go enable preemption...
+                       b               epStart                                 /* Go enable preemption... */
 
-/*             
- *             void _enable_preemption_no_check(void)
+/*
+ *             Here is where we enable preemption.  We need to be protected
+ *             against ourselves, we can't chance getting interrupted and modifying
+ *             our processor wide preemption count after we'sve loaded it up. So,
+ *             we need to disable all 'rupts.  Actually, we could use a compare
+ *             and swap to do this, but, since there are no MP considerations
+ *             (we are dealing with a CPU local field) it is much, much faster
+ *             to disable.
  *
- *                     This version does not check if we get preempted or not
+ *             Note that if we are not genned MP, the calls here will be no-opped via
+ *             a #define and since the _mp forms are the same, likewise a #define
+ *             will be used to route to the other forms
  */
+
+/*             This version does not check if we get preempted or not */
+
+
                        .align  4
                        .globl  EXT(_enable_preemption_no_check)
 
 LEXT(_enable_preemption_no_check)
+                       cmplw   cr1,r1,r1                       /* Force zero cr so we know not to check if preempted */
+                       b               epCommn                         /* Join up with the other enable code... */
 
-                       cmplw   cr1,r1,r1                                               ; Force zero cr so we know not to check if preempted
-                       b               epCommn                                                 ; Join up with the other enable code... 
 
-/*             
- *             void _enable_preemption(void)
- *
- *                     This version checks if we get preempted or not
- */
+/*             This version checks if we get preempted or not */
+
                        .align  5
                        .globl  EXT(_enable_preemption)
 
 LEXT(_enable_preemption)
 
-;              Here is where we enable preemption.  We need to be protected
-;              against ourselves, we can't chance getting interrupted and modifying
-;              our processor wide preemption count after we'sve loaded it up. So,
-;              we need to disable all 'rupts.  Actually, we could use a compare
-;              and swap to do this, but, since there are no MP considerations
-;              (we are dealing with a CPU local field) it is much, much faster
-;              to disable.
-;
-;              Note that if we are not genned MP, the calls here will be no-opped via
-;              a #define and since the _mp forms are the same, likewise a #define
-;              will be used to route to the other forms
-
-epStart:
-                       cmplwi  cr1,r1,0                                                ; Force non-zero cr so we know to check if preempted
-
-epCommn:
-                       mfsprg  r3,1                                                    ; Get current activation
-                       li              r8,-1                                                   ; Get a decrementer
-                       lwz             r5,ACT_PREEMPT_CNT(r3)                  ; Get the preemption level
-                       add.    r5,r5,r8                                                ; Bring down the disable count
-                       blt-    epTooFar                                                ; Yeah, we did...
-                       stw             r5,ACT_PREEMPT_CNT(r3)                  ; Save it back
-                       crandc  cr0_eq,cr0_eq,cr1_eq
-                       beq+    epCheckPreempt                                  ; Go check if we need to be preempted...
-                       blr                                                                             ; Leave...
+epStart:       cmplwi  cr1,r1,0                        /* Force non-zero cr so we know to check if preempted */
+
+/*
+ *                     Common enable preemption code 
+ */
+
+epCommn:       mfmsr   r9                                      /* Save the old MSR */
+                       rlwinm  r9,r9,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r9,r9,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r8,r9,0,MSR_EE_BIT+1,MSR_EE_BIT-1       /* Clear interruptions */
+                       mtmsr   r8                                      /* Interrupts off */
+                       isync                                           ; May have mess with vec/fp here
+                                               
+                       mfsprg  r3,0                            /* Get the per_proc block */
+                       li              r8,-1                           /* Get a decrimenter */
+                       lwz             r5,PP_PREEMPT_CNT(r3)   /* Get the preemption level */
+                       add.    r5,r5,r8                        /* Bring down the disable count */
+#if 0
+                       mfsprg  r4,1                            ; (TEST/DEBUG) Note the next 3 keep from interrpting too early
+                       mr.             r4,r4                           ; (TEST/DEBUG)
+                       beq-    epskptrc0                       ; (TEST/DEBUG)
+                       lis             r0,hi16(CutTrace)       ; (TEST/DEBUG)
+                       lis             r4,0xBBBB                       ; (TEST/DEBUG)
+                       oris    r0,r0,lo16(CutTrace)    ; (TEST/DEBUG)
+                       sc                                                      ; (TEST/DEBUG)
+epskptrc0:     mr.             r5,r5                           ; (TEST/DEBUG)
+#endif
+#if MACH_LDEBUG
+                       blt-    epTooFar                        /* Yeah, we did... */
+#endif /* MACH_LDEBUG */
+                       stw             r5,PP_PREEMPT_CNT(r3)   /* Save it back */
+
+                       beq+    epCheckPreempt          /* Go check if we need to be preempted... */
+
+epNoCheck:     mtmsr   r9                                      /* Restore the interrupt level */
+                       blr                                                     /* Leave... */
+
+#if MACH_LDEBUG
 epTooFar:      
-                       mr              r4,r5
-                       lis             r3,hi16(epTooFarStr)                    ; First half of panic string
-                       ori             r3,r3,lo16(epTooFarStr)                 ; Second half of panic string
-                       bl              EXT(panic)
+                       lis             r6,HIGH_ADDR(EXT(panic))        /* First half of panic call */
+                       lis             r3,HIGH_ADDR(epTooFarStr)       /* First half of panic string */
+                       ori             r6,r6,LOW_ADDR(EXT(panic))      /* Second half of panic call */
+                       ori             r3,r3,LOW_ADDR(epTooFarStr)     /* Second half of panic string */
+                       mtlr    r6                                      /* Get the address of the panic routine */
+                       mtmsr   r9                                      /* Restore interruptions */
+                       blrl                                            /* Panic... */
 
                        .data
 epTooFarStr:
-                       STRINGD "_enable_preemption: preemption_level %d\n\000"
-
+                       STRINGD "_enable_preemption: preemption_level <= 0!\000"
                        .text
+#endif /* MACH_LDEBUG */
+
                        .align  5
+
 epCheckPreempt:
-                       lis             r0,hi16(MASK(MSR_VEC))                  ; Get vector enable
-                       mfmsr   r9                                                              ; Get the MSR value
-                       ori             r0,r0,lo16(MASK(MSR_FP))                ; Get FP enable
-                       andi.   r3,r9,lo16(MASK(MSR_EE))                ; We cannot preempt if interruptions are off
-                       beq+    epCPno                                                  ; No preemption here...
-                       ori             r7,r0,lo16(MASK(MSR_EE))                ; Get EE bit on too
-                       andc    r9,r9,r0                                                ; Clear FP and VEC
-                       andc    r7,r9,r7                                                ; Clear EE as well
-                       mtmsr   r7                                                              ; Turn off interruptions 
-                       isync                                                                   ; May have turned off vec and fp here 
-                       mfsprg  r3,0                                                    ; Get per_proc 
-                       lwz             r7,PP_NEED_AST(r3)                              ; Get the AST request address
-                       li              r5,AST_URGENT                                   ; Get the requests we do honor
-                       lwz             r7,0(r7)                                                ; Get the actual, real live, extra special AST word
-                       lis             r0,hi16(DoPreemptCall)                  ; Just in case, get the top of firmware call
-                       and.    r7,r7,r5                                                ; Should we preempt?
-                       ori             r0,r0,lo16(DoPreemptCall)               ; Merge in bottom part
-                       mtmsr   r9                                                              ; Allow interrupts if we can
-epCPno:                
-                       beqlr+                                                                  ; We probably will not preempt...
-                       sc                                                                              ; Do the preemption
-                       blr                                                                             ; Now, go away now...
+                       lwz             r7,PP_NEED_AST(r3)      /* Get the AST request address */
+                       li              r5,AST_URGENT           /* Get the requests we do honor */
+                       lwz             r7,0(r7)                        /* Get the actual, real live, extra special AST word */
+                       lis             r0,HIGH_ADDR(DoPreemptCall)     /* Just in case, get the top of firmware call */
+                       and.    r7,r7,r5                        ; Should we preempt?
+                       ori             r0,r0,LOW_ADDR(DoPreemptCall)   /* Merge in bottom part */
+                       beq+    epCPno                          ; No preemption here...
+
+                       andi.   r3,r9,lo16(MASK(MSR_EE))        ; We cannot preempt if interruptions are off
+
+epCPno:                mtmsr   r9                                      /* Allow interrupts if we can */
+                       beqlr+                                          ; We probably will not preempt...
+                       sc                                                      /* Do the preemption */
+                       blr                                                     /* Now, go away now... */
 
 /*
- *             void disable_preemption(void)
- *
  *                     Here is where we disable preemption.  Since preemption is on a
  *                     per processor basis (a thread runs on one CPU at a time) we don't
  *                     need any cross-processor synchronization.  We do, however, need to
@@ -1397,273 +1465,355 @@ epCPno:
  *                     disablement, and this is platform specific code, we'll just kick the
  *                     MSR. We'll save a couple of orders of magnitude over using SPLs.
  */
+
                        .align  5
+
+                       nop                                                     ; Use these 5 nops to force daPreComm 
+                       nop                                                     ; to a line boundary.
+                       nop
+                       nop
+                       nop
+                       
                        .globl  EXT(_disable_preemption)
 
 LEXT(_disable_preemption)
 
-                       mfsprg  r6,1                                                    ; Get the current activation
-                       lwz             r5,ACT_PREEMPT_CNT(r6)                  ; Get the preemption level
-                       addi    r5,r5,1                                                 ; Bring up the disable count
-                       stw             r5,ACT_PREEMPT_CNT(r6)                  ; Save it back 
-                       blr                                                                             ; Return...
+daPreAll:      mfmsr   r9                                      /* Save the old MSR */
+                       rlwinm  r9,r9,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r9,r9,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r8,r9,0,MSR_EE_BIT+1,MSR_EE_BIT-1       /* Clear interruptions */
+                       mtmsr   r8                                      /* Interrupts off */
+                       isync                                           ; May have mess with fp/vec
+                       
+daPreComm:     mfsprg  r6,0                            /* Get the per_proc block */
+                       lwz             r5,PP_PREEMPT_CNT(r6)   /* Get the preemption level */
+                       addi    r5,r5,1                         /* Bring up the disable count */
+                       stw             r5,PP_PREEMPT_CNT(r6)   /* Save it back */
+#if 0
+                       mfsprg  r4,1                            ; (TEST/DEBUG) Note the next 3 keep from interrpting too early
+                       mr.             r4,r4                           ; (TEST/DEBUG)
+                       beq-    epskptrc1                       ; (TEST/DEBUG)
+                       lis             r0,hi16(CutTrace)       ; (TEST/DEBUG)
+                       lis             r4,0xAAAA                       ; (TEST/DEBUG)
+                       oris    r0,r0,lo16(CutTrace)    ; (TEST/DEBUG)
+                       sc                                                      ; (TEST/DEBUG)
+epskptrc1:                                                             ; (TEST/DEBUG)
+#endif
+
+;
+;              Set PREEMPTSTACK above to enable a preemption traceback stack.          
+;
+;              NOTE: make sure that PREEMPTSTACK in aligned_data is
+;              set the same as it is here.  This is the number of
+;              traceback entries we can handle per processor
+;
+;              A value of 0 disables the stack.
+;
+#if PREEMPTSTACK
+                       cmplwi  r5,PREEMPTSTACK         ; Maximum depth
+                       lwz             r6,CPU_ACTIVE_THREAD(r6)        ; Get the pointer to the currently active thread
+                       bgt-    nopredeb                        ; Too many to stack...
+                       mr.             r6,r6                           ; During boot?
+                       beq-    nopredeb                        ; Yes, do not do backtrace...
+                       lwz             r6,THREAD_TOP_ACT(r6)   ; Point to the active activation
+                       lwz             r6,ACT_MACT_PCB(r6)             ; Get the last savearea used
+                       mr.             r0,r6                           ; Any saved context?
+                       beq-    nosaveds                        ; No...
+                       lwz             r0,saver1(r6)           ; Get end of savearea chain
+
+nosaveds:      li              r11,0                           ; Clear callers callers callers return
+                       li              r10,0                           ; Clear callers callers callers callers return
+                       li              r8,0                            ; Clear callers callers callers callers callers return
+                       lwz             r2,0(r1)                        ; Get callers callers stack frame
+                       lwz             r12,8(r2)                       ; Get our callers return
+                       lwz             r4,0(r2)                        ; Back chain
+
+                       xor             r2,r4,r2                        ; Form difference
+                       cmplwi  r2,8192                         ; Within a couple of pages?
+                       mr              r2,r4                           ; Move register
+                       bge-    nosaveher2                      ; No, no back chain then...
+                       lwz             r11,8(r2)                       ; Get our callers return
+                       lwz             r4,0(r2)                        ; Back chain
+
+                       xor             r2,r4,r2                        ; Form difference
+                       cmplwi  r2,8192                         ; Within a couple of pages?
+                       mr              r2,r4                           ; Move register
+                       bge-    nosaveher2                      ; No, no back chain then...
+                       lwz             r10,8(r2)                       ; Get our callers return
+                       lwz             r4,0(r2)                        ; Back chain
+
+                       xor             r2,r4,r2                        ; Form difference
+                       cmplwi  r2,8192                         ; Within a couple of pages?
+                       mr              r2,r4                           ; Move register
+                       bge-    nosaveher2                      ; No, no back chain then...
+                       lwz             r8,8(r2)                        ; Get our callers return
+
+nosaveher2:
+                       addi    r5,r5,-1                        ; Get index to slot
+                       mfspr   r6,pir                          ; Get our processor
+                       mflr    r4                                      ; Get our return
+                       rlwinm  r6,r6,8,0,23            ; Index to processor slot
+                       lis             r2,hi16(EXT(DBGpreempt))        ; Stack high order
+                       rlwinm  r5,r5,4,0,27            ; Index to stack slot                   
+                       ori             r2,r2,lo16(EXT(DBGpreempt))     ; Stack low order
+                       add             r2,r2,r5                        ; Point to slot
+                       add             r2,r2,r6                        ; Move to processor
+                       stw             r4,0(r2)                        ; Save our return
+                       stw             r11,4(r2)                       ; Save callers caller
+                       stw             r10,8(r2)                       ; Save callers callers caller
+                       stw             r8,12(r2)                       ; Save callers callers callers caller
+nopredeb:
+#endif
+                       mtmsr   r9                                      /* Allow interruptions now */
+                       
+                       blr                                                     /* Return... */
 
 /*
- *             int get_preemption_level(void)
- *
- *                     Return the current preemption level
+ *                     Return the active thread for both inside and outside osfmk consumption
  */
+  
                        .align  5
-                       .globl  EXT(get_preemption_level)
+                       .globl  EXT(current_thread)
 
-LEXT(get_preemption_level)
-                       mfsprg  r6,1                                                    ; Get current activation
-                       lwz             r3,ACT_PREEMPT_CNT(r6)                  ; Get the preemption level
-                       blr                                                                             ; Return...
+LEXT(current_thread)
+
+#if 1
+                       mfsprg  r3,1
+                       lwz             r3,ACT_THREAD(r3)
+                       blr
+#else
+                       mfmsr   r9                                      /* Save the old MSR */
+                       rlwinm  r9,r9,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r9,r9,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r8,r9,0,MSR_EE_BIT+1,MSR_EE_BIT-1       /* Clear interruptions */
+                       mtmsr   r8                                      /* Interrupts off */
+                       isync
+                       mfsprg  r6,0                            /* Get the per_proc */
+                       lwz             r3,PP_ACTIVE_THREAD(r6) /* Get the active thread */
+                       mfsprg  r4,1
+                       lwz     r4,ACT_THREAD(r4)
+                       cmplw   cr0,r4,r3
+                       beq             current_thread_cont
+                       lis             r5,hi16(L_current_thread_paniced)
+                       ori             r5,r5,lo16(L_current_thread_paniced)
+                       lwz             r6,0(r5)
+                       mr.             r6,r6
+                       bne             current_thread_cont
+                       stw             r9,0(r5)
+                       mr              r5,r4
+                       mr              r4,r3
+                       lis             r3,hi16(L_current_thread_panic)
+                       ori             r3,r3,lo16(L_current_thread_panic)
+                       bl              EXT(panic)
+
+                       .data
+L_current_thread_panic:
+                       STRINGD "current_thread: spr1 not sync %x %x %x\n\000"
+L_current_thread_paniced:
+                       .long   0
+                       .text
+current_thread_cont:
+#endif
+                       mtmsr   r9                                      /* Restore interruptions to entry */
+                       blr                                                     /* Return... */
 
 /*
- *             int get_simple_lock_count(void)
- *
- *                     Return the simple lock count
- *
+ *                     Set the active thread 
  */
                        .align  5
-                       .globl  EXT(get_simple_lock_count)
+                       .globl  EXT(set_machine_current_thread)
+LEXT(set_machine_current_thread)
+
+                       mfmsr   r9                                      /* Save the old MSR */
+                       rlwinm  r9,r9,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r9,r9,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r8,r9,0,MSR_EE_BIT+1,MSR_EE_BIT-1       /* Clear interruptions */
+                       mtmsr   r8                                      /* Interrupts off */
+                       isync                                           ; May have messed with fp/vec
+                       mfsprg  r6,0                            /* Get the per_proc */
+                       stw             r3,PP_ACTIVE_THREAD(r6) /* Set the active thread */
+                       mtmsr   r9                                      /* Restore interruptions to entry */
+                       blr                                                     /* Return... */
 
-LEXT(get_simple_lock_count)
-#if    MACH_LDEBUG
-                       lis             r3,hi16(MASK(MSR_VEC))                  ; Get vector enable
-                       mfmsr   r9                                                              ; Get the MSR value
-                       ori             r3,r3,lo16(MASK(MSR_FP))                ; Get FP enable
-                       ori             r8,r3,lo16(MASK(MSR_EE))                ; Get EE bit on too
-                       andc    r9,r9,r3                                                ; Clear FP and VEC
-                       andc    r8,r9,r8                                                ; Clear EE as well
-                       mtmsr   r8                                                              ; Interrupts off
-                       isync                                                                   ; May have messed with vec/fp
-                       mfsprg  r6,0                                                    ; Get the per_proc
-                       lwz             r3,PP_SIMPLE_LOCK_CNT(r6)               ; Get the simple lock count
-                       mtmsr   r9                                                              ; Restore interruptions to entry
-#else
-                       li              r3,0                                                    ; simple lock count not updated
-#endif
-                       blr                                                                             ; Return...
+/*
+ *                     Set the current activation
+ */
+                       .align  5
+                       .globl  EXT(set_machine_current_act)
+LEXT(set_machine_current_act)
+                       mtsprg  1,r3                            /* Set spr1 with the active thread */
+                       blr                                                     /* Return... */
 
 /*
- *             void ppc_usimple_lock_init(simple_lock_t, etap_event_t)
- *
- *                     Initialize a simple lock.
+ *                     Return the current activation
  */
                        .align  5
-                       .globl  EXT(ppc_usimple_lock_init)
+                       .globl  EXT(current_act)
+LEXT(current_act)
+                       mfsprg  r3,1
+                       blr
+
 
-LEXT(ppc_usimple_lock_init)
 
-                       li      r0,     0                                                               ; set lock to free == 0 
-                       stw     r0,     0(r3)                                                   ; Initialize the lock 
-                       blr
-       
 /*
- *             void ppc_usimple_lock(simple_lock_t)
- *
+ *                     Return the current preemption level
  */
                        .align  5
-                       .globl  EXT(ppc_usimple_lock)
+                       .globl  EXT(get_preemption_level)
 
-LEXT(ppc_usimple_lock)
+LEXT(get_preemption_level)
+                       mfmsr   r9                                      /* Save the old MSR */
+                       rlwinm  r9,r9,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r9,r9,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r8,r9,0,MSR_EE_BIT+1,MSR_EE_BIT-1       /* Clear interruptions */
+                       mtmsr   r8                                      /* Interrupts off */
+                       isync                   
+                       mfsprg  r6,0                            /* Get the per_proc */
+                       lwz             r3,PP_PREEMPT_CNT(r6)   /* Get the preemption level */
+                       mtmsr   r9                                      /* Restore interruptions to entry */
+                       blr                                                     /* Return... */
 
-#if CHECKNMI
-                       mflr    r12                                                             ; (TEST/DEBUG) 
-                       bl              EXT(ml_sense_nmi)                               ; (TEST/DEBUG)
-                       mtlr    r12                                                             ; (TEST/DEBUG)
-#endif
 
-                       mfsprg  r6,1                                                    ; Get the current activation 
-                       lwz             r5,ACT_PREEMPT_CNT(r6)                  ; Get the preemption level
-                       addi    r5,r5,1                                                 ; Bring up the disable count
-                       stw             r5,ACT_PREEMPT_CNT(r6)                  ; Save it back 
-                       mr              r5,r3                                                   ; Get the address of the lock
-                       li              r8,0                                                    ; Set r8 to zero
-                       li              r4,0                                                    ; Set r4 to zero
-
-slcktry:       lwarx   r11,0,r5                                                ; Grab the lock value
-                       andi.   r3,r11,ILK_LOCKED                               ; Is it locked?
-                       ori             r11,r6,ILK_LOCKED                               ; Set interlock 
-                       bne--   slckspin                                                ; Yeah, wait for it to clear...
-                       stwcx.  r11,0,r5                                                ; Try to seize that there durn lock
-                       bne--   slcktry                                                 ; Couldn't get it...
-                       isync                                                                   ; Make sure we don't use a speculativily loaded value
-                       blr                                                                             ; Go on home...
-
-slckspin:      li              r11,lgKillResv                                  ; Killing field
-                       stwcx.  r11,0,r11                                               ; Kill reservation
-
-                       mr.             r4,r4                                                   ; Test timeout value
-                       bne++   slockspin0
-                       lis             r4,hi16(EXT(LockTimeOut))               ; Get the high part 
-                       ori             r4,r4,lo16(EXT(LockTimeOut))    ; And the low part
-                       lwz             r4,0(r4)                                                ; Get the timerout value
-
-slockspin0:    mr.             r8,r8                                                   ; Is r8 set to zero
-                       bne++   slockspin1                                              ; If yes, first spin attempt
-                       lis             r0,hi16(MASK(MSR_VEC))                  ; Get vector enable
-                       mfmsr   r9                                                              ; Get the MSR value
-                       ori             r0,r0,lo16(MASK(MSR_FP))                ; Get FP enable
-                       ori             r7,r0,lo16(MASK(MSR_EE))                ; Get EE bit on too
-                       andc    r9,r9,r0                                                ; Clear FP and VEC
-                       andc    r7,r9,r7                                                ; Clear EE as well
-                       mtmsr   r7                                                              ; Turn off interruptions 
-                       isync                                                                   ; May have turned off vec and fp here 
-                       mftb    r8                                                              ; Get timestamp on entry
-                       b               slcksniff
-
-slockspin1:    mtmsr   r7                                                              ; Turn off interruptions 
-                       mftb    r8                                                              ; Get timestamp on entry
-
-slcksniff:     lwz             r3,0(r5)                                                ; Get that lock in here
-                       andi.   r3,r3,ILK_LOCKED                                ; Is it free yet?
-                       beq++   slckretry                                               ; Yeah, try for it again...
-                       
-                       mftb    r10                                                             ; Time stamp us now
-                       sub             r10,r10,r8                                              ; Get the elapsed time
-                       cmplwi  r10,128                                                 ; Have we been spinning for 128 tb ticks?
-                       blt++   slcksniff                                               ; Not yet...
-                       
-                       mtmsr   r9                                                              ; Say, any interrupts pending?
+/*
+ *                     Return the cpu_data
+ */
+                       .align  5
+                       .globl  EXT(get_cpu_data)
 
-;                      The following instructions force the pipeline to be interlocked to that only one
-;                      instruction is issued per cycle.  The insures that we stay enabled for a long enough
-;                      time; if it's too short, pending interruptions will not have a chance to be taken
+LEXT(get_cpu_data)
+                       mfsprg  r3,0                            /* Get the per_proc */
+                       addi    r3,r3,PP_ACTIVE_THREAD          /* Get the pointer to the CPU data from per proc */
+                       blr                                                     /* Return... */
 
-                       subi    r4,r4,128                                               ; Back off elapsed time from timeout value
-                       or              r4,r4,r4                                                ; Do nothing here but force a single cycle delay
-                       mr.             r4,r4                                                   ; See if we used the whole timeout
-                       li              r3,0                                                    ; Assume a timeout return code
-                       or              r4,r4,r4                                                ; Do nothing here but force a single cycle delay
-                       
-                       ble--   slckfail                                                ; We failed
-                       b               slockspin1                                              ; Now that we've opened an enable window, keep trying...
-slckretry:
-                       mtmsr   r9                                                              ; Restore interrupt state
-                       li              r8,1                                                    ; Show already through once
-                       b               slcktry
-slckfail:                                                                                      ; We couldn't get the lock
-                       lis             r3,hi16(slckpanic_str)
-                       ori             r3,r3,lo16(slckpanic_str)
-                       mr              r4,r5
-                       mflr    r5
-                       bl              EXT(panic)
 
-               .data
-slckpanic_str:
-               STRINGD "ppc_usimple_lock: simple lock deadlock detection l=0x%08X, pc=0x%08X\n\000"
-               .text
+/*
+ *                     Return the simple lock count
+ */
+                       .align  5
+                       .globl  EXT(get_simple_lock_count)
+
+LEXT(get_simple_lock_count)
+                       mfmsr   r9                                      /* Save the old MSR */
+                       rlwinm  r9,r9,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r9,r9,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r8,r9,0,MSR_EE_BIT+1,MSR_EE_BIT-1       /* Clear interruptions */
+                       mtmsr   r8                                      /* Interrupts off */
+                       isync                                           ; May have messed with vec/fp
+                       mfsprg  r6,0                            /* Get the per_proc */
+                       lwz             r3,PP_SIMPLE_LOCK_CNT(r6)       /* Get the simple lock count */
+                       mtmsr   r9                                      /* Restore interruptions to entry */
+                       blr                                                     /* Return... */
 
 /*
- *             unsigned int ppc_usimple_lock_try(simple_lock_t)
+ *             fast_usimple_lock():
  *
+ *             If EE is off, get the simple lock without incrementing the preemption count and 
+ *             mark The simple lock with SLOCK_FAST.
+ *             If EE is on, call usimple_lock().
  */
                        .align  5
-                       .globl  EXT(ppc_usimple_lock_try)
+                       .globl  EXT(fast_usimple_lock)
 
-LEXT(ppc_usimple_lock_try)
+LEXT(fast_usimple_lock)
 
 #if CHECKNMI
-                       mflr    r12                                                             ; (TEST/DEBUG) 
-                       bl              EXT(ml_sense_nmi)                               ; (TEST/DEBUG)
-                       mtlr    r12                                                             ; (TEST/DEBUG)
+               b               EXT(usimple_lock)               ; (TEST/DEBUG)  
 #endif                  
-                       lis             r0,hi16(MASK(MSR_VEC))                  ; Get vector enable
-                       mfmsr   r9                                                              ; Get the MSR value 
-                       ori             r0,r0,lo16(MASK(MSR_FP))                ; Get FP enable
-                       ori             r7,r0,lo16(MASK(MSR_EE))                ; Get EE bit on too
-                       andc    r9,r9,r0                                                ; Clear FP and VEC
-                       andc    r7,r9,r7                                                ; Clear EE as well
-                       mtmsr   r7                                                              ; Disable interruptions and thus, preemption
-                       mfsprg  r6,1                                                    ; Get current activation 
-
-                       lwz             r11,0(r3)                                               ; Get the lock
-                       andi.   r5,r11,ILK_LOCKED                               ; Check it...
-                       bne--   slcktryfail                                             ; Quickly fail...
-
-slcktryloop:   
-                       lwarx   r11,0,r3                                                ; Ld from addr of arg and reserve
-
-                       andi.   r5,r11,ILK_LOCKED                               ; TEST...
-                       ori             r5,r6,ILK_LOCKED
-                       bne--   slcktryfailX                                    ; branch if taken. Predict free 
-       
-                       stwcx.  r5,0,r3                                                 ; And SET (if still reserved)
-                       bne--   slcktryloop                                             ; If set failed, loop back 
-                       
-                       isync
-
-                       lwz             r5,ACT_PREEMPT_CNT(r6)                  ; Get the preemption level
-                       addi    r5,r5,1                                                 ; Bring up the disable count 
-                       stw             r5,ACT_PREEMPT_CNT(r6)                  ; Save it back
-
-                       mtmsr   r9                                                              ; Allow interruptions now 
-                       li              r3,1                                                    ; Set that the lock was free 
-                       blr
-
-slcktryfailX:
-                       li              r5,lgKillResv                                   ; Killing field
-                       stwcx.  r5,0,r5                                                 ; Kill reservation
-
-slcktryfail:
-                       mtmsr   r9                                                              ; Allow interruptions now 
-                       li              r3,0                                                    ; FAILURE - lock was taken 
-                       blr
-
+               mfmsr   r9
+               andi.   r7,r9,lo16(MASK(MSR_EE))
+               bne-    L_usimple_lock_c
+L_usimple_lock_loop:
+               lwarx   r4,0,r3
+               li      r5,ILK_LOCKED|SLOCK_FAST
+               mr.     r4,r4
+               bne-    L_usimple_lock_c
+               stwcx.  r5,0,r3
+               bne-    L_usimple_lock_loop
+               isync
+               blr
+L_usimple_lock_c:
+               b               EXT(usimple_lock)
 
 /*
- *             void ppc_usimple_unlock_rwcmb(simple_lock_t)
+ *             fast_usimple_lock_try():
  *
+ *             If EE is off, try to get the simple lock. The preemption count doesn't get incremented and
+ *             if successfully held, the simple lock is marked with SLOCK_FAST.
+ *             If EE is on, call usimple_lock_try()
  */
                        .align  5
-                       .globl  EXT(ppc_usimple_unlock_rwcmb)
+                       .globl  EXT(fast_usimple_lock_try)
 
-LEXT(ppc_usimple_unlock_rwcmb)
+LEXT(fast_usimple_lock_try)
 
 #if CHECKNMI
-                       mflr    r12                                                             ; (TEST/DEBUG) 
-                       bl              EXT(ml_sense_nmi)                               ; (TEST/DEBUG)
-                       mtlr    r12                                                             ; (TEST/DEBUG)
+               b               EXT(usimple_lock_try)           ; (TEST/DEBUG)  
 #endif                  
-                       li              r0,0
-                       .globl  EXT(sulckPatch_isync)
-LEXT(sulckPatch_isync)
-                       isync
-                       .globl  EXT(sulckPatch_eieio)
-LEXT(sulckPatch_eieio)
-                       eieio
-                       stw             r0, LOCK_DATA(r3)
-
-                       b               epStart                                                 ; Go enable preemption...
+               mfmsr   r9
+               andi.   r7,r9,lo16(MASK(MSR_EE))
+               bne-    L_usimple_lock_try_c
+L_usimple_lock_try_loop:
+               lwarx   r4,0,r3
+               li      r5,ILK_LOCKED|SLOCK_FAST
+               mr.             r4,r4
+               bne-    L_usimple_lock_try_fail
+               stwcx.  r5,0,r3
+               bne-    L_usimple_lock_try_loop
+               li              r3,1
+               isync
+               blr
+L_usimple_lock_try_fail:
+               li              r3,0
+               blr
+L_usimple_lock_try_c:
+               b               EXT(usimple_lock_try)
 
 /*
- *             void ppc_usimple_unlock_rwmb(simple_lock_t)
+ *             fast_usimple_unlock():
  *
+ *             If the simple lock is marked SLOCK_FAST, release it without decrementing the preemption count.
+ *             Call usimple_unlock() otherwise.        
  */
                        .align  5
-                       .globl  EXT(ppc_usimple_unlock_rwmb)
+                       .globl  EXT(fast_usimple_unlock)
 
-LEXT(ppc_usimple_unlock_rwmb)
+LEXT(fast_usimple_unlock)
 
 #if CHECKNMI
-                       mflr    r12                                                             ; (TEST/DEBUG) 
-                       bl              EXT(ml_sense_nmi)                               ; (TEST/DEBUG)
-                       mtlr    r12                                                             ; (TEST/DEBUG)
+               b               EXT(usimple_unlock)                     ; (TEST/DEBUG)  
 #endif                  
-                       li              r0,0
-                       sync
-                       stw             r0, LOCK_DATA(r3)
+               lwz             r5,LOCK_DATA(r3)
+               li              r0,0
+               cmpi    cr0,r5,ILK_LOCKED|SLOCK_FAST
+               bne-    L_usimple_unlock_c
+               sync
+#if 0
+               mfmsr   r9
+               andi.   r7,r9,lo16(MASK(MSR_EE))
+               beq             L_usimple_unlock_cont
+               lis             r3,hi16(L_usimple_unlock_panic)
+               ori             r3,r3,lo16(L_usimple_unlock_panic)
+               bl              EXT(panic)
 
-                       b               epStart                                                 ; Go enable preemption...
+               .data
+L_usimple_unlock_panic:
+               STRINGD "fast_usimple_unlock: interrupts not disabled\n\000"
+               .text
+L_usimple_unlock_cont:
+#endif
+               stw             r0, LOCK_DATA(r3)
+               blr
+L_usimple_unlock_c:
+               b               EXT(usimple_unlock)
 
 /*
- *             void enter_funnel_section(funnel_t *)
+ *             enter_funnel_section():
  *
  */
                        .align  5
@@ -1672,45 +1822,46 @@ LEXT(ppc_usimple_unlock_rwmb)
 LEXT(enter_funnel_section)
 
 #if    !MACH_LDEBUG
-                       lis             r10,hi16(EXT(kdebug_enable))
-                       ori             r10,r10,lo16(EXT(kdebug_enable))
-                       lwz             r10,0(r10)
-                       lis             r11,hi16(EXT(split_funnel_off))
-                       ori             r11,r11,lo16(EXT(split_funnel_off))
-                       lwz             r11,0(r11)
-                       or.             r10,r11,r10                                             ; Check kdebug_enable or split_funnel_off
-                       bne-    L_enter_funnel_section_slow             ; If set, call the slow path
-                       mfsprg  r6,1                                                    ; Get the current activation
-                       lwz             r7,LOCK_FNL_MUTEX(r3)
-
-                       lwz             r5,0(r7)                                                ; Get lock quickly
-                       mr.             r5,r5                                                   ; Locked?
-                       bne--   L_enter_funnel_section_slow             ; Yup...
-
+               lis             r10,hi16(EXT(kdebug_enable))
+               ori             r10,r10,lo16(EXT(kdebug_enable))
+               lwz             r10,0(r10)
+               lis             r11,hi16(EXT(split_funnel_off))
+               ori             r11,r11,lo16(EXT(split_funnel_off))
+               lwz             r11,0(r11)
+               or.             r10,r11,r10                                                     ; Check kdebug_enable or split_funnel_off
+               bne-    L_enter_funnel_section_slow1            ; If set, call the slow path
+               mfsprg  r6,1                                                            ; Get the current activation
+               lwz             r7,LOCK_FNL_MUTEX(r3)
+               mfmsr   r11
+               rlwinm  r11,r11,0,MSR_FP_BIT+1,MSR_FP_BIT-1     ; Force floating point off
+               rlwinm  r11,r11,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1   ; Force vectors off
+               rlwinm  r10,r11,0,MSR_EE_BIT+1,MSR_EE_BIT-1
+               mtmsr   r10                                                                     ; Turn off EE
+               isync                                                                           ; May have messed with vec/fp
+               mr              r9,r6
 L_enter_funnel_section_loop:
-                       lwarx   r5,0,r7                                                 ; Load the mutex lock
-                       mr.             r5,r5
-                       bne--   L_enter_funnel_section_slowX    ; Go to the slow path
-                       stwcx.  r6,0,r7                                                 ; Grab the lock
-                       bne--   L_enter_funnel_section_loop             ; Loop back if failed
-                       isync                                                                   ; Stop prefeteching
-                       lwz             r6,ACT_THREAD(r6)                               ; Get the current thread
-                       li              r7,TH_FN_OWNED
-                       stw             r3,THREAD_FUNNEL_LOCK(r6)               ; Set the funnel lock reference
-                       stw             r7,THREAD_FUNNEL_STATE(r6)              ; Set the funnel state
-                       blr
-
-L_enter_funnel_section_slowX:
-                       li              r4,lgKillResv                                   ; Killing field
-                       stwcx.  r4,0,r4                                                 ; Kill reservation
+               lwarx   r5,0,r7                                                         ; Load the mutex lock
+               mr.             r5,r5
+               bne-    L_enter_funnel_section_slow                     ; Go to the slow path
+               stwcx.  r6,0,r7                                                         ; Grab the lock
+               bne-    L_enter_funnel_section_loop                     ; Loop back if failed
+               isync                                                                           ; Stop prefeteching
+               lwz             r6,ACT_THREAD(r6)                                       ; Get the current thread
+               li              r7,TH_FN_OWNED
+               stw             r7,THREAD_FUNNEL_STATE(r6)                      ; Set the funnel state
+               stw             r3,THREAD_FUNNEL_LOCK(r6)                       ; Set the funnel lock reference
+               mtmsr   r11
+               blr
 
 L_enter_funnel_section_slow:
+               mtmsr   r11
+L_enter_funnel_section_slow1:
 #endif
-                       li              r4,TRUE
-                       b               EXT(thread_funnel_set)
+               li              r4,TRUE
+               b               EXT(thread_funnel_set)
 
 /*
- *             void exit_funnel_section(void)
+ *             exit_funnel_section():
  *
  */
                        .align  5
@@ -1718,61 +1869,42 @@ L_enter_funnel_section_slow:
 
 LEXT(exit_funnel_section)
 
-                       mfsprg  r6,1                                                    ; Get the current activation
-                       lwz             r6,ACT_THREAD(r6)                               ; Get the current thread
-                       lwz             r3,THREAD_FUNNEL_LOCK(r6)               ; Get the funnel lock
-                       mr.             r3,r3                                                   ; Check on funnel held
-                       beq-    L_exit_funnel_section_ret               ; 
 #if    !MACH_LDEBUG
-                       lis             r10,hi16(EXT(kdebug_enable))
-                       ori             r10,r10,lo16(EXT(kdebug_enable))
-                       lwz             r10,0(r10)
-                       mr.             r10,r10
-                       bne-    L_exit_funnel_section_slow              ; If set, call the slow path
-                       lwz             r7,LOCK_FNL_MUTEX(r3)                   ; Get the funnel mutex lock
-                       .globl  EXT(retfsectPatch_isync)     
-LEXT(retfsectPatch_isync)
-                       isync
-                       .globl  EXT(retfsectPatch_eieio)     
-LEXT(retfsectPatch_eieio)
-                       eieio
-
-                       lwz             r5,0(r7)                                                ; Get lock
-                       rlwinm. r4,r5,0,30,31                                   ; Quick check for bail if pending waiter or interlock set 
-                       bne--   L_exit_funnel_section_slow              ; No can get...
-
+               mfsprg  r6,1                                                            ; Get the current activation
+               lwz             r6,ACT_THREAD(r6)                                       ; Get the current thread
+               lwz             r3,THREAD_FUNNEL_LOCK(r6)                       ; Get the funnel lock
+               mr.             r3,r3                                                           ; Check on funnel held
+               beq-    L_exit_funnel_section_ret                       ; 
+               lis             r10,hi16(EXT(kdebug_enable))
+               ori             r10,r10,lo16(EXT(kdebug_enable))
+               lwz             r10,0(r10)
+               mr.             r10,r10
+               bne-    L_exit_funnel_section_slow1                     ; If set, call the slow path
+               lwz             r7,LOCK_FNL_MUTEX(r3)                           ; Get the funnel mutex lock
+               mfmsr   r11
+               rlwinm  r11,r11,0,MSR_FP_BIT+1,MSR_FP_BIT-1     ; Force floating point off
+               rlwinm  r11,r11,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1   ; Force vectors off
+               rlwinm  r10,r11,0,MSR_EE_BIT+1,MSR_EE_BIT-1
+               mtmsr   r10                                                                     ; Turn off EE
+               isync                                                                           ; May have messed with fp/vec
+               sync
 L_exit_funnel_section_loop:
-                       lwarx   r5,0,r7
-                       rlwinm. r4,r5,0,30,31                                   ; Bail if pending waiter or interlock set 
-                       li              r5,0                                                    ; Clear the mutexlock 
-                       bne--   L_exit_funnel_section_slowX
-                       stwcx.  r5,0,r7                                                 ; Release the funnel mutexlock
-                       bne--   L_exit_funnel_section_loop
-                       li              r7,0
-                       stw             r7,THREAD_FUNNEL_STATE(r6)              ; Clear the funnel state
-                       stw             r7,THREAD_FUNNEL_LOCK(r6)               ; Clear the funnel lock reference
-                       blr                                                                             ; Return
-
-L_exit_funnel_section_slowX:
-                       li              r4,lgKillResv                                   ; Killing field
-                       stwcx.  r4,0,r4                                                 ; Kill it
-
+               lwarx   r5,0,r7
+               rlwinm. r4,r5,0,30,31                                           ; Bail if pending waiter or interlock set 
+               li              r5,0                                                            ; Clear the mutexlock 
+               bne-    L_exit_funnel_section_slow
+               stwcx.  r5,0,r7                                                         ; Release the funnel mutexlock
+               bne-    L_exit_funnel_section_loop
+               li              r7,0
+               stw             r7,THREAD_FUNNEL_STATE(r6)                      ; Clear the funnel state
+               stw             r7,THREAD_FUNNEL_LOCK(r6)                       ; Clear the funnel lock reference
+               mtmsr   r11
+L_exit_funnel_section_ret:
+               blr
 L_exit_funnel_section_slow:
+               mtmsr   r11
+L_exit_funnel_section_slow1:
 #endif
-                       li              r4,FALSE
-                       b               EXT(thread_funnel_set)
-L_exit_funnel_section_ret:
-                       blr
-
-;
-;                     This is bring up code
-;
-                       .align  5
-                       .globl  EXT(condStop)
-
-LEXT(condStop)
-
-XcondStop:     cmplw   r3,r4                                                   ; Check if these are equal
-                       beq--   XcondStop                                               ; Stop here until they are different
-                       blr                                                                             ; Return.
+               li              r4,FALSE
+               b               EXT(thread_funnel_set)
 
index b51f04a951c45541d74b6450f0a7b885f5c58794..54ffa016c08745143bcfe19461e6a6f159930884 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
diff --git a/osfmk/ppc/hw_perfmon.c b/osfmk/ppc/hw_perfmon.c
deleted file mode 100644 (file)
index e2f4249..0000000
+++ /dev/null
@@ -1,945 +0,0 @@
-/*
- * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-
-#include <kern/thread.h>
-#include <kern/thread_act.h>
-#include <ppc/exception.h>
-#include <ppc/savearea.h>
-#include <ppc/hw_perfmon.h>
-#include <ppc/hw_perfmon_mmcr.h>
-
-decl_simple_lock_data(,hw_perfmon_lock)
-static task_t hw_perfmon_owner = TASK_NULL;
-static int hw_perfmon_thread_count = 0;
-
-/* Notes:
- * -supervisor/user level filtering is unnecessary because of the way PMCs and MMCRs are context switched
- *  (can only count user events anyway)
- * -marked filtering is unnecssary because each thread has its own virtualized set of PMCs and MMCRs
- * -virtual counter PMI is passed up as a breakpoint exception
- */
-
-int perfmon_init(void)
-{
-       simple_lock_init(&hw_perfmon_lock, FALSE);
-       return KERN_SUCCESS;
-}
-
-/* PMC Facility Owner:
- * TASK_NULL - no one owns it
- * kernel_task - owned by hw_perfmon
- * other task - owned by another task
- */
-
-int perfmon_acquire_facility(task_t task)
-{
-       kern_return_t retval = KERN_SUCCESS;
-  
-       simple_lock(&hw_perfmon_lock);
-  
-       if(hw_perfmon_owner==task) {
-#ifdef HWPERFMON_DEBUG
-               kprintf("perfmon_acquire_facility - ACQUIRED: already owner\n");
-#endif
-               retval = KERN_SUCCESS;
-               /* already own it */
-       } else if(hw_perfmon_owner==TASK_NULL) { /* no one owns it */
-               hw_perfmon_owner = task;
-               hw_perfmon_thread_count = 0;
-#ifdef HWPERFMON_DEBUG
-               kprintf("perfmon_acquire_facility - ACQUIRED: no current owner - made new owner\n");
-#endif
-               retval = KERN_SUCCESS;
-       } else { /* someone already owns it */
-               if(hw_perfmon_owner==kernel_task) {
-                       if(hw_perfmon_thread_count==0) { /* kernel owns it but no threads using it */
-                               hw_perfmon_owner = task;
-                               hw_perfmon_thread_count = 0;
-#ifdef HWPERFMON_DEBUG
-                               kprintf("perfmon_acquire_facility - ACQUIRED: kernel is current owner but no threads using it\n");
-#endif
-                               retval = KERN_SUCCESS;
-                       } else {
-#ifdef HWPERFMON_DEBUG
-                               kprintf("perfmon_acquire_facility - DENIED: kernel is current owner and facility in use\n");
-#endif
-                               retval = KERN_RESOURCE_SHORTAGE;
-                       }
-               } else { /* non-kernel owner */
-#ifdef HWPERFMON_DEBUG
-                       kprintf("perfmon_acquire_facility - DENIED: another active task owns the facility\n");
-#endif
-                       retval = KERN_RESOURCE_SHORTAGE;
-               }
-       }
-  
-       simple_unlock(&hw_perfmon_lock);
-       return retval;
-}
-
-int perfmon_release_facility(task_t task)
-{
-       kern_return_t retval = KERN_SUCCESS;
-       task_t old_perfmon_owner = hw_perfmon_owner;
-  
-       simple_lock(&hw_perfmon_lock);
-  
-       if(task!=hw_perfmon_owner) {
-               retval = KERN_NO_ACCESS;
-       } else {
-               if(old_perfmon_owner==kernel_task) {
-                       if(hw_perfmon_thread_count>0) {
-#ifdef HWPERFMON_DEBUG
-                               kprintf("perfmon_release_facility - NOT RELEASED: kernel task is owner and has active perfmon threads\n");
-#endif
-                               retval = KERN_NO_ACCESS;
-                       } else {
-#ifdef HWPERFMON_DEBUG
-                               kprintf("perfmon_release_facility - RELEASED: kernel task was owner\n");
-#endif
-                               hw_perfmon_owner = TASK_NULL;
-                               retval = KERN_SUCCESS;
-                       }
-               } else {
-#ifdef HWPERFMON_DEBUG
-                       kprintf("perfmon_release_facility - RELEASED: user task was owner\n");
-#endif
-                       hw_perfmon_owner = TASK_NULL;
-                       retval = KERN_SUCCESS;
-               }
-       }
-
-       simple_unlock(&hw_perfmon_lock);
-       return retval;
-}
-
-int perfmon_enable(thread_act_t thr_act)
-{
-       struct savearea *sv = thr_act->mact.pcb;
-       kern_return_t kr;
-       kern_return_t retval = KERN_SUCCESS;
-       int curPMC;
-  
-       if(thr_act->mact.specFlags & perfMonitor) {
-               return KERN_SUCCESS; /* already enabled */
-       } else if(perfmon_acquire_facility(kernel_task)!=KERN_SUCCESS) {
-               return KERN_RESOURCE_SHORTAGE; /* facility is in use */
-       } else { /* kernel_task owns the faciltity and this thread has not yet been counted */
-               simple_lock(&hw_perfmon_lock);
-               hw_perfmon_thread_count++;
-               simple_unlock(&hw_perfmon_lock);
-       }
-
-       sv->save_mmcr1 = 0;
-       sv->save_mmcr2 = 0;
-       
-       switch(machine_slot[0].cpu_subtype) {
-               case CPU_SUBTYPE_POWERPC_750:
-               case CPU_SUBTYPE_POWERPC_7400:
-               case CPU_SUBTYPE_POWERPC_7450:
-                       {
-                               ppc32_mmcr0_reg_t mmcr0_reg;
-               
-                               mmcr0_reg.value = 0;
-                               mmcr0_reg.field.disable_counters_always = TRUE;
-                               mmcr0_reg.field.disable_counters_supervisor = TRUE; /* no choice */
-                               sv->save_mmcr0 = mmcr0_reg.value;
-                       }
-                       break;
-               case CPU_SUBTYPE_POWERPC_970:
-                       {
-                               ppc64_mmcr0_reg_t mmcr0_reg;
-               
-                               mmcr0_reg.value = 0;
-                               mmcr0_reg.field.disable_counters_always = TRUE;
-                               mmcr0_reg.field.disable_counters_supervisor = TRUE; /* no choice */
-                               sv->save_mmcr0 = mmcr0_reg.value;
-                       }
-                       break;
-               default:
-                       retval = KERN_FAILURE;
-                       break;
-       }
-  
-       if(retval==KERN_SUCCESS) {
-               for(curPMC=0; curPMC<MAX_CPUPMC_COUNT; curPMC++) {
-                       sv->save_pmc[curPMC] = 0;
-                       thr_act->mact.pmcovfl[curPMC] = 0;
-               }
-               thr_act->mact.perfmonFlags = 0;
-               thr_act->mact.specFlags |= perfMonitor; /* enable perf monitor facility for this thread */
-               if(thr_act==current_act()) {
-                       per_proc_info[cpu_number()].spcFlags |= perfMonitor; /* update per_proc */
-               }
-       }
-
-#ifdef HWPERFMON_DEBUG  
-       kprintf("perfmon_enable - mmcr0=0x%llx mmcr1=0x%llx mmcr2=0x%llx\n", sv->save_mmcr0, sv->save_mmcr1, sv->save_mmcr2);
-#endif  
-
-       return retval;
-}
-
-int perfmon_disable(thread_act_t thr_act)
-{
-       struct savearea *sv = thr_act->mact.pcb;
-       int curPMC;
-  
-       if(!(thr_act->mact.specFlags & perfMonitor)) {
-               return KERN_NO_ACCESS; /* not enabled */
-       } else {
-               simple_lock(&hw_perfmon_lock);
-               hw_perfmon_thread_count--;
-               simple_unlock(&hw_perfmon_lock);
-               perfmon_release_facility(kernel_task); /* will release if hw_perfmon_thread_count is 0 */
-       }
-  
-       thr_act->mact.specFlags &= ~perfMonitor; /* disable perf monitor facility for this thread */
-       if(thr_act==current_act()) {
-               per_proc_info[cpu_number()].spcFlags &= ~perfMonitor; /* update per_proc */
-       }
-       sv->save_mmcr0 = 0;
-       sv->save_mmcr1 = 0;
-       sv->save_mmcr2 = 0;
-  
-       for(curPMC=0; curPMC<MAX_CPUPMC_COUNT; curPMC++) {
-               sv->save_pmc[curPMC] = 0;
-               thr_act->mact.pmcovfl[curPMC] = 0;
-               thr_act->mact.perfmonFlags = 0;
-       }
-  
-#ifdef HWPERFMON_DEBUG
-       kprintf("perfmon_disable - mmcr0=0x%llx mmcr1=0x%llx mmcr2=0x%llx\n", sv->save_mmcr0, sv->save_mmcr1, sv->save_mmcr2);
-#endif  
-
-       return KERN_SUCCESS;
-}
-
-int perfmon_clear_counters(thread_act_t thr_act)
-{
-       struct savearea *sv = thr_act->mact.pcb;
-       int curPMC;
-
-#ifdef HWPERFMON_DEBUG
-       kprintf("perfmon_clear_counters (CPU%d)\n", cpu_number());
-#endif  
-
-       /* clear thread copy */
-       for(curPMC=0; curPMC<MAX_CPUPMC_COUNT; curPMC++) {
-               sv->save_pmc[curPMC] = 0;
-               thr_act->mact.pmcovfl[curPMC] = 0;
-       }
-  
-       return KERN_SUCCESS;
-}
-
-int perfmon_write_counters(thread_act_t thr_act, uint64_t *pmcs)
-{
-       struct savearea *sv = thr_act->mact.pcb;
-       int curPMC;
-  
-#ifdef HWPERFMON_DEBUG
-       kprintf("perfmon_write_counters (CPU%d): mmcr0 = %016llX, pmc1=%llX pmc2=%llX pmc3=%llX pmc4=%llX pmc5=%llX pmc6=%llX pmc7=%llX pmc8=%llX\n", cpu_number(), sv->save_mmcr0, pmcs[PMC_1], pmcs[PMC_2], pmcs[PMC_3], pmcs[PMC_4], pmcs[PMC_5], pmcs[PMC_6], pmcs[PMC_7], pmcs[PMC_8]);
-#endif  
-
-       /* update thread copy */
-       for(curPMC=0; curPMC<MAX_CPUPMC_COUNT; curPMC++) {
-               sv->save_pmc[curPMC] = pmcs[curPMC] & 0x7FFFFFFF;
-               thr_act->mact.pmcovfl[curPMC] = (pmcs[curPMC]>>31) & 0xFFFFFFFF;
-       }
-  
-       return KERN_SUCCESS;
-}
-
-int perfmon_read_counters(thread_act_t thr_act, uint64_t *pmcs)
-{
-       struct savearea *sv = thr_act->mact.pcb;
-       int curPMC;
-  
-       /* retrieve from thread copy */
-       for(curPMC=0; curPMC<MAX_CPUPMC_COUNT; curPMC++) {
-               pmcs[curPMC] = thr_act->mact.pmcovfl[curPMC]; 
-               pmcs[curPMC] = pmcs[curPMC]<<31;
-               pmcs[curPMC] |= (sv->save_pmc[curPMC] & 0x7FFFFFFF);
-       }
-
-       /* zero any unused counters on this platform */
-       switch(machine_slot[0].cpu_subtype) {
-               case CPU_SUBTYPE_POWERPC_750:
-               case CPU_SUBTYPE_POWERPC_7400:
-               case CPU_SUBTYPE_POWERPC_7450:
-                       pmcs[PMC_7] = 0;
-                       pmcs[PMC_8] = 0;
-                       break;
-               default:
-                       break;
-       }
-
-#ifdef HWPERFMON_DEBUG
-       kprintf("perfmon_read_counters (CPU%d): mmcr0 = %016llX pmc1=%llX pmc2=%llX pmc3=%llX pmc4=%llX pmc5=%llX pmc6=%llX pmc7=%llX pmc8=%llX\n", cpu_number(), sv->save_mmcr0, pmcs[PMC_1], pmcs[PMC_2], pmcs[PMC_3], pmcs[PMC_4], pmcs[PMC_5], pmcs[PMC_6], pmcs[PMC_7], pmcs[PMC_8]);
-#endif  
-
-       return KERN_SUCCESS;
-}
-
-int perfmon_start_counters(thread_act_t thr_act)
-{
-       struct savearea *sv = thr_act->mact.pcb;
-       kern_return_t retval = KERN_SUCCESS;
-
-       switch(machine_slot[0].cpu_subtype) {
-               case CPU_SUBTYPE_POWERPC_750:
-               case CPU_SUBTYPE_POWERPC_7400:
-                       {
-                               ppc32_mmcr0_reg_t mmcr0_reg;
-                               mmcr0_reg.value = sv->save_mmcr0;
-                               mmcr0_reg.field.disable_counters_always = FALSE;
-                               /* XXXXX PMI broken on 750, 750CX, 750FX, 7400 and 7410 v1.2 and earlier XXXXX */
-                               mmcr0_reg.field.on_pmi_stop_counting = FALSE;
-                               mmcr0_reg.field.enable_pmi = FALSE; 
-                               mmcr0_reg.field.enable_pmi_on_pmc1 = FALSE;
-                               mmcr0_reg.field.enable_pmi_on_pmcn = FALSE;
-                               sv->save_mmcr0 = mmcr0_reg.value;
-                       }
-                       break;
-               case CPU_SUBTYPE_POWERPC_7450:
-                       {
-                               ppc32_mmcr0_reg_t mmcr0_reg;
-                               mmcr0_reg.value = sv->save_mmcr0;
-                               mmcr0_reg.field.disable_counters_always = FALSE;
-                               mmcr0_reg.field.on_pmi_stop_counting = TRUE;
-                               mmcr0_reg.field.enable_pmi = TRUE;
-                               mmcr0_reg.field.enable_pmi_on_pmc1 = TRUE;
-                               mmcr0_reg.field.enable_pmi_on_pmcn = TRUE;
-                               sv->save_mmcr0 = mmcr0_reg.value;
-                       }
-                       break;
-               case CPU_SUBTYPE_POWERPC_970:
-                       {
-                               ppc64_mmcr0_reg_t mmcr0_reg;
-                               mmcr0_reg.value = sv->save_mmcr0;
-                               mmcr0_reg.field.disable_counters_always = FALSE;
-                               mmcr0_reg.field.on_pmi_stop_counting = TRUE;
-                               mmcr0_reg.field.enable_pmi = TRUE;
-                               mmcr0_reg.field.enable_pmi_on_pmc1 = TRUE;
-                               mmcr0_reg.field.enable_pmi_on_pmcn = TRUE;
-                               sv->save_mmcr0 = mmcr0_reg.value;
-                       }
-                       break;
-               default:
-                       retval = KERN_FAILURE;
-                       break;
-       }
-
-#ifdef HWPERFMON_DEBUG
-       kprintf("perfmon_start_counters (CPU%d) - mmcr0=0x%llx mmcr1=0x%llx mmcr2=0x%llx\n", cpu_number(), sv->save_mmcr0, sv->save_mmcr1, sv->save_mmcr2);
-#endif
-
-       return retval;
-}
-
-int perfmon_stop_counters(thread_act_t thr_act)
-{
-       struct savearea *sv = thr_act->mact.pcb;
-       kern_return_t retval = KERN_SUCCESS;
-
-       switch(machine_slot[0].cpu_subtype) {
-               case CPU_SUBTYPE_POWERPC_750:
-               case CPU_SUBTYPE_POWERPC_7400:
-               case CPU_SUBTYPE_POWERPC_7450:
-                       {
-                               ppc32_mmcr0_reg_t mmcr0_reg;
-                               mmcr0_reg.value = sv->save_mmcr0;
-                               mmcr0_reg.field.disable_counters_always = TRUE;
-                               sv->save_mmcr0 = mmcr0_reg.value;
-                       }
-                       break;
-               case CPU_SUBTYPE_POWERPC_970:
-                       {
-                               ppc64_mmcr0_reg_t mmcr0_reg;
-                               mmcr0_reg.value = sv->save_mmcr0;
-                               mmcr0_reg.field.disable_counters_always = TRUE;
-                               sv->save_mmcr0 = mmcr0_reg.value;
-                       }
-                       break;
-               default:
-                       retval = KERN_FAILURE;
-                       break;
-       }
-
-#ifdef HWPERFMON_DEBUG
-       kprintf("perfmon_stop_counters (CPU%d) - mmcr0=0x%llx mmcr1=0x%llx mmcr2=0x%llx\n", cpu_number(), sv->save_mmcr0, sv->save_mmcr1, sv->save_mmcr2);
-#endif
-
-       return retval;
-}
-
-int perfmon_set_event(thread_act_t thr_act, int pmc, int event)
-{
-       struct savearea *sv = thr_act->mact.pcb;
-       kern_return_t retval = KERN_SUCCESS;
-
-#ifdef HWPERFMON_DEBUG
-       kprintf("perfmon_set_event b4 (CPU%d) - pmc=%d, event=%d - mmcr0=0x%llx mmcr1=0x%llx mmcr2=0x%llx\n", cpu_number(), pmc, event, sv->save_mmcr0, sv->save_mmcr1, sv->save_mmcr2);
-#endif
-       switch(machine_slot[0].cpu_subtype) {
-               case CPU_SUBTYPE_POWERPC_750:
-               case CPU_SUBTYPE_POWERPC_7400:
-                       {
-                               ppc32_mmcr0_reg_t mmcr0_reg;
-                               ppc32_mmcr1_reg_t mmcr1_reg;
-               
-                               mmcr0_reg.value = sv->save_mmcr0;
-                               mmcr1_reg.value = sv->save_mmcr1;
-               
-                               switch(pmc) {
-                                       case PMC_1:
-                                               mmcr0_reg.field.pmc1_event = event;
-                                               sv->save_mmcr0 = mmcr0_reg.value;
-                                               break;
-                                       case PMC_2:
-                                               mmcr0_reg.field.pmc2_event = event;
-                                               sv->save_mmcr0 = mmcr0_reg.value;
-                                               break;
-                                       case PMC_3:
-                                               mmcr1_reg.field.pmc3_event = event;
-                                               sv->save_mmcr1 = mmcr1_reg.value;
-                                               break;
-                                       case PMC_4:
-                                               mmcr1_reg.field.pmc4_event = event;
-                                               sv->save_mmcr1 = mmcr1_reg.value;
-                                               break;
-                                       default:
-                                               retval = KERN_FAILURE;
-                                               break;
-                               }
-                       }
-                       break;
-               case CPU_SUBTYPE_POWERPC_7450:
-                       {
-                               ppc32_mmcr0_reg_t mmcr0_reg;
-                               ppc32_mmcr1_reg_t mmcr1_reg;
-
-                               mmcr0_reg.value = sv->save_mmcr0;
-                               mmcr1_reg.value = sv->save_mmcr1;
-                               switch(pmc) {
-                                       case PMC_1:
-                                               mmcr0_reg.field.pmc1_event = event;
-                                               sv->save_mmcr0 = mmcr0_reg.value;
-                                               break;
-                                       case PMC_2:
-                                               mmcr0_reg.field.pmc2_event = event;
-                                               sv->save_mmcr0 = mmcr0_reg.value;
-                                               break;
-                                       case PMC_3:
-                                               mmcr1_reg.field.pmc3_event = event;
-                                               sv->save_mmcr1 = mmcr1_reg.value;
-                                               break;
-                                       case PMC_4:
-                                               mmcr1_reg.field.pmc4_event = event;
-                                               sv->save_mmcr1 = mmcr1_reg.value;
-                                               break;
-                                       case PMC_5:
-                                               mmcr1_reg.field.pmc5_event = event;
-                                               sv->save_mmcr1 = mmcr1_reg.value;
-                                               break;
-                                       case PMC_6:
-                                               mmcr1_reg.field.pmc6_event = event;
-                                               sv->save_mmcr1 = mmcr1_reg.value;
-                                               break;
-                                       default:
-                                               retval = KERN_FAILURE;
-                                               break;
-                               }
-                       }
-                       break;
-               case CPU_SUBTYPE_POWERPC_970:
-                       {
-                               ppc64_mmcr0_reg_t mmcr0_reg;
-                               ppc64_mmcr1_reg_t mmcr1_reg;
-         
-                               mmcr0_reg.value = sv->save_mmcr0;
-                               mmcr1_reg.value = sv->save_mmcr1;
-         
-                               switch(pmc) {
-                                       case PMC_1:
-                                               mmcr0_reg.field.pmc1_event = event;
-                                               sv->save_mmcr0 = mmcr0_reg.value;
-                                               break;
-                                       case PMC_2:
-                                               mmcr0_reg.field.pmc2_event = event;
-                                               sv->save_mmcr0 = mmcr0_reg.value;
-                                               break;
-                                       case PMC_3:
-                                               mmcr1_reg.field.pmc3_event = event;
-                                               sv->save_mmcr1 = mmcr1_reg.value;
-                                               break;
-                                       case PMC_4:
-                                               mmcr1_reg.field.pmc4_event = event;
-                                               sv->save_mmcr1 = mmcr1_reg.value;
-                                               break;
-                                       case PMC_5:
-                                               mmcr1_reg.field.pmc5_event = event;
-                                               sv->save_mmcr1 = mmcr1_reg.value;
-                                               break;
-                                       case PMC_6:
-                                               mmcr1_reg.field.pmc6_event = event;
-                                               sv->save_mmcr1 = mmcr1_reg.value;
-                                               break;
-                                       case PMC_7:
-                                               mmcr1_reg.field.pmc7_event = event;
-                                               sv->save_mmcr1 = mmcr1_reg.value;
-                                               break;
-                                       case PMC_8:
-                                               mmcr1_reg.field.pmc8_event = event;
-                                               sv->save_mmcr1 = mmcr1_reg.value;
-                                               break;
-                                       default:
-                                               retval = KERN_FAILURE;
-                                               break;
-                               }
-                       }
-                       break;
-               default:
-                       retval = KERN_FAILURE;
-                       break;
-       }
-
-#ifdef HWPERFMON_DEBUG
-       kprintf("perfmon_set_event (CPU%d) - pmc=%d, event=%d - mmcr0=0x%llx mmcr1=0x%llx mmcr2=0x%llx\n", cpu_number(), pmc, event, sv->save_mmcr0, sv->save_mmcr1, sv->save_mmcr2);
-#endif
-
-       return retval;
-}
-
-int perfmon_set_event_func(thread_act_t thr_act, uint32_t f)
-{
-       struct savearea *sv = thr_act->mact.pcb;
-       kern_return_t retval = KERN_SUCCESS;
-
-#ifdef HWPERFMON_DEBUG
-       kprintf("perfmon_set_event_func - func=%s\n", 
-                  f==PPC_PERFMON_FUNC_FPU ? "FUNC" :
-                  f==PPC_PERFMON_FUNC_ISU ? "ISU" :
-                  f==PPC_PERFMON_FUNC_IFU ? "IFU" :
-                  f==PPC_PERFMON_FUNC_VMX ? "VMX" :
-                  f==PPC_PERFMON_FUNC_IDU ? "IDU" :
-                  f==PPC_PERFMON_FUNC_GPS ? "GPS" :
-                  f==PPC_PERFMON_FUNC_LSU0 ? "LSU0" :
-                  f==PPC_PERFMON_FUNC_LSU1A ? "LSU1A" :
-                  f==PPC_PERFMON_FUNC_LSU1B ? "LSU1B" :
-                  f==PPC_PERFMON_FUNC_SPECA ? "SPECA" :
-                  f==PPC_PERFMON_FUNC_SPECB ? "SPECB" :
-                  f==PPC_PERFMON_FUNC_SPECC ? "SPECC" :
-                  "UNKNOWN");
-#endif /* HWPERFMON_DEBUG */
-
-       switch(machine_slot[0].cpu_subtype) {
-               case CPU_SUBTYPE_POWERPC_750:
-               case CPU_SUBTYPE_POWERPC_7400:
-               case CPU_SUBTYPE_POWERPC_7450:
-                       retval = KERN_FAILURE; /* event functional unit only applies to 970 */
-                       break;
-               case CPU_SUBTYPE_POWERPC_970:
-                       {
-                               ppc64_mmcr1_reg_t mmcr1_reg;
-                               ppc_func_unit_t func_unit;
-
-                               func_unit.value = f;
-                               mmcr1_reg.value = sv->save_mmcr1;
-
-                               mmcr1_reg.field.ttm0_select = func_unit.field.TTM0SEL;
-                               mmcr1_reg.field.ttm1_select = func_unit.field.TTM1SEL;
-                               mmcr1_reg.field.ttm2_select = 0; /* not used */
-                               mmcr1_reg.field.ttm3_select = func_unit.field.TTM3SEL;
-                               mmcr1_reg.field.speculative_event = func_unit.field.SPECSEL;
-                               mmcr1_reg.field.lane0_select = func_unit.field.TD_CP_DBGxSEL;
-                               mmcr1_reg.field.lane1_select = func_unit.field.TD_CP_DBGxSEL;
-                               mmcr1_reg.field.lane2_select = func_unit.field.TD_CP_DBGxSEL;
-                               mmcr1_reg.field.lane3_select = func_unit.field.TD_CP_DBGxSEL;
-
-                               sv->save_mmcr1 = mmcr1_reg.value;
-                       }
-                       break;
-               default:
-                       retval = KERN_FAILURE;
-                       break;
-       }
-
-       return retval;
-}
-
-int perfmon_set_threshold(thread_act_t thr_act, int threshold)
-{
-       struct savearea *sv = thr_act->mact.pcb;
-       kern_return_t retval = KERN_SUCCESS;
-
-       switch(machine_slot[0].cpu_subtype) {
-               case CPU_SUBTYPE_POWERPC_750:
-                       {
-                               ppc32_mmcr0_reg_t mmcr0_reg;
-
-                               mmcr0_reg.value = sv->save_mmcr0;
-
-                               if(threshold>63) { /* no multiplier on 750 */
-                                       int newThreshold = 63;
-#ifdef HWPERFMON_DEBUG
-                                       kprintf("perfmon_set_threshold - WARNING: supplied threshold (%d) exceeds max threshold value - clamping to %d\n", threshold, newThreshold);
-#endif
-                                       threshold = newThreshold;
-                               }
-                               mmcr0_reg.field.threshold_value = threshold;
-
-                               sv->save_mmcr0 = mmcr0_reg.value;
-                       }
-                       break;
-
-               case CPU_SUBTYPE_POWERPC_7400:
-               case CPU_SUBTYPE_POWERPC_7450:
-                       {
-                               ppc32_mmcr0_reg_t mmcr0_reg;
-                               ppc32_mmcr2_reg_t mmcr2_reg;
-
-                               mmcr0_reg.value = sv->save_mmcr0;
-                               mmcr2_reg.value = sv->save_mmcr2;
-
-                               if(threshold<=(2*63)) { /* 2x multiplier */
-                                       if(threshold%2 != 0) {
-                                               int newThreshold = 2*(threshold/2);
-#ifdef HWPERFMON_DEBUG
-                                               kprintf("perfmon_set_threshold - WARNING: supplied threshold (%d) is not evenly divisible by 2x multiplier - using threshold of %d instead\n", threshold, newThreshold);
-#endif
-                                               threshold = newThreshold;
-                                       }
-                                       mmcr2_reg.field.threshold_multiplier = 0;
-                               } else if(threshold<=(32*63)) { /* 32x multiplier */
-                                       if(threshold%32 != 0) {
-                                               int newThreshold = 32*(threshold/32);
-#ifdef HWPERFMON_DEBUG
-                                               kprintf("perfmon_set_threshold - WARNING: supplied threshold (%d) is not evenly divisible by 32x multiplier - using threshold of %d instead\n", threshold, newThreshold);
-#endif
-                                               threshold = newThreshold;
-                                       }
-                                       mmcr2_reg.field.threshold_multiplier = 1;
-                               } else {
-                                       int newThreshold = 32*63;
-#ifdef HWPERFMON_DEBUG
-                                       kprintf("perfmon_set_threshold - WARNING: supplied threshold (%d) exceeds max threshold value - clamping to %d\n", threshold, newThreshold);
-#endif
-                                       threshold = newThreshold;
-                                       mmcr2_reg.field.threshold_multiplier = 1;
-                               }
-                               mmcr0_reg.field.threshold_value = threshold;
-
-                               sv->save_mmcr0 = mmcr0_reg.value;
-                               sv->save_mmcr2 = mmcr2_reg.value;
-
-                       }
-                       break;
-               case CPU_SUBTYPE_POWERPC_970:
-                       {
-                               ppc64_mmcr0_reg_t mmcr0_reg;
-
-                               mmcr0_reg.value = sv->save_mmcr0;
-
-                               if(threshold>63) { /* multiplier is in HID1 on 970 - not context switching HID1 so always 1x */
-                                       int newThreshold = 63;
-#ifdef HWPERFMON_DEBUG
-                                       kprintf("perfmon_set_threshold - WARNING: supplied threshold (%d) exceeds max threshold value - clamping to %d\n", threshold, newThreshold);
-#endif
-                                       threshold = newThreshold;
-                               }
-                               mmcr0_reg.field.threshold_value = threshold;
-
-                               sv->save_mmcr0 = mmcr0_reg.value;
-                       }
-                       break;
-               default:
-                       retval = KERN_FAILURE;
-                       break;
-       }
-
-#ifdef HWPERFMON_DEBUG
-       kprintf("perfmon_set_threshold - threshold=%d - mmcr0=0x%llx mmcr1=0x%llx mmcr2=0x%llx\n", threshold, sv->save_mmcr0, sv->save_mmcr1, sv->save_mmcr2);
-#endif
-
-       return retval;
-}
-
-int perfmon_set_tbsel(thread_act_t thr_act, int tbsel)
-{
-       struct savearea *sv = thr_act->mact.pcb;
-       kern_return_t retval = KERN_SUCCESS;
-
-       switch(machine_slot[0].cpu_subtype) {
-               case CPU_SUBTYPE_POWERPC_750:
-               case CPU_SUBTYPE_POWERPC_7400:
-               case CPU_SUBTYPE_POWERPC_7450:
-                       {
-                               ppc32_mmcr0_reg_t mmcr0_reg;
-
-                               mmcr0_reg.value = sv->save_mmcr0;
-                               switch(tbsel) {
-                                       case 0x0:
-                                       case 0x1:
-                                       case 0x2:
-                                       case 0x3:
-                                               mmcr0_reg.field.timebase_bit_selector = tbsel;
-                                               break;
-                                       default:
-                                               retval = KERN_FAILURE;
-                               }
-                               sv->save_mmcr0 = mmcr0_reg.value;
-                       }
-                       break;
-               case CPU_SUBTYPE_POWERPC_970:
-                       {
-                               ppc64_mmcr0_reg_t mmcr0_reg;
-
-                               mmcr0_reg.value = sv->save_mmcr0;
-                               switch(tbsel) {
-                                       case 0x0:
-                                       case 0x1:
-                                       case 0x2:
-                                       case 0x3:
-                                               mmcr0_reg.field.timebase_bit_selector = tbsel;
-                                               break;
-                                       default:
-                                               retval = KERN_FAILURE;
-                               }
-                               sv->save_mmcr0 = mmcr0_reg.value;
-                       }
-                       break;
-               default:
-                       retval = KERN_FAILURE;
-                       break;
-       }
-
-#ifdef HWPERFMON_DEBUG
-       kprintf("perfmon_set_tbsel - tbsel=%d - mmcr0=0x%llx mmcr1=0x%llx mmcr2=0x%llx\n", tbsel, sv->save_mmcr0, sv->save_mmcr1, sv->save_mmcr2);
-#endif
-
-       return retval;
-}
-
-int perfmon_control(struct savearea *ssp)
-{
-       mach_port_t thr_port = (mach_port_t)ssp->save_r3;
-       int action = (int)ssp->save_r4;
-       int pmc = (int)ssp->save_r5;
-       int val = (int)ssp->save_r6;
-       uint64_t *usr_pmcs_p = (uint64_t *)ssp->save_r7;
-       thread_act_t thr_act = THREAD_NULL;
-       uint64_t kern_pmcs[MAX_CPUPMC_COUNT];
-       kern_return_t retval = KERN_SUCCESS;
-       int error;  
-       boolean_t oldlevel;
-
-       thr_act = port_name_to_act(thr_port); // convert user space thread port name to a thread_act_t
-       if(!thr_act) {
-               ssp->save_r3 = KERN_INVALID_ARGUMENT;
-               return 1;  /* Return and check for ASTs... */
-       }
-
-       if(thr_act!=current_act()) {
-               thread_suspend(thr_act);
-       }
-
-#ifdef HWPERFMON_DEBUG
-       //  kprintf("perfmon_control: action=0x%x pmc=%d val=%d pmcs=0x%x\n", action, pmc, val, usr_pmcs_p);
-#endif  
-
-       oldlevel = ml_set_interrupts_enabled(FALSE);
-  
-       /* individual actions which do not require perfmon facility to be enabled */
-       if(action==PPC_PERFMON_DISABLE) {
-               retval = perfmon_disable(thr_act);
-       }
-       else if(action==PPC_PERFMON_ENABLE) {
-               retval = perfmon_enable(thr_act);
-       }
-  
-       else { /* individual actions which do require perfmon facility to be enabled */
-               if(!(thr_act->mact.specFlags & perfMonitor)) { /* perfmon not enabled */
-#ifdef HWPERFMON_DEBUG
-                       kprintf("perfmon_control: ERROR - perfmon not enabled for this thread\n");
-#endif
-                       retval = KERN_NO_ACCESS;
-                       goto perfmon_return;
-               }
-       
-               if(action==PPC_PERFMON_SET_EVENT) {
-                       retval = perfmon_set_event(thr_act, pmc, val);
-               }
-               else if(action==PPC_PERFMON_SET_THRESHOLD) {
-                       retval = perfmon_set_threshold(thr_act, val);
-               }
-               else if(action==PPC_PERFMON_SET_TBSEL) {
-                       retval = perfmon_set_tbsel(thr_act, val);
-               }
-               else if(action==PPC_PERFMON_SET_EVENT_FUNC) {
-                       retval = perfmon_set_event_func(thr_act, val);
-               }
-               else if(action==PPC_PERFMON_ENABLE_PMI_BRKPT) {
-                       if(val) {
-                               thr_act->mact.perfmonFlags |= PERFMONFLAG_BREAKPOINT_FOR_PMI;
-                       } else {
-                               thr_act->mact.perfmonFlags &= ~PERFMONFLAG_BREAKPOINT_FOR_PMI;
-                       }
-                       retval = KERN_SUCCESS;
-               }
-       
-               /* combinable actions */
-               else {
-                       if(action & PPC_PERFMON_STOP_COUNTERS) {
-                               error = perfmon_stop_counters(thr_act);
-                               if(error!=KERN_SUCCESS) {
-                                       retval = error;
-                                       goto perfmon_return;
-                               }
-                       }
-                       if(action & PPC_PERFMON_CLEAR_COUNTERS) {
-                               error = perfmon_clear_counters(thr_act);
-                               if(error!=KERN_SUCCESS) {
-                                       retval = error;
-                                       goto perfmon_return;
-                               }
-                       }
-                       if(action & PPC_PERFMON_WRITE_COUNTERS) {
-                               if(error = copyin((void *)usr_pmcs_p, (void *)kern_pmcs, MAX_CPUPMC_COUNT*sizeof(uint64_t))) {
-                                       retval = error;
-                                       goto perfmon_return;
-                               }
-                               error = perfmon_write_counters(thr_act, kern_pmcs);
-                               if(error!=KERN_SUCCESS) {
-                                       retval = error;
-                                       goto perfmon_return;
-                               }
-                       }
-                       if(action & PPC_PERFMON_READ_COUNTERS) {
-                               error = perfmon_read_counters(thr_act, kern_pmcs);
-                               if(error!=KERN_SUCCESS) {
-                                       retval = error;
-                                       goto perfmon_return;
-                               }
-                               if(error = copyout((void *)kern_pmcs, (void *)usr_pmcs_p, MAX_CPUPMC_COUNT*sizeof(uint64_t))) {
-                                       retval = error;
-                                       goto perfmon_return;
-                               }
-                       }
-                       if(action & PPC_PERFMON_START_COUNTERS) {
-                               error = perfmon_start_counters(thr_act);
-                               if(error!=KERN_SUCCESS) {
-                                       retval = error;
-                                       goto perfmon_return;
-                               }
-                       }
-               }
-       }
-  
- perfmon_return:
-       ml_set_interrupts_enabled(oldlevel);
-
-#ifdef HWPERFMON_DEBUG
-       kprintf("perfmon_control (CPU%d): mmcr0 = %016llX, pmc1=%X pmc2=%X pmc3=%X pmc4=%X pmc5=%X pmc6=%X pmc7=%X pmc8=%X\n", cpu_number(), ssp->save_mmcr0, ssp->save_pmc[PMC_1], ssp->save_pmc[PMC_2], ssp->save_pmc[PMC_3], ssp->save_pmc[PMC_4], ssp->save_pmc[PMC_5], ssp->save_pmc[PMC_6], ssp->save_pmc[PMC_7], ssp->save_pmc[PMC_8]);
-#endif  
-       if(thr_act!=current_act()) {
-               thread_resume(thr_act);
-       }
-
-#ifdef HWPERFMON_DEBUG
-       if(retval!=KERN_SUCCESS) {
-               kprintf("perfmon_control - ERROR: retval=%d\n", retval);
-       }
-#endif /* HWPERFMON_DEBUG */
-
-       ssp->save_r3 = retval;
-       return 1;  /* Return and check for ASTs... */
-}
-
-int perfmon_handle_pmi(struct savearea *ssp)
-{
-       int curPMC;
-       kern_return_t retval = KERN_SUCCESS;
-       thread_act_t thr_act = current_act();
-
-#ifdef HWPERFMON_DEBUG
-               kprintf("perfmon_handle_pmi: got rupt\n");
-#endif
-
-       if(!(thr_act->mact.specFlags & perfMonitor)) { /* perfmon not enabled */
-#ifdef HWPERFMON_DEBUG
-               kprintf("perfmon_handle_pmi: ERROR - perfmon not enabled for this thread\n");
-#endif
-               return KERN_FAILURE;
-       }
-  
-       for(curPMC=0; curPMC<MAX_CPUPMC_COUNT; curPMC++) {
-               if(thr_act->mact.pcb->save_pmc[curPMC] & 0x80000000) {
-                       if(thr_act->mact.pmcovfl[curPMC]==0xFFFFFFFF && (thr_act->mact.perfmonFlags & PERFMONFLAG_BREAKPOINT_FOR_PMI)) {
-                               doexception(EXC_BREAKPOINT, EXC_PPC_PERFMON, (unsigned int)ssp->save_srr0); // pass up a breakpoint exception
-                               return KERN_SUCCESS;
-                       } else {
-                               thr_act->mact.pmcovfl[curPMC]++;
-                               thr_act->mact.pcb->save_pmc[curPMC] = 0;
-                       }
-               }
-       }
-  
-       if(retval==KERN_SUCCESS) {
-               switch(machine_slot[0].cpu_subtype) {
-                       case CPU_SUBTYPE_POWERPC_7450:
-                               {
-                                       ppc32_mmcr0_reg_t mmcr0_reg;
-       
-                                       mmcr0_reg.value = thr_act->mact.pcb->save_mmcr0;
-                                       mmcr0_reg.field.disable_counters_always = FALSE;
-                                       mmcr0_reg.field.enable_pmi = TRUE;
-                                       thr_act->mact.pcb->save_mmcr0 = mmcr0_reg.value;
-                               }
-                               retval = KERN_SUCCESS;
-                               break;
-                       case CPU_SUBTYPE_POWERPC_970:
-                               {
-                                       ppc64_mmcr0_reg_t mmcr0_reg;
-       
-                                       mmcr0_reg.value = thr_act->mact.pcb->save_mmcr0;
-                                       mmcr0_reg.field.disable_counters_always = FALSE;
-                                       mmcr0_reg.field.enable_pmi = TRUE;
-                                       thr_act->mact.pcb->save_mmcr0 = mmcr0_reg.value;
-                               }
-                               retval = KERN_SUCCESS;
-                               break;
-                       default:
-                               retval = KERN_FAILURE;
-                               break;
-               }
-       }
-
-       return retval;
-}
diff --git a/osfmk/ppc/hw_perfmon.h b/osfmk/ppc/hw_perfmon.h
deleted file mode 100644 (file)
index 1f70b32..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-#ifndef _HW_PERFMON_H_
-#define _HW_PERFMON_H_
-
-#ifndef __ppc__
-#error This file is only useful on PowerPC.
-#endif
-
-#define MAX_CPUPMC_COUNT  8
-
-#define PMC_1    0
-#define PMC_2    1
-#define PMC_3    2
-#define PMC_4    3
-#define PMC_5    4
-#define PMC_6    5
-#define PMC_7    6
-#define PMC_8    7
-
-/* these actions can be combined and simultaneously performed with a single call to perfmon_control() */
-typedef enum {
-       PPC_PERFMON_CLEAR_COUNTERS =   0x0002,
-       PPC_PERFMON_START_COUNTERS =   0x0004,
-       PPC_PERFMON_STOP_COUNTERS  =   0x0008,
-       PPC_PERFMON_READ_COUNTERS  =   0x0010,
-       PPC_PERFMON_WRITE_COUNTERS =   0x0020
-} perfmon_multi_action_t;
-
-/* these actions can not be combined and each requires a separate call to perfmon_control() */
-typedef enum {
-       PPC_PERFMON_ENABLE =           0x00010000,
-       PPC_PERFMON_DISABLE =          0x00020000,
-       PPC_PERFMON_SET_EVENT =        0x00030000,
-       PPC_PERFMON_SET_THRESHOLD =    0x00040000,
-       PPC_PERFMON_SET_TBSEL =        0x00050000,
-       PPC_PERFMON_SET_EVENT_FUNC =   0x00060000,
-       PPC_PERFMON_ENABLE_PMI_BRKPT = 0x00070000
-} perfmon_single_action_t;
-
-/* used to select byte lane and speculative events (currently 970 only) */
-typedef enum {                        /* SPECSEL[0:1]  TD_CP_DBGxSEL[0:1]  TTM3SEL[0:1]  TTM1SEL[0:1]  TTM0SEL[0:1] */
-       PPC_PERFMON_FUNC_FPU =         0,   /*           00                  00            00            00            00 */
-       PPC_PERFMON_FUNC_ISU =         1,   /*           00                  00            00            00            01 */
-       PPC_PERFMON_FUNC_IFU =         2,   /*           00                  00            00            00            10 */
-       PPC_PERFMON_FUNC_VMX =         3,   /*           00                  00            00            00            11 */
-       PPC_PERFMON_FUNC_IDU =        64,   /*           00                  01            00            00            00 */
-       PPC_PERFMON_FUNC_GPS =        76,   /*           00                  01            00            11            00 */
-       PPC_PERFMON_FUNC_LSU0 =      128,   /*           00                  10            00            00            00 */
-       PPC_PERFMON_FUNC_LSU1A =     192,   /*           00                  11            00            00            00 */
-       PPC_PERFMON_FUNC_LSU1B =     240,   /*           00                  11            11            00            00 */
-       PPC_PERFMON_FUNC_SPECA =     256,   /*           01                  00            00            00            00 */
-       PPC_PERFMON_FUNC_SPECB =     512,   /*           10                  00            00            00            00 */
-       PPC_PERFMON_FUNC_SPECC =     768,   /*           11                  00            00            00            00 */
-} perfmon_functional_unit_t;
-
-#ifdef MACH_KERNEL_PRIVATE
-int perfmon_acquire_facility(task_t task);
-int perfmon_release_facility(task_t task);
-
-extern int perfmon_disable(thread_act_t thr_act);
-extern int perfmon_init(void);
-extern int perfmon_control(struct savearea *save);
-extern int perfmon_handle_pmi(struct savearea *ssp);
-
-/* perfmonFlags */
-#define PERFMONFLAG_BREAKPOINT_FOR_PMI     0x1
-
-#endif /* MACH_KERNEL_PRIVATE */
-
-/* 
- * From user space:
- * 
- * int perfmon_control(thread_t thread, perfmon_action_t action, int pmc, u_int32_t val, u_int64_t *pmcs);
- * 
- * r3: thread
- * r4: action
- * r5: pmc
- * r6: event/threshold/tbsel/count
- * r7: pointer to space for PMC counts: uint64_t[MAX_CPUPMC_COUNT]
- *
- * perfmon_control(thread, PPC_PERFMON_CLEAR_COUNTERS, 0, 0, NULL);
- * perfmon_control(thread, PPC_PERFMON_START_COUNTERS, 0, 0, NULL);
- * perfmon_control(thread, PPC_PERFMON_STOP_COUNTERS, 0, 0, NULL);
- * perfmon_control(thread, PPC_PERFMON_READ_COUNTERS, 0, 0, uint64_t *pmcs);
- * perfmon_control(thread, PPC_PERFMON_WRITE_COUNTERS, 0, 0, uint64_t *pmcs);
- * perfmon_control(thread, PPC_PERFMON_ENABLE, 0, 0, NULL);
- * perfmon_control(thread, PPC_PERFMON_DISABLE, 0, 0, NULL);
- * perfmon_control(thread, PPC_PERFMON_SET_EVENT, int pmc, int event, NULL);
- * perfmon_control(thread, PPC_PERFMON_SET_THRESHOLD, 0, int threshold, NULL);
- * perfmon_control(thread, PPC_PERFMON_SET_TBSEL, 0, int tbsel, NULL);
- * perfmon_control(thread, PPC_PERFMON_SET_EVENT_FUNC, 0, perfmon_functional_unit_t func, NULL);
- * perfmon_control(thread, PPC_PERFMON_ENABLE_PMI_BRKPT, 0, boolean_t enable, NULL);
- *
- */
-
-#endif /* _HW_PERFMON_H_ */
diff --git a/osfmk/ppc/hw_perfmon_mmcr.h b/osfmk/ppc/hw_perfmon_mmcr.h
deleted file mode 100644 (file)
index 13d636d..0000000
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-#ifndef _HW_PERFMON_MMCR_H_
-#define _HW_PERFMON_MMCR_H_
-
-#ifndef __ppc__
-#error This file is only useful on PowerPC.
-#endif
-
-typedef struct {
-       uint32_t disable_counters_always : 1;     /*     0: disable counters */
-       uint32_t disable_counters_supervisor : 1; /*     1: disable counters (supervisor) */
-       uint32_t disable_counters_user : 1;       /*     2: disable counters (user) */
-       uint32_t disable_counters_marked : 1;     /*     3: disable counters (marked bit == 1) */
-       uint32_t disable_counters_unmarked : 1;   /*     4: disable counters (marked bit == 0) */
-       uint32_t enable_pmi : 1;                  /*     5: performance monitor interrupt enable */
-       uint32_t on_pmi_stop_counting : 1;        /*     6: disable counters (pmi) */
-       uint32_t timebase_bit_selector : 2;       /*   7-8: TBL bit for TB events */
-       uint32_t enable_timebase_pmi : 1;         /*     9: enable pmi on TBL bit transition */
-       uint32_t threshold_value : 6;             /* 10-15: threshold value */
-       uint32_t enable_pmi_on_pmc1 : 1;          /*    16: enable pmi on pmc1 overflow */
-       uint32_t enable_pmi_on_pmcn : 1;          /*    17: enable pmi on any pmc except pmc1 overflow */
-       uint32_t enable_pmi_trigger : 1;          /*    18: enable triggering of pmcn by pmc1 overflow */
-       uint32_t pmc1_event : 7;                  /* 19-25: pmc1 event select */
-       uint32_t pmc2_event : 6;                  /* 26-31: pmc2 event select */
-} ppc32_mmcr0_bits_t;
-
-typedef union {
-       uint32_t value;
-       ppc32_mmcr0_bits_t field;
-} ppc32_mmcr0_reg_t;
-
-typedef struct {
-       uint32_t pmc3_event : 5;
-       uint32_t pmc4_event : 5;
-       uint32_t pmc5_event : 5;
-       uint32_t pmc6_event : 6;
-       uint32_t /*reserved*/ : 11;
-} ppc32_mmcr1_bits_t;
-
-typedef union {
-       uint32_t value;
-       ppc32_mmcr1_bits_t field;
-} ppc32_mmcr1_reg_t;
-
-typedef struct {
-       uint32_t threshold_multiplier : 1;
-       uint32_t /*reserved*/ : 31;
-} ppc32_mmcr2_bits_t;
-
-typedef union {
-       uint32_t value;
-       ppc32_mmcr2_bits_t field;
-} ppc32_mmcr2_reg_t;
-
-typedef struct {
-       uint32_t /* reserved */ : 32;             /*  0-31: reserved */
-       uint32_t disable_counters_always : 1;     /*    32: disable counters */
-       uint32_t disable_counters_supervisor : 1; /*    33: disable counters (supervisor) */
-       uint32_t disable_counters_user : 1;       /*    34: disable counters (user) */
-       uint32_t disable_counters_marked : 1;     /*    35: disable counters (marked bit == 1) */
-       uint32_t disable_counters_unmarked : 1;   /*    36: disable counters (marked bit == 0) */
-       uint32_t enable_pmi : 1;                  /*    37: performance monitor interrupt enable */
-       uint32_t on_pmi_stop_counting : 1;        /*    38: disable counters (pmi) */
-       uint32_t timebase_bit_selector : 2;       /* 39-40: TBL bit for timebase events */
-       uint32_t enable_timebase_pmi : 1;         /*    41: enable pmi on TBL bit transition */
-       uint32_t threshold_value : 6;             /* 42-47: threshold value */
-       uint32_t enable_pmi_on_pmc1 : 1;          /*    48: enable pmi on pmc1 overflow */
-       uint32_t enable_pmi_on_pmcn : 1;          /*    49: enable pmi on any pmc except pmc1 overflow */
-       uint32_t enable_pmi_trigger : 1;          /*    50: enable triggering of pmcn by pmc1 overflow */
-       uint32_t pmc1_event : 5;                  /* 51-55: pmc1 event select */
-       uint32_t perfmon_event_occurred : 1;      /*    56: performance monitor event has occurred */
-       uint32_t /* reserved */ : 1;              /*    57: reserved */
-       uint32_t pmc2_event : 5;                  /* 58-62: pmc2 event select */
-       uint32_t disable_counters_hypervisor : 1; /*    63: disable counters (hypervisor) */
-} ppc64_mmcr0_bits_t;
-
-typedef union {
-       uint64_t value;
-       ppc64_mmcr0_bits_t field;
-} ppc64_mmcr0_reg_t;
-
-typedef struct {
-       uint32_t ttm0_select : 2;                 /*   0-1: FPU/ISU/IFU/VMX unit select */
-       uint32_t /* reserved */ : 1;              /*     2: reserved */
-       uint32_t ttm1_select : 2;                 /*   3-4: IDU/ISU/ISU unit select */
-       uint32_t /* reserved */ : 1;              /*     5: reserved */
-       uint32_t ttm2_select : 2;                 /*   6-7: IFU/LSU0 unit select */
-       uint32_t /* reserved */ : 1;              /*     8: reserved */
-       uint32_t ttm3_select : 2;                 /*  9-10: LSU1 select */
-       uint32_t /* reserved */ : 1;              /*    11: reserved */
-       uint32_t lane0_select : 2;                /* 12-13: Byte lane 0 unit select (TD_CP_DBG0SEL) */
-       uint32_t lane1_select : 2;                /* 14-15: Byte lane 1 unit select (TD_CP_DBG1SEL) */
-       uint32_t lane2_select : 2;                /* 16-17: Byte lane 2 unit select (TD_CP_DBG2SEL) */
-       uint32_t lane3_select : 2;                /* 18-19: Byte lane 3 unit select (TD_CP_DBG3SEL) */
-       uint32_t /* reserved */ : 4;              /* 20-23: reserved */
-       uint32_t pmc1_adder_lane_select : 1;      /*    24: PMC1 Event Adder Lane Select (PMC1_ADDER_SELECT) */
-       uint32_t pmc2_adder_lane_select : 1;      /*    25: PMC2 Event Adder Lane Select (PMC2_ADDER_SELECT) */
-       uint32_t pmc6_adder_lane_select : 1;      /*    26: PMC6 Event Adder Lane Select (PMC6_ADDER_SELECT) */
-       uint32_t pmc5_adder_lane_select : 1;      /*    27: PMC5 Event Adder Lane Select (PMC5_ADDER_SELECT) */
-       uint32_t pmc8_adder_lane_select : 1;      /*    28: PMC8 Event Adder Lane Select (PMC8_ADDER_SELECT) */
-       uint32_t pmc7_adder_lane_select : 1;      /*    29: PMC7 Event Adder Lane Select (PMC7_ADDER_SELECT) */
-       uint32_t pmc3_adder_lane_select : 1;      /*    30: PMC3 Event Adder Lane Select (PMC3_ADDER_SELECT) */
-       uint32_t pmc4_adder_lane_select : 1;      /*    31: PMC4 Event Adder Lane Select (PMC4_ADDER_SELECT) */
-       uint32_t pmc3_event : 5;                  /* 32-36: pmc3 event select */
-       uint32_t pmc4_event : 5;                  /* 37-41: pmc4 event select */
-       uint32_t pmc5_event : 5;                  /* 42-46: pmc5 event select */
-       uint32_t pmc6_event : 5;                  /* 47-51: pmc6 event select */
-       uint32_t pmc7_event : 5;                  /* 52-56: pmc7 event select */
-       uint32_t pmc8_event : 5;                  /* 57-61: pmc8 event select */
-       uint32_t speculative_event : 2;           /* 62-63: SPeCulative count event SELector */
-} ppc64_mmcr1_bits_t;
-
-typedef union {
-       uint64_t value;
-       ppc64_mmcr1_bits_t field;
-} ppc64_mmcr1_reg_t;
-
-typedef struct {
-       uint32_t /* reserved */ : 32;             /*  0-31: reserved */
-       uint32_t siar_sdar_same_instruction : 1;  /*    32: SIAR and SDAR are from same instruction */
-       uint32_t disable_counters_pmc1_pmc4 : 1;  /*    33: disable counters PMC1-PMC4 */
-       uint32_t disable_counters_pmc5_pmc8 : 1;  /*    34: disable counters PMC5-PMC8 */
-       uint32_t problem_state_siar : 1;          /*    35: MSR[PR] bit when SIAR set */
-       uint32_t hypervisor_state_siar : 1;       /*    36: MSR[HV] bit when SIAR set */
-       uint32_t /* reserved */ : 3;              /* 37-39: reserved */
-       uint32_t threshold_start_event : 3;       /* 40-42: threshold start event */
-       uint32_t threshold_end_event : 3;         /* 43-45: threshold end event */
-       uint32_t /* reserved */ : 3;              /* 46-48: reserved */
-       uint32_t imr_select : 1;                  /*    49: imr select */
-       uint32_t imr_mark : 2;                    /* 50-51: imr mark */
-       uint32_t imr_mask : 4;                    /* 52-55: imr mask */
-       uint32_t imr_match : 4;                   /* 56-59: imr match */
-       uint32_t disable_counters_tags_inactive : 1; /* 60: disable counters in tags inactive mode */
-       uint32_t disable_counters_tags_active : 1; /*   61: disable counters in tags active mode */
-       uint32_t disable_counters_wait_state : 1; /*    62: freeze counters in wait state (CNTL[31]=0) */
-       uint32_t sample_enable : 1;               /*    63: sampling enabled */
-} ppc64_mmcra_bits_t;
-
-typedef union {
-       uint64_t value;
-       ppc64_mmcra_bits_t field;
-} ppc64_mmcra_reg_t;
-
-/* PPC_PERFMON_FUNC_* values are taken apart to fill in the appropriate configuration bitfields: */
-typedef struct {
-       uint32_t /* reserved */ : 22;
-       uint32_t SPECSEL : 2;
-       uint32_t TD_CP_DBGxSEL : 2;
-       uint32_t TTM3SEL : 2;
-       uint32_t TTM1SEL : 2;
-       uint32_t TTM0SEL : 2;
-} ppc_func_bits_t;
-
-typedef union {
-       uint32_t value;
-       ppc_func_bits_t field;
-} ppc_func_unit_t;
-
-#endif /* _HW_PERFMON_MMCR_H_ */
index b5839084f97d8c5eda8f0711bbf9713857057892..640a637f68a7b35a77fed5bcb0283c4b92dcc0cd 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #include <ppc/exception.h>
 #include <ppc/Performance.h>
 #include <ppc/exception.h>
+#include <ppc/pmap_internals.h>
 #include <mach/ppc/vm_param.h>
-
-#define INSTRUMENT 0
+#define PERFTIMES 0
        
                        .text
 
-;
-;                                     0        0        1        2        3        4        4        5      6
-;                                     0        8        6        4        2        0        8        6      3 
-;                                    +--------+--------+--------+--------+--------+--------+--------+--------+
-;                                    |00000000|00000SSS|SSSSSSSS|SSSSSSSS|SSSSPPPP|PPPPPPPP|PPPPxxxx|xxxxxxxx|          - EA
-;                                    +--------+--------+--------+--------+--------+--------+--------+--------+
-;
-;                                                       0        0        1
-;                                                       0        8        6      
-;                                                      +--------+--------+--------+
-;                                                      |//////BB|BBBBBBBB|BBBB////|                                     - SID - base
-;                                                      +--------+--------+--------+
-;
-;                                     0        0        1
-;                                     0        8        6      
-;                                    +--------+--------+--------+
-;                                    |////////|11111111|111111//|                                                       - SID - copy 1
-;                                    +--------+--------+--------+
-;
-;                   0        0        1
-;                   0        8        6      
-;                  +--------+--------+--------+
-;                  |////////|//222222|22222222|                                                                         - SID - copy 2
-;                  +--------+--------+--------+
-;
-;          0        0        1
-;          0        8        6      
-;         +--------+--------+--------+
-;         |//////33|33333333|33//////|                                                                                  - SID - copy 3 - not needed
-;         +--------+--------+--------+                                                                                         for 65 bit VPN
-;
-;                   0        0        1        2        3        4        4  5   5  
-;                   0        8        6        4        2        0        8  1   5  
-;                  +--------+--------+--------+--------+--------+--------+--------+
-;                  |00000000|00000002|22222222|11111111|111111BB|BBBBBBBB|BBBB////|                                     - SID Hash - this is all
-;                  +--------+--------+--------+--------+--------+--------+--------+                                           SID copies ORed
-;                   0        0        1        2        3        4        4  5   5  
-;                   0        8        6        4        2        0        8  1   5  
-;                  +--------+--------+--------+--------+--------+--------+--------+
-;                  |00000000|0000000S|SSSSSSSS|SSSSSSSS|SSSSSS00|00000000|0000////|                                      - Shifted high order EA
-;                  +--------+--------+--------+--------+--------+--------+--------+                                           left shifted "segment"
-;                                                                                                                             part of EA to make
-;                                                                                                                             room for SID base
-;
-;
-;                   0        0        1        2        3        4        4  5   5  
-;                   0        8        6        4        2        0        8  1   5  
-;                  +--------+--------+--------+--------+--------+--------+--------+
-;                  |00000000|0000000V|VVVVVVVV|VVVVVVVV|VVVVVVVV|VVVVVVVV|VVVV////|                                     - VSID - SID Hash XORed
-;                  +--------+--------+--------+--------+--------+--------+--------+                                            with shifted EA
-;
-;                   0        0        1        2        3        4        4        5        6        7      7
-;                   0        8        6        4        2        0        8        6        4        2      9
-;                  +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
-;                  |00000000|0000000V|VVVVVVVV|VVVVVVVV|VVVVVVVV|VVVVVVVV|VVVVPPPP|PPPPPPPP|PPPPxxxx|xxxxxxxx|          - VPN
-;                  +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
-;
+/*
+ *
+ *                     Random notes and musings...
+ *
+ *                     Access to mappings via the PTEG hash must be done with the list locked.
+ *                     Access via the physical entries is controlled by the physent lock.
+ *                     Access to mappings is controlled by the PTEG lock once they are queued.
+ *                     If they are not on the list, they don't really exist, so
+ *                     only one processor at a time can find them, so no access control is needed. 
+ *
+ *                     The second half of the PTE is kept in the physical entry.  It is done this
+ *                     way, because there may be multiple mappings that refer to the same physical
+ *                     page (i.e., address aliases or synonymns).  We must do it this way, because
+ *                     maintenance of the reference and change bits becomes nightmarish if each mapping
+ *                     has its own. One side effect of this, and not necessarily a bad one, is that
+ *                     all mappings for a single page can have a single WIMG, protection state, and RC bits.
+ *                     The only "bad" thing, is the reference bit.  With a single copy, we can not get
+ *                     a completely accurate working set calculation, i.e., we can't tell which mapping was
+ *                     used to reference the page, all we can tell is that the physical page was 
+ *                     referenced.
+ *
+ *                     The master copys of the reference and change bits are kept in the phys_entry.
+ *                     Other than the reference and change bits, changes to the phys_entry are not
+ *                     allowed if it has any mappings.  The master reference and change bits must be
+ *                     changed via atomic update.
+ *
+ *                     Invalidating a PTE merges the RC bits into the phys_entry.
+ *
+ *                     Before checking the reference and/or bits, ALL mappings to the physical page are
+ *                     invalidated.
+ *                     
+ *                     PTEs are never explicitly validated, they are always faulted in.  They are also
+ *                     not visible outside of the hw_vm modules.  Complete seperation of church and state.
+ *
+ *                     Removal of a mapping is invalidates its PTE.
+ *
+ *                     So, how do we deal with mappings to I/O space? We don't have a physent for it.
+ *                     Within the mapping is a copy of the second half of the PTE.  This is used
+ *                     ONLY when there is no physical entry.  It is swapped into the PTE whenever
+ *                     it is built.  There is no need to swap it back out, because RC is not
+ *                     maintained for these mappings.
+ *
+ *                     So, I'm starting to get concerned about the number of lwarx/stcwx loops in
+ *                     this.  Satisfying a mapped address with no stealing requires one lock.  If we 
+ *                     steal an entry, there's two locks and an atomic update.  Invalidation of an entry
+ *                     takes one lock and, if there is a PTE, another lock and an atomic update.  Other 
+ *                     operations are multiples (per mapping) of the above.  Maybe we should look for
+ *                     an alternative.  So far, I haven't found one, but I haven't looked hard.
+ */
 
 
-/*                     addr64_t hw_add_map(struct pmap *pmap, struct mapping *mp) - Adds a mapping
+/*                     hw_add_map(struct mapping *mp, space_t space, vm_offset_t va) - Adds a mapping
  *
- *                     Maps a page or block into a pmap
+ *                     Adds a mapping to the PTEG hash list.
  *
- *                     Returns 0 if add worked or the vaddr of the first overlap if not
+ *                     Interrupts must be disabled before calling.
+ *
+ *                     Using the space and the virtual address, we hash into the hash table
+ *                     and get a lock on the PTEG hash chain.  Then we chain the 
+ *                     mapping to the front of the list.
  *
- * Make mapping - not block or I/O - note: this is low-level, upper should remove duplicates
- *  
- *  1) bump mapping busy count
- *  2) lock pmap share
- *  3) find mapping full path - finds all possible list previous elements
- *  4) upgrade pmap to exclusive
- *  5) add mapping to search list
- *  6) find physent
- *  7) lock physent
- *  8) add to physent
- *  9) unlock physent
- * 10) unlock pmap
- * 11) drop mapping busy count
- * 
- * 
- * Make mapping - block or I/O - note: this is low-level, upper should remove duplicates
- *  
- *  1) bump mapping busy count
- *  2) lock pmap share
- *  3) find mapping full path - finds all possible list previous elements
- *  4) upgrade pmap to exclusive
- *  5) add mapping to search list
- *  6) unlock pmap
- *  7) drop mapping busy count
- * 
  */
 
                        .align  5
                        .globl  EXT(hw_add_map)
 
 LEXT(hw_add_map)
-                       
-                       stwu    r1,-(FM_ALIGN((31-17+1)*4)+FM_SIZE)(r1) ; Make some space on the stack
-                       mflr    r0                                                      ; Save the link register
-                       stw             r17,FM_ARG0+0x00(r1)            ; Save a register
-                       stw             r18,FM_ARG0+0x04(r1)            ; Save a register
-                       stw             r19,FM_ARG0+0x08(r1)            ; Save a register
-                       mfsprg  r19,2                                           ; Get feature flags 
-                       stw             r20,FM_ARG0+0x0C(r1)            ; Save a register
-                       stw             r21,FM_ARG0+0x10(r1)            ; Save a register
-                       mtcrf   0x02,r19                                        ; move pf64Bit cr6
-                       stw             r22,FM_ARG0+0x14(r1)            ; Save a register
-                       stw             r23,FM_ARG0+0x18(r1)            ; Save a register
-                       stw             r24,FM_ARG0+0x1C(r1)            ; Save a register
-                       stw             r25,FM_ARG0+0x20(r1)            ; Save a register
-                       stw             r26,FM_ARG0+0x24(r1)            ; Save a register
-                       stw             r27,FM_ARG0+0x28(r1)            ; Save a register
-                       stw             r28,FM_ARG0+0x2C(r1)            ; Save a register
-                       stw             r29,FM_ARG0+0x30(r1)            ; Save a register
-                       stw             r30,FM_ARG0+0x34(r1)            ; Save a register
-                       stw             r31,FM_ARG0+0x38(r1)            ; Save a register
-                       stw             r0,(FM_ALIGN((31-17+1)*4)+FM_SIZE+FM_LR_SAVE)(r1)       ; Save the return
-
-                       rlwinm  r11,r4,0,0,19                           ; Round down to get mapping block address
-                       mr              r28,r3                                          ; Save the pmap
-                       mr              r31,r4                                          ; Save the mapping
-                       bt++    pf64Bitb,hamSF1                         ; skip if 64-bit (only they take the hint)
-                       lwz             r20,pmapvr+4(r3)                        ; Get conversion mask for pmap
-                       lwz             r21,mbvrswap+4(r11)                     ; Get conversion mask for mapping
-
-                       b               hamSF1x                                         ; Done...
-                       
-hamSF1:                ld              r20,pmapvr(r3)                          ; Get conversion mask for pmap
-                       ld              r21,mbvrswap(r11)                       ; Get conversion mask for mapping
-
-hamSF1x:       bl              EXT(mapSetUp)                           ; Turn off interrupts, translation, and possibly enter 64-bit
-                       
-                       mr              r17,r11                                         ; Save the MSR
-                       xor             r28,r28,r20                                     ; Convert the pmap to physical addressing
-                       xor             r31,r31,r21                                     ; Convert the mapping to physical addressing
-                       
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkShared                                      ; Go get a shared lock on the mapping lists
-                       mr.             r3,r3                                           ; Did we get the lock?
-                       lwz             r24,mpFlags(r31)                        ; Pick up the flags
-                       bne--   hamBadLock                                      ; Nope...
-
-                       li              r21,0                                           ; Remember that we have the shared lock
-                       
-;
-;                      Note that we do a full search (i.e., no shortcut level skips, etc.)
-;                      here so that we will know the previous elements so we can dequeue them
-;                      later.
-;
 
-hamRescan:     lwz             r4,mpVAddr(r31)                         ; Get the new vaddr top half
-                       lwz             r5,mpVAddr+4(r31)                       ; Get the new vaddr bottom half
-                       mr              r3,r28                                          ; Pass in pmap to search
-                       lhz             r23,mpBSize(r31)                        ; Get the block size for later
-                       mr              r29,r4                                          ; Save top half of vaddr for later
-                       mr              r30,r5                                          ; Save bottom half of vaddr for later
-                       
-#if INSTRUMENT
-                       mfspr   r0,pmc1                                         ; INSTRUMENT - saveinstr[16] - Take stamp before mapSearchFull
-                       stw             r0,0x6100+(16*16)+0x0(0)        ; INSTRUMENT - Save it
-                       mfspr   r0,pmc2                                         ; INSTRUMENT - Get stamp
-                       stw             r0,0x6100+(16*16)+0x4(0)        ; INSTRUMENT - Save it
-                       mfspr   r0,pmc3                                         ; INSTRUMENT - Get stamp
-                       stw             r0,0x6100+(16*16)+0x8(0)        ; INSTRUMENT - Save it
-                       mfspr   r0,pmc4                                         ; INSTRUMENT - Get stamp
-                       stw             r0,0x6100+(16*16)+0xC(0)        ; INSTRUMENT - Save it
-#endif                 
-                       
-                       bl              EXT(mapSearchFull)                      ; Go see if we can find it
-                       
-#if INSTRUMENT
-                       mfspr   r0,pmc1                                         ; INSTRUMENT - saveinstr[14] - Take stamp after mapSearchFull
-                       stw             r0,0x6100+(17*16)+0x0(0)        ; INSTRUMENT - Save it
-                       mfspr   r0,pmc2                                         ; INSTRUMENT - Get stamp
-                       stw             r0,0x6100+(17*16)+0x4(0)        ; INSTRUMENT - Save it
-                       mfspr   r0,pmc3                                         ; INSTRUMENT - Get stamp
-                       stw             r0,0x6100+(17*16)+0x8(0)        ; INSTRUMENT - Save it
-                       mfspr   r0,pmc4                                         ; INSTRUMENT - Get stamp
-                       stw             r0,0x6100+(17*16)+0xC(0)        ; INSTRUMENT - Save it
-#endif                 
-                       
-                       andi.   r0,r24,mpNest                           ; See if we are a nest
-                       rlwinm  r23,r23,12,0,19                         ; Convert standard block size to bytes
-                       lis             r0,0x8000                                       ; Get 0xFFFFFFFF80000000
-                       li              r22,0                                           ; Assume high part of size is 0
-                       beq++   hamNoNest                                       ; This is not a nest...
-                       
-                       rlwinm  r22,r23,16,16,31                        ; Convert partially converted size to segments
-                       rlwinm  r23,r23,16,0,3                          ; Finish shift
-                       
-hamNoNest:     add             r0,r0,r0                                        ; Get 0xFFFFFFFF00000000 for 64-bit or 0 for 32-bit
-                       mr.             r3,r3                                           ; Did we find a mapping here?
-                       or              r0,r0,r30                                       ; Make sure a carry will propagate all the way in 64-bit
-                       crmove  cr5_eq,cr0_eq                           ; Remember that if we found the mapping
-                       addc    r9,r0,r23                                       ; Add size to get last page in new range
-                       or.             r0,r4,r5                                        ; Are we beyond the end?
-                       adde    r8,r29,r22                                      ; Add the rest of the length on
-                       bne--   cr5,hamOverlay                          ; Yeah, this is no good, can not double map...
-                       rlwinm  r9,r9,0,0,31                            ; Clean top half of sum
-                       beq++   hamFits                                         ; We are at the end...
-                       
-                       cmplw   cr1,r9,r5                                       ; Is the bottom part of our end less?
-                       cmplw   r8,r4                                           ; Is our end before the next (top part)
-                       crand   cr0_eq,cr0_eq,cr1_lt            ; Is the second half less and the first half equal?
-                       cror    cr0_eq,cr0_eq,cr0_lt            ; Or is the top half less
-                       
-                       bf--    cr0_eq,hamOverlay                       ; No, we do fit, there is an overlay...
-                       
-;
-;                      Here we try to convert to an exclusive lock.  This will fail if someone else
-;                      has it shared.
-;
-hamFits:       mr.             r21,r21                                         ; Do we already have the exclusive lock?                        
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
+#if PERFTIMES && DEBUG
+                       mr              r7,r3
+                       mflr    r11
+                       li              r3,20
+                       bl              EXT(dbgLog2)                                            ; Start of hw_add_map
+                       mr              r3,r7
+                       mtlr    r11
+#endif
+
+                       mfmsr   r0                                                      /* Get the MSR */
+                       eqv             r6,r6,r6                                        /* Fill the bottom with foxes */
+                       rlwinm  r0,r0,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r11,r4,6,6,25                           /* Position the space for the VSID */
+                       mfspr   r10,sdr1                                        /* Get hash table base and size */
+                       rlwinm  r0,r0,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwimi  r11,r5,30,2,5                           /* Insert the segment no. to make a VSID */
+                       mfsprg  r12,2                                           ; Get feature flags
+                       rlwimi  r6,r10,16,0,15                          /* Make table size -1 out of mask */
+                       rlwinm  r7,r5,26,10,25                          /* Isolate the page index */
+                       or              r8,r10,r6                                       /* Point to the last byte in table */
+                       rlwinm  r9,r5,4,0,3                                     ; Move nybble 1 up to 0
+                       xor             r7,r7,r11                                       /* Get primary hash */
+                       mtcrf   0x04,r12                                        ; Set the features                      
+                       andi.   r12,r0,0x7FCF                           /* Disable translation and interruptions */
+                       rlwinm  r11,r11,1,1,24                          /* Position VSID for pte ID */
+                       addi    r8,r8,1                                         /* Point to the PTEG Control Area */
+                       xor             r9,r9,r5                                        ; Splooch vaddr nybble 0 and 1 together
+                       and             r7,r7,r6                                        /* Wrap the hash */
+                       rlwimi  r11,r5,10,26,31                         /* Move API into pte ID */
+                       rlwinm  r9,r9,6,27,29                           ; Get splooched bits in place
+                       add             r8,r8,r7                                        /* Point to our PCA entry */
+                       rlwinm  r10,r4,2,27,29                          ; Get low 3 bits of the VSID for look-aside hash
+                       
+                       bt              pfNoMSRirb,hamNoMSR                     ; No MSR...
+
+                       mtmsr   r12                                                     ; Translation and all off
+                       isync                                                           ; Toss prefetch
+                       b               hamNoMSRx
                        
-                       bne--   hamGotX                                         ; We already have the exclusive...
+hamNoMSR:      mr              r4,r0                                           ; Save R0
+                       mr              r2,r3                                           ; Save
+                       li              r0,loadMSR                                      ; Get the MSR setter SC
+                       mr              r3,r12                                          ; Get new MSR
+                       sc                                                                      ; Set it
+                       mr              r0,r4                                           ; Restore
+                       mr              r3,r2                                           ; Restore
+hamNoMSRx:
+
+                       la              r4,PCAhash(r8)                          /* Point to the mapping hash area */
+                       xor             r9,r9,r10                                       ; Finish splooching nybble 0, 1, and the low bits of the VSID
+                       isync                                                           /* Get rid of anything prefetched before we ref storage */
+/*
+ *                     We've now got the address of our PCA, the hash chain anchor, our API subhash,
+ *                     and word 0 of the PTE (the virtual part). 
+ *
+ *                     Now, we just lock the PCA.              
+ */
                        
-                       bl              sxlkPromote                                     ; Try to promote shared to exclusive
-                       mr.             r3,r3                                           ; Could we?
-                       beq++   hamGotX                                         ; Yeah...
+                       li              r12,1                                           /* Get the locked value */
+                       dcbt    0,r4                                            /* We'll need the hash area in a sec, so get it */
+                       add             r4,r4,r9                                        /* Point to the right mapping hash slot */
+                       
+ptegLckx:      lwarx   r10,0,r8                                        /* Get the PTEG lock */
+                       mr.             r10,r10                                         /* Is it locked? */
+                       bne-    ptegLckwx                                       /* Yeah... */
+                       stwcx.  r12,0,r8                                        /* Take take it */
+                       bne-    ptegLckx                                        /* Someone else was trying, try again... */
+                       b               ptegSXgx                                        /* All done... */
+
+                       .align  4
+                       
+ptegLckwx:     mr.             r10,r10                                         /* Check if it's already held */
+                       beq+    ptegLckx                                        /* It's clear... */
+                       lwz             r10,0(r8)                                       /* Get lock word again... */
+                       b               ptegLckwx                                       /* Wait... */
+                       
+                       .align  4
+                       
+ptegSXgx:      isync                                                           /* Make sure we haven't used anything yet */
+
+                       lwz             r7,0(r4)                                        /* Pick up the anchor of hash list */
+                       stw             r3,0(r4)                                        /* Save the new head */
+                       stw             r7,mmhashnext(r3)                       /* Chain in the old head */
+                       
+                       stw             r4,mmPTEhash(r3)                        /* Point to the head of the hash list */
+                       
+                       sync                                                            /* Make sure the chain is updated */
+                       stw             r10,0(r8)                                       /* Unlock the hash list */
+                       mtmsr   r0                                                      /* Restore translation and interruptions */
+                       isync                                                           /* Toss anything done with DAT off */
+#if PERFTIMES && DEBUG
+                       mflr    r11
+                       mr              r4,r3
+                       li              r3,21
+                       bl              EXT(dbgLog2)                            ; end of hw_add_map
+                       mr              r3,r4
+                       mtlr    r11
+#endif
+                       blr                                                                     /* Leave... */
+
+
+/*                     mp=hw_lock_phys_vir(space, va) - Finds and locks a physical entry by vaddr.
+ *
+ *                     Returns the mapping with the associated physent locked if found, or a
+ *                     zero and no lock if not.  It we timed out trying to get a the lock on
+ *                     the physical entry, we retun a 1.  A physical entry can never be on an
+ *                     odd boundary, so we can distinguish between a mapping and a timeout code.
+ *
+ *                     Interrupts must be disabled before calling.
+ *
+ *                     Using the space and the virtual address, we hash into the hash table
+ *                     and get a lock on the PTEG hash chain.  Then we search the chain for the
+ *                     mapping for our virtual address.  From there, we extract the pointer to
+ *                     the physical entry.
+ *
+ *                     Next comes a bit of monkey business.  we need to get a lock on the physical
+ *                     entry.  But, according to our rules, we can't get it after we've gotten the
+ *                     PTEG hash lock, we could deadlock if we do.  So, we need to release the
+ *                     hash lock.  The problem is, though, that as soon as we release it, some 
+ *                     other yahoo may remove our mapping between the time that we release the
+ *                     hash lock and obtain the phys entry lock.  So, we can't count on the 
+ *                     mapping once we release the lock.  Instead, after we lock the phys entry,
+ *                     we search the mapping list (phys_link) for our translation.  If we don't find it,
+ *                     we unlock the phys entry, bail out, and return a 0 for the mapping address.  If we 
+ *                     did find it, we keep the lock and return the address of the mapping block.
+ *
+ *                     What happens when a mapping is found, but there is no physical entry?
+ *                     This is what happens when there is I/O area mapped.  It one of these mappings
+ *                     is found, the mapping is returned, as is usual for this call, but we don't
+ *                     try to lock anything.  There could possibly be some problems here if another
+ *                     processor releases the mapping while we still alre using it.  Hope this 
+ *                     ain't gonna happen.
+ *
+ *                     Taaa-dahhh!  Easy as pie, huh?
+ *
+ *                     So, we have a few hacks hacks for running translate off in here. 
+ *                     First, when we call the lock routine, we have carnel knowlege of the registers is uses. 
+ *                     That way, we don't need a stack frame, which we can't have 'cause the stack is in
+ *                     virtual storage.  But wait, as if that's not enough...  We need one more register.  So, 
+ *                     we cram the LR into the CTR and return from there.
+ *
+ */
+                       .align  5
+                       .globl  EXT(hw_lock_phys_vir)
+
+LEXT(hw_lock_phys_vir)
+
+#if PERFTIMES && DEBUG
+                       mflr    r11
+                       mr              r5,r3
+                       li              r3,22
+                       bl              EXT(dbgLog2)                                            ; Start of hw_add_map
+                       mr              r3,r5
+                       mtlr    r11
+#endif
+                       mfmsr   r12                                                     /* Get the MSR */
+                       eqv             r6,r6,r6                                        /* Fill the bottom with foxes */
+                       mfsprg  r9,2                                            ; Get feature flags 
+                       rlwinm  r11,r3,6,6,25                           /* Position the space for the VSID */
+                       rlwinm  r12,r12,0,MSR_FP_BIT+1,MSR_FP_BIT-1     ; Force floating point off
+                       mfspr   r5,sdr1                                         /* Get hash table base and size */
+                       rlwimi  r11,r4,30,2,5                           /* Insert the segment no. to make a VSID */
+                       mtcrf   0x04,r9                                         ; Set the features                      
+                       rlwinm  r12,r12,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1   ; Force vectors off
+                       rlwimi  r6,r5,16,0,15                           /* Make table size -1 out of mask */
+                       andi.   r0,r12,0x7FCF                           /* Disable translation and interruptions */
+                       rlwinm  r9,r4,4,0,3                                     ; Move nybble 1 up to 0
+                       rlwinm  r7,r4,26,10,25                          /* Isolate the page index */
+                       or              r8,r5,r6                                        /* Point to the last byte in table */
+                       xor             r7,r7,r11                                       /* Get primary hash */
+                       rlwinm  r11,r11,1,1,24                          /* Position VSID for pte ID */
+                       addi    r8,r8,1                                         /* Point to the PTEG Control Area */
+                       xor             r9,r9,r4                                        ; Splooch vaddr nybble 0 and 1 together
+                       and             r7,r7,r6                                        /* Wrap the hash */
+                       rlwimi  r11,r4,10,26,31                         /* Move API into pte ID */
+                       rlwinm  r9,r9,6,27,29                           ; Get splooched bits in place
+                       add             r8,r8,r7                                        /* Point to our PCA entry */
+                       rlwinm  r10,r3,2,27,29                          ; Get low 3 bits of the VSID for look-aside hash
+
+                       bt              pfNoMSRirb,hlpNoMSR                     ; No MSR...
+
+                       mtmsr   r0                                                      ; Translation and all off
+                       isync                                                           ; Toss prefetch
+                       b               hlpNoMSRx
                        
-;
-;                      Since we could not promote our lock, we need to convert to it.
-;                      That means that we drop the shared lock and wait to get it
-;                      exclusive.  Since we release the lock, we need to do the look up
-;                      again.
-;                      
+hlpNoMSR:      mr              r3,r0                                           ; Get the new MSR
+                       li              r0,loadMSR                                      ; Get the MSR setter SC
+                       sc                                                                      ; Set it
+hlpNoMSRx:
+
+                       la              r3,PCAhash(r8)                          /* Point to the mapping hash area */
+                       xor             r9,r9,r10                                       ; Finish splooching nybble 0, 1, and the low bits of the VSID
+                       isync                                                           /* Make sure translation is off before we ref storage */
+
+/*
+ *                     We've now got the address of our PCA, the hash chain anchor, our API subhash,
+ *                     and word 0 of the PTE (the virtual part). 
+ *
+ *                     Now, we just lock the PCA and find our mapping, if it exists.                           
+ */
                        
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkConvert                                     ; Convert shared to exclusive
-                       mr.             r3,r3                                           ; Could we?
-                       bne--   hamBadLock                                      ; Nope, we must have timed out...
+                       dcbt    0,r3                                            /* We'll need the hash area in a sec, so get it */
+                       add             r3,r3,r9                                        /* Point to the right mapping hash slot */
                        
-                       li              r21,1                                           ; Remember that we have the exclusive lock
-                       b               hamRescan                                       ; Go look again...
+ptegLcka:      lwarx   r10,0,r8                                        /* Get the PTEG lock */
+                       li              r5,1                                            /* Get the locked value */
+                       mr.             r10,r10                                         /* Is it locked? */
+                       bne-    ptegLckwa                                       /* Yeah... */
+                       stwcx.  r5,0,r8                                         /* Take take it */
+                       bne-    ptegLcka                                        /* Someone else was trying, try again... */
+                       b               ptegSXga                                        /* All done... */
                        
-                       .align  5
+                       .align  4
 
-hamGotX:       
-#if INSTRUMENT
-                       mfspr   r3,pmc1                                         ; INSTRUMENT - saveinstr[18] - Take stamp before mapSearchFull
-                       stw             r3,0x6100+(18*16)+0x0(0)        ; INSTRUMENT - Save it
-                       mfspr   r3,pmc2                                         ; INSTRUMENT - Get stamp
-                       stw             r3,0x6100+(18*16)+0x4(0)        ; INSTRUMENT - Save it
-                       mfspr   r3,pmc3                                         ; INSTRUMENT - Get stamp
-                       stw             r3,0x6100+(18*16)+0x8(0)        ; INSTRUMENT - Save it
-                       mfspr   r3,pmc4                                         ; INSTRUMENT - Get stamp
-                       stw             r4,0x6100+(18*16)+0xC(0)        ; INSTRUMENT - Save it
-#endif                 
-                       mr              r3,r28                                          ; Get the pmap to insert into
-                       mr              r4,r31                                          ; Point to the mapping
-                       bl              EXT(mapInsert)                          ; Insert the mapping into the list
-
-#if INSTRUMENT
-                       mfspr   r4,pmc1                                         ; INSTRUMENT - saveinstr[19] - Take stamp before mapSearchFull
-                       stw             r4,0x6100+(19*16)+0x0(0)        ; INSTRUMENT - Save it
-                       mfspr   r4,pmc2                                         ; INSTRUMENT - Get stamp
-                       stw             r4,0x6100+(19*16)+0x4(0)        ; INSTRUMENT - Save it
-                       mfspr   r4,pmc3                                         ; INSTRUMENT - Get stamp
-                       stw             r4,0x6100+(19*16)+0x8(0)        ; INSTRUMENT - Save it
-                       mfspr   r4,pmc4                                         ; INSTRUMENT - Get stamp
-                       stw             r4,0x6100+(19*16)+0xC(0)        ; INSTRUMENT - Save it
-#endif                 
-       
-                       lhz             r8,mpSpace(r31)                         ; Get the address space
-                       mfsdr1  r7                                                      ; Get the hash table base/bounds
-                       lwz             r4,pmapResidentCnt(r28)         ; Get the mapped page count 
-                       andi.   r0,r24,mpNest|mpBlock           ; Is this a nest or block?
-
-                       rlwimi  r8,r8,14,4,17                           ; Double address space
-                       rlwinm  r9,r30,20,16,31                         ; Isolate the page number
-                       rlwinm  r10,r30,18,14,17                        ; Shift EA[32:35] down to correct spot in VSID (actually shift up 14)
-                       rlwimi  r8,r8,28,0,3                            ; Get the last nybble of the hash
-                       rlwimi  r10,r29,18,0,13                         ; Shift EA[18:31] down to VSID (31-bit math works because of max hash table size)                       
-                       rlwinm  r7,r7,0,16,31                           ; Isolate length mask (or count)
-                       addi    r4,r4,1                                         ; Bump up the mapped page count
-                       xor             r10,r10,r8                                      ; Calculate the low 32 bits of the VSID
-                       stw             r4,pmapResidentCnt(r28)         ; Set the mapped page count 
-                       xor             r9,r9,r10                                       ; Get the hash to the PTEG
-                       
-                       bne--   hamDoneNP                                       ; This is a block or nest, therefore, no physent...
-                       
-                       bl              mapPhysFindLock                         ; Go find and lock the physent
-                       
-                       bt++    pf64Bitb,ham64                          ; This is 64-bit...
-                       
-                       lwz             r11,ppLink+4(r3)                        ; Get the alias chain pointer
-                       rlwinm  r7,r7,16,0,15                           ; Get the PTEG wrap size
-                       slwi    r9,r9,6                                         ; Make PTEG offset
-                       ori             r7,r7,0xFFC0                            ; Stick in the bottom part
-                       rlwinm  r12,r11,0,0,25                          ; Clean it up
-                       and             r9,r9,r7                                        ; Wrap offset into table
-                       mr              r4,r31                                          ; Set the link to install
-                       stw             r9,mpPte(r31)                           ; Point the mapping at the PTEG (exact offset is invalid)
-                       stw             r12,mpAlias+4(r31)                      ; Move to the mapping
-                       bl              mapPhyCSet32                            ; Install the link
-                       b               hamDone                                         ; Go finish up...
+ptegLckwa:     mr.             r10,r10                                         /* Check if it's already held */
+                       beq+    ptegLcka                                        /* It's clear... */
+                       lwz             r10,0(r8)                                       /* Get lock word again... */
+                       b               ptegLckwa                                       /* Wait... */
                        
-                       .align  5
-                       
-ham64:         li              r0,0xFF                                         ; Get mask to clean up alias pointer
-                       subfic  r7,r7,46                                        ; Get number of leading zeros
-                       eqv             r4,r4,r4                                        ; Get all ones
-                       ld              r11,ppLink(r3)                          ; Get the alias chain pointer
-                       rldicl  r0,r0,62,0                                      ; Rotate clean up mask to get 0xC0000000000000003F
-                       srd             r4,r4,r7                                        ; Get the wrap mask
-                       sldi    r9,r9,7                                         ; Change hash to PTEG offset
-                       andc    r11,r11,r0                                      ; Clean out the lock and flags
-                       and             r9,r9,r4                                        ; Wrap to PTEG
-                       mr              r4,r31
-                       stw             r9,mpPte(r31)                           ; Point the mapping at the PTEG (exact offset is invalid)
-                       std             r11,mpAlias(r31)                        ; Set the alias pointer in the mapping
-
-                       bl              mapPhyCSet64                            ; Install the link
-                                               
-hamDone:       bl              mapPhysUnlock                           ; Unlock the physent chain
+                       .align  4
 
-hamDoneNP:     la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkUnlock                                      ; Unlock the search list
+ptegSXga:      isync                                                           /* Make sure we haven't used anything yet */
 
-                       mr              r3,r31                                          ; Get the mapping pointer
-                       bl              mapDropBusy                                     ; Drop the busy count
+                       mflr    r0                                                      /* Get the LR */
+                       lwz             r9,0(r3)                                        /* Pick up the first mapping block */
+                       mtctr   r0                                                      /* Stuff it into the CTR */
                        
-                       li              r3,0                                            ; Set successful return
-                       li              r4,0                                            ; Set successful return
-
-hamReturn:     bt++    pf64Bitb,hamR64                         ; Yes...
+findmapa:      
 
-                       mtmsr   r17                                                     ; Restore enables/translation/etc.
-                       isync
-                       b               hamReturnC                                      ; Join common...
+                       mr.             r3,r9                                           /* Did we hit the end? */
+                       bne+    chkmapa                                         /* Nope... */
+                       
+                       stw             r3,0(r8)                                        /* Unlock the PTEG lock
+                                                                                                  Note: we never saved anything while we 
+                                                                                                  had the lock, so we don't need a sync 
+                                                                                                  before we unlock it */
 
-hamR64:                mtmsrd  r17                                                     ; Restore enables/translation/etc.
-                       isync                                                           
+vbail:         mtmsr   r12                                                     /* Restore translation and interruptions */
+                       isync                                                           /* Make sure translation is cool */
+#if PERFTIMES && DEBUG
+                       mflr    r11
+                       mr              r4,r3
+                       li              r3,23
+                       bl              EXT(dbgLog2)                            ; Start of hw_add_map
+                       mr              r3,r4
+                       mtlr    r11
+#endif
+                       bctr                                                            /* Return in abject failure... */
+                       
+                       .align  4
+
+chkmapa:       lwz             r10,mmPTEv(r3)                          /* Pick up our virtual ID */
+                       lwz             r9,mmhashnext(r3)                       /* Pick up next mapping block */
+                       cmplw   r10,r11                                         /* Have we found ourself? */
+                       bne-    findmapa                                        /* Nope, still wandering... */
+                       
+                       lwz             r9,mmphysent(r3)                        /* Get our physical entry pointer */
+                       li              r5,0                                            /* Clear this out */
+                       mr.             r9,r9                                           /* Is there, like, a physical entry? */
+                       stw             r5,0(r8)                                        /* Unlock the PTEG lock
+                                                                                                  Note: we never saved anything while we 
+                                                                                                  had the lock, so we don't need a sync 
+                                                                                                  before we unlock it */
+                                                                                                  
+                       beq-    vbail                                           /* If there is no physical entry, it's time
+                                                                                                  to leave... */
+                                                                                                  
+/*                     Here we want to call hw_lock_bit.  We don't want to use the stack, 'cause it's
+ *                     in virtual storage, and we're in real.  So, we've carefully looked at the code
+ *                     in hw_lock_bit (and unlock) and cleverly don't use any of the registers that it uses.
+ *                     Be very, very aware of how you change this code.  By the way, it uses:
+ *                     R0, R6, R7, R8, and R9.  R3, R4, and R5 contain parameters
+ *                     Unfortunatly, we need to stash R9 still. So... Since we know we will not be interrupted
+ *                     ('cause we turned off interruptions and translation is off) we will use SPRG3...
+ */
+                       lwz             r10,mmPTEhash(r3)                       /* Save the head of the hash-alike chain.  We need it to find ourselves later */
+                       lis             r5,HIGH_ADDR(EXT(LockTimeOut))  /* Get address of timeout value */
+                       la              r3,pephyslink(r9)                       /* Point to the lock word */
+                       ori             r5,r5,LOW_ADDR(EXT(LockTimeOut))        /* Get second half of address */
+                       li              r4,PHYS_LOCK                            /* Get the lock bit value */
+                       lwz             r5,0(r5)                                        /* Pick up the timeout value */
+                       mtsprg  3,r9                                            /* Save R9 in SPRG3 */
                        
-hamReturnC:    
-#if INSTRUMENT
-                       mfspr   r0,pmc1                                         ; INSTRUMENT - saveinstr[20] - Take stamp before mapSearchFull
-                       stw             r0,0x6100+(20*16)+0x0(0)        ; INSTRUMENT - Save it
-                       mfspr   r0,pmc2                                         ; INSTRUMENT - Get stamp
-                       stw             r0,0x6100+(20*16)+0x4(0)        ; INSTRUMENT - Save it
-                       mfspr   r0,pmc3                                         ; INSTRUMENT - Get stamp
-                       stw             r0,0x6100+(20*16)+0x8(0)        ; INSTRUMENT - Save it
-                       mfspr   r0,pmc4                                         ; INSTRUMENT - Get stamp
-                       stw             r0,0x6100+(20*16)+0xC(0)        ; INSTRUMENT - Save it
-#endif                 
-                       lwz             r0,(FM_ALIGN((31-17+1)*4)+FM_SIZE+FM_LR_SAVE)(r1)       ; Get the return
-                       lwz             r17,FM_ARG0+0x00(r1)            ; Save a register
-                       lwz             r18,FM_ARG0+0x04(r1)            ; Save a register
-                       lwz             r19,FM_ARG0+0x08(r1)            ; Save a register
-                       lwz             r20,FM_ARG0+0x0C(r1)            ; Save a register
-                       mtlr    r0                                                      ; Restore the return
-                       lwz             r21,FM_ARG0+0x10(r1)            ; Save a register
-                       lwz             r22,FM_ARG0+0x14(r1)            ; Save a register
-                       lwz             r23,FM_ARG0+0x18(r1)            ; Save a register
-                       lwz             r24,FM_ARG0+0x1C(r1)            ; Save a register
-                       lwz             r25,FM_ARG0+0x20(r1)            ; Save a register
-                       lwz             r26,FM_ARG0+0x24(r1)            ; Save a register
-                       lwz             r27,FM_ARG0+0x28(r1)            ; Save a register
-                       lwz             r28,FM_ARG0+0x2C(r1)            ; Save a register
-                       lwz             r29,FM_ARG0+0x30(r1)            ; Save a register
-                       lwz             r30,FM_ARG0+0x34(r1)            ; Save a register
-                       lwz             r31,FM_ARG0+0x38(r1)            ; Save a register
-                       lwz             r1,0(r1)                                        ; Pop the stack
+                       bl              EXT(hw_lock_bit)                        /* Go do the lock */
                        
-                       blr                                                                     ; Leave...
+                       mfsprg  r9,3                                            /* Restore pointer to the phys_entry */         
+                       mr.             r3,r3                                           /* Did we timeout? */
+                       lwz             r4,pephyslink(r9)                       /* Pick up first mapping block */               
+                       beq-    penterr                                         /* Bad deal, we timed out... */
 
+                       rlwinm  r4,r4,0,0,26                            ; Clear out the flags from first link
                        
-                       .align  5
-
-hamOverlay:    lwz             r22,mpFlags(r3)                         ; Get the overlay flags
-                       li              r0,mpC|mpR                                      ; Get a mask to turn off RC bits
-                       lwz             r23,mpFlags(r31)                        ; Get the requested flags
-                       lwz             r20,mpVAddr(r3)                         ; Get the overlay address
-                       lwz             r8,mpVAddr(r31)                         ; Get the requested address
-                       lwz             r21,mpVAddr+4(r3)                       ; Get the overlay address
-                       lwz             r9,mpVAddr+4(r31)                       ; Get the requested address
-                       lhz             r10,mpBSize(r3)                         ; Get the overlay length
-                       lhz             r11,mpBSize(r31)                        ; Get the requested length
-                       lwz             r24,mpPAddr(r3)                         ; Get the overlay physical address
-                       lwz             r25,mpPAddr(r31)                        ; Get the requested physical address
-                       andc    r21,r21,r0                                      ; Clear RC bits
-                       andc    r9,r9,r0                                        ; Clear RC bits
-
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkUnlock                                      ; Unlock the search list
-
-                       rlwinm. r0,r22,0,mpRIPb,mpRIPb          ; Are we in the process of removing this one?
-                       mr              r3,r20                                          ; Save the top of the colliding address
-                       rlwinm  r4,r21,0,0,19                           ; Save the bottom of the colliding address
-
-                       bne++   hamRemv                                         ; Removing, go say so so we help...
-                       
-                       cmplw   r20,r8                                          ; High part of vaddr the same?
-                       cmplw   cr1,r21,r9                                      ; Low part?
-                       crand   cr5_eq,cr0_eq,cr1_eq            ; Remember if same
-                       
-                       cmplw   r10,r11                                         ; Size the same?
-                       cmplw   cr1,r24,r25                                     ; Physical address?
-                       crand   cr5_eq,cr5_eq,cr0_eq            ; Remember
-                       crand   cr5_eq,cr5_eq,cr1_eq            ; Remember if same
-                       
-                       xor             r23,r23,r22                                     ; Check for differences in flags
-                       ori             r23,r23,mpFIP                           ; "Fault in Progress" is ok to be different
-                       xori    r23,r23,mpFIP                           ; Force mpFIP off
-                       rlwinm. r0,r23,0,mpSpecialb,mpListsb-1  ; See if any important flags are different
-                       crand   cr5_eq,cr5_eq,cr0_eq            ; Merge in final check
-                       bf--    cr5_eq,hamReturn                        ; This is not the same, so we just return a collision...
-                       
-                       ori             r4,r4,mapRtMapDup                       ; Set duplicate
-                       b               hamReturn                                       ; And leave...
-                       
-hamRemv:       ori             r4,r4,mapRtRemove                       ; We are in the process of removing the collision
-                       b               hamReturn                                       ; Come back yall...
-
-                       .align  5
+findmapb:      mr.             r3,r4                                           /* Did we hit the end? */
+                       bne+    chkmapb                                         /* Nope... */
                        
-hamBadLock:    li              r3,0                                            ; Set lock time out error code
-                       li              r4,mapRtBadLk                           ; Set lock time out error code
-                       b               hamReturn                                       ; Leave....
+                       la              r3,pephyslink(r9)                       /* Point to where the lock is */                                                
+                       li              r4,PHYS_LOCK                            /* Get the lock bit value */
+                       bl              EXT(hw_unlock_bit)                      /* Go unlock the physentry */
 
+                       li              r3,0                                            /* Say we failed */                     
+                       b               vbail                                           /* Return in abject failure... */
+                       
+penterr:       li              r3,1                                            /* Set timeout */
+                       b               vbail                                           /* Return in abject failure... */
+                                       
+                       .align  5
 
+chkmapb:       lwz             r6,mmPTEv(r3)                           /* Pick up our virtual ID */
+                       lwz             r4,mmnext(r3)                           /* Pick up next mapping block */
+                       cmplw   r6,r11                                          /* Have we found ourself? */
+                       lwz             r5,mmPTEhash(r3)                        /* Get the start of our hash chain */
+                       bne-    findmapb                                        /* Nope, still wandering... */
+                       cmplw   r5,r10                                          /* On the same hash chain? */
+                       bne-    findmapb                                        /* Nope, keep looking... */
 
+                       b               vbail                                           /* Return in glorious triumph... */
 
 
 /*
- *                     mapping *hw_rem_map(pmap, vaddr, addr64_t *next) - remove a mapping from the system.
+ *                     hw_rem_map(mapping) - remove a mapping from the system.
  *
- *                     Upon entry, R3 contains a pointer to a pmap.  Since vaddr is
- *                     a 64-bit quantity, it is a long long so it is in R4 and R5.
- *                     
- *                     We return the virtual address of the removed mapping as a 
- *                     R3.
+ *                     Upon entry, R3 contains a pointer to a mapping block and the associated
+ *                     physical entry is locked if there is one.
+ *
+ *                     If the mapping entry indicates that there is a PTE entry, we invalidate
+ *                     if and merge the reference and change information into the phys_entry.
  *
- *                     Note that this is designed to be called from 32-bit mode with a stack.
+ *                     Next, we remove the mapping from the phys_ent and the PTEG hash list.
  *
- *                     We disable translation and all interruptions here.  This keeps is
- *                     from having to worry about a deadlock due to having anything locked
- *                     and needing it to process a fault.
+ *                     Unlock any locks that are left, and exit.
  *
  *                     Note that this must be done with both interruptions off and VM off
  *     
- *  Remove mapping via pmap, regular page, no pte
- * 
- *  1) lock pmap share
- *  2) find mapping full path - finds all possible list previous elements
- *  4) upgrade pmap to exclusive
- *  3) bump mapping busy count
- *  5) remove mapping from search list
- *  6) unlock pmap
- *  7) lock physent
- *  8) remove from physent
- *  9) unlock physent
- * 10) drop mapping busy count
- * 11) drain mapping busy count
- * 
- * 
- * Remove mapping via pmap, regular page, with pte
- * 
- *  1) lock pmap share
- *  2) find mapping full path - finds all possible list previous elements
- *  3) upgrade lock to exclusive
- *  4) bump mapping busy count
- *  5) lock PTEG
- *  6) invalidate pte and tlbie
- *  7) atomic merge rc into physent
- *  8) unlock PTEG
- *  9) remove mapping from search list
- * 10) unlock pmap
- * 11) lock physent
- * 12) remove from physent
- * 13) unlock physent
- * 14) drop mapping busy count
- * 15) drain mapping busy count
- * 
- * 
- * Remove mapping via pmap, I/O or block
- * 
- *  1) lock pmap share
- *  2) find mapping full path - finds all possible list previous elements
- *  3) upgrade lock to exclusive
- *  4) bump mapping busy count
- *     5) mark remove-in-progress
- *     6) check and bump remove chunk cursor if needed
- *     7) unlock pmap
- *     8) if something to invalidate, go to step 11
-
- *     9) drop busy
- * 10) return with mapRtRemove to force higher level to call again
- * 11) Lock PTEG
- * 12) invalidate ptes, no tlbie
- * 13) unlock PTEG
- * 14) repeat 11 - 13 for all pages in chunk
- * 15) if not final chunk, go to step 9
- * 16) invalidate tlb entries for the whole block map but no more than the full tlb
- * 17) lock pmap share
- * 18) find mapping full path - finds all possible list previous elements
- * 19) upgrade lock to exclusive
- * 20) remove mapping from search list
- * 21) drop mapping busy count
- * 22) drain mapping busy count
- *     
+ *                     Note that this code depends upon the VSID being of the format 00SXXXXX
+ *                     where S is the segment number.
+ *
+ *                       
  */
 
                        .align  5
                        .globl  EXT(hw_rem_map)
 
 LEXT(hw_rem_map)
+#if PERFTIMES && DEBUG
+                       mflr    r11
+                       mr              r4,r3
+                       li              r3,24
+                       bl              EXT(dbgLog2)                            ; Start of hw_add_map
+                       mr              r3,r4
+                       mtlr    r11
+#endif
+                       mfsprg  r9,2                                            ; Get feature flags 
+                       mfmsr   r0                                                      /* Save the MSR  */
+                       rlwinm  r0,r0,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r0,r0,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r12,r0,0,MSR_EE_BIT+1,MSR_EE_BIT-1      /* Clear interruptions */
+                       mtcrf   0x04,r9                                         ; Set the features                      
+                       rlwinm  r12,r12,0,28,25                         /* Clear IR and DR */
 
-;
-;                      NOTE NOTE NOTE - IF WE CHANGE THIS STACK FRAME STUFF WE NEED TO CHANGE
-;                      THE HW_PURGE_* ROUTINES ALSO
-;
+                       bt              pfNoMSRirb,lmvNoMSR                     ; No MSR...
+
+                       mtmsr   r12                                                     ; Translation and all off
+                       isync                                                           ; Toss prefetch
+                       b               lmvNoMSRx
+                       
+lmvNoMSR:      
+                       mr              r6,r0
+                       mr              r4,r3
+                       li              r0,loadMSR                                      ; Get the MSR setter SC
+                       mr              r3,r12                                          ; Get new MSR
+                       sc                                                                      ; Set it
+                       mr              r3,r4
+                       mr              r0,r6
 
-#define hrmStackSize ((31-15+1)*4)+4
-                       stwu    r1,-(FM_ALIGN(hrmStackSize)+FM_SIZE)(r1)        ; Make some space on the stack
-                       mflr    r0                                                      ; Save the link register
-                       stw             r15,FM_ARG0+0x00(r1)            ; Save a register
-                       stw             r16,FM_ARG0+0x04(r1)            ; Save a register
-                       stw             r17,FM_ARG0+0x08(r1)            ; Save a register
-                       stw             r18,FM_ARG0+0x0C(r1)            ; Save a register
-                       stw             r19,FM_ARG0+0x10(r1)            ; Save a register
-                       mfsprg  r19,2                                           ; Get feature flags 
-                       stw             r20,FM_ARG0+0x14(r1)            ; Save a register
-                       stw             r21,FM_ARG0+0x18(r1)            ; Save a register
-                       mtcrf   0x02,r19                                        ; move pf64Bit cr6
-                       stw             r22,FM_ARG0+0x1C(r1)            ; Save a register
-                       stw             r23,FM_ARG0+0x20(r1)            ; Save a register
-                       stw             r24,FM_ARG0+0x24(r1)            ; Save a register
-                       stw             r25,FM_ARG0+0x28(r1)            ; Save a register
-                       stw             r26,FM_ARG0+0x2C(r1)            ; Save a register
-                       stw             r27,FM_ARG0+0x30(r1)            ; Save a register
-                       stw             r28,FM_ARG0+0x34(r1)            ; Save a register
-                       stw             r29,FM_ARG0+0x38(r1)            ; Save a register
-                       stw             r30,FM_ARG0+0x3C(r1)            ; Save a register
-                       stw             r31,FM_ARG0+0x40(r1)            ; Save a register
-                       stw             r6,FM_ARG0+0x44(r1)                     ; Save address to save next mapped vaddr
-                       stw             r0,(FM_ALIGN(hrmStackSize)+FM_SIZE+FM_LR_SAVE)(r1)      ; Save the return
-
-                       bt++    pf64Bitb,hrmSF1                         ; skip if 64-bit (only they take the hint)
-                       lwz             r9,pmapvr+4(r3)                         ; Get conversion mask
-                       b               hrmSF1x                                         ; Done...
-                       
-hrmSF1:                ld              r9,pmapvr(r3)                           ; Get conversion mask
-
-hrmSF1x:       
-                       bl              EXT(mapSetUp)                           ; Turn off interrupts, translation, and possibly enter 64-bit
-                       
-                       xor             r28,r3,r9                                       ; Convert the pmap to physical addressing
+lmvNoMSRx:
 
-;
-;                      Here is where we join in from the hw_purge_* routines
-;
+               
+                       lwz             r6,mmPTEhash(r3)                        /* Get pointer to hash list anchor */
+                       lwz             r5,mmPTEv(r3)                           /* Get the VSID */
+                       dcbt    0,r6                                            /* We'll need that chain in a bit */
 
-hrmJoin:       mfsprg  r19,2                                           ; Get feature flags again (for alternate entries)
+                       rlwinm  r7,r6,0,0,25                            /* Round hash list down to PCA boundary */
+                       li              r12,1                                           /* Get the locked value */
+                       subi    r6,r6,mmhashnext                        /* Make the anchor look like an entry */
 
-                       mr              r17,r11                                         ; Save the MSR
-                       mr              r29,r4                                          ; Top half of vaddr
-                       mr              r30,r5                                          ; Bottom half of vaddr
-                       
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkShared                                      ; Go get a shared lock on the mapping lists
-                       mr.             r3,r3                                           ; Did we get the lock?
-                       bne--   hrmBadLock                                      ; Nope...
+ptegLck1:      lwarx   r10,0,r7                                        /* Get the PTEG lock */
+                       mr.             r10,r10                                         /* Is it locked? */
+                       bne-    ptegLckw1                                       /* Yeah... */
+                       stwcx.  r12,0,r7                                        /* Try to take it */
+                       bne-    ptegLck1                                        /* Someone else was trying, try again... */
+                       b               ptegSXg1                                        /* All done... */
                        
-;
-;                      Note that we do a full search (i.e., no shortcut level skips, etc.)
-;                      here so that we will know the previous elements so we can dequeue them
-;                      later. Note: we get back mpFlags in R7.
-;
+                       .align  4
 
-                       mr              r3,r28                                          ; Pass in pmap to search
-                       mr              r4,r29                                          ; High order of address
-                       mr              r5,r30                                          ; Low order of address
-                       bl              EXT(mapSearchFull)                      ; Go see if we can find it
-                       
-                       andi.   r0,r7,lo16(mpPerm|mpSpecial|mpNest)     ; Is this nested, special, or a perm mapping?
-                       mr              r20,r7                                          ; Remember mpFlags
-                       rlwinm  r0,r7,0,mpRemovableb,mpRemovableb       ; Are we allowed to remove it?
-                       crmove  cr5_eq,cr0_eq                           ; Remember if we should remove this
-                       mr.             r31,r3                                          ; Did we? (And remember mapping address for later)
-                       cmplwi  cr1,r0,0                                        ; Are we allowed to remove?
-                       mr              r15,r4                                          ; Save top of next vaddr
-                       crorc   cr5_eq,cr5_eq,cr1_eq            ; cr5_eq is true if this is not removable
-                       mr              r16,r5                                          ; Save bottom of next vaddr
-                       beq             hrmNotFound                                     ; Nope, not found...
-                       
-                       bf--    cr5_eq,hrmPerm                          ; This one can't be removed...
-;
-;                      Here we try to promote to an exclusive lock.  This will fail if someone else
-;                      has it shared.
-;
+ptegLckw1:     mr.             r10,r10                                         /* Check if it's already held */
+                       beq+    ptegLck1                                        /* It's clear... */
+                       lwz             r10,0(r7)                                       /* Get lock word again... */
+                       b               ptegLckw1                                       /* Wait... */
                        
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkPromote                                     ; Try to promote shared to exclusive
-                       mr.             r3,r3                                           ; Could we?
-                       beq++   hrmGotX                                         ; Yeah...
-                       
-;
-;                      Since we could not promote our lock, we need to convert to it.
-;                      That means that we drop the shared lock and wait to get it
-;                      exclusive.  Since we release the lock, we need to do the look up
-;                      again.
-;                      
-                       
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkConvert                                     ; Convert shared to exclusive
-                       mr.             r3,r3                                           ; Could we?
-                       bne--   hrmBadLock                                      ; Nope, we must have timed out...
-                       
-                       mr              r3,r28                                          ; Pass in pmap to search
-                       mr              r4,r29                                          ; High order of address
-                       mr              r5,r30                                          ; Low order of address
-                       bl              EXT(mapSearchFull)                      ; Rescan the list
-                       
-                       andi.   r0,r7,lo16(mpPerm|mpSpecial|mpNest)     ; Is this nested, special, or a perm mapping?
-                       rlwinm  r0,r7,0,mpRemovableb,mpRemovableb       ; Are we allowed to remove it?
-                       crmove  cr5_eq,cr0_eq                           ; Remember if we should remove this
-                       mr.             r31,r3                                          ; Did we lose it when we converted?
-                       cmplwi  cr1,r0,0                                        ; Are we allowed to remove?
-                       mr              r20,r7                                          ; Remember mpFlags
-                       crorc   cr5_eq,cr5_eq,cr1_eq            ; cr5_eq is true if this is not removable
-                       mr              r15,r4                                          ; Save top of next vaddr
-                       mr              r16,r5                                          ; Save bottom of next vaddr
-                       beq--   hrmNotFound                                     ; Yeah, we did, someone tossed it for us...
-               
-                       bf--    cr5_eq,hrmPerm                          ; This one can't be removed...
+                       .align  4
 
-;
-;                      We have an exclusive lock on the mapping chain. And we
-;                      also have the busy count bumped in the mapping so it can
-;                      not vanish on us.
-;
+ptegSXg1:      isync                                                           /* Make sure we haven't used anything yet */
+
+                       lwz             r12,mmhashnext(r3)                      /* Prime with our forward pointer */
+                       lwz             r4,mmPTEent(r3)                         /* Get the pointer to the PTE now that the lock's set */
 
-hrmGotX:       mr              r3,r31                                          ; Get the mapping
-                       bl              mapBumpBusy                                     ; Bump up the busy count
+srchmaps:      mr.             r10,r6                                          /* Save the previous entry */
+                       bne+    mapok                                           /* No error... */
                        
-;
-;                      Invalidate any PTEs associated with this
-;                      mapping (more than one if a block) and accumulate the reference
-;                      and change bits.
-;
-;                      Here is also where we need to split 32- and 64-bit processing
-;
+                       lis             r0,HIGH_ADDR(Choke)                     /* We have a kernel choke!!! */
+                       ori             r0,r0,LOW_ADDR(Choke)           
+                       sc                                                                      /* Firmware Heimlich manuever */
 
-                       lwz             r21,mpPte(r31)                          ; Grab the offset to the PTE
-                       rlwinm  r23,r29,0,1,0                           ; Copy high order vaddr to high if 64-bit machine
-                       mfsdr1  r29                                                     ; Get the hash table base and size
-                       rlwinm  r0,r20,0,mpBlockb,mpBlockb      ; Is this a block mapping?
-                       andi.   r2,r20,lo16(mpSpecial|mpNest)   ; Is this nest or special mapping?
-                       cmplwi  cr5,r0,0                                        ; Remember if this is a block mapping
-                       rlwinm  r0,r21,0,mpHValidb,mpHValidb    ; See if we actually have a PTE
-                       ori             r2,r2,0xFFFF                            ; Get mask to clean out hash table base (works for both 32- and 64-bit)
-                       cmpwi   cr1,r0,0                                        ; Have we made a PTE for this yet? 
-                       rlwinm  r21,r21,0,0,30                          ; Clear out valid bit
-                       crorc   cr0_eq,cr1_eq,cr0_eq            ; No need to look at PTE if none or a special mapping
-                       rlwimi  r23,r30,0,0,31                          ; Insert low under high part of address
-                       andc    r29,r29,r2                                      ; Clean up hash table base
-                       li              r22,0                                           ; Clear this on out (also sets RC to 0 if we bail)
-                       mr              r30,r23                                         ; Move the now merged vaddr to the correct register
-                       add             r26,r29,r21                                     ; Point to the PTEG slot
-                       
-                       bt++    pf64Bitb,hrmSplit64                     ; Go do 64-bit version...
-                       
-                       rlwinm  r9,r21,28,4,29                          ; Convert PTEG to PCA entry
-                       bne-    cr5,hrmBlock32                          ; Go treat block specially...
-                       subfic  r9,r9,-4                                        ; Get the PCA entry offset
-                       bt-             cr0_eq,hrmPysDQ32                       ; Skip next if no possible PTE...
-                       add             r7,r9,r29                                       ; Point to the PCA slot
+                       .align  4                       
 
-       
-                       bl              mapLockPteg                                     ; Go lock up the PTEG (Note: we need to save R6 to set PCA)
-       
-                       lwz             r21,mpPte(r31)                          ; Get the quick pointer again
-                       lwz             r5,0(r26)                                       ; Get the top of PTE
+mapok:         lwz             r6,mmhashnext(r6)                       /* Look at the next one */
+                       cmplwi  cr5,r4,0                                        /* Is there a PTE? */
+                       cmplw   r6,r3                                           /* Have we found ourselves? */
+                       bne+    srchmaps                                        /* Nope, get your head together... */
                        
-                       rlwinm. r0,r21,0,mpHValidb,mpHValidb    ; See if we actually have a PTE
-                       rlwinm  r21,r21,0,0,30                          ; Clear out valid bit
-                       rlwinm  r5,r5,0,1,31                            ; Turn off valid bit in PTE
-                       stw             r21,mpPte(r31)                          ; Make sure we invalidate mpPte, still pointing to PTEG (keep walk_page from making a mistake)
-                       beq-    hrmUlckPCA32                            ; Pte is gone, no need to invalidate...
+                       stw             r12,mmhashnext(r10)                     /* Remove us from the queue */
+                       rlwinm  r9,r5,1,0,3                                     /* Move in the segment */
+                       rlwinm  r8,r4,6,4,19                            /* Line PTEG disp up to a page */
+                       rlwinm  r11,r5,5,4,19                           /* Line up the VSID */
+                       lwz             r10,mmphysent(r3)                       /* Point to the physical entry */
+               
+                       beq+    cr5,nopte                                       /* There's no PTE to invalidate... */
                        
-                       stw             r5,0(r26)                                       ; Invalidate the PTE
+                       xor             r8,r8,r11                                       /* Back hash to virt index */
+                       lis             r12,HIGH_ADDR(EXT(tlb_system_lock))     /* Get the TLBIE lock */
+                       rlwimi  r9,r5,22,4,9                            /* Move in the API */
+                       ori             r12,r12,LOW_ADDR(EXT(tlb_system_lock))  /* Grab up the bottom part */
+                       mfspr   r11,pvr                                         /* Find out what kind of machine we are */
+                       rlwimi  r9,r8,0,10,19                           /* Create the virtual address */
+                       rlwinm  r11,r11,16,16,31                        /* Isolate CPU type */
 
-                       li              r9,tlbieLock                            ; Get the TLBIE lock
+                       stw             r5,0(r4)                                        /* Make the PTE invalid */              
 
-                       sync                                                            ; Make sure the invalid PTE is actually in memory
-       
-hrmPtlb32:     lwarx   r5,0,r9                                         ; Get the TLBIE lock 
-                       mr.             r5,r5                                           ; Is it locked?
-                       li              r5,1                                            ; Get locked indicator
-                       bne-    hrmPtlb32                                       ; It is locked, go spin...
-                       stwcx.  r5,0,r9                                         ; Try to get it
-                       bne-    hrmPtlb32                                       ; We was beat... 
-                       
-                       rlwinm. r0,r19,0,pfSMPcapb,pfSMPcapb    ; Can this processor do SMP?    
-                                       
-                       tlbie   r30                                                     ; Invalidate it all corresponding TLB entries
+                       cmplwi  cr1,r11,3                                       /* Is this a 603? */
+                       sync                                                            /* Make sure the invalid is stored */
+                                               
+tlbhang1:      lwarx   r5,0,r12                                        /* Get the TLBIE lock */
+                       rlwinm  r11,r4,29,29,31                         /* Get the bit position of entry */
+                       mr.             r5,r5                                           /* Is it locked? */
+                       lis             r6,0x8000                                       /* Start up a bit mask */
+                       li              r5,1                                            /* Get our lock word */
+                       bne-    tlbhang1                                        /* It's locked, go wait... */
+                       stwcx.  r5,0,r12                                        /* Try to get it */
+                       bne-    tlbhang1                                        /* We was beat... */
                        
-                       beq-    hrmNTlbs                                        ; Jump if we can not do a TLBSYNC....
+                       srw             r6,r6,r11                                       /* Make a "free slot" mask */
+                       lwz             r5,PCAallo(r7)                          /* Get the allocation control bits */
+                       rlwinm  r11,r6,24,8,15                          /* Make the autogen bit to turn off */
+                       or              r5,r5,r6                                        /* turn on the free bit */
+                       rlwimi  r11,r11,24,16,23                        /* Get lock bit mask to turn it off */
                        
-                       eieio                                                           ; Make sure that the tlbie happens first
-                       tlbsync                                                         ; Wait for everyone to catch up
-                       sync                                                            ; Make sure of it all
-                       
-hrmNTlbs:      li              r0,0                                            ; Clear this 
-                       rlwinm  r2,r21,29,29,31                         ; Get slot number (8 byte entries)
-                       stw             r0,tlbieLock(0)                         ; Clear the tlbie lock
-                       lis             r0,0x8000                                       ; Get bit for slot 0
-                       eieio                                                           ; Make sure those RC bit have been stashed in PTE
-                       
-                       srw             r0,r0,r2                                        ; Get the allocation hash mask
-                       lwz             r22,4(r26)                                      ; Get the latest reference and change bits
-                       or              r6,r6,r0                                        ; Show that this slot is free
-
-hrmUlckPCA32:                  
-                       eieio                                                           ; Make sure all updates come first
-                       stw             r6,0(r7)                                        ; Unlock the PTEG
-               
-;
-;                      Now, it is time to remove the mapping and unlock the chain.
-;                      But first, we need to make sure no one else is using this 
-;                      mapping so we drain the busy now
-;                      
+                       andc    r5,r5,r11                                       /* Turn off the lock and autogen bits in allocation flags */
+                       li              r11,0                                           /* Lock clear value */
 
-hrmPysDQ32:    mr              r3,r31                                          ; Point to the mapping
-                       bl              mapDrainBusy                            ; Go wait until mapping is unused
-
-                       mr              r3,r28                                          ; Get the pmap to remove from
-                       mr              r4,r31                                          ; Point to the mapping
-                       bl              EXT(mapRemove)                          ; Remove the mapping from the list                      
+                       tlbie   r9                                                      /* Invalidate it everywhere */
 
                        
-                       lwz             r4,pmapResidentCnt(r28)         ; Get the mapped page count 
-                       andi.   r0,r20,lo16(mpSpecial|mpNest)   ; Is this nest or special mapping?
-                       cmplwi  cr1,r0,0                                        ; Special thingie?
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       subi    r4,r4,1                                         ; Drop down the mapped page count
-                       stw             r4,pmapResidentCnt(r28)         ; Set the mapped page count 
-                       bl              sxlkUnlock                                      ; Unlock the search list
-
-                       bne--   cr1,hrmRetn32                           ; This one has no real memory associated with it so we are done...
+                       beq-    cr1,its603a                                     /* It's a 603, skip the tlbsync... */
+                       
+                       eieio                                                           /* Make sure that the tlbie happens first */
+                       tlbsync                                                         /* wait for everyone to catch up */
+                       isync                                                           
+                       
+its603a:       sync                                                            /* Make sure of it all */
+                       stw             r11,0(r12)                                      /* Clear the tlbie lock */
+                       eieio                                                           /* Make sure those RC bit are loaded */
+                       stw             r5,PCAallo(r7)                          /* Show that the slot is free */
+                       stw             r11,mmPTEent(r3)                        /* Clear the pointer to the PTE */
 
-                       bl              mapPhysFindLock                         ; Go find and lock the physent
+nopte:         mr.             r10,r10                                         /* See if there is a physical entry */
+                       la              r9,pephyslink(r10)                      /* Point to the physical mapping chain */
+                       beq-    nophys                                          /* No physical entry, we're done... */
+                       beq-    cr5,nadamrg                                     /* No PTE to merge... */
 
-                       lwz             r9,ppLink+4(r3)                         ; Get first mapping
+                       lwz             r6,4(r4)                                        /* Get the latest reference and change bits */
+                       la              r12,pepte1(r10)                         /* Point right at the master copy */
+                       rlwinm  r6,r6,0,23,24                           /* Extract just the RC bits */
 
-                       mr              r4,r22                                          ; Get the RC bits we just got
-                       bl              mapPhysMerge                            ; Go merge the RC bits
-                       
-                       rlwinm  r9,r9,0,0,25                            ; Clear the flags from the mapping pointer
-                       
-                       cmplw   r9,r31                                          ; Are we the first on the list?
-                       bne-    hrmNot1st                                       ; Nope...
-                       
-                       li              r9,0                                            ; Get a 0
-                       lwz             r4,mpAlias+4(r31)                       ; Get our new forward pointer
-                       stw             r9,mpAlias+4(r31)                       ; Make sure we are off the chain
-                       bl              mapPhyCSet32                            ; Go set the physent link and preserve flags                                                            
+mrgrc:         lwarx   r8,0,r12                                        /* Get the master copy */
+                       or              r8,r8,r6                                        /* Merge in latest RC */
+                       stwcx.  r8,0,r12                                        /* Save it back */
+                       bne-    mrgrc                                           /* If it changed, try again... */
                        
-                       b               hrmPhyDQd                                       ; Join up and unlock it all...
+nadamrg:       li              r11,0                                           /* Clear this out */
+                       lwz             r12,mmnext(r3)                          /* Prime with our next */
 
-                       .align  5
-                       
-hrmPerm:       li              r8,-4096                                        ; Get the value we need to round down to a page
-                       and             r8,r8,r31                                       ; Get back to a page
-                       lwz             r8,mbvrswap+4(r8)                       ; Get last half of virtual to real swap
-                       
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkUnlock                                      ; Unlock the search list
-                       
-                       xor             r3,r31,r8                                       ; Flip mapping address to virtual
-                       ori             r3,r3,mapRtPerm                         ; Set permanent mapping error
-                       b               hrmErRtn
+                       sync                                                            ; Make sure all is saved
+
+                       stw             r11,0(r7)                                       /* Unlock the hash chain now so we don't
+                                                                                                  lock out another processor during 
+                                                                                                  our next little search */            
                        
-hrmBadLock:    li              r3,mapRtBadLk                           ; Set bad lock
-                       b               hrmErRtn
+srchpmap:      mr.             r10,r9                                          /* Save the previous entry */
+                       bne+    mapok1                                          /* No error... */
                        
-hrmEndInSight:
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkUnlock                                      ; Unlock the search list
+                       lis             r0,HIGH_ADDR(Choke)                     /* We have a kernel choke!!! */
+                       ori             r0,r0,LOW_ADDR(Choke)                   
+                       sc                                                                      /* Firmware Heimlich maneuver */
                        
-hrmDoneChunk:
-                       mr              r3,r31                                          ; Point to the mapping
-                       bl              mapDropBusy                                     ; Drop the busy here since we need to come back
-                       li              r3,mapRtRemove                          ; Say we are still removing this
-                       b               hrmErRtn
+                       .align  4
 
-                       .align  5
+mapok1:                lwz             r9,mmnext(r9)                           /* Look at the next one */
+                       rlwinm  r8,r9,0,27,31                           ; Save the flags (including the lock)
+                       rlwinm  r9,r9,0,0,26                            ; Clear out the flags from first link
+                       cmplw   r9,r3                                           /* Have we found ourselves? */
+                       bne+    srchpmap                                        /* Nope, get your head together... */
                        
-hrmNotFound:
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkUnlock                                      ; Unlock the search list
-                       li              r3,0                                            ; Make sure we know we did not find it
+                       rlwimi  r12,r8,0,27,31                          ; Insert the lock and flags */
+                       stw             r12,mmnext(r10)                         /* Remove us from the queue */
+                       
+                       mtmsr   r0                                                      /* Interrupts and translation back on */
+                       isync
+#if PERFTIMES && DEBUG
+                       mflr    r11
+                       li              r3,25
+                       bl              EXT(dbgLog2)                                            ; Start of hw_add_map
+                       mtlr    r11
+#endif
+                       blr                                                                     /* Return... */
 
-hrmErRtn:      bt++    pf64Bitb,hrmSF1z                        ; skip if 64-bit (only they take the hint)
+                       .align  4
 
-                       mtmsr   r17                                                     ; Restore enables/translation/etc.
+nophys:                li              r4,0                                            /* Make sure this is 0 */
+                       sync                                                            /* Make sure that chain is updated */
+                       stw             r4,0(r7)                                        /* Unlock the hash chain */
+                       mtmsr   r0                                                      /* Interrupts and translation back on */
                        isync
-                       b               hrmRetnCmn                                      ; Join the common return code...
+#if PERFTIMES && DEBUG
+                       mflr    r11
+                       li              r3,25
+                       bl              EXT(dbgLog2)                                            ; Start of hw_add_map
+                       mtlr    r11
+#endif
+                       blr                                                                     /* Return... */
 
-hrmSF1z:       mtmsrd  r17                                                     ; Restore enables/translation/etc.
-                       isync
-                       b               hrmRetnCmn                                      ; Join the common return code...
+
+/*
+ *                     hw_prot(physent, prot) - Change the protection of a physical page
+ *
+ *                     Upon entry, R3 contains a pointer to a physical entry which is locked.
+ *                     R4 contains the PPC protection bits.
+ *
+ *                     The first thing we do is to slam the new protection into the phys entry.
+ *                     Then we scan the mappings and process each one.
+ *
+ *                     Acquire the lock on the PTEG hash list for the mapping being processed.
+ *
+ *                     If the current mapping has a PTE entry, we invalidate
+ *                     it and merge the reference and change information into the phys_entry.
+ *
+ *                     Next, slam the protection bits into the entry and unlock the hash list.
+ *
+ *                     Note that this must be done with both interruptions off and VM off
+ *     
+ *                       
+ */
 
                        .align  5
+                       .globl  EXT(hw_prot)
 
-hrmNot1st:     mr.             r8,r9                                           ; Remember and test current node
-                       beq-    hrmPhyDQd                                       ; Could not find our node, someone must have unmapped us...
-                       lwz             r9,mpAlias+4(r9)                        ; Chain to the next
-                       cmplw   r9,r31                                          ; Is this us?
-                       bne-    hrmNot1st                                       ; Not us...
-               
-                       lwz             r9,mpAlias+4(r9)                        ; Get our forward pointer
-                       stw             r9,mpAlias+4(r8)                        ; Unchain us
-                       
-                       nop                                                                     ; For alignment
+LEXT(hw_prot)
+#if PERFTIMES && DEBUG
+                       mflr    r11
+                       mr              r7,r3
+//                     lwz             r5,4(r3)
+                       li              r5,0x1111
+                       li              r3,26
+                       bl              EXT(dbgLog2)                            ; Start of hw_add_map
+                       mr              r3,r7
+                       mtlr    r11
+#endif
+                       mfsprg  r9,2                                            ; Get feature flags 
+                       mfmsr   r0                                                      /* Save the MSR  */
+                       li              r5,pepte1                                       /* Get displacement to the second word of master pte */
+                       rlwinm  r0,r0,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r0,r0,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r12,r0,0,MSR_EE_BIT+1,MSR_EE_BIT-1      /* Clear interruptions */
+                       mtcrf   0x04,r9                                         ; Set the features                      
+                       rlwinm  r12,r12,0,28,25                         /* Clear IR and DR */
+
+                       bt              pfNoMSRirb,hpNoMSR                      ; No MSR...
+
+                       mtmsr   r12                                                     ; Translation and all off
+                       isync                                                           ; Toss prefetch
+                       b               hpNoMSRx
                        
-hrmPhyDQd:     bl              mapPhysUnlock                           ; Unlock the physent chain
+hpNoMSR:       
+                       mr              r10,r0
+                       mr              r7,r3
+                       li              r0,loadMSR                                      ; Get the MSR setter SC
+                       mr              r3,r12                                          ; Get new MSR
+                       sc                                                                      ; Set it
+                       mr              r0,r10
+                       mr              r3,r7
+hpNoMSRx:
 
-hrmRetn32:     rlwinm  r8,r31,0,0,19                           ; Find start of page
-                       mr              r3,r31                                          ; Copy the pointer to the mapping
-                       lwz             r8,mbvrswap+4(r8)                       ; Get last half of virtual to real swap
-                       bl              mapDrainBusy                            ; Go wait until mapping is unused
 
-                       xor             r3,r31,r8                                       ; Flip mapping address to virtual
                        
-                       mtmsr   r17                                                     ; Restore enables/translation/etc.
-                       isync
-
-hrmRetnCmn:    lwz             r6,FM_ARG0+0x44(r1)                     ; Get address to save next mapped vaddr
-                       lwz             r0,(FM_ALIGN(hrmStackSize)+FM_SIZE+FM_LR_SAVE)(r1)      ; Restore the return
-                       lwz             r17,FM_ARG0+0x08(r1)            ; Restore a register
-                       lwz             r18,FM_ARG0+0x0C(r1)            ; Restore a register
-                       mr.             r6,r6                                           ; Should we pass back the "next" vaddr?
-                       lwz             r19,FM_ARG0+0x10(r1)            ; Restore a register
-                       lwz             r20,FM_ARG0+0x14(r1)            ; Restore a register
-                       mtlr    r0                                                      ; Restore the return
-                       
-                       rlwinm  r16,r16,0,0,19                          ; Clean to a page boundary
-                       beq             hrmNoNextAdr                            ; Do not pass back the next vaddr...
-                       stw             r15,0(r6)                                       ; Pass back the top of the next vaddr
-                       stw             r16,4(r6)                                       ; Pass back the bottom of the next vaddr
-
-hrmNoNextAdr:
-                       lwz             r15,FM_ARG0+0x00(r1)            ; Restore a register
-                       lwz             r16,FM_ARG0+0x04(r1)            ; Restore a register
-                       lwz             r21,FM_ARG0+0x18(r1)            ; Restore a register
-                       rlwinm  r3,r3,0,0,31                            ; Clear top of register if 64-bit
-                       lwz             r22,FM_ARG0+0x1C(r1)            ; Restore a register
-                       lwz             r23,FM_ARG0+0x20(r1)            ; Restore a register
-                       lwz             r24,FM_ARG0+0x24(r1)            ; Restore a register
-                       lwz             r25,FM_ARG0+0x28(r1)            ; Restore a register
-                       lwz             r26,FM_ARG0+0x2C(r1)            ; Restore a register
-                       lwz             r27,FM_ARG0+0x30(r1)            ; Restore a register
-                       lwz             r28,FM_ARG0+0x34(r1)            ; Restore a register
-                       lwz             r29,FM_ARG0+0x38(r1)            ; Restore a register
-                       lwz             r30,FM_ARG0+0x3C(r1)            ; Restore a register
-                       lwz             r31,FM_ARG0+0x40(r1)            ; Restore a register
-                       lwz             r1,0(r1)                                        ; Pop the stack
-                       blr                                                                     ; Leave...
+                       lwz             r10,pephyslink(r3)                      /* Get the first mapping block */
+                       rlwinm  r10,r10,0,0,26                          ; Clear out the flags from first link
 
-;
-;                      Here is where we come when all is lost.  Somehow, we failed a mapping function
-;                      that must work... All hope is gone.  Alas, we die.......
-;
+/*
+ *                     Note that we need to to do the interlocked update here because another processor
+ *                     can be updating the reference and change bits even though the physical entry
+ *                     is locked.  All modifications to the PTE portion of the physical entry must be
+ *                     done via interlocked update.
+ */
 
-hrmPanic:      lis             r0,hi16(Choke)                          ; System abend
-                       ori             r0,r0,lo16(Choke)                       ; System abend
-                       li              r3,failMapping                          ; Show that we failed some kind of mapping thing
-                       sc
+protcng:       lwarx   r8,r5,r3                                        /* Get the master copy */
+                       rlwimi  r8,r4,0,30,31                           /* Move in the protection bits */
+                       stwcx.  r8,r5,r3                                        /* Save it back */
+                       bne-    protcng                                         /* If it changed, try again... */
 
 
-;
-;                      Invalidate block mappings by invalidating a chunk of autogen PTEs in PTEGs hashed
-;                      in the range. Then, if we did not finish, return a code indicating that we need to 
-;                      be called again.  Eventually, we will finish and then, we will do a TLBIE for each 
-;                      PTEG up to the point where we have cleared it all (64 for 32-bit architecture)
-;
-;                      A potential speed up is that we stop the invalidate loop once we have walked through
-;                      the hash table once. This really is not worth the trouble because we need to have
-;                      mapped 1/2 of physical RAM in an individual block.  Way unlikely.
-;
-;                      We should rethink this and see if we think it will be faster to check PTE and
-;                      only invalidate the specific PTE rather than all block map PTEs in the PTEG.
-;
 
-                       .align  5
+protnext:      mr.             r10,r10                                         /* Are there any more mappings? */
+                       beq-    protdone                                        /* Naw... */
                        
-hrmBlock32:    
-                       lhz             r23,mpSpace(r31)                        ; Get the address space hash
-                       lhz             r25,mpBSize(r31)                        ; Get the number of pages in block
-                       lwz             r9,mpBlkRemCur(r31)                     ; Get our current remove position
-                       ori             r0,r20,mpRIP                            ; Turn on the remove in progress flag
-                       mfsdr1  r29                                                     ; Get the hash table base and size
-                       rlwinm  r24,r23,maxAdrSpb,32-maxAdrSpb-maxAdrSpb,31-maxAdrSpb   ; Get high order of hash
-                       lwz             r27,mpVAddr+4(r31)                      ; Get the base vaddr
-                       sub             r4,r25,r9                                       ; Get number of pages left
-                       cmplw   cr1,r9,r25                                      ; Have we already hit the end?
-                       addi    r10,r9,mapRemChunk                      ; Point to the start of the next chunk
-                       addi    r2,r4,-mapRemChunk                      ; See if mapRemChunk or more
-                       rlwinm  r26,r29,16,7,15                         ; Get the hash table size
-                       srawi   r2,r2,31                                        ; We have -1 if less than mapRemChunk or 0 if equal or more
-                       stb             r0,mpFlags+3(r31)                       ; Save the flags with the mpRIP bit on
-                       subi    r4,r4,mapRemChunk-1                     ; Back off for a running start (will be negative for more than mapRemChunk)
-                       cmpwi   cr7,r2,0                                        ; Remember if we have finished
-                       slwi    r0,r9,12                                        ; Make cursor into page offset
-                       or              r24,r24,r23                                     ; Get full hash
-                       and             r4,r4,r2                                        ; If more than a chunk, bring this back to 0
-                       rlwinm  r29,r29,0,0,15                          ; Isolate the hash table base
-                       add             r27,r27,r0                                      ; Adjust vaddr to start of current chunk
-                       addi    r4,r4,mapRemChunk-1                     ; Add mapRemChunk-1 to get max(num left,  chunksize)
-                       
-                       bgt-    cr1,hrmEndInSight                       ; Someone is already doing the last hunk...
-                       
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       stw             r10,mpBlkRemCur(r31)            ; Set next chunk to do (note: this may indicate after end)
-                       bl              sxlkUnlock                                      ; Unlock the search list while we are invalidating
-                       
-                       rlwinm  r8,r27,4+maxAdrSpb,31-maxAdrSpb-3,31-maxAdrSpb  ; Isolate the segment
-                       rlwinm  r30,r27,26,6,25                         ; Shift vaddr to PTEG offset (and remember VADDR in R27)
-                       xor             r24,r24,r8                                      ; Get the proper VSID
-                       rlwinm  r21,r27,26,10,25                        ; Shift page index to PTEG offset (and remember VADDR in R27)
-                       ori             r26,r26,lo16(0xFFC0)            ; Stick in the rest of the length
-                       rlwinm  r22,r4,6,10,25                          ; Shift size to PTEG offset
-                       rlwinm  r24,r24,6,0,25                          ; Shift hash to PTEG units
-                       add             r22,r22,r30                                     ; Get end address (in PTEG units)
-                       
-hrmBInv32:     rlwinm  r23,r30,0,10,25                         ; Isolate just the page index 
-                       xor             r23,r23,r24                                     ; Hash it
-                       and             r23,r23,r26                                     ; Wrap it into the table
-                       rlwinm  r3,r23,28,4,29                          ; Change to PCA offset
-                       subfic  r3,r3,-4                                        ; Get the PCA entry offset
-                       add             r7,r3,r29                                       ; Point to the PCA slot
-                       cmplw   cr5,r30,r22                                     ; Check if we reached the end of the range
-                       addi    r30,r30,64                                      ; bump to the next vaddr
-                                                               
-                       bl              mapLockPteg                                     ; Lock the PTEG
-                                       
-                       rlwinm. r4,r6,16,0,7                            ; Position, save, and test block mappings in PCA
-                       add             r5,r23,r29                                      ; Point to the PTEG
-                       li              r0,0                                            ; Set an invalid PTE value
-                       beq+    hrmBNone32                                      ; No block map PTEs in this PTEG...
-                       mtcrf   0x80,r4                                         ; Set CRs to select PTE slots
-                       mtcrf   0x40,r4                                         ; Set CRs to select PTE slots
+                       lwz             r7,mmPTEhash(r10)                       /* Get pointer to hash list anchor */
+                       lwz             r5,mmPTEv(r10)                          /* Get the virtual address */
+                       rlwinm  r7,r7,0,0,25                            /* Round hash list down to PCA boundary */
 
-                       bf              0,hrmSlot0                                      ; No autogen here
-                       stw             r0,0x00(r5)                                     ; Invalidate PTE
+                       li              r12,1                                           /* Get the locked value */
 
-hrmSlot0:      bf              1,hrmSlot1                                      ; No autogen here
-                       stw             r0,0x08(r5)                                     ; Invalidate PTE
+protLck1:      lwarx   r11,0,r7                                        /* Get the PTEG lock */
+                       mr.             r11,r11                                         /* Is it locked? */
+                       bne-    protLckw1                                       /* Yeah... */
+                       stwcx.  r12,0,r7                                        /* Try to take it */
+                       bne-    protLck1                                        /* Someone else was trying, try again... */
+                       b               protSXg1                                        /* All done... */
+                       
+                       .align  4
 
-hrmSlot1:      bf              2,hrmSlot2                                      ; No autogen here
-                       stw             r0,0x10(r5)                                     ; Invalidate PTE
+protLckw1:     mr.             r11,r11                                         /* Check if it's already held */
+                       beq+    protLck1                                        /* It's clear... */
+                       lwz             r11,0(r7)                                       /* Get lock word again... */
+                       b               protLckw1                                       /* Wait... */
+                       
+                       .align  4
 
-hrmSlot2:      bf              3,hrmSlot3                                      ; No autogen here
-                       stw             r0,0x18(r5)                                     ; Invalidate PTE
+protSXg1:      isync                                                           /* Make sure we haven't used anything yet */
 
-hrmSlot3:      bf              4,hrmSlot4                                      ; No autogen here
-                       stw             r0,0x20(r5)                                     ; Invalidate PTE
+                       lwz             r6,mmPTEent(r10)                        /* Get the pointer to the PTE now that the lock's set */
 
-hrmSlot4:      bf              5,hrmSlot5                                      ; No autogen here
-                       stw             r0,0x28(r5)                                     ; Invalidate PTE
+                       rlwinm  r9,r5,1,0,3                                     /* Move in the segment */
+                       lwz             r2,mmPTEr(r10)                          ; Get the mapping copy of the PTE
+                       mr.             r6,r6                                           /* See if there is a PTE here */
+                       rlwinm  r8,r5,31,2,25                           /* Line it up */
+                       rlwimi  r2,r4,0,30,31                           ; Move protection bits into the mapping copy
+               
+                       beq+    protul                                          /* There's no PTE to invalidate... */
+                       
+                       xor             r8,r8,r6                                        /* Back hash to virt index */
+                       rlwimi  r9,r5,22,4,9                            /* Move in the API */
+                       lis             r12,HIGH_ADDR(EXT(tlb_system_lock))     /* Get the TLBIE lock */
+                       rlwinm  r5,r5,0,1,31                            /* Clear the valid bit */
+                       ori             r12,r12,LOW_ADDR(EXT(tlb_system_lock))  /* Grab up the bottom part */
+                       mfspr   r11,pvr                                         /* Find out what kind of machine we are */
+                       rlwimi  r9,r8,6,10,19                           /* Create the virtual address */
+                       rlwinm  r11,r11,16,16,31                        /* Isolate CPU type */
+
+                       stw             r5,0(r6)                                        /* Make the PTE invalid */              
+                       cmplwi  cr1,r11,3                                       /* Is this a 603? */
+                       sync                                                            /* Make sure the invalid is stored */
+                                               
+tlbhangp:      lwarx   r11,0,r12                                       /* Get the TLBIE lock */
+                       rlwinm  r8,r6,29,29,31                          /* Get the bit position of entry */
+                       mr.             r11,r11                                         /* Is it locked? */
+                       lis             r5,0x8000                                       /* Start up a bit mask */
+                       li              r11,1                                           /* Get our lock word */
+                       bne-    tlbhangp                                        /* It's locked, go wait... */
+                       stwcx.  r11,0,r12                                       /* Try to get it */
+                       bne-    tlbhangp                                        /* We was beat... */
+                       
+                       li              r11,0                                           /* Lock clear value */
 
-hrmSlot5:      bf              6,hrmSlot6                                      ; No autogen here
-                       stw             r0,0x30(r5)                                     ; Invalidate PTE
+                       tlbie   r9                                                      /* Invalidate it everywhere */
 
-hrmSlot6:      bf              7,hrmSlot7                                      ; No autogen here
-                       stw             r0,0x38(r5)                                     ; Invalidate PTE
+                       beq-    cr1,its603p                                     /* It's a 603, skip the tlbsync... */
+                       
+                       eieio                                                           /* Make sure that the tlbie happens first */
+                       tlbsync                                                         /* wait for everyone to catch up */
+                       isync                                                           
+                       
+its603p:       stw             r11,0(r12)                                      /* Clear the lock */
+                       srw             r5,r5,r8                                        /* Make a "free slot" mask */
+                       sync                                                            /* Make sure of it all */
 
-hrmSlot7:      rlwinm  r0,r4,16,16,23                          ; Move in use to autogen
-                       or              r6,r6,r4                                        ; Flip on the free bits that corrospond to the autogens we cleared
-                       andc    r6,r6,r0                                        ; Turn off all the old autogen bits
+                       lwz             r6,4(r6)                                        /* Get the latest reference and change bits */
+                       stw             r11,mmPTEent(r10)                       /* Clear the pointer to the PTE */
+                       rlwinm  r6,r6,0,23,24                           /* Extract the RC bits */
+                       lwz             r9,PCAallo(r7)                          /* Get the allocation control bits */
+                       rlwinm  r8,r5,24,8,15                           /* Make the autogen bit to turn off */
+                       rlwimi  r2,r6,0,23,24                           ; Put the latest RC bit in mapping copy
+                       or              r9,r9,r5                                        /* Set the slot free */
+                       rlwimi  r8,r8,24,16,23                          /* Get lock bit mask to turn it off */
+                       andc    r9,r9,r8                                        /* Clear the auto and lock bits */
+                       li              r5,pepte1                                       /* Get displacement to the second word of master pte */
+                       stw             r9,PCAallo(r7)                          /* Store the allocation controls */
+                       
+protmod:       lwarx   r11,r5,r3                                       /* Get the master copy */
+                       or              r11,r11,r6                                      /* Merge in latest RC */
+                       stwcx.  r11,r5,r3                                       /* Save it back */
+                       bne-    protmod                                         /* If it changed, try again... */
+                       
+protul:                li              r4,0                                            /* Get a 0 */
+                       stw             r2,mmPTEr(r10)                          ; Save the updated mapping PTE
+                       lwz             r10,mmnext(r10)                         /* Get the next */
 
-hrmBNone32:    eieio                                                           ; Make sure all updates come first
+                       sync                                                            ; Make sure stores are complete
 
-                       stw             r6,0(r7)                                        ; Unlock and set the PCA
+                       stw             r4,0(r7)                                        /* Unlock the hash chain */
+                       b               protnext                                        /* Go get the next one */
                        
-                       bne+    cr5,hrmBInv32                           ; Go invalidate the next...
+                       .align  4
 
-                       bge+    cr7,hrmDoneChunk                        ; We have not as yet done the last chunk, go tell our caller to call again...
+protdone:      mtmsr   r0                                                      /* Interrupts and translation back on */
+                       isync
+#if PERFTIMES && DEBUG
+                       mflr    r11
+                       li              r3,27
+                       bl              EXT(dbgLog2)                            ; Start of hw_add_map
+                       mtlr    r11
+#endif
+                       blr                                                                     /* Return... */
 
-                       mr              r3,r31                                          ; Copy the pointer to the mapping
-                       bl              mapDrainBusy                            ; Go wait until we are sure all other removers are done with this one
 
-                       sync                                                            ; Make sure memory is consistent
-                       
-                       subi    r5,r25,63                                       ; Subtract TLB size from page count (note we are 0 based here)
-                       li              r6,63                                           ; Assume full invalidate for now
-                       srawi   r5,r5,31                                        ; Make 0 if we need a full purge, -1 otherwise
-                       andc    r6,r6,r5                                        ; Clear max if we have less to do
-                       and             r5,r25,r5                                       ; Clear count if we have more than max
-                       lwz             r27,mpVAddr+4(r31)                      ; Get the base vaddr again
-                       li              r7,tlbieLock                            ; Get the TLBIE lock
-                       or              r5,r5,r6                                        ; Get number of TLBIEs needed           
-                                       
-hrmBTLBlck:    lwarx   r2,0,r7                                         ; Get the TLBIE lock
-                       mr.             r2,r2                                           ; Is it locked?
-                       li              r2,1                                            ; Get our lock value
-                       bne-    hrmBTLBlck                                      ; It is locked, go wait...
-                       stwcx.  r2,0,r7                                         ; Try to get it
-                       bne-    hrmBTLBlck                                      ; We was beat...
-       
-hrmBTLBi:      addic.  r5,r5,-1                                        ; See if we did them all
-                       tlbie   r27                                                     ; Invalidate it everywhere
-                       addi    r27,r27,0x1000                          ; Up to the next page
-                       bge+    hrmBTLBi                                        ; Make sure we have done it all...
-                       
-                       rlwinm. r0,r19,0,pfSMPcapb,pfSMPcapb    ; Can this processor do SMP?    
-                       li              r2,0                                            ; Lock clear value
-                       
-                       sync                                                            ; Make sure all is quiet
-                       beq-    hrmBNTlbs                                       ; Jump if we can not do a TLBSYNC....
-                       
-                       eieio                                                           ; Make sure that the tlbie happens first
-                       tlbsync                                                         ; Wait for everyone to catch up
-                       sync                                                            ; Wait for quiet again
-
-hrmBNTlbs:     stw             r2,tlbieLock(0)                         ; Clear the tlbie lock
-                       
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkShared                                      ; Go get a shared lock on the mapping lists
-                       mr.             r3,r3                                           ; Did we get the lock?
-                       bne-    hrmPanic                                        ; Nope...
-                       
-                       lwz             r4,mpVAddr(r31)                         ; High order of address
-                       lwz             r5,mpVAddr+4(r31)                       ; Low order of address
-                       mr              r3,r28                                          ; Pass in pmap to search
-                       mr              r29,r4                                          ; Save this in case we need it (only promote fails)
-                       mr              r30,r5                                          ; Save this in case we need it (only promote fails)
-                       bl              EXT(mapSearchFull)                      ; Go see if we can find it
-                       
-                       mr.             r3,r3                                           ; Did we? (And remember mapping address for later)
-                       mr              r15,r4                                          ; Save top of next vaddr
-                       mr              r16,r5                                          ; Save bottom of next vaddr
-                       beq-    hrmPanic                                        ; Nope, not found...
-                       
-                       cmplw   r3,r31                                          ; Same mapping?
-                       bne-    hrmPanic                                        ; Not good...
-                       
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkPromote                                     ; Try to promote shared to exclusive
-                       mr.             r3,r3                                           ; Could we?
-                       mr              r3,r31                                          ; Restore the mapping pointer
-                       beq+    hrmBDone1                                       ; Yeah...
-                       
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkConvert                                     ; Convert shared to exclusive
-                       mr.             r3,r3                                           ; Could we?
-                       bne--   hrmPanic                                        ; Nope, we must have timed out...
-                       
-                       mr              r3,r28                                          ; Pass in pmap to search
-                       mr              r4,r29                                          ; High order of address
-                       mr              r5,r30                                          ; Low order of address
-                       bl              EXT(mapSearchFull)                      ; Rescan the list
-                       
-                       mr.             r3,r3                                           ; Did we lose it when we converted?
-                       mr              r15,r4                                          ; Save top of next vaddr
-                       mr              r16,r5                                          ; Save bottom of next vaddr
-                       beq--   hrmPanic                                        ; Yeah, we did, someone tossed it for us...
-
-hrmBDone1:     bl              mapDrainBusy                            ; Go wait until mapping is unused
-
-                       mr              r3,r28                                          ; Get the pmap to remove from
-                       mr              r4,r31                                          ; Point to the mapping
-                       bl              EXT(mapRemove)                          ; Remove the mapping from the list      
-                                       
-                       lwz             r4,pmapResidentCnt(r28)         ; Get the mapped page count 
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       subi    r4,r4,1                                         ; Drop down the mapped page count
-                       stw             r4,pmapResidentCnt(r28)         ; Set the mapped page count 
-                       bl              sxlkUnlock                                      ; Unlock the search list
-               
-                       b               hrmRetn32                                       ; We are all done, get out...
+/*
+ *                     hw_prot_virt(mapping, prot) - Change the protection of single page
+ *
+ *                     Upon entry, R3 contains a pointer (real) to a mapping.
+ *                     R4 contains the PPC protection bits.
+ *
+ *                     Acquire the lock on the PTEG hash list for the mapping being processed.
+ *
+ *                     If the current mapping has a PTE entry, we invalidate
+ *                     it and merge the reference and change information into the phys_entry.
+ *
+ *                     Next, slam the protection bits into the entry, merge the RC bits, 
+ *                     and unlock the hash list.
+ *
+ *                     Note that this must be done with both interruptions off and VM off
+ *     
+ *                       
+ */
 
-;
-;                      Here we handle the 64-bit version of hw_rem_map
-;
-               
                        .align  5
-               
-hrmSplit64:    rlwinm  r9,r21,27,5,29                          ; Convert PTEG to PCA entry
-                       bne--   cr5,hrmBlock64                          ; Go treat block specially...
-                       subfic  r9,r9,-4                                        ; Get the PCA entry offset
-                       bt--    cr0_eq,hrmPysDQ64                       ; Skip next if no possible PTE...
-                       add             r7,r9,r29                                       ; Point to the PCA slot
-                       
-                       bl              mapLockPteg                                     ; Go lock up the PTEG
-       
-                       lwz             r21,mpPte(r31)                          ; Get the quick pointer again
-                       ld              r5,0(r26)                                       ; Get the top of PTE
-                       
-                       rlwinm. r0,r21,0,mpHValidb,mpHValidb    ; See if we actually have a PTE
-                       rlwinm  r21,r21,0,0,30                          ; Clear out valid bit
-                       sldi    r23,r5,16                                       ; Shift AVPN up to EA format
-                       rldicr  r5,r5,0,62                                      ; Clear the valid bit
-                       rldimi  r23,r30,0,36                            ; Insert the page portion of the VPN
-                       stw             r21,mpPte(r31)                          ; Make sure we invalidate mpPte but keep pointing to PTEG (keep walk_page from making a mistake)
-                       beq--   hrmUlckPCA64                            ; Pte is gone, no need to invalidate...
-                       
-                       std             r5,0(r26)                                       ; Invalidate the PTE
-
-                       li              r9,tlbieLock                            ; Get the TLBIE lock
-
-                       sync                                                            ; Make sure the invalid PTE is actually in memory
-
-hrmPtlb64:     lwarx   r5,0,r9                                         ; Get the TLBIE lock 
-                       rldicl  r23,r23,0,16                            ; Clear bits 0:15 cause they say to
-                       mr.             r5,r5                                           ; Is it locked?
-                       li              r5,1                                            ; Get locked indicator
-                       bne--   hrmPtlb64w                                      ; It is locked, go spin...
-                       stwcx.  r5,0,r9                                         ; Try to get it
-                       bne--   hrmPtlb64                                       ; We was beat... 
-                                       
-                       tlbie   r23                                                     ; Invalidate it all corresponding TLB entries
-                       
-                       eieio                                                           ; Make sure that the tlbie happens first
-                       tlbsync                                                         ; Wait for everyone to catch up
-                       isync                                                           
-                       
-                       ptesync                                                         ; Make sure of it all
-                       li              r0,0                                            ; Clear this 
-                       rlwinm  r2,r21,28,29,31                         ; Get slot number (16 byte entries)
-                       stw             r0,tlbieLock(0)                         ; Clear the tlbie lock
-                       oris    r0,r0,0x8000                            ; Assume slot 0
-                       eieio                                                           ; Make sure those RC bit have been stashed in PTE
-                       srw             r0,r0,r2                                        ; Get slot mask to deallocate
+                       .globl  EXT(hw_prot_virt)
 
-                       lwz             r22,12(r26)                                     ; Get the latest reference and change bits
-                       or              r6,r6,r0                                        ; Make the guy we killed free
+LEXT(hw_prot_virt)
+#if PERFTIMES && DEBUG
+                       mflr    r11
+                       mr              r7,r3
+//                     lwz             r5,4(r3)
+                       li              r5,0x1111
+                       li              r3,40
+                       bl              EXT(dbgLog2)                                            ; Start of hw_add_map
+                       mr              r3,r7
+                       mtlr    r11
+#endif
+                       mfsprg  r9,2                                            ; Get feature flags 
+                       mfmsr   r0                                                      /* Save the MSR  */
+                       rlwinm  r0,r0,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r0,r0,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r12,r0,0,MSR_EE_BIT+1,MSR_EE_BIT-1      /* Clear interruptions */
+                       mtcrf   0x04,r9                                         ; Set the features                      
+                       rlwinm  r12,r12,0,28,25                         /* Clear IR and DR */
                        
-hrmUlckPCA64:
-                       eieio                                                           ; Make sure all updates come first
+                       bt              pfNoMSRirb,hpvNoMSR                     ; No MSR...
 
-                       stw             r6,0(r7)                                        ; Unlock and change the PCA
-               
-hrmPysDQ64:    mr              r3,r31                                          ; Point to the mapping
-                       bl              mapDrainBusy                            ; Go wait until mapping is unused
-
-                       mr              r3,r28                                          ; Get the pmap to insert into
-                       mr              r4,r31                                          ; Point to the mapping
-                       bl              EXT(mapRemove)                          ; Remove the mapping from the list                      
-
-                       andi.   r0,r20,lo16(mpSpecial|mpNest)   ; Is this nest or special mapping?
-                       lwz             r4,pmapResidentCnt(r28)         ; Get the mapped page count 
-                       cmplwi  cr1,r0,0                                        ; Special thingie?
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       subi    r4,r4,1                                         ; Drop down the mapped page count
-                       stw             r4,pmapResidentCnt(r28)         ; Set the mapped page count 
-                       bl              sxlkUnlock                                      ; Unlock the search list
-               
-                       bne--   cr1,hrmRetn64                           ; This one has no real memory associated with it so we are done...
+                       mtmsr   r12                                                     ; Translation and all off
+                       isync                                                           ; Toss prefetch
+                       b               hpvNoMSRx
+                       
+hpvNoMSR:      
+                       mr              r5,r0
+                       mr              r7,r3
+                       li              r0,loadMSR                                      ; Get the MSR setter SC
+                       mr              r3,r12                                          ; Get new MSR
+                       sc                                                                      ; Set it
+                       mr              r3,r7
+                       mr              r0,r5
+hpvNoMSRx:
 
-                       bl              mapPhysFindLock                         ; Go find and lock the physent
 
-                       li              r0,0xFF                                         ; Get mask to clean up mapping pointer
-                       ld              r9,ppLink(r3)                           ; Get first mapping
-                       rldicl  r0,r0,62,0                                      ; Rotate clean up mask to get 0xC0000000000000003F
-                       mr              r4,r22                                          ; Get the RC bits we just got
-                       
-                       bl              mapPhysMerge                            ; Go merge the RC bits
-                       
-                       andc    r9,r9,r0                                        ; Clean up the mapping pointer
                        
-                       cmpld   r9,r31                                          ; Are we the first on the list?
-                       bne-    hrmNot1st64                                     ; Nope...
-                       
-                       li              r9,0                                            ; Get a 0
-                       ld              r4,mpAlias(r31)                         ; Get our forward pointer
+/*
+ *                     Note that we need to to do the interlocked update here because another processor
+ *                     can be updating the reference and change bits even though the physical entry
+ *                     is locked.  All modifications to the PTE portion of the physical entry must be
+ *                     done via interlocked update.
+ */
                        
-                       std             r9,mpAlias(r31)                         ; Make sure we are off the chain
-                       bl              mapPhyCSet64                            ; Go set the physent link and preserve flags                                                            
+                       lwz             r7,mmPTEhash(r3)                        /* Get pointer to hash list anchor */
+                       lwz             r5,mmPTEv(r3)                           /* Get the virtual address */
+                       rlwinm  r7,r7,0,0,25                            /* Round hash list down to PCA boundary */
+
+                       li              r12,1                                           /* Get the locked value */
 
-                       b               hrmPhyDQd64                                     ; Join up and unlock it all...
+protvLck1:     lwarx   r11,0,r7                                        /* Get the PTEG lock */
+                       mr.             r11,r11                                         /* Is it locked? */
+                       bne-    protvLckw1                                      /* Yeah... */
+                       stwcx.  r12,0,r7                                        /* Try to take it */
+                       bne-    protvLck1                                       /* Someone else was trying, try again... */
+                       b               protvSXg1                                       /* All done... */
                        
-hrmPtlb64w:    li              r5,lgKillResv                           ; Point to some spare memory
-                       stwcx.  r5,0,r5                                         ; Clear the pending reservation                 
-                                               
+                       .align  4
+
+protvLckw1:    mr.             r11,r11                                         /* Check if it's already held */
+                       beq+    protvLck1                                       /* It's clear... */
+                       lwz             r11,0(r7)                                       /* Get lock word again... */
+                       b               protvLckw1                                      /* Wait... */
                        
-hrmPtlb64x:    lwz             r5,0(r9)                                        ; Do a regular load to avoid taking reservation
-                       mr.             r5,r5                                           ; is it locked?
-                       beq++   hrmPtlb64                                       ; Nope...
-                       b               hrmPtlb64x                                      ; Sniff some more...
-               
-                       .align  5                                                       
-                       
-hrmNot1st64:
-                       mr.             r8,r9                                           ; Remember and test current node
-                       beq-    hrmNotFound                                     ; Could not find our node...
-                       ld              r9,mpAlias(r9)                          ; Chain to the next
-                       cmpld   r9,r31                                          ; Is this us?
-                       bne-    hrmNot1st64                                     ; Not us...
+                       .align  4
+
+protvSXg1:     isync                                                           /* Make sure we haven't used anything yet */
+
+                       lwz             r6,mmPTEent(r3)                         /* Get the pointer to the PTE now that the lock's set */
+                       lwz             r2,mmPTEr(r3)                           ; Get the mapping copy if the real part
+
+                       rlwinm  r9,r5,1,0,3                                     /* Move in the segment */
+                       cmplwi  cr7,r6,0                                        ; Any PTE to invalidate?
+                       rlwimi  r2,r4,0,30,31                           ; Move in the new protection bits
+                       rlwinm  r8,r5,31,2,25                           /* Line it up */
                
-                       ld              r9,mpAlias(r9)                          ; Get our forward pointer
-                       std             r9,mpAlias(r8)                          ; Unchain us
-                       
-                       nop                                                                     ; For alignment
+                       beq+    cr7,pvnophys                            /* There's no PTE to invalidate... */
+                       
+                       xor             r8,r8,r6                                        /* Back hash to virt index */
+                       rlwimi  r9,r5,22,4,9                            /* Move in the API */
+                       lis             r12,HIGH_ADDR(EXT(tlb_system_lock))     /* Get the TLBIE lock */
+                       rlwinm  r5,r5,0,1,31                            /* Clear the valid bit */
+                       ori             r12,r12,LOW_ADDR(EXT(tlb_system_lock))  /* Grab up the bottom part */
+                       mfspr   r11,pvr                                         /* Find out what kind of machine we are */
+                       rlwimi  r9,r8,6,10,19                           /* Create the virtual address */
+                       rlwinm  r11,r11,16,16,31                        /* Isolate CPU type */
+
+                       stw             r5,0(r6)                                        /* Make the PTE invalid */              
+                       cmplwi  cr1,r11,3                                       /* Is this a 603? */
+                       sync                                                            /* Make sure the invalid is stored */
+                                               
+tlbhangpv:     lwarx   r11,0,r12                                       /* Get the TLBIE lock */
+                       rlwinm  r8,r6,29,29,31                          /* Get the bit position of entry */
+                       mr.             r11,r11                                         /* Is it locked? */
+                       lis             r5,0x8000                                       /* Start up a bit mask */
+                       li              r11,1                                           /* Get our lock word */
+                       bne-    tlbhangpv                                       /* It's locked, go wait... */
+                       stwcx.  r11,0,r12                                       /* Try to get it */
+                       bne-    tlbhangpv                                       /* We was beat... */
                        
-hrmPhyDQd64:   
-                       bl              mapPhysUnlock                           ; Unlock the physent chain
+                       li              r11,0                                           /* Lock clear value */
 
-hrmRetn64:     rldicr  r8,r31,0,51                                     ; Find start of page
-                       mr              r3,r31                                          ; Copy the pointer to the mapping
-                       lwz             r8,mbvrswap+4(r8)                       ; Get last half of virtual to real swap
-                       bl              mapDrainBusy                            ; Go wait until mapping is unused
+                       tlbie   r9                                                      /* Invalidate it everywhere */
 
-                       xor             r3,r31,r8                                       ; Flip mapping address to virtual
+                       beq-    cr1,its603pv                            /* It's a 603, skip the tlbsync... */
                        
-                       mtmsrd  r17                                                     ; Restore enables/translation/etc.
-                       isync
+                       eieio                                                           /* Make sure that the tlbie happens first */
+                       tlbsync                                                         /* wait for everyone to catch up */
+                       isync                                                           
                        
-                       b               hrmRetnCmn                                      ; Join the common return path...
+its603pv:      stw             r11,0(r12)                                      /* Clear the lock */
+                       srw             r5,r5,r8                                        /* Make a "free slot" mask */
+                       sync                                                            /* Make sure of it all */
+
+                       lwz             r6,4(r6)                                        /* Get the latest reference and change bits */
+                       stw             r11,mmPTEent(r3)                        /* Clear the pointer to the PTE */
+                       rlwinm  r6,r6,0,23,24                           /* Extract the RC bits */
+                       lwz             r9,PCAallo(r7)                          /* Get the allocation control bits */
+                       rlwinm  r8,r5,24,8,15                           /* Make the autogen bit to turn off */
+                       lwz             r10,mmphysent(r3)                       ; Get any physical entry
+                       or              r9,r9,r5                                        /* Set the slot free */
+                       rlwimi  r8,r8,24,16,23                          /* Get lock bit mask to turn it off */
+                       andc    r9,r9,r8                                        /* Clear the auto and lock bits */
+                       mr.             r10,r10                                         ; Is there a physical entry?
+                       li              r5,pepte1                                       /* Get displacement to the second word of master pte */
+                       stw             r9,PCAallo(r7)                          /* Store the allocation controls */
+                       rlwimi  r2,r6,0,23,24                           ; Stick in RC bits
+                       beq-    pvnophys                                        ; No physical entry...
+                       
+protvmod:      lwarx   r11,r5,r10                                      /* Get the master copy */
+                       or              r11,r11,r6                                      /* Merge in latest RC */
+                       stwcx.  r11,r5,r10                                      /* Save it back */
+                       bne-    protvmod                                        /* If it changed, try again... */
+                       
+pvnophys:      li              r4,0                                            /* Get a 0 */
+                       stw             r2,mmPTEr(r3)                           ; Set the real part of the PTE
+
+                       sync                                                            ; Make sure everything is stored
+
+                       stw             r4,0(r7)                                        /* Unlock the hash chain */
+                       mtmsr   r0                                                      ; Restore interrupts and translation
+                       isync
 
+#if PERFTIMES && DEBUG
+                       mflr    r11
+                       li              r3,41
+                       bl              EXT(dbgLog2)                            
+                       mtlr    r11
+#endif
+                       blr                                                                     /* Return... */
 
-;
-;                      Check hrmBlock32 for comments.
-;
-
-                       .align  5
-                       
-hrmBlock64:                            
-                       lhz             r24,mpSpace(r31)                        ; Get the address space hash
-                       lhz             r25,mpBSize(r31)                        ; Get the number of pages in block
-                       lwz             r9,mpBlkRemCur(r31)                     ; Get our current remove position
-                       ori             r0,r20,mpRIP                            ; Turn on the remove in progress flag
-                       mfsdr1  r29                                                     ; Get the hash table base and size
-                       ld              r27,mpVAddr(r31)                        ; Get the base vaddr
-                       rlwinm  r5,r29,0,27,31                          ; Isolate the size
-                       sub             r4,r25,r9                                       ; Get number of pages left
-                       cmplw   cr1,r9,r25                                      ; Have we already hit the end?
-                       addi    r10,r9,mapRemChunk                      ; Point to the start of the next chunk
-                       addi    r2,r4,-mapRemChunk                      ; See if mapRemChunk or more
-                       stb             r0,mpFlags+3(r31)                       ; Save the flags with the mpRIP bit on
-                       srawi   r2,r2,31                                        ; We have -1 if less than mapRemChunk or 0 if equal or more
-                       subi    r4,r4,mapRemChunk-1                     ; Back off for a running start (will be negative for more than mapRemChunk)
-                       cmpwi   cr7,r2,0                                        ; Remember if we are doing the last chunk
-                       and             r4,r4,r2                                        ; If more than a chunk, bring this back to 0
-                       srdi    r27,r27,12                                      ; Change address into page index
-                       addi    r4,r4,mapRemChunk-1                     ; Add mapRemChunk-1 to get max(num left,  chunksize)
-                       add             r27,r27,r9                                      ; Adjust vaddr to start of current chunk
-                       
-                       bgt--   cr1,hrmEndInSight                       ; Someone is already doing the last hunk...
-                       
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       stw             r10,mpBlkRemCur(r31)            ; Set next chunk to do (note: this may indicate after end)
-                       bl              sxlkUnlock                                      ; Unlock the search list while we are invalidating
-                       
-                       rlwimi  r24,r24,14,4,17                         ; Insert a copy of space hash
-                       eqv             r26,r26,r26                                     ; Get all foxes here
-                       rldimi  r24,r24,28,8                            ; Make a couple copies up higher
-                       rldicr  r29,r29,0,47                            ; Isolate just the hash table base
-                       subfic  r5,r5,46                                        ; Get number of leading zeros
-                       srd             r26,r26,r5                                      ; Shift the size bits over              
-                       mr              r30,r27                                         ; Get start of chunk to invalidate
-                       rldicr  r26,r26,0,56                            ; Make length in PTEG units
-                       add             r22,r4,r30                                      ; Get end page number
-                                                                       
-hrmBInv64:     srdi    r0,r30,2                                        ; Shift page index over to form ESID
-                       rldicr  r0,r0,0,49                                      ; Clean all but segment portion
-                       rlwinm  r2,r30,0,16,31                          ; Get the current page index
-                       xor             r0,r0,r24                                       ; Form VSID
-                       xor             r8,r2,r0                                        ; Hash the vaddr
-                       sldi    r8,r8,7                                         ; Make into PTEG offset
-                       and             r23,r8,r26                                      ; Wrap into the hash table
-                       rlwinm  r3,r23,27,5,29                          ; Change to PCA offset (table is always 2GB or less so 32-bit instructions work here)
-                       subfic  r3,r3,-4                                        ; Get the PCA entry offset
-                       add             r7,r3,r29                                       ; Point to the PCA slot
-                       
-                       cmplw   cr5,r30,r22                                     ; Have we reached the end of the range?
-                                                               
-                       bl              mapLockPteg                                     ; Lock the PTEG
-                                               
-                       rlwinm. r4,r6,16,0,7                            ; Extract the block mappings in this here PTEG and see if there are any
-                       add             r5,r23,r29                                      ; Point to the PTEG
-                       li              r0,0                                            ; Set an invalid PTE value
-                       beq++   hrmBNone64                                      ; No block map PTEs in this PTEG...
-                       mtcrf   0x80,r4                                         ; Set CRs to select PTE slots
-                       mtcrf   0x40,r4                                         ; Set CRs to select PTE slots
-
-
-                       bf              0,hrmSlot0s                                     ; No autogen here
-                       std             r0,0x00(r5)                                     ; Invalidate PTE
 
-hrmSlot0s:     bf              1,hrmSlot1s                                     ; No autogen here
-                       std             r0,0x10(r5)                                     ; Invalidate PTE
-
-hrmSlot1s:     bf              2,hrmSlot2s                                     ; No autogen here
-                       std             r0,0x20(r5)                                     ; Invalidate PTE
-
-hrmSlot2s:     bf              3,hrmSlot3s                                     ; No autogen here
-                       std             r0,0x30(r5)                                     ; Invalidate PTE
+/*
+ *                     hw_attr_virt(mapping, attr) - Change the attributes of single page
+ *
+ *                     Upon entry, R3 contains a pointer (real) to a mapping.
+ *                     R4 contains the WIMG bits.
+ *
+ *                     Acquire the lock on the PTEG hash list for the mapping being processed.
+ *
+ *                     If the current mapping has a PTE entry, we invalidate
+ *                     it and merge the reference and change information into the phys_entry.
+ *
+ *                     Next, slam the WIMG bits into the entry, merge the RC bits, 
+ *                     and unlock the hash list.
+ *
+ *                     Note that this must be done with both interruptions off and VM off
+ *     
+ *                       
+ */
 
-hrmSlot3s:     bf              4,hrmSlot4s                                     ; No autogen here
-                       std             r0,0x40(r5)                                     ; Invalidate PTE
+                       .align  5
+                       .globl  EXT(hw_attr_virt)
 
-hrmSlot4s:     bf              5,hrmSlot5s                                     ; No autogen here
-                       std             r0,0x50(r5)                                     ; Invalidate PTE
+LEXT(hw_attr_virt)
+#if PERFTIMES && DEBUG
+                       mflr    r11
+                       mr              r7,r3
+//                     lwz             r5,4(r3)
+                       li              r5,0x1111
+                       li              r3,40
+                       bl              EXT(dbgLog2)                                            ; Start of hw_add_map
+                       mr              r3,r7
+                       mtlr    r11
+#endif
+                       mfsprg  r9,2                                            ; Get feature flags 
+                       mfmsr   r0                                                      /* Save the MSR  */
+                       rlwinm  r0,r0,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r0,r0,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       mtcrf   0x04,r9                                         ; Set the features                      
+                       rlwinm  r12,r0,0,MSR_EE_BIT+1,MSR_EE_BIT-1      /* Clear interruptions */
+                       rlwinm  r12,r12,0,28,25                         /* Clear IR and DR */
 
-hrmSlot5s:     bf              6,hrmSlot6s                                     ; No autogen here
-                       std             r0,0x60(r5)                                     ; Invalidate PTE
+                       bt              pfNoMSRirb,havNoMSR                     ; No MSR...
 
-hrmSlot6s:     bf              7,hrmSlot7s                                     ; No autogen here
-                       std             r0,0x70(r5)                                     ; Invalidate PTE
+                       mtmsr   r12                                                     ; Translation and all off
+                       isync                                                           ; Toss prefetch
+                       b               havNoMSRx
+                       
+havNoMSR:      
+                       mr              r5,r0
+                       mr              r7,r3
+                       li              r0,loadMSR                                      ; Get the MSR setter SC
+                       mr              r3,r12                                          ; Get new MSR
+                       sc                                                                      ; Set it
+                       mr              r3,r7
+                       mr              r0,r5
+havNoMSRx:
 
-hrmSlot7s:     rlwinm  r0,r4,16,16,23                          ; Move in use to autogen
-                       or              r6,r6,r4                                        ; Flip on the free bits that corrospond to the autogens we cleared
-                       andc    r6,r6,r0                                        ; Turn off all the old autogen bits
+/*
+ *                     Note that we need to to do the interlocked update here because another processor
+ *                     can be updating the reference and change bits even though the physical entry
+ *                     is locked.  All modifications to the PTE portion of the physical entry must be
+ *                     done via interlocked update.
+ */
+                       
+                       lwz             r7,mmPTEhash(r3)                        /* Get pointer to hash list anchor */
+                       lwz             r5,mmPTEv(r3)                           /* Get the virtual address */
+                       rlwinm  r7,r7,0,0,25                            /* Round hash list down to PCA boundary */
 
-hrmBNone64:    eieio                                                           ; Make sure all updates come first
-                       stw             r6,0(r7)                                        ; Unlock and set the PCA
+                       li              r12,1                                           /* Get the locked value */
 
-                       addi    r30,r30,1                                       ; bump to the next PTEG
-                       bne++   cr5,hrmBInv64                           ; Go invalidate the next...
+attrvLck1:     lwarx   r11,0,r7                                        /* Get the PTEG lock */
+                       mr.             r11,r11                                         /* Is it locked? */
+                       bne-    attrvLckw1                                      /* Yeah... */
+                       stwcx.  r12,0,r7                                        /* Try to take it */
+                       bne-    attrvLck1                                       /* Someone else was trying, try again... */
+                       b               attrvSXg1                                       /* All done... */
+                       
+                       .align  4
 
-                       bge+    cr7,hrmDoneChunk                        ; We have not as yet done the last chunk, go tell our caller to call again...
+attrvLckw1:    mr.             r11,r11                                         /* Check if it's already held */
+                       beq+    attrvLck1                                       /* It's clear... */
+                       lwz             r11,0(r7)                                       /* Get lock word again... */
+                       b               attrvLckw1                                      /* Wait... */
+                       
+                       .align  4
 
-                       mr              r3,r31                                          ; Copy the pointer to the mapping
-                       bl              mapDrainBusy                            ; Go wait until we are sure all other removers are done with this one
+attrvSXg1:     isync                                                           /* Make sure we haven't used anything yet */
 
-                       sync                                                            ; Make sure memory is consistent
+                       lwz             r6,mmPTEent(r3)                         /* Get the pointer to the PTE now that the lock's set */
+                       lwz             r2,mmPTEr(r3)                           ; Get the mapping copy if the real part
 
-                       subi    r5,r25,255                                      ; Subtract TLB size from page count (note we are 0 based here)
-                       li              r6,255                                          ; Assume full invalidate for now
-                       srawi   r5,r5,31                                        ; Make 0 if we need a full purge, -1 otherwise
-                       andc    r6,r6,r5                                        ; Clear max if we have less to do
-                       and             r5,r25,r5                                       ; Clear count if we have more than max
-                       sldi    r24,r24,28                                      ; Get the full XOR value over to segment position
-                       ld              r27,mpVAddr(r31)                        ; Get the base vaddr
-                       li              r7,tlbieLock                            ; Get the TLBIE lock
-                       or              r5,r5,r6                                        ; Get number of TLBIEs needed           
+                       rlwinm  r9,r5,1,0,3                                     /* Move in the segment */
+                       mr.             r6,r6                                           /* See if there is a PTE here */
+                       rlwimi  r2,r4,0,25,28                           ; Move in the new attribute bits
+                       rlwinm  r8,r5,31,2,25                           /* Line it up and check if empty */
+               
+                       beq+    avnophys                                        /* There's no PTE to invalidate... */
+                       
+                       xor             r8,r8,r6                                        /* Back hash to virt index */
+                       rlwimi  r9,r5,22,4,9                            /* Move in the API */
+                       lis             r12,HIGH_ADDR(EXT(tlb_system_lock))     /* Get the TLBIE lock */
+                       rlwinm  r5,r5,0,1,31                            /* Clear the valid bit */
+                       ori             r12,r12,LOW_ADDR(EXT(tlb_system_lock))  /* Grab up the bottom part */
+                       mfspr   r11,pvr                                         /* Find out what kind of machine we are */
+                       rlwimi  r9,r8,6,10,19                           /* Create the virtual address */
+                       rlwinm  r11,r11,16,16,31                        /* Isolate CPU type */
+                       stw             r5,0(r6)                                        /* Make the PTE invalid */              
+                       cmplwi  cr1,r11,3                                       /* Is this a 603? */
+                       sync                                                            /* Make sure the invalid is stored */
+                                               
+tlbhangav:     lwarx   r11,0,r12                                       /* Get the TLBIE lock */
+                       rlwinm  r8,r6,29,29,31                          /* Get the bit position of entry */
+                       mr.             r11,r11                                         /* Is it locked? */
+                       lis             r5,0x8000                                       /* Start up a bit mask */
+                       li              r11,1                                           /* Get our lock word */
+                       bne-    tlbhangav                                       /* It's locked, go wait... */
+                       stwcx.  r11,0,r12                                       /* Try to get it */
+                       bne-    tlbhangav                                       /* We was beat... */
                        
-hrmBTLBlcl:    lwarx   r2,0,r7                                         ; Get the TLBIE lock
-                       mr.             r2,r2                                           ; Is it locked?
-                       li              r2,1                                            ; Get our lock value
-                       bne--   hrmBTLBlcm                                      ; It is locked, go wait...
-                       stwcx.  r2,0,r7                                         ; Try to get it
-                       bne--   hrmBTLBlcl                                      ; We was beat...
-       
-hrmBTLBj:      sldi    r2,r27,maxAdrSpb                        ; Move to make room for address space ID
-                       rldicr  r2,r2,0,35-maxAdrSpb            ; Clear out the extra
-                       addic.  r5,r5,-1                                        ; See if we did them all
-                       xor             r2,r2,r24                                       ; Make the VSID
-                       rldimi  r2,r27,0,36                                     ; Insert the page portion of the VPN
-                       rldicl  r2,r2,0,16                                      ; Clear bits 0:15 cause they say we gotta
+                       li              r11,0                                           /* Lock clear value */
 
-                       tlbie   r2                                                      ; Invalidate it everywhere
-                       addi    r27,r27,0x1000                          ; Up to the next page
-                       bge++   hrmBTLBj                                        ; Make sure we have done it all...
+                       tlbie   r9                                                      /* Invalidate it everywhere */
 
-                       sync                                                            ; Make sure all is quiet
+                       beq-    cr1,its603av                            /* It's a 603, skip the tlbsync... */
                        
-                       eieio                                                           ; Make sure that the tlbie happens first
-                       tlbsync                                                         ; wait for everyone to catch up
+                       eieio                                                           /* Make sure that the tlbie happens first */
+                       tlbsync                                                         /* wait for everyone to catch up */
                        isync                                                           
+                       
+its603av:      stw             r11,0(r12)                                      /* Clear the lock */
+                       srw             r5,r5,r8                                        /* Make a "free slot" mask */
+                       sync                                                            /* Make sure of it all */
+
+                       lwz             r6,4(r6)                                        /* Get the latest reference and change bits */
+                       stw             r11,mmPTEent(r3)                        /* Clear the pointer to the PTE */
+                       rlwinm  r6,r6,0,23,24                           /* Extract the RC bits */
+                       lwz             r9,PCAallo(r7)                          /* Get the allocation control bits */
+                       rlwinm  r8,r5,24,8,15                           /* Make the autogen bit to turn off */
+                       lwz             r10,mmphysent(r3)                       ; Get any physical entry
+                       or              r9,r9,r5                                        /* Set the slot free */
+                       rlwimi  r8,r8,24,16,23                          /* Get lock bit mask to turn it off */
+                       andc    r9,r9,r8                                        /* Clear the auto and lock bits */
+                       mr.             r10,r10                                         ; Is there a physical entry?
+                       li              r5,pepte1                                       /* Get displacement to the second word of master pte */
+                       stw             r9,PCAallo(r7)                          /* Store the allocation controls */
+                       rlwimi  r2,r6,0,23,24                           ; Stick in RC bits
+                       beq-    avnophys                                        ; No physical entry...                  
+                       
+attrvmod:      lwarx   r11,r5,r10                                      /* Get the master copy */
+                       or              r11,r11,r6                                      /* Merge in latest RC */
+                       stwcx.  r11,r5,r10                                      /* Save it back */
+                       bne-    attrvmod                                        /* If it changed, try again... */
+                       
+avnophys:      li              r4,0                                            /* Get a 0 */
+                       stw             r2,mmPTEr(r3)                           ; Set the real part of the PTE
+
+                       sync                                                            ; Make sure that everything is updated
+
+                       stw             r4,0(r7)                                        /* Unlock the hash chain */
+                       
+                       rlwinm  r2,r2,0,0,19                            ; Clear back to page boundary
+                       
+attrflsh:      cmplwi  r4,(4096-32)                            ; Are we about to do the last line on page?
+                       dcbst   r2,r4                                           ; Flush cache because we changed attributes
+                       addi    r4,r4,32                                        ; Bump up cache
+                       blt+    attrflsh                                        ; Do the whole page...
+                       sync
 
-                       li              r2,0                                            ; Lock clear value
-
-                       ptesync                                                         ; Wait for quiet again
-                       sync                                                            ; Make sure that is done
+                       li              r4,0
+attrimvl:      cmplwi  r4,(4096-32)                            ; Are we about to do the last line on page?
+                       dcbi    r2,r4                                           ; Invalidate dcache because we changed attributes
+                       icbi    r2,r4                                           ; Invalidate icache because we changed attributes
+                       addi    r4,r4,32                                        ; Bump up cache
+                       blt+    attrimvl                                        ; Do the whole page...
+                       sync
 
-                       stw             r2,tlbieLock(0)                         ; Clear the tlbie lock
-                       
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkShared                                      ; Go get a shared lock on the mapping lists
-                       mr.             r3,r3                                           ; Did we get the lock?
-                       bne-    hrmPanic                                        ; Nope...
-                       
-                       lwz             r4,mpVAddr(r31)                         ; High order of address
-                       lwz             r5,mpVAddr+4(r31)                       ; Low order of address
-                       mr              r3,r28                                          ; Pass in pmap to search
-                       mr              r29,r4                                          ; Save this in case we need it (only promote fails)
-                       mr              r30,r5                                          ; Save this in case we need it (only promote fails)
-                       bl              EXT(mapSearchFull)                      ; Go see if we can find it
-                       
-                       mr.             r3,r3                                           ; Did we? (And remember mapping address for later)
-                       mr              r15,r4                                          ; Save top of next vaddr
-                       mr              r16,r5                                          ; Save bottom of next vaddr
-                       beq-    hrmPanic                                        ; Nope, not found...
-                       
-                       cmpld   r3,r31                                          ; Same mapping?
-                       bne-    hrmPanic                                        ; Not good...
-                       
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkPromote                                     ; Try to promote shared to exclusive
-                       mr.             r3,r3                                           ; Could we?
-                       mr              r3,r31                                          ; Restore the mapping pointer
-                       beq+    hrmBDone2                                       ; Yeah...
-                       
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkConvert                                     ; Convert shared to exclusive
-                       mr.             r3,r3                                           ; Could we?
-                       bne--   hrmPanic                                        ; Nope, we must have timed out...
-                       
-                       mr              r3,r28                                          ; Pass in pmap to search
-                       mr              r4,r29                                          ; High order of address
-                       mr              r5,r30                                          ; Low order of address
-                       bl              EXT(mapSearchFull)                      ; Rescan the list
-                       
-                       mr.             r3,r3                                           ; Did we lose it when we converted?
-                       mr              r15,r4                                          ; Save top of next vaddr
-                       mr              r16,r5                                          ; Save bottom of next vaddr
-                       beq--   hrmPanic                                        ; Yeah, we did, someone tossed it for us...
-
-hrmBDone2:     bl              mapDrainBusy                            ; Go wait until mapping is unused
-
-                       mr              r3,r28                                          ; Get the pmap to remove from
-                       mr              r4,r31                                          ; Point to the mapping
-                       bl              EXT(mapRemove)                          ; Remove the mapping from the list      
-                                       
-                       lwz             r4,pmapResidentCnt(r28)         ; Get the mapped page count 
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       subi    r4,r4,1                                         ; Drop down the mapped page count
-                       stw             r4,pmapResidentCnt(r28)         ; Set the mapped page count 
-                       bl              sxlkUnlock                                      ; Unlock the search list
-               
-                       b               hrmRetn64                                       ; We are all done, get out...
-                       
-hrmBTLBlcm:    li              r2,lgKillResv                           ; Get space unreserve line
-                       stwcx.  r2,0,r2                                         ; Unreserve it
-                                               
-hrmBTLBlcn:    lwz             r2,0(r7)                                        ; Get the TLBIE lock
-                       mr.             r2,r2                                           ; Is it held?
-                       beq++   hrmBTLBlcl                                      ; Nope...
-                       b               hrmBTLBlcn                                      ; Yeah...
+                       mtmsr   r0                                                      ; Restore interrupts and translation
+                       isync
 
+#if PERFTIMES && DEBUG
+                       mflr    r11
+                       li              r3,41
+                       bl              EXT(dbgLog2)                            
+                       mtlr    r11
+#endif
+                       blr                                                                     /* Return... */
 
 
 /*
- *                     mapping *hw_purge_phys(physent) - remove a mapping from the system
+ *                     hw_pte_comm(physent) - Do something to the PTE pointing to a physical page
  *
- *                     Upon entry, R3 contains a pointer to a physent.  
+ *                     Upon entry, R3 contains a pointer to a physical entry which is locked.
+ *                     Note that this must be done with both interruptions off and VM off
  *
- *                     This function removes the first mapping from a physical entry
- *                     alias list.  It locks the list, extracts the vaddr and pmap from
- *                     the first entry.  It then jumps into the hw_rem_map function.
- *                     NOTE: since we jump into rem_map, we need to set up the stack
- *                     identically.  Also, we set the next parm to 0 so we do not
- *                     try to save a next vaddr.
- *                     
- *                     We return the virtual address of the removed mapping as a 
- *                     R3.
+ *                     First, we set up CRs 5 and 7 to indicate which of the 7 calls this is.
  *
- *                     Note that this is designed to be called from 32-bit mode with a stack.
+ *                     Now we scan the mappings to invalidate any with an active PTE.
  *
- *                     We disable translation and all interruptions here.  This keeps is
- *                     from having to worry about a deadlock due to having anything locked
- *                     and needing it to process a fault.
+ *                             Acquire the lock on the PTEG hash list for the mapping being processed.
+ *
+ *                             If the current mapping has a PTE entry, we invalidate
+ *                             it and merge the reference and change information into the phys_entry.
+ *
+ *                             Next, unlock the hash list and go on to the next mapping.
  *
- *                     Note that this must be done with both interruptions off and VM off
- *     
- * 
- * Remove mapping via physical page (mapping_purge)
- * 
- *  1) lock physent
- *  2) extract vaddr and pmap
- *  3) unlock physent
- *  4) do "remove mapping via pmap"
- *  
  *     
+ *                       
  */
 
                        .align  5
-                       .globl  EXT(hw_purge_phys)
-
-LEXT(hw_purge_phys)
-                       stwu    r1,-(FM_ALIGN(hrmStackSize)+FM_SIZE)(r1)        ; Make some space on the stack
-                       mflr    r0                                                      ; Save the link register
-                       stw             r15,FM_ARG0+0x00(r1)            ; Save a register
-                       stw             r16,FM_ARG0+0x04(r1)            ; Save a register
-                       stw             r17,FM_ARG0+0x08(r1)            ; Save a register
-                       stw             r18,FM_ARG0+0x0C(r1)            ; Save a register
-                       stw             r19,FM_ARG0+0x10(r1)            ; Save a register
-                       stw             r20,FM_ARG0+0x14(r1)            ; Save a register
-                       stw             r21,FM_ARG0+0x18(r1)            ; Save a register
-                       stw             r22,FM_ARG0+0x1C(r1)            ; Save a register
-                       stw             r23,FM_ARG0+0x20(r1)            ; Save a register
-                       stw             r24,FM_ARG0+0x24(r1)            ; Save a register
-                       stw             r25,FM_ARG0+0x28(r1)            ; Save a register
-                       li              r6,0                                            ; Set no next address return
-                       stw             r26,FM_ARG0+0x2C(r1)            ; Save a register
-                       stw             r27,FM_ARG0+0x30(r1)            ; Save a register
-                       stw             r28,FM_ARG0+0x34(r1)            ; Save a register
-                       stw             r29,FM_ARG0+0x38(r1)            ; Save a register
-                       stw             r30,FM_ARG0+0x3C(r1)            ; Save a register
-                       stw             r31,FM_ARG0+0x40(r1)            ; Save a register
-                       stw             r6,FM_ARG0+0x44(r1)                     ; Save address to save next mapped vaddr
-                       stw             r0,(FM_ALIGN(hrmStackSize)+FM_SIZE+FM_LR_SAVE)(r1)      ; Save the return
-
-                       bl              EXT(mapSetUp)                           ; Turn off interrupts, translation, and possibly enter 64-bit
-
-                       bl              mapPhysLock                                     ; Lock the physent
-                       
-                       bt++    pf64Bitb,hppSF                          ; skip if 64-bit (only they take the hint)
-               
-                       lwz             r12,ppLink+4(r3)                        ; Grab the pointer to the first mapping
-                       li              r0,0x3F                                         ; Set the bottom stuff to clear
-                       b               hppJoin                                         ; Join the common...
-                       
-hppSF:         li              r0,0xFF
-                       ld              r12,ppLink(r3)                          ; Get the pointer to the first mapping
-                       rldicl  r0,r0,62,0                                      ; Rotate clean up mask to get 0xC0000000000000003F
-
-hppJoin:       andc.   r12,r12,r0                                      ; Clean and test link
-                       beq--   hppNone                                         ; There are no more mappings on physical page
-                       
-                       lis             r28,hi16(EXT(pmapTrans))        ; Get the top of the start of the pmap hash to pmap translate table
-                       lhz             r7,mpSpace(r12)                 ; Get the address space hash
-                       ori             r28,r28,lo16(EXT(pmapTrans))    ; Get the top of the start of the pmap hash to pmap translate table
-                       slwi    r0,r7,2                                         ; Multiply space by 4
-                       lwz             r4,mpVAddr(r12)                         ; Get the top of the vaddr
-                       slwi    r7,r7,3                                         ; Multiply space by 8
-                       lwz             r5,mpVAddr+4(r12)                       ; and the bottom
-                       add             r7,r7,r0                                        ; Get correct displacement into translate table
-                       lwz             r28,0(r28)                                      ; Get the actual translation map
-       
-                       add             r28,r28,r7                                      ; Point to the pmap translation
-                                       
-                       bl              mapPhysUnlock                           ; Time to unlock the physical entry
-                       
-                       bt++    pf64Bitb,hppSF2                         ; skip if 64-bit (only they take the hint)
-                       
-                       lwz             r28,pmapPAddr+4(r28)            ; Get the physical address of the pmap
-                       b               hrmJoin                                         ; Go remove the mapping...
-                       
-hppSF2:                ld              r28,pmapPAddr(r28)                      ; Get the physical address of the pmap
-                       b               hrmJoin                                         ; Go remove the mapping...
+                       .globl  EXT(hw_inv_all)
 
-                       .align  5
-                       
-hppNone:       bl              mapPhysUnlock                           ; Time to unlock the physical entry
+LEXT(hw_inv_all)
+       
+                       li              r9,0x800                                        /* Indicate invalidate all */
+                       li              r2,0                                            ; No inadvertant modifications please
+                       b               hw_pte_comm                                     /* Join in the fun... */
 
-                       bt++    pf64Bitb,hppSF3                         ; skip if 64-bit (only they take the hint)...
 
-                       mtmsr   r11                                                     ; Restore enables/translation/etc.
-                       isync
-                       b               hppRetnCmn                                      ; Join the common return code...
+                       .align  5
+                       .globl  EXT(hw_tst_mod)
 
-hppSF3:                mtmsrd  r11                                                     ; Restore enables/translation/etc.
-                       isync
+LEXT(hw_tst_mod)
 
-;
-;                      NOTE: we have not used any registers other than the volatiles to this point
-;
+                       lwz             r8,pepte1(r3)                           ; Get the saved PTE image
+                       li              r9,0x400                                        /* Indicate test modify */
+                       li              r2,0                                            ; No inadvertant modifications please
+                       rlwinm. r8,r8,25,31,31                          ; Make change bit into return code
+                       beq+    hw_pte_comm                                     ; Assume we do not know if it is set...
+                       mr              r3,r8                                           ; Set the return code
+                       blr                                                                     ; Return quickly...
 
-hppRetnCmn:    lwz             r12,(FM_ALIGN(hrmStackSize)+FM_SIZE+FM_LR_SAVE)(r1)     ; Restore the return
+                       .align  5
+                       .globl  EXT(hw_tst_ref)
 
-                       li              r3,0                                            ; Clear high order mapping address because we are 32-bit
-                       mtlr    r12                                                     ; Restore the return
-                       lwz             r1,0(r1)                                        ; Pop the stack
-                       blr                                                                     ; Leave...
+LEXT(hw_tst_ref)
+                       lwz             r8,pepte1(r3)                           ; Get the saved PTE image
+                       li              r9,0x200                                        /* Indicate test reference bit */
+                       li              r2,0                                            ; No inadvertant modifications please
+                       rlwinm. r8,r8,24,31,31                          ; Make reference bit into return code
+                       beq+    hw_pte_comm                                     ; Assume we do not know if it is set...
+                       mr              r3,r8                                           ; Set the return code
+                       blr                                                                     ; Return quickly...
 
 /*
- *                     mapping *hw_purge_map(pmap, vaddr, addr64_t *next) - remove a mapping from the system.
- *
- *                     Upon entry, R3 contains a pointer to a pmap.  Since vaddr is
- *                     a 64-bit quantity, it is a long long so it is in R4 and R5.
- *                     
- *                     We return the virtual address of the removed mapping as a 
- *                     R3.
- *
- *                     Note that this is designed to be called from 32-bit mode with a stack.
- *
- *                     We disable translation and all interruptions here.  This keeps is
- *                     from having to worry about a deadlock due to having anything locked
- *                     and needing it to process a fault.
- *
- *                     Note that this must be done with both interruptions off and VM off
- *     
- *  Remove a mapping which can be reestablished by VM
- *
+ *                     Note that the following are all in one CR for ease of use later
  */
+                       .align  4
+                       .globl  EXT(hw_set_mod)
 
-                       .align  5
-                       .globl  EXT(hw_purge_map)
-
-LEXT(hw_purge_map)
-                       stwu    r1,-(FM_ALIGN(hrmStackSize)+FM_SIZE)(r1)        ; Make some space on the stack
-                       mflr    r0                                                      ; Save the link register
-                       stw             r15,FM_ARG0+0x00(r1)            ; Save a register
-                       stw             r16,FM_ARG0+0x04(r1)            ; Save a register
-                       stw             r17,FM_ARG0+0x08(r1)            ; Save a register
-                       stw             r18,FM_ARG0+0x0C(r1)            ; Save a register
-                       stw             r19,FM_ARG0+0x10(r1)            ; Save a register
-                       mfsprg  r19,2                                           ; Get feature flags 
-                       stw             r20,FM_ARG0+0x14(r1)            ; Save a register
-                       stw             r21,FM_ARG0+0x18(r1)            ; Save a register
-                       mtcrf   0x02,r19                                        ; move pf64Bit cr6
-                       stw             r22,FM_ARG0+0x1C(r1)            ; Save a register
-                       stw             r23,FM_ARG0+0x20(r1)            ; Save a register
-                       stw             r24,FM_ARG0+0x24(r1)            ; Save a register
-                       stw             r25,FM_ARG0+0x28(r1)            ; Save a register
-                       stw             r26,FM_ARG0+0x2C(r1)            ; Save a register
-                       stw             r27,FM_ARG0+0x30(r1)            ; Save a register
-                       stw             r28,FM_ARG0+0x34(r1)            ; Save a register
-                       stw             r29,FM_ARG0+0x38(r1)            ; Save a register
-                       stw             r30,FM_ARG0+0x3C(r1)            ; Save a register
-                       stw             r31,FM_ARG0+0x40(r1)            ; Save a register
-                       stw             r6,FM_ARG0+0x44(r1)                     ; Save address to save next mapped vaddr
-                       stw             r0,(FM_ALIGN(hrmStackSize)+FM_SIZE+FM_LR_SAVE)(r1)      ; Save the return
-
-                       bt++    pf64Bitb,hpmSF1                         ; skip if 64-bit (only they take the hint)
-                       lwz             r9,pmapvr+4(r3)                         ; Get conversion mask
-                       b               hpmSF1x                                         ; Done...
-                       
-hpmSF1:                ld              r9,pmapvr(r3)                           ; Get conversion mask
-
-hpmSF1x:       
-                       bl              EXT(mapSetUp)                           ; Turn off interrupts, translation, and possibly enter 64-bit
-
-                       xor             r28,r3,r9                                       ; Convert the pmap to physical addressing
-
-                       mr              r17,r11                                         ; Save the MSR
-
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkExclusive                           ; Go get an exclusive lock on the mapping lists
-                       mr.             r3,r3                                           ; Did we get the lock?
-                       bne--   hrmBadLock                                      ; Nope...
-;
-;                      Note that we do a full search (i.e., no shortcut level skips, etc.)
-;                      here so that we will know the previous elements so we can dequeue them
-;                      later.
-;
-hpmSearch:
-                       mr              r3,r28                                          ; Pass in pmap to search
-                       mr              r29,r4                                          ; Top half of vaddr
-                       mr              r30,r5                                          ; Bottom half of vaddr
-                       bl              EXT(mapSearchFull)                      ; Rescan the list
-                       mr.             r31,r3                                          ; Did we? (And remember mapping address for later)
-                       or              r0,r4,r5                                        ; Are we beyond the end?
-                       mr              r15,r4                                          ; Save top of next vaddr
-                       cmplwi  cr1,r0,0                                        ; See if there is another
-                       mr              r16,r5                                          ; Save bottom of next vaddr
-                       bne--   hpmGotOne                                       ; We found one, go check it out...
-
-hpmCNext:      bne++   cr1,hpmSearch                           ; There is another to check...
-                       b               hrmNotFound                                     ; No more in pmap to check...
-
-hpmGotOne:     lwz             r20,mpFlags(r3)                         ; Get the flags
-                       andi.   r9,r20,lo16(mpSpecial|mpNest|mpPerm|mpBlock)    ; Are we allowed to remove it?
-                       beq++   hrmGotX                                         ; Found, branch to remove the mapping...
-                       b               hpmCNext                                        ; Nope...
+LEXT(hw_set_mod)
+                       
+                       li              r9,0x008                                        /* Indicate set modify bit */
+                       li              r2,0x4                                          ; Set set C, clear none
+                       b               hw_pte_comm                                     /* Join in the fun... */
 
-/*
- *                     mapping *hw_purge_space(physent, pmap) - remove a mapping from the system based upon address space
- *
- *                     Upon entry, R3 contains a pointer to a pmap.  
- *                     pa is a pointer to the physent
- *
- *                     This function removes the first mapping for a specific pmap from a physical entry
- *                     alias list.  It locks the list, extracts the vaddr and pmap from
- *                     the first apporpriate entry.  It then jumps into the hw_rem_map function.
- *                     NOTE: since we jump into rem_map, we need to set up the stack
- *                     identically.  Also, we set the next parm to 0 so we do not
- *                     try to save a next vaddr.
- *                     
- *                     We return the virtual address of the removed mapping as a 
- *                     R3.
- *
- *                     Note that this is designed to be called from 32-bit mode with a stack.
- *
- *                     We disable translation and all interruptions here.  This keeps is
- *                     from having to worry about a deadlock due to having anything locked
- *                     and needing it to process a fault.
- *
- *                     Note that this must be done with both interruptions off and VM off
- *     
- * 
- * Remove mapping via physical page (mapping_purge)
- * 
- *  1) lock physent
- *  2) extract vaddr and pmap
- *  3) unlock physent
- *  4) do "remove mapping via pmap"
- *  
- *     
- */
 
-                       .align  5
-                       .globl  EXT(hw_purge_space)
-
-LEXT(hw_purge_space)
-                       stwu    r1,-(FM_ALIGN(hrmStackSize)+FM_SIZE)(r1)        ; Make some space on the stack
-                       mflr    r0                                                      ; Save the link register
-                       stw             r15,FM_ARG0+0x00(r1)            ; Save a register
-                       stw             r16,FM_ARG0+0x04(r1)            ; Save a register
-                       stw             r17,FM_ARG0+0x08(r1)            ; Save a register
-                       mfsprg  r2,2                                            ; Get feature flags 
-                       stw             r18,FM_ARG0+0x0C(r1)            ; Save a register
-                       stw             r19,FM_ARG0+0x10(r1)            ; Save a register
-                       stw             r20,FM_ARG0+0x14(r1)            ; Save a register
-                       stw             r21,FM_ARG0+0x18(r1)            ; Save a register
-                       stw             r22,FM_ARG0+0x1C(r1)            ; Save a register
-                       mtcrf   0x02,r2                                         ; move pf64Bit cr6
-                       stw             r23,FM_ARG0+0x20(r1)            ; Save a register
-                       stw             r24,FM_ARG0+0x24(r1)            ; Save a register
-                       stw             r25,FM_ARG0+0x28(r1)            ; Save a register
-                       stw             r26,FM_ARG0+0x2C(r1)            ; Save a register
-                       stw             r27,FM_ARG0+0x30(r1)            ; Save a register
-                       li              r6,0                                            ; Set no next address return
-                       stw             r28,FM_ARG0+0x34(r1)            ; Save a register
-                       stw             r29,FM_ARG0+0x38(r1)            ; Save a register
-                       stw             r30,FM_ARG0+0x3C(r1)            ; Save a register
-                       stw             r31,FM_ARG0+0x40(r1)            ; Save a register
-                       stw             r6,FM_ARG0+0x44(r1)                     ; Save address to save next mapped vaddr
-                       stw             r0,(FM_ALIGN(hrmStackSize)+FM_SIZE+FM_LR_SAVE)(r1)      ; Save the return
-
-                       bt++    pf64Bitb,hpsSF1                         ; skip if 64-bit (only they take the hint)
-
-                       lwz             r9,pmapvr+4(r4)                         ; Get conversion mask for pmap
-
-                       b               hpsSF1x                                         ; Done...
-                       
-hpsSF1:                ld              r9,pmapvr(r4)                           ; Get conversion mask for pmap
-
-hpsSF1x:       bl              EXT(mapSetUp)                           ; Turn off interrupts, translation, and possibly enter 64-bit
-                       
-                       xor             r4,r4,r9                                        ; Convert the pmap to physical addressing
-
-                       bl              mapPhysLock                                     ; Lock the physent
-                        
-                       lhz             r8,pmapSpace(r4)                        ; Get the space hash
-                       bt++    pf64Bitb,hpsSF                          ; skip if 64-bit (only they take the hint)
-               
-                       lwz             r12,ppLink+4(r3)                        ; Grab the pointer to the first mapping
-                       
-hpsSrc32:      rlwinm. r12,r12,0,0,25                          ; Clean and test mapping address
-                       beq             hpsNone                                         ; Did not find one...
-                       
-                       lhz             r10,mpSpace(r12)                        ; Get the space
-                       
-                       cmplw   r10,r8                                          ; Is this one of ours?
-                       beq             hpsFnd                                          ; Yes...
-                       
-                       lwz             r12,mpAlias+4(r12)                      ; Chain on to the next
-                       b               hpsSrc32                                        ; Check it out...
+                       .align  4
+                       .globl  EXT(hw_clr_mod)
 
-                       .align  5
-               
-hpsSF:         li              r0,0xFF
-                       ld              r12,ppLink(r3)                          ; Get the pointer to the first mapping
-                       rldicl  r0,r0,62,0                                      ; Rotate clean up mask to get 0xC0000000000000003F
-                       
-hpsSrc64:      andc.   r12,r12,r0                                      ; Clean and test mapping address
-                       beq             hpsNone                                         ; Did not find one...
-                       
-                       lhz             r10,mpSpace(r12)                        ; Get the space
-                       
-                       cmplw   r10,r8                                          ; Is this one of ours?
-                       beq             hpsFnd                                          ; Yes...
-                       
-                       ld              r12,mpAlias(r12)                        ; Chain on to the next
-                       b               hpsSrc64                                        ; Check it out...
-                       
-                       .align  5
-                       
-hpsFnd:                mr              r28,r4                                          ; Set the pmap physical address
-                       lwz             r4,mpVAddr(r12)                         ; Get the top of the vaddr
-                       lwz             r5,mpVAddr+4(r12)                       ; and the bottom
-                       
-                       bl              mapPhysUnlock                           ; Time to unlock the physical entry
-                       b               hrmJoin                                         ; Go remove the mapping...
-                       
-                       .align  5
+LEXT(hw_clr_mod)
                        
-hpsNone:       bl              mapPhysUnlock                           ; Time to unlock the physical entry
-
-                       bt++    pf64Bitb,hpsSF3                         ; skip if 64-bit (only they take the hint)...
+                       li              r9,0x004                                        /* Indicate clear modify bit */
+                       li              r2,0x1                                          ; Set set none, clear C
+                       b               hw_pte_comm                                     /* Join in the fun... */
 
-                       mtmsr   r11                                                     ; Restore enables/translation/etc.
-                       isync
-                       b               hpsRetnCmn                                      ; Join the common return code...
 
-hpsSF3:                mtmsrd  r11                                                     ; Restore enables/translation/etc.
-                       isync
+                       .align  4
+                       .globl  EXT(hw_set_ref)
 
-;
-;                      NOTE: we have not used any registers other than the volatiles to this point
-;
+LEXT(hw_set_ref)
+                       
+                       li              r9,0x002                                        /* Indicate set reference */
+                       li              r2,0x8                                          ; Set set R, clear none
+                       b               hw_pte_comm                                     /* Join in the fun... */
 
-hpsRetnCmn:    lwz             r12,(FM_ALIGN(hrmStackSize)+FM_SIZE+FM_LR_SAVE)(r1)     ; Restore the return
+                       .align  5
+                       .globl  EXT(hw_clr_ref)
 
-                       li              r3,0                                            ; Set return code
-                       mtlr    r12                                                     ; Restore the return
-                       lwz             r1,0(r1)                                        ; Pop the stack
-                       blr                                                                     ; Leave...
+LEXT(hw_clr_ref)
+                       
+                       li              r9,0x001                                        /* Indicate clear reference bit */
+                       li              r2,0x2                                          ; Set set none, clear R
+                       b               hw_pte_comm                                     /* Join in the fun... */
 
 
 /*
- *                     mapping *hw_find_space(physent, space) - finds the first mapping on physent for specified space
- *
- *                     Upon entry, R3 contains a pointer to a physent.  
- *                     space is the space ID from the pmap in question
- *
- *                     We return the virtual address of the found mapping in 
- *                     R3. Note that the mapping busy is bumped.
- *
- *                     Note that this is designed to be called from 32-bit mode with a stack.
- *
- *                     We disable translation and all interruptions here.  This keeps is
- *                     from having to worry about a deadlock due to having anything locked
- *                     and needing it to process a fault.
- *     
+ *                     This is the common stuff.
  */
 
                        .align  5
-                       .globl  EXT(hw_find_space)
-
-LEXT(hw_find_space)
-                       stwu    r1,-(FM_SIZE)(r1)                       ; Make some space on the stack
-                       mflr    r0                                                      ; Save the link register
-                       mr              r8,r4                                           ; Remember the space
-                       stw             r0,(FM_SIZE+FM_LR_SAVE)(r1)     ; Save the return
 
-                       bl              EXT(mapSetUp)                           ; Turn off interrupts, translation, and possibly enter 64-bit
-
-                       bl              mapPhysLock                                     ; Lock the physent
+hw_pte_comm:                                                                   /* Common routine for pte tests and manips */
  
-                       bt++    pf64Bitb,hfsSF                          ; skip if 64-bit (only they take the hint)
-               
-                       lwz             r12,ppLink+4(r3)                        ; Grab the pointer to the first mapping
-                       
-hfsSrc32:      rlwinm. r12,r12,0,0,25                          ; Clean and test mapping address
-                       beq             hfsNone                                         ; Did not find one...
-                       
-                       lhz             r10,mpSpace(r12)                        ; Get the space
-                       
-                       cmplw   r10,r8                                          ; Is this one of ours?
-                       beq             hfsFnd                                          ; Yes...
+#if PERFTIMES && DEBUG
+                       mflr    r11
+                       mr              r7,r3
+                       lwz             r4,4(r3)
+                       mr              r5,r9                   
+                       li              r3,28
+                       bl              EXT(dbgLog2)                                            ; Start of hw_add_map
+                       mr              r3,r7
+                       mtlr    r11
+#endif
+                       mfsprg  r8,2                                            ; Get feature flags 
+                       lwz             r10,pephyslink(r3)                      /* Get the first mapping block */
+                       mfmsr   r0                                                      /* Save the MSR  */
+                       rlwinm. r10,r10,0,0,26                          ; Clear out the flags from first link and see if we are mapped
+                       rlwinm  r0,r0,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r0,r0,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r12,r0,0,MSR_EE_BIT+1,MSR_EE_BIT-1      /* Clear interruptions */
+                       mtcrf   0x04,r8                                         ; Set the features                      
+                       rlwinm  r12,r12,0,28,25                         /* Clear IR and DR */
+                       beq-    comnmap                                         ; No mapping
+                       dcbt    br0,r10                                         ; Touch the first mapping in before the isync
+                       
+comnmap:
+
+                       bt              pfNoMSRirb,hpcNoMSR                     ; No MSR...
+
+                       mtmsr   r12                                                     ; Translation and all off
+                       isync                                                           ; Toss prefetch
+                       b               hpcNoMSRx
                        
-                       lwz             r12,mpAlias+4(r12)                      ; Chain on to the next
-                       b               hfsSrc32                                        ; Check it out...
+hpcNoMSR:      
+                       mr              r5,r0
+                       mr              r7,r3
+                       li              r0,loadMSR                                      ; Get the MSR setter SC
+                       mr              r3,r12                                          ; Get new MSR
+                       sc                                                                      ; Set it
+                       mr              r3,r7
+                       mr              r0,r5
+hpcNoMSRx:
 
-                       .align  5
-               
-hfsSF:         li              r0,0xFF
-                       ld              r12,ppLink(r3)                          ; Get the pointer to the first mapping
-                       rldicl  r0,r0,62,0                                      ; Rotate clean up mask to get 0xC0000000000000003F
-                       
-hfsSrc64:      andc.   r12,r12,r0                                      ; Clean and test mapping address
-                       beq             hfsNone                                         ; Did not find one...
-                       
-                       lhz             r10,mpSpace(r12)                        ; Get the space
-                       
-                       cmplw   r10,r8                                          ; Is this one of ours?
-                       beq             hfsFnd                                          ; Yes...
-                       
-                       ld              r12,mpAlias(r12)                        ; Chain on to the next
-                       b               hfsSrc64                                        ; Check it out...
-                       
-                       .align  5
-                       
-hfsFnd:                mr              r8,r3                                           ; Save the physent
-                       mr              r3,r12                                          ; Point to the mapping
-                       bl              mapBumpBusy                                     ; If we found it, bump up the busy count so the mapping does not disapear
+                       mtcrf   0x05,r9                                         /* Set the call type flags into cr5 and 7 */
 
-                       mr              r3,r8                                           ; Get back the physical entry
-                       li              r7,0xFFF                                        ; Get a page size mask
-                       bl              mapPhysUnlock                           ; Time to unlock the physical entry
+                       beq-    commdone                                        ; Nothing us mapped to this page...
+                       b               commnext                                        ; Jump to first pass (jump here so we can align loop)
                
-                       andc    r3,r12,r7                                       ; Move the mapping back down to a page  
-                       lwz             r3,mbvrswap+4(r3)                       ; Get last half of virtual to real swap
-                       xor             r12,r3,r12                                      ; Convert to virtual
-                       b               hfsRet                                          ; Time to return
-                       
-                       .align  5
-                       
-hfsNone:       bl              mapPhysUnlock                           ; Time to unlock the physical entry
-                       
-hfsRet:                bt++    pf64Bitb,hfsSF3                         ; skip if 64-bit (only they take the hint)...
-
-                       mtmsr   r11                                                     ; Restore enables/translation/etc.
-                       isync
-                       b               hfsRetnCmn                                      ; Join the common return code...
-
-hfsSF3:                mtmsrd  r11                                                     ; Restore enables/translation/etc.
-                       isync
-
-;
-;                      NOTE: we have not used any registers other than the volatiles to this point
-;
-
-hfsRetnCmn:    mr              r3,r12                                          ; Get the mapping or a 0 if we failed
-                       lwz             r12,(FM_SIZE+FM_LR_SAVE)(r1)    ; Restore the return
+                       .align  5       
 
-                       mtlr    r12                                                     ; Restore the return
-                       lwz             r1,0(r1)                                        ; Pop the stack
-                       blr                                                                     ; Leave...
+commnext:      lwz             r11,mmnext(r10)                         ; Get the pointer to the next mapping (if any)
+                       lwz             r7,mmPTEhash(r10)                       /* Get pointer to hash list anchor */
+                       lwz             r5,mmPTEv(r10)                          /* Get the virtual address */
+                       mr.             r11,r11                                         ; More mappings to go?
+                       rlwinm  r7,r7,0,0,25                            /* Round hash list down to PCA boundary */
+                       beq-    commnxtch                                       ; No more mappings...
+                       dcbt    br0,r11                                         ; Touch the next mapping
 
+commnxtch:     li              r12,1                                           /* Get the locked value */
 
-;
-;                      mapping *hw_find_map(pmap, va, *nextva) - Looks up a vaddr in a pmap
-;                      Returns 0 if not found or the virtual address of the mapping if
-;                      if is.  Also, the mapping has the busy count bumped.
-;
-                       .align  5
-                       .globl  EXT(hw_find_map)
+commLck1:      lwarx   r11,0,r7                                        /* Get the PTEG lock */
+                       mr.             r11,r11                                         /* Is it locked? */
+                       bne-    commLckw1                                       /* Yeah... */
+                       stwcx.  r12,0,r7                                        /* Try to take it */
+                       bne-    commLck1                                        /* Someone else was trying, try again... */
+                       b               commSXg1                                        /* All done... */
+                       
+                       .align  4
 
-LEXT(hw_find_map)
-                       stwu    r1,-(FM_ALIGN((31-25+1)*4)+FM_SIZE)(r1) ; Make some space on the stack
-                       mflr    r0                                                      ; Save the link register
-                       stw             r25,FM_ARG0+0x00(r1)            ; Save a register
-                       stw             r26,FM_ARG0+0x04(r1)            ; Save a register
-                       mr              r25,r6                                          ; Remember address of next va
-                       stw             r27,FM_ARG0+0x08(r1)            ; Save a register
-                       stw             r28,FM_ARG0+0x0C(r1)            ; Save a register
-                       stw             r29,FM_ARG0+0x10(r1)            ; Save a register
-                       stw             r30,FM_ARG0+0x14(r1)            ; Save a register
-                       stw             r31,FM_ARG0+0x18(r1)            ; Save a register
-                       stw             r0,(FM_ALIGN((31-26+1)*4)+FM_SIZE+FM_LR_SAVE)(r1)       ; Save the return
+commLckw1:     mr.             r11,r11                                         /* Check if it's already held */
+                       beq+    commLck1                                        /* It's clear... */
+                       lwz             r11,0(r7)                                       /* Get lock word again... */
+                       b               commLckw1                                       /* Wait... */
+                       
+                       .align  4
 
-                       lwz             r6,pmapvr(r3)                           ; Get the first part of the VR translation for pmap
-                       lwz             r7,pmapvr+4(r3)                         ; Get the second part
+commSXg1:      isync                                                           /* Make sure we haven't used anything yet */
 
+                       lwz             r6,mmPTEent(r10)                        /* Get the pointer to the PTE now that the lock's set */
 
-                       bl              EXT(mapSetUp)                           ; Turn off interrupts, translation, and possibly enter 64-bit
+                       rlwinm  r9,r5,1,0,3                                     /* Move in the segment */
+                       mr.             r6,r6                                           /* See if there is a PTE entry here */
+                       rlwinm  r8,r5,31,2,25                           /* Line it up and check if empty */
+               
+                       beq+    commul                                          /* There's no PTE to invalidate... */
+                       
+                       xor             r8,r8,r6                                        /* Back hash to virt index */
+                       rlwimi  r9,r5,22,4,9                            /* Move in the API */
+                       lis             r12,HIGH_ADDR(EXT(tlb_system_lock))             /* Get the TLBIE lock */
+                       rlwinm  r5,r5,0,1,31                            /* Clear the valid bit */
+                       ori             r12,r12,LOW_ADDR(EXT(tlb_system_lock))  /* Grab up the bottom part */
+                       rlwimi  r9,r8,6,10,19                           /* Create the virtual address */
+
+                       stw             r5,0(r6)                                        /* Make the PTE invalid */              
+                       mfspr   r4,pvr                                          /* Find out what kind of machine we are */
+                       sync                                                            /* Make sure the invalid is stored */
+                                               
+tlbhangco:     lwarx   r11,0,r12                                       /* Get the TLBIE lock */
+                       rlwinm  r8,r6,29,29,31                          /* Get the bit position of entry */
+                       mr.             r11,r11                                         /* Is it locked? */
+                       lis             r5,0x8000                                       /* Start up a bit mask */
+                       li              r11,1                                           /* Get our lock word */
+                       bne-    tlbhangco                                       /* It's locked, go wait... */
+                       stwcx.  r11,0,r12                                       /* Try to get it */
+                       bne-    tlbhangco                                       /* We was beat... */
+                       
+                       rlwinm  r4,r4,16,16,31                          /* Isolate CPU type */
+                       li              r11,0                                           /* Lock clear value */
+                       cmplwi  r4,3                                            /* Is this a 603? */
 
-                       mr              r27,r11                                         ; Remember the old MSR
-                       mr              r26,r12                                         ; Remember the feature bits
+                       tlbie   r9                                                      /* Invalidate it everywhere */
 
-                       xor             r28,r3,r7                                       ; Change the common 32- and 64-bit half
+                       beq-    its603co                                        /* It's a 603, skip the tlbsync... */
+                       
+                       eieio                                                           /* Make sure that the tlbie happens first */
+                       tlbsync                                                         /* wait for everyone to catch up */
+                       isync                                                           
+                       
+its603co:      stw             r11,0(r12)                                      /* Clear the lock */
+                       srw             r5,r5,r8                                        /* Make a "free slot" mask */
+                       sync                                                            /* Make sure of it all */
 
-                       bf--    pf64Bitb,hfmSF1                         ; skip if 32-bit...
+                       lwz             r6,4(r6)                                        /* Get the latest reference and change bits */
+                       lwz             r9,PCAallo(r7)                          /* Get the allocation control bits */
+                       stw             r11,mmPTEent(r10)                       /* Clear the pointer to the PTE */
+                       rlwinm  r8,r5,24,8,15                           /* Make the autogen bit to turn off */
+                       or              r9,r9,r5                                        /* Set the slot free */
+                       rlwimi  r8,r8,24,16,23                          /* Get lock bit mask to turn it off */
+                       rlwinm  r4,r6,0,23,24                           /* Extract the RC bits */
+                       andc    r9,r9,r8                                        /* Clear the auto and lock bits */
+                       li              r5,pepte1                                       /* Get displacement to the second word of master pte */
+                       stw             r9,PCAallo(r7)                          /* Store the allocation controls */
                        
-                       rldimi  r28,r6,32,0                                     ; Shift the fixed upper part of the physical over and cram in top
+commmod:       lwarx   r11,r5,r3                                       /* Get the master copy */
+                       or              r11,r11,r4                                      /* Merge in latest RC */
+                       stwcx.  r11,r5,r3                                       /* Save it back */
+                       bne-    commmod                                         /* If it changed, try again... */
+                       b               commulnl                                        ; Skip loading the old real part...
 
-hfmSF1:                mr              r29,r4                                          ; Save top half of vaddr
-                       mr              r30,r5                                          ; Save the bottom half
-                                               
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkShared                                      ; Go get a shared lock on the mapping lists
-                       mr.             r3,r3                                           ; Did we get the lock?
-                       bne--   hfmBadLock                                      ; Nope...
+commul:                lwz             r6,mmPTEr(r10)                          ; Get the real part
 
-                       mr              r3,r28                                          ; get the pmap address
-                       mr              r4,r29                                          ; Get bits 0:31 to look for
-                       mr              r5,r30                                          ; Get bits 32:64
+commulnl:      rlwinm  r12,r2,5,23,24                          ; Get the "set" bits
+                       rlwinm  r11,r2,7,23,24                          ; Get the "clear" bits
                        
-                       bl              EXT(mapSearch)                          ; Go see if we can find it (note: R7 comes back with mpFlags)
-
-                       rlwinm  r0,r7,0,mpRIPb,mpRIPb           ; Find remove in progress bit
-                       mr.             r31,r3                                          ; Save the mapping if we found it
-                       cmplwi  cr1,r0,0                                        ; Are we removing?
-                       mr              r29,r4                                          ; Save next va high half
-                       crorc   cr0_eq,cr0_eq,cr1_eq            ; Not found or removing
-                       mr              r30,r5                                          ; Save next va low half
-                       li              r6,0                                            ; Assume we did not find it
-                       li              r26,0xFFF                                       ; Get a mask to relocate to start of mapping page
+                       or              r6,r6,r12                                       ; Set the bits to come on
+                       andc    r6,r6,r11                                       ; Clear those to come off
 
-                       bt--    cr0_eq,hfmNotFnd                        ; We did not find it...
+                       stw             r6,mmPTEr(r10)                          ; Set the new RC
 
-                       bl              mapBumpBusy                                     ; If we found it, bump up the busy count so the mapping does not disapear
+                       lwz             r10,mmnext(r10)                         /* Get the next */
+                       li              r4,0                                            /* Make sure this is 0 */
+                       mr.             r10,r10                                         ; Is there another mapping?
 
-                       andc    r4,r31,r26                                      ; Get back to the mapping page start
+                       sync                                                            ; Make sure that all is saved
 
-;                      Note: we can treat 32- and 64-bit the same here. Because we are going from
-;                      physical to virtual and we only do 32-bit virtual, we only need the low order
-;                      word of the xor.
+                       stw             r4,0(r7)                                        /* Unlock the hash chain */
+                       bne+    commnext                                        ; Go get the next if there is one...
+                       
+/*
+ *                     Now that all PTEs have been invalidated and the master RC bits are updated,
+ *                     we go ahead and figure out what the original call was and do that.  Note that
+ *                     another processor could be messing around and may have entered one of the 
+ *                     PTEs we just removed into the hash table.  Too bad...  You takes yer chances.
+ *                     If there's a problem with that, it's because some higher level was trying to
+ *                     do something with a mapping that it shouldn't.  So, the problem's really
+ *                     there, nyaaa, nyaaa, nyaaa... nyaaa, nyaaa... nyaaa! So there!
+ */
 
-                       lwz             r4,mbvrswap+4(r4)                       ; Get last half of virtual to real swap
-                       li              r6,-1                                           ; Indicate we found it and it is not being removed
-                       xor             r31,r31,r4                                      ; Flip to virtual
+commdone:      li              r5,pepte1                                       /* Get displacement to the second word of master pte */
+                       blt             cr5,commfini                            /* We're finished, it was invalidate all... */
+                       bgt             cr5,commtst                                     /* It was a test modified... */
+                       beq             cr5,commtst                                     /* It was a test reference... */
 
-hfmNotFnd:     la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkUnlock                                      ; Unlock the search list
+/*
+ *                     Note that we need to to do the interlocked update here because another processor
+ *                     can be updating the reference and change bits even though the physical entry
+ *                     is locked.  All modifications to the PTE portion of the physical entry must be
+ *                     done via interlocked update.
+ */
 
-                       rlwinm  r3,r31,0,0,31                           ; Move mapping to return register and clear top of register if 64-bit
-                       and             r3,r3,r6                                        ; Clear if not found or removing
+                       rlwinm  r12,r2,5,23,24                          ; Get the "set" bits
+                       rlwinm  r11,r2,7,23,24                          ; Get the "clear" bits
 
-hfmReturn:     bt++    pf64Bitb,hfmR64                         ; Yes...
+commcng:       lwarx   r8,r5,r3                                        /* Get the master copy */
+                       or              r8,r8,r12                                       ; Set the bits to come on
+                       andc    r8,r8,r11                                       ; Clear those to come off
+                       stwcx.  r8,r5,r3                                        /* Save it back */
+                       bne-    commcng                                         /* If it changed, try again... */
 
-                       mtmsr   r27                                                     ; Restore enables/translation/etc.
+                       mtmsr   r0                                                      /* Interrupts and translation back on */
                        isync
-                       b               hfmReturnC                                      ; Join common...
+#if PERFTIMES && DEBUG
+                       mflr    r11
+                       mr              r4,r3
+                       li              r3,29
+                       bl              EXT(dbgLog2)                                            ; Start of hw_add_map
+                       mr              r3,r4
+                       mtlr    r11
+#endif
+                       blr                                                                     /* Return... */
+
+                       .align  4
+
+commtst:       lwz             r8,pepte1(r3)                           /* Get the PTE */
+                       bne-    cr5,commtcb                                     ; This is for the change bit...
+                       mtmsr   r0                                                      ; Interrupts and translation back on
+                       rlwinm  r3,r8,24,31,31                          ; Copy reference bit to bit 31
+                       isync                                                           ; Toss prefetching
+#if PERFTIMES && DEBUG
+                       mflr    r11
+                       mr              r4,r3
+                       li              r3,29
+                       bl              EXT(dbgLog2)                                            ; Start of hw_add_map
+                       mr              r3,r4
+                       mtlr    r11
+#endif
+                       blr                                                                     ; Return...
 
-hfmR64:                mtmsrd  r27                                                     ; Restore enables/translation/etc.
-                       isync                                                           
-                       
-hfmReturnC:    stw             r29,0(r25)                                      ; Save the top of the next va
-                       stw             r30,4(r25)                                      ; Save the bottom of the next va
-                       lwz             r0,(FM_ALIGN((31-25+1)*4)+FM_SIZE+FM_LR_SAVE)(r1)       ; Save the return
-                       lwz             r25,FM_ARG0+0x00(r1)            ; Restore a register
-                       lwz             r26,FM_ARG0+0x04(r1)            ; Restore a register
-                       and             r3,r3,r6                                        ; Clear return if the mapping is being removed
-                       lwz             r27,FM_ARG0+0x08(r1)            ; Restore a register
-                       mtlr    r0                                                      ; Restore the return
-                       lwz             r28,FM_ARG0+0x0C(r1)            ; Restore a register
-                       lwz             r29,FM_ARG0+0x10(r1)            ; Restore a register
-                       lwz             r30,FM_ARG0+0x14(r1)            ; Restore a register
-                       lwz             r31,FM_ARG0+0x18(r1)            ; Restore a register
-                       lwz             r1,0(r1)                                        ; Pop the stack
-                       blr                                                                     ; Leave...
-                       
-                       .align  5
-                       
-hfmBadLock:    li              r3,1                                            ; Set lock time out error code
-                       b               hfmReturn                                       ; Leave....
+                       .align  4
+
+commtcb:       rlwinm  r3,r8,25,31,31                          ; Copy change bit to bit 31
+
+commfini:      mtmsr   r0                                                      ; Interrupts and translation back on
+                       isync                                                           ; Toss prefetching
 
+#if PERFTIMES && DEBUG
+                       mflr    r11
+                       mr              r4,r3
+                       li              r3,29
+                       bl              EXT(dbgLog2)                                            ; Start of hw_add_map
+                       mr              r3,r4
+                       mtlr    r11
+#endif
+                       blr                                                                     ; Return...
 
 /*
- *                     unsigned int hw_walk_phys(pp, preop, op, postop, parm) 
- *                             walks all mapping for a physical page and performs
- *                             specified operations on each.
- *
- *                     pp is unlocked physent
- *                     preop is operation to perform on physent before walk.  This would be
- *                             used to set cache attribute or protection
- *                     op is the operation to perform on each mapping during walk
- *                     postop is operation to perform in the phsyent after walk.  this would be
- *                             used to set or reset the RC bits.
- *
- *                     We return the RC bits from before postop is run.
+ *                     unsigned int hw_test_rc(mapping *mp, boolean_t reset);
  *
- *                     Note that this is designed to be called from 32-bit mode with a stack.
+ *                     Test the RC bits for a specific mapping.  If reset is non-zero, clear them.
+ *                     We return the RC value in the mapping if there is no PTE or if C is set.
+ *                     (Note: R is always set with C.) Otherwise we invalidate the PTE and
+ *                     collect the RC bits from there, also merging them into the global copy.
+ *                     
+ *                     For now, we release the PTE slot and leave it invalid.  In the future, we
+ *                     may consider re-validating and not releasing the slot.  It would be faster,
+ *                     but our current implementation says that we will have not PTEs valid
+ *                     without the reference bit set.
  *
- *                     We disable translation and all interruptions here.  This keeps is
- *                     from having to worry about a deadlock due to having anything locked
- *                     and needing it to process a fault.
+ *                     We will special case C==1 && not reset to just return the RC.
  *
- *                     We lock the physent, execute preop, and then walk each mapping in turn. 
- *                     If there is a PTE, it is invalidated and the RC merged into the physent.
- *                     Then we call the op function.
- *                     Then we revalidate the PTE.
- *                     Once all all mappings are finished, we save the physent RC and call the 
- *                     postop routine.  Then we unlock the physent and return the RC.
- *     
- * 
+ *                     Probable state is worst performance state: C bit is off and there is a PTE.
  */
 
+#define                htrReset 31
+
                        .align  5
-                       .globl  EXT(hw_walk_phys)
-
-LEXT(hw_walk_phys)
-                       stwu    r1,-(FM_ALIGN((31-25+1)*4)+FM_SIZE)(r1) ; Make some space on the stack
-                       mflr    r0                                                      ; Save the link register
-                       stw             r25,FM_ARG0+0x00(r1)            ; Save a register
-                       stw             r26,FM_ARG0+0x04(r1)            ; Save a register
-                       stw             r27,FM_ARG0+0x08(r1)            ; Save a register
-                       stw             r28,FM_ARG0+0x0C(r1)            ; Save a register
-                       mr              r25,r7                                          ; Save the parm
-                       stw             r29,FM_ARG0+0x10(r1)            ; Save a register
-                       stw             r30,FM_ARG0+0x14(r1)            ; Save a register
-                       stw             r31,FM_ARG0+0x18(r1)            ; Save a register
-                       stw             r0,(FM_ALIGN((31-25+1)*4)+FM_SIZE+FM_LR_SAVE)(r1)       ; Save the return
-
-                       bl              EXT(mapSetUp)                           ; Turn off interrupts, translation, and possibly enter 64-bit
-               
-                       mr              r26,r11                                         ; Save the old MSR
-                       lis             r27,hi16(hwpOpBase)                     ; Get high order of op base
-                       slwi    r4,r4,7                                         ; Convert preop to displacement
-                       ori             r27,r27,lo16(hwpOpBase)         ; Get low order of op base
-                       slwi    r5,r5,7                                         ; Convert op to displacement
-                       add             r12,r4,r27                                      ; Point to the preop routine
-                       slwi    r28,r6,7                                        ; Convert postop to displacement
-                       mtctr   r12                                                     ; Set preop routine     
-                       add             r28,r28,r27                                     ; Get the address of the postop routine
-                       add             r27,r5,r27                                      ; Get the address of the op routine                     
+                       .globl  EXT(hw_test_rc)
 
-                       bl              mapPhysLock                                     ; Lock the physent
+LEXT(hw_test_rc)
 
-                       mr              r29,r3                                          ; Save the physent address
-                       
-                       bt++    pf64Bitb,hwp64                          ; skip if 64-bit (only they take the hint)
+                       mfsprg  r9,2                                            ; Get feature flags 
+                       mfmsr   r0                                                      ; Save the MSR 
+                       rlwinm  r0,r0,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       mr.             r4,r4                                           ; See if we have a reset to do later
+                       rlwinm  r0,r0,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r12,r0,0,MSR_EE_BIT+1,MSR_EE_BIT-1      ; Clear interruption mask
+                       crnot   htrReset,cr0_eq                         ; Remember reset
+                       mtcrf   0x04,r9                                         ; Set the features                      
+                       rlwinm  r12,r12,0,28,25                         ; Clear IR and DR
                        
-                       bctrl                                                           ; Call preop routine
-                       bne-    hwpEarly32                                      ; preop says to bail now...
-                       
-                       mtctr   r27                                                     ; Set up the op function address
-                       lwz             r31,ppLink+4(r3)                        ; Grab the pointer to the first mapping
-                       
-hwpSrc32:      rlwinm. r31,r31,0,0,25                          ; Clean and test mapping address
-                       beq             hwpNone32                                       ; Did not find one...
-
-;
-;                      Note: mapInvPte32 returns the PTE in R3 (or 0 if none), PTE high in R4, 
-;                      PTE low in R5.  The PCA address is in R7.  The PTEG come back locked.
-;                      If there is no PTE, PTE low is obtained from mapping
-;
-                       bl              mapInvPte32                                     ; Invalidate and lock PTE, also merge into physent
-               
-                       bctrl                                                           ; Call the op function
+                       bt              pfNoMSRirb,htrNoMSR                     ; No MSR...
 
-                       crmove  cr1_eq,cr0_eq                           ; Save the return code
-                                               
-                       mr.             r3,r3                                           ; Was there a previously valid PTE?
-                       beq-    hwpNxt32                                        ; Nope...
-                       
-                       stw             r5,4(r3)                                        ; Store second half of PTE
-                       eieio                                                           ; Make sure we do not reorder
-                       stw             r4,0(r3)                                        ; Revalidate the PTE
+                       mtmsr   r12                                                     ; Translation and all off
+                       isync                                                           ; Toss prefetch
+                       b               htrNoMSRx
                        
-                       eieio                                                           ; Make sure all updates come first
-                       stw             r6,0(r7)                                        ; Unlock the PCA
+htrNoMSR:      
+                       mr              r2,r0
+                       mr              r7,r3
+                       li              r0,loadMSR                                      ; Get the MSR setter SC
+                       mr              r3,r12                                          ; Get new MSR
+                       sc                                                                      ; Set it
+                       mr              r3,r7
+                       mr              r0,r2
+htrNoMSRx:
                        
-hwpNxt32:      bne-    cr1,hwpEarly32                          ; op says to bail now...
-                       lwz             r31,mpAlias+4(r31)                      ; Chain on to the next
-                       b               hwpSrc32                                        ; Check it out...
+                       lwz             r2,mmPTEr(r3)                           ; Get the real part
+                       lwz             r7,mmPTEhash(r3)                        ; Get pointer to hash list anchor
+                       rlwinm. r12,r2,0,24,24                          ; Is the change bit on?
+                       lwz             r5,mmPTEv(r3)                           ; Get the virtual address
+                       crnor   cr0_eq,cr0_eq,htrReset          ; Set if C=1 && not reset
+                       rlwinm  r7,r7,0,0,25                            ; Round hash list down to PCA boundary 
+                       bt              cr0_eq,htrcset                          ; Special case changed but no reset case...
 
-                       .align  5
+                       li              r12,1                                           ; Get the locked value
 
-hwpNone32:     mtctr   r28                                                     ; Get the post routine address
+htrLck1:       lwarx   r11,0,r7                                        ; Get the PTEG lock
+                       mr.             r11,r11                                         ; Is it locked?
+                       bne-    htrLckw1                                        ; Yeah...
+                       stwcx.  r12,0,r7                                        ; Try to take it
+                       bne-    htrLck1                                         ; Someone else was trying, try again...
+                       b               htrSXg1                                         ; All done...
                        
-                       lwz             r30,ppLink+4(r29)                       ; Save the old RC
-                       mr              r3,r29                                          ; Get the physent address
-                       bctrl                                                           ; Call post routine
+                       .align  4
 
-                       bl              mapPhysUnlock                           ; Unlock the physent
+htrLckw1:      mr.             r11,r11                                         ; Check if it is already held 
+                       beq+    htrLck1                                         ; It is clear... 
+                       lwz             r11,0(r7)                                       ; Get lock word again... 
+                       b               htrLckw1                                        ; Wait... 
                        
-                       mtmsr   r26                                                     ; Restore translation/mode/etc.
-                       isync
-                       
-                       b               hwpReturn                                       ; Go restore registers and return...
+                       .align  4
 
-                       .align  5
+htrSXg1:       isync                                                           ; Make sure we have not used anything yet
 
-hwpEarly32:    lwz             r30,ppLink+4(r29)                       ; Save the old RC
-                       mr              r3,r29                                          ; Get the physent address
-                       bl              mapPhysUnlock                           ; Unlock the physent
-                       
-                       mtmsr   r26                                                     ; Restore translation/mode/etc.
-                       isync
-                       
-                       b               hwpReturn                                       ; Go restore registers and return...
+                       lwz             r6,mmPTEent(r3)                         ; Get the pointer to the PTE now that the lock is set
+                       lwz             r2,mmPTEr(r3)                           ; Get the mapping copy of the real part
 
-                       .align  5
+                       rlwinm  r9,r5,1,0,3                                     ; Move in the segment
+                       mr.             r6,r6                                           ; Any PTE to invalidate?
+                       rlwinm  r8,r5,31,2,25                           ; Line it up 
                
-hwp64:         bctrl                                                           ; Call preop routine
-                       bne--   hwpEarly64                                      ; preop says to bail now...
-                       
-                       mtctr   r27                                                     ; Set up the op function address
-                       
-                       li              r0,0xFF
-                       ld              r31,ppLink(r3)                          ; Get the pointer to the first mapping
-                       rldicl  r0,r0,62,0                                      ; Rotate clean up mask to get 0xC0000000000000003F
+                       beq+    htrnopte                                        ; There is no PTE to invalidate...
+                       
+                       xor             r8,r8,r6                                        ; Back hash to virt index
+                       rlwimi  r9,r5,22,4,9                            ; Move in the API
+                       lis             r12,HIGH_ADDR(EXT(tlb_system_lock))     ; Get the TLBIE lock
+                       rlwinm  r5,r5,0,1,31                            ; Clear the valid bit
+                       ori             r12,r12,LOW_ADDR(EXT(tlb_system_lock))  ; Grab up the bottom part
+                       mfspr   r11,pvr                                         ; Find out what kind of machine we are
+                       rlwimi  r9,r8,6,10,19                           ; Create the virtual address
+                       rlwinm  r11,r11,16,16,31                        ; Isolate CPU type 
+
+                       stw             r5,0(r6)                                        ; Make the PTE invalid  
+                       cmplwi  cr1,r11,3                                       ; Is this a 603?
+                       sync                                                            ; Make sure the invalid is stored
+                                               
+htrtlbhang:    lwarx   r11,0,r12                                       ; Get the TLBIE lock
+                       rlwinm  r8,r6,29,29,31                          ; Get the bit position of entry 
+                       mr.             r11,r11                                         ; Is it locked?
+                       lis             r5,0x8000                                       ; Start up a bit mask
+                       li              r11,1                                           ; Get our lock word 
+                       bne-    htrtlbhang                                      ; It is locked, go wait...
+                       stwcx.  r11,0,r12                                       ; Try to get it
+                       bne-    htrtlbhang                                      ; We was beat...
                        
-hwpSrc64:      andc.   r31,r31,r0                                      ; Clean and test mapping address
-                       beq             hwpNone64                                       ; Did not find one...
-;
-;                      Note: mapInvPte64 returns the PTE in R3 (or 0 if none), PTE high in R4, 
-;                      PTE low in R5. PTEG comes back locked if there is one
-;
-                       bl              mapInvPte64                                     ; Invalidate and lock PTEG, also merge into physent
+                       li              r11,0                                           ; Lock clear value 
 
-                       bctrl                                                           ; Call the op function
+                       tlbie   r9                                                      ;Invalidate it everywhere
 
-                       crmove  cr1_eq,cr0_eq                           ; Save the return code
-                       
-                       mr.             r3,r3                                           ; Was there a previously valid PTE?
-                       beq--   hwpNxt64                                        ; Nope...
+                       beq-    cr1,htr603                                      ; It is a 603, skip the tlbsync... 
                        
-                       std             r5,8(r3)                                        ; Save bottom of PTE
-                       eieio                                                           ; Make sure we do not reorder 
-                       std             r4,0(r3)                                        ; Revalidate the PTE
+                       eieio                                                           ; Make sure that the tlbie happens first
+                       tlbsync                                                         ; wait for everyone to catch up
+                       isync                                                           
                        
-                       eieio                                                           ; Make sure all updates come first
-                       stw             r6,0(r7)                                        ; Unlock the PCA
-
-hwpNxt64:      bne--   cr1,hwpEarly64                          ; op says to bail now...
-                       ld              r31,mpAlias(r31)                        ; Chain on to the next
-                       li              r0,0xFF
-                       rldicl  r0,r0,62,0                                      ; Rotate clean up mask to get 0xC0000000000000003F
-                       b               hwpSrc64                                        ; Check it out...
+htr603:                stw             r11,0(r12)                                      ; Clear the lock
+                       srw             r5,r5,r8                                        ; Make a "free slot" mask 
+                       sync                                                            ; Make sure of it all 
+
+                       lwz             r6,4(r6)                                        ; Get the latest reference and change bits
+                       stw             r11,mmPTEent(r3)                        ; Clear the pointer to the PTE 
+                       rlwinm  r6,r6,0,23,24                           ; Extract the RC bits 
+                       lwz             r9,PCAallo(r7)                          ; Get the allocation control bits 
+                       rlwinm  r8,r5,24,8,15                           ; Make the autogen bit to turn off
+                       lwz             r10,mmphysent(r3)                       ; Get any physical entry
+                       or              r9,r9,r5                                        ; Set the slot free 
+                       rlwimi  r8,r8,24,16,23                          ; Get lock bit mask to turn it off
+                       andc    r9,r9,r8                                        ; Clear the auto and lock bits 
+                       mr.             r10,r10                                         ; Is there a physical entry?
+                       li              r5,pepte1                                       ; Get displacement to the second word of master pte
+                       stw             r9,PCAallo(r7)                          ; Store the allocation controls
+                       rlwimi  r2,r6,0,23,24                           ; Stick in RC bits
+                       beq-    htrnopte                                        ; No physical entry...
+                       
+htrmrc:                lwarx   r11,r5,r10                                      ; Get the master copy
+                       or              r11,r11,r6                                      ; Merge in latest RC
+                       stwcx.  r11,r5,r10                                      ; Save it back
+                       bne-    htrmrc                                          ; If it changed, try again... 
+
+htrnopte:      rlwinm  r5,r2,25,30,31                          ; Position RC and mask off
+                       bf              htrReset,htrnorst                       ; No reset to do...
+                       rlwinm  r2,r2,0,25,22                           ; Clear the RC if requested
+                       
+htrnorst:      li              r4,0                                            ; Get a 0 
+                       stw             r2,mmPTEr(r3)                           ; Set the real part of the PTE
+                       
+                       sync                                                            ; Make sure that stuff is all stored
+
+                       stw             r4,0(r7)                                        ; Unlock the hash chain
        
-                       .align  5
-                       
-hwpNone64:     mtctr   r28                                                     ; Get the post routine address
-                       
-                       lwz             r30,ppLink+4(r29)                       ; Save the old RC
-                       mr              r3,r29                                          ; Get the physent address
-                       bctrl                                                           ; Call post routine
-
-                       bl              mapPhysUnlock                           ; Unlock the physent
-                       
-                       mtmsrd  r26                                                     ; Restore translation/mode/etc.
+                       mr              r3,r5                                           ; Get the old RC to pass back
+                       mtmsr   r0                                                      ; Restore interrupts and translation
                        isync
-                       b               hwpReturn                                       ; Go restore registers and return...
-
-                       .align  5
-
-hwpEarly64:    lwz             r30,ppLink+4(r29)                       ; Save the old RC
-                       mr              r3,r29                                          ; Get the physent address
-                       bl              mapPhysUnlock                           ; Unlock the physent
-                       
-                       mtmsrd  r26                                                     ; Restore translation/mode/etc.
-                       isync                   
-
-hwpReturn:     lwz             r0,(FM_ALIGN((31-25+1)*4)+FM_SIZE+FM_LR_SAVE)(r1)       ; Restore the return
-                       lwz             r25,FM_ARG0+0x00(r1)            ; Restore a register
-                       lwz             r26,FM_ARG0+0x04(r1)            ; Restore a register
-                       mr              r3,r30                                          ; Pass back the RC
-                       lwz             r27,FM_ARG0+0x08(r1)            ; Restore a register
-                       lwz             r28,FM_ARG0+0x0C(r1)            ; Restore a register
-                       mtlr    r0                                                      ; Restore the return
-                       lwz             r29,FM_ARG0+0x10(r1)            ; Restore a register
-                       lwz             r30,FM_ARG0+0x14(r1)            ; Restore a register
-                       lwz             r31,FM_ARG0+0x18(r1)            ; Restore a register
-                       lwz             r1,0(r1)                                        ; Pop the stack
-                       blr                                                                     ; Leave...
-
+                       blr                                                                     ; Return...
 
-;
-;                      The preop/op/postop function table.
-;                      Each function must be 64-byte aligned and be no more than
-;                      16 instructions.  If more than 16, we must fix address calculations
-;                      at the start of hwpOpBase
-;
-;                      The routine must set CR0_EQ in order to continue scan.
-;                      If CR0_EQ is not set, an early return from the function is made.
-;
+                       .align  4
 
-                       .align  7
-                       
-hwpOpBase:
+htrcset:       rlwinm  r3,r2,25,30,31                          ; Position RC and mask off
+                       mtmsr   r0                                                      ; Restore interrupts and translation
+                       isync
+                       blr                                                                     ; Return...
 
-;                      Function 0 - No operation
 
-hwpNoop:       cmplw   r0,r0                                           ; Make sure CR0_EQ is set
-                       blr                                                                     ; Just return...
+/*
+ *                     hw_phys_attr(struct phys_entry *pp, vm_prot_t prot, unsigned int wimg) - Sets the default physical page attributes
+ *
+ *                     Note that this must be done with both interruptions off and VM off
+ *                     Move the passed in attributes into the pte image in the phys entry
+ *     
+ *                       
+ */
 
                        .align  5
+                       .globl  EXT(hw_phys_attr)
 
-;                      This is the continuation of function 4 - Set attributes in mapping
+LEXT(hw_phys_attr)
 
-;                      We changed the attributes of a mapped page.  Make sure there are no cache paradoxes.
-;                      NOTE: Do we have to deal with i-cache here?
-
-hwpSAM:                li              r11,4096                                                ; Get page size
-                       
-hwpSAMinvd:    sub.    r11,r11,r9                                      ; Back off a line
-                       dcbf    r11,r5                                          ; Flush the line in the data cache
-                       bgt++   hwpSAMinvd                                      ; Go do the rest of it...
-                       
-                       sync                                                            ; Make sure it is done
-
-                       li              r11,4096                                                ; Get page size
-                       
-hwpSAMinvi:    sub.    r11,r11,r9                                      ; Back off a line
-                       icbi    r11,r5                                          ; Flush the line in the icache
-                       bgt++   hwpSAMinvi                                      ; Go do the rest of it...
+#if PERFTIMES && DEBUG
+                       mflr    r11
+                       mr              r8,r3
+                       mr              r7,r5
+                       mr              r5,r4
+//                     lwz             r4,4(r3)
+                       li              r4,0x1111
+                       li              r3,30
+                       bl              EXT(dbgLog2)                                            ; Start of hw_add_map
+                       mr              r3,r8
+                       mr              r4,r5
+                       mr              r5,r7
+                       mtlr    r11
+#endif
+                       mfsprg  r9,2                                            ; Get feature flags 
+                       mfmsr   r0                                                      /* Save the MSR  */
+                       rlwinm  r0,r0,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r0,r0,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       andi.   r5,r5,0x0078                            /* Clean up the WIMG */
+                       rlwinm  r12,r0,0,MSR_EE_BIT+1,MSR_EE_BIT-1      /* Clear interruptions */
+                       mtcrf   0x04,r9                                         ; Set the features                      
+                       rlwimi  r5,r4,0,30,31                           /* Move the protection into the wimg register */
+                       la              r6,pepte1(r3)                           /* Point to the default pte */
+                       rlwinm  r12,r12,0,28,25                         /* Clear IR and DR */
+
+                       bt              pfNoMSRirb,hpaNoMSR                     ; No MSR...
+
+                       mtmsr   r12                                                     ; Translation and all off
+                       isync                                                           ; Toss prefetch
+                       b               hpaNoMSRx
                        
-                       sync                                                            ; Make sure it is done
+hpaNoMSR:      
+                       mr              r10,r0
+                       mr              r4,r3
+                       li              r0,loadMSR                                      ; Get the MSR setter SC
+                       mr              r3,r12                                          ; Get new MSR
+                       sc                                                                      ; Set it
+                       mr              r3,r4
+                       mr              r0,r10
+hpaNoMSRx:
+
+atmattr:       lwarx   r10,0,r6                                        /* Get the pte */
+                       rlwimi  r10,r5,0,25,31                          /* Move in the new attributes */
+                       stwcx.  r10,0,r6                                        /* Try it on for size */
+                       bne-    atmattr                                         /* Someone else was trying, try again... */
+               
+                       mtmsr   r0                                                      /* Interrupts and translation back on */
+                       isync
+#if PERFTIMES && DEBUG
+                       mflr    r11
+                       mr              r4,r10
+                       li              r3,31
+                       bl              EXT(dbgLog2)                                            ; Start of hw_add_map
+                       mtlr    r11
+#endif
+                       blr                                                                     /* All done... */
 
-                       cmpw    r0,r0                                           ; Make sure we return CR0_EQ
-                       blr                                                                     ; Return...
 
 
-;                      Function 1 - Set protection in physent
+/*
+ *                     handlePF - handle a page fault interruption
+ *
+ *                     If the fault can be handled, this routine will RFI directly,
+ *                     otherwise it will return with all registers as in entry.
+ *
+ *                     Upon entry, state and all registers have been saved in savearea.
+ *                     This is pointed to by R13.
+ *                     IR and DR are off, interrupts are masked,
+ *                     Floating point be disabled.
+ *                     R3 is the interrupt code.
+ *
+ *                     If we bail, we must restore cr5, and all registers except 6 and
+ *                     3.
+ *
+ */
+       
+                       .align  5
+                       .globl  EXT(handlePF)
 
-                       .set    .,hwpOpBase+(1*128)                     ; Generate error if previous function too long
+LEXT(handlePF)
 
-hwpSPrtPhy:    li              r5,ppLink+4                                     ; Get offset for flag part of physent
+/*
+ *                     This first part does a quick check to see if we can handle the fault.
+ *                     We can't handle any kind of protection exceptions here, so we pass
+ *                     them up to the next level.
+ *
+ *                     The mapping lists are kept in MRS (most recently stolen)
+ *                     order on queues anchored within from the
+ *                     PTEG to which the virtual address hashes.  This is further segregated by
+ *                     the low-order 3 bits of the VSID XORed with the segment number and XORed
+ *                     with bits 4-7 of the vaddr in an attempt to keep the searches
+ *                     short.
+ *                     
+ *                     MRS is handled by moving the entry to the head of its list when stolen in the
+ *                     assumption that it will be revalidated soon.  Entries are created on the head 
+ *                     of the list because they will be used again almost immediately.
+ *
+ *                     We need R13 set to the savearea, R3 set to the interrupt code, and R2
+ *                     set to the per_proc.
+ *
+ *                     NOTE: In order for a page-fault redrive to work, the translation miss
+ *                     bit must be set in the DSISR (or SRR1 for IFETCH).  That must occur
+ *                     before we come here.
+ */
 
-hwpSPrtPhX:    lwarx   r4,r5,r29                                       ; Get the old flags
-                       rlwimi  r4,r25,0,ppPPb-32,ppPPe-32      ; Stick in the new protection
-                       stwcx.  r4,r5,r29                                       ; Try to stuff it
-                       bne--   hwpSPrtPhX                                      ; Try again...
-;                      Note: CR0_EQ is set because of stwcx.
-                       blr                                                                     ; Return...
+                       cmplwi  r3,T_INSTRUCTION_ACCESS         /* See if this is for the instruction */
+                       lwz             r8,savesrr1(r13)                        ; Get the MSR to determine mode
+                       beq-    gotIfetch                                       ; We have an IFETCH here...
                        
+                       lwz             r7,savedsisr(r13)                       /* Get the DSISR */
+                       lwz             r6,savedar(r13)                         /* Get the fault address */
+                       b               ckIfProt                                        ; Go check if this is a protection fault...
 
-;                      Function 2 - Set protection in mapping
+gotIfetch:     mr              r7,r8                                           ; IFETCH info is in SRR1
+                       lwz             r6,savesrr0(r13)                        /* Get the instruction address */
 
-                       .set    .,hwpOpBase+(2*128)                     ; Generate error if previous function too long
+ckIfProt:      rlwinm. r7,r7,0,1,1                                     ; Is this a protection exception?
+                       beqlr-                                                          ; Yes... (probably not though)
 
-hwpSPrtMap:    lwz             r9,mpFlags(r31)                         ; Get the mapping flags
-                       lwz             r8,mpVAddr+4(r31)                       ; Get the protection part of mapping
-                       rlwinm. r9,r9,0,mpPermb,mpPermb         ; Is the mapping permanent?
-                       li              r0,lo16(mpPP)                           ; Get protection bits
-                       crnot   cr0_eq,cr0_eq                           ; Change CR0_EQ to true if mapping is permanent
-                       rlwinm  r2,r25,0,mpPPb-32,mpPPb-32+2    ; Isolate new protection 
-                       beqlr--                                                         ; Leave if permanent mapping (before we trash R5)...
-                       andc    r5,r5,r0                                        ; Clear the old prot bits
-                       or              r5,r5,r2                                        ; Move in the prot bits
-                       rlwimi  r8,r5,0,20,31                           ; Copy into the mapping copy
-                       cmpw    r0,r0                                           ; Make sure we return CR0_EQ
-                       stw             r8,mpVAddr+4(r31)                       ; Set the flag part of mapping
-                       blr                                                                     ; Leave...
-                       
-;                      Function 3 - Set attributes in physent
+/*
+ *                     We will need to restore registers if we bail after this point.
+ *                     Note that at this point several SRs have been changed to the kernel versions.
+ *                     Therefore, for these we must build these values.
+ */
 
-                       .set    .,hwpOpBase+(3*128)                     ; Generate error if previous function too long
+#if PERFTIMES && DEBUG
+                       mflr    r11
+                       mr              r5,r6
+                       mr              r4,r3
+                       li              r3,32
+                       bl              EXT(dbgLog2)                                            ; Start of hw_add_map
+                       mr              r3,r4
+                       mtlr    r11
+                       mfsprg  r2,0
+#endif
+                       lwz             r3,PP_USERPMAP(r2)                      ; Get the user pmap (not needed if kernel access, but optimize for user??)
+                       rlwinm. r8,r8,0,MSR_PR_BIT,MSR_PR_BIT   ; Supervisor state access?
+                       rlwinm  r5,r6,6,26,29                           ; Get index to the segment slot
+                       eqv             r1,r1,r1                                        ; Fill the bottom with foxes
+                       bne+    notsuper                                        ; Go do the user mode interrupt stuff...
+                       
+                       cmplwi  cr1,r5,SR_COPYIN_NUM*4          ; See if this is the copyin/copyout segment
+                       rlwinm  r3,r6,24,8,11                           ; Make the kernel VSID
+                       bne+    cr1,havevsid                            ; We are done if we do not want the copyin/out guy...
+                       
+                       mfsr    r3,SR_COPYIN                            ; Get the copy vsid
+                       b               havevsid                                        ; Join up...
+
+                       .align  5
+
+notsuper:      addi    r5,r5,PMAP_SEGS                         ; Get offset to table
+                       lwzx    r3,r3,r5                                        ; Get the VSID
+
+havevsid:      mfspr   r5,sdr1                                         /* Get hash table base and size */
+                       cror    cr1_eq,cr0_eq,cr0_eq            ; Remember if kernel fault for later
+                       rlwinm  r9,r6,2,2,5                                     ; Move nybble 1 up to 0 (keep aligned with VSID)
+                       rlwimi  r1,r5,16,0,15                           /* Make table size -1 out of mask */
+                       rlwinm  r3,r3,6,2,25                            /* Position the space for the VSID */
+                       rlwinm  r7,r6,26,10,25                          /* Isolate the page index */
+                       xor             r9,r9,r3                                        ; Splooch vaddr nybble 0 (from VSID) and 1 together
+                       or              r8,r5,r1                                        /* Point to the last byte in table */
+                       xor             r7,r7,r3                                        /* Get primary hash */
+                       rlwinm  r3,r3,1,1,24                            /* Position VSID for pte ID */
+                       addi    r8,r8,1                                         /* Point to the PTEG Control Area */
+                       rlwinm  r9,r9,8,27,29                           ; Get splooched bits in place
+                       and             r7,r7,r1                                        /* Wrap the hash */
+                       rlwimi  r3,r6,10,26,31                          /* Move API into pte ID */
+                       add             r8,r8,r7                                        /* Point to our PCA entry */
+                       rlwinm  r12,r3,27,27,29                         ; Get low 3 bits of the VSID for look-aside hash
+                       la              r11,PCAhash(r8)                         /* Point to the mapping hash area */
+                       xor             r9,r9,r12                                       ; Finish splooching nybble 0, 1, and the low bits of the VSID
 
-hwpSAtrPhy:    li              r5,ppLink+4                                     ; Get offset for flag part of physent
 
-hwpSAtrPhX:    lwarx   r4,r5,r29                                       ; Get the old flags
-                       rlwimi  r4,r25,0,ppIb-32,ppGb-32        ; Stick in the new attributes
-                       stwcx.  r4,r5,r29                                       ; Try to stuff it
-                       bne--   hwpSAtrPhX                                      ; Try again...
-;                      Note: CR0_EQ is set because of stwcx.
-                       blr                                                                     ; Return...
+/*
+ *                     We have about as much as we need to start searching the autogen (aka block maps)
+ *                     and mappings.  From here on, any kind of failure will bail, and
+ *                     contention will either bail or restart from here.
+ *
+ *                     
+ */
                        
-;                      Function 4 - Set attributes in mapping
-
-                       .set    .,hwpOpBase+(4*128)                     ; Generate error if previous function too long
-
-hwpSAtrMap:    lwz             r9,mpFlags(r31)                         ; Get the mapping flags
-                       lwz             r8,mpVAddr+4(r31)                       ; Get the attribute part of mapping
-                       li              r2,0x10                                         ; Force on coherent
-                       rlwinm. r9,r9,0,mpPermb,mpPermb         ; Is the mapping permanent?
-                       li              r0,lo16(mpWIMG)                         ; Get wimg mask         
-                       crnot   cr0_eq,cr0_eq                           ; Change CR0_EQ to true if mapping is permanent
-                       rlwimi  r2,r2,mpIb-ppIb,mpIb-32,mpIb-32 ; Copy in the cache inhibited bit
-                       beqlr--                                                         ; Leave if permanent mapping (before we trash R5)...
-                       andc    r5,r5,r0                                        ; Clear the old wimg
-                       rlwimi  r2,r2,32-(mpGb-ppGb),mpGb-32,mpGb-32    ; Copy in the guarded bit
-                       mfsprg  r9,2                                            ; Feature flags
-                       or              r5,r5,r2                                        ; Move in the new wimg
-                       rlwimi  r8,r5,0,20,31                           ; Copy into the mapping copy
-                       lwz             r2,mpPAddr(r31)                         ; Get the physical address
-                       li              r0,0xFFF                                        ; Start a mask
-                       andi.   r9,r9,pf32Byte+pf128Byte        ; Get cache line size
-                       rlwinm  r5,r0,0,1,0                                     ; Copy to top half
-                       stw             r8,mpVAddr+4(r31)                       ; Set the flag part of mapping
-                       rlwinm  r2,r2,12,1,0                            ; Copy to top and rotate to make physical address with junk left
-                       and             r5,r5,r2                                        ; Clean stuff in top 32 bits
-                       andc    r2,r2,r0                                        ; Clean bottom too
-                       rlwimi  r5,r2,0,0,31                            ; Insert low 23 to make full physical address
-                       b               hwpSAM                                          ; Join common
+                       li              r12,1                                           /* Get the locked value */
+                       dcbt    0,r11                                           /* We'll need the hash area in a sec, so get it */
+                       add             r11,r11,r9                                      /* Point to the right mapping hash slot */
                        
-;                      NOTE: we moved the remainder of the code out of here because it
-;                      did not fit in the 128 bytes allotted.  It got stuck into the free space
-;                      at the end of the no-op function.
-
-
+ptegLck:       lwarx   r10,0,r8                                        /* Get the PTEG lock */
+                       mr.             r10,r10                                         /* Is it locked? */
+                       bne-    ptegLckw                                        /* Yeah... */
+                       stwcx.  r12,0,r8                                        /* Take take it */
+                       bne-    ptegLck                                         /* Someone else was trying, try again... */
+                       b               ptegSXg                                         /* All done... */
+                       
+                       .align  4
 
+ptegLckw:      mr.             r10,r10                                         /* Check if it's already held */
+                       beq+    ptegLck                                         /* It's clear... */
+                       lwz             r10,0(r8)                                       /* Get lock word again... */
+                       b               ptegLckw                                        /* Wait... */
                        
-;                      Function 5 - Clear reference in physent
+                       .align  5
+                       
+                       nop                                                                     ; Force ISYNC to last instruction in IFETCH
+                       nop                                                                     
+                       nop
 
-                       .set    .,hwpOpBase+(5*128)                     ; Generate error if previous function too long
+ptegSXg:       isync                                                           /* Make sure we haven't used anything yet */
 
-hwpCRefPhy:    li              r5,ppLink+4                                     ; Get offset for flag part of physent
+                       lwz             r9,0(r11)                                       /* Pick up first mapping block */
+                       mr              r5,r11                                          /* Get the address of the anchor */
+                       mr              r7,r9                                           /* Save the first in line */
+                       b               findmap                                         ; Take space and force loop to cache line
+               
+findmap:       mr.             r12,r9                                          /* Are there more? */
+                       beq-    tryAuto                                         /* Nope, nothing in mapping list for us... */
+                       
+                       lwz             r10,mmPTEv(r12)                         /* Get unique PTE identification */
+                       lwz             r9,mmhashnext(r12)                      /* Get the chain, just in case */
+                       cmplw   r10,r3                                          /* Did we hit our PTE? */
+                       lwz             r0,mmPTEent(r12)                        /* Get the pointer to the hash table entry */
+                       mr              r5,r12                                          /* Save the current as previous */
+                       bne-    findmap                                         ; Nothing here, try the next...
+
+;                      Cache line boundary here
+
+                       cmplwi  cr1,r0,0                                        /* Is there actually a PTE entry in the hash? */
+                       lwz             r2,mmphysent(r12)                       /* Get the physical entry */
+                       bne-    cr1,MustBeOK                            /* There's an entry in the hash table, so, this must 
+                                                                                                  have been taken care of already... */
+                       lis             r4,0x8000                                       ; Tell PTE inserter that this was not an auto
+                       cmplwi  cr2,r2,0                                        /* Is there a physical entry? */
+                       li              r0,0x0100                                       /* Force on the reference bit whenever we make a PTE valid */
+                       bne+    cr2,gotphys                                     /* Skip down if we have a physical entry */
+                       li              r0,0x0180                                       /* When there is no physical entry, force on
+                                                                                                  both R and C bits to keep hardware from
+                                                                                                  updating the PTE to set them.  We don't
+                                                                                                  keep track of RC for I/O areas, so this is ok */
+                       
+gotphys:       lwz             r2,mmPTEr(r12)                          ; Get the second part of the PTE
+                       b               insert                                          /* Go insert into the PTEG... */
+
+MustBeOK:      li              r10,0                                           /* Get lock clear value */
+                       li              r3,T_IN_VAIN                            /* Say that we handled it */
+                       stw             r10,PCAlock(r8)                         /* Clear the PTEG lock */
+
+#if PERFTIMES && DEBUG
+                       mflr    r11
+                       mr              r4,r3
+                       li              r3,33
+                       bl              EXT(dbgLog2)                                            ; Start of hw_add_map
+                       mr              r3,r4
+                       mtlr    r11
+#endif
+                       blr                                                                     /* Blow back and handle exception */
 
-hwpCRefPhX:    lwarx   r4,r5,r29                                       ; Get the old flags
-                       rlwinm  r4,r4,0,ppRb+1-32,ppRb-1-32             ; Clear R
-                       stwcx.  r4,r5,r29                                       ; Try to stuff it
-                       bne--   hwpCRefPhX                                      ; Try again...
-;                      Note: CR0_EQ is set because of stwcx.
-                       blr                                                                     ; Return...
 
                        
-;                      Function 6 - Clear reference in mapping 
-
-                       .set    .,hwpOpBase+(6*128)                     ; Generate error if previous function too long
-
-hwpCRefMap:    li              r0,lo16(mpR)                            ; Get reference bit
-                       lwz             r8,mpVAddr+4(r31)                       ; Get the flag part of mapping
-                       andc    r5,r5,r0                                        ; Clear in PTE copy
-                       andc    r8,r8,r0                                        ; and in the mapping
-                       cmpw    r0,r0                                           ; Make sure we return CR0_EQ
-                       stw             r8,mpVAddr+4(r31)                       ; Set the flag part of mapping
-                       blr                                                                     ; Return...
+/*
+ *                     We couldn't find it in the mapping list.  As a last try, we will
+ *                     see if we can autogen it from the block mapped list.
+ *     
+ *                     A block mapped area is defined as a contiguous virtual area that is mapped to 
+ *                     a contiguous physical area.  The olde-tyme IBM VM/XA Interpretive Execution
+ *                     architecture referred to this as a V=F, or Virtual = Fixed area. 
+ *
+ *                     We consider a V=F area to be a single entity, adjacent areas can not be merged
+ *                     or overlapped.  The protection and memory attributes are the same and reference
+ *                     and change indications are not kept. The areas are not considered part of the
+ *                     physical RAM of the machine and do not have any associated physical table
+ *                     entries. Their primary use is intended for mapped I/O areas (e.g., framebuffers)
+ *                     although certain areas of RAM, such as the kernel V=R memory, can be mapped.
+ *
+ *                     We also have a problem in the case of copyin/out: that access is done
+ *                     within the kernel for a user address. Unfortunately, the user isn't
+ *                     necessarily the current guy.  That means that we don't have access to the
+ *                     right autogen list. We can't support this kind of access. So, we need to do
+ *                     a quick check here and cause a fault if an attempt to copyin or out to
+ *                     any autogenned area.
+ *
+ *                     The lists must be kept short.
+ *
+ *                     NOTE:  kernel_pmap_store must be in V=R storage!!!!!!!!!!!!!!
+ */
+                       .align  5
 
+tryAuto:       rlwinm. r11,r3,0,5,24                           ; Check if this is a kernel VSID
+                       lis             r10,HIGH_ADDR(EXT(kernel_pmap_store)+PMAP_BMAPS)        ; Get the top part of kernel block map anchor
+                       crandc  cr0_eq,cr1_eq,cr0_eq            ; Set if kernel access and non-zero VSID (copyin or copyout)
+                       mfsprg  r11,0                                           ; Get the per_proc area
+                       beq-    cr0,realFault                                   ; Can not autogen for copyin/copyout...
+                       ori             r10,r10,LOW_ADDR(EXT(kernel_pmap_store)+PMAP_BMAPS)     ; Get the bottom part
+                       beq-    cr1,bmInKernel                          ; We are in kernel... (cr1 set way back at entry)
+                       
+                       lwz             r10,PP_USERPMAP(r11)            ; Get the user pmap
+                       la              r10,PMAP_BMAPS(r10)                     ; Point to the chain anchor
+                       b               bmInKernel                                      ; Jump over alignment gap...
+                       nop
+                       nop
+                       nop
+                       nop
+                       nop
+                       nop                                             
+bmInKernel:
+#ifndef CHIP_ERRATA_MAX_V1
+                       lwarx   r9,0,r10        
+#endif /* CHIP_ERRATA_MAX_V1 */
+
+bmapLck:       lwarx   r9,0,r10                                        ; Get the block map anchor and lock
+                       rlwinm. r5,r9,0,31,31                           ; Is it locked?
+                       ori             r5,r5,1                                         ; Set the lock
+                       bne-    bmapLckw                                        ; Yeah...
+                       stwcx.  r5,0,r10                                        ; Lock the bmap list
+                       bne-    bmapLck                                         ; Someone else was trying, try again...
+                       b               bmapSXg                                         ; All done...
+                       
+                       .align  4
+
+bmapLckw:      rlwinm. r5,r9,0,31,31                           ; Check if it is still held
+                       beq+    bmapLck                                         ; Not no more...
+                       lwz             r9,0(r10)                                       ; Get lock word again...
+                       b               bmapLckw                                        ; Check it out...
+                       
+                       .align  5
+                       
+                       nop                                                                     ; Force ISYNC to last instruction in IFETCH
+                       nop                                                                     
+                       nop
+
+bmapSXg:       rlwinm. r4,r9,0,0,26                            ; Clear out flags and lock
+                       isync                                                           ; Make sure we have not used anything yet
+                       bne+    findAuto                                        ; We have something, let us go...
+                       
+bmapNone:      stw             r9,0(r10)                                       ; Unlock it, we have nothing here
+                                                                                               ; No sync here because we have not changed anything
                        
-;                      Function 7 - Clear change in physent
-
-                       .set    .,hwpOpBase+(7*128)                     ; Generate error if previous function too long
-
-hwpCCngPhy:    li              r5,ppLink+4                                     ; Get offset for flag part of physent
+/*
+ *                     When we come here, we know that we can't handle this.  Restore whatever
+ *                     state that we trashed and go back to continue handling the interrupt.
+ */
 
-hwpCCngPhX:    lwarx   r4,r5,r29                                       ; Get the old flags
-                       rlwinm  r4,r4,0,ppCb+1-32,ppCb-1-32     ; Clear C
-                       stwcx.  r4,r5,r29                                       ; Try to stuff it
-                       bne--   hwpCCngPhX                                      ; Try again...
-;                      Note: CR0_EQ is set because of stwcx.
-                       blr                                                                     ; Return...
+realFault:     li              r10,0                                           /* Get lock clear value */
+                       lwz             r3,saveexception(r13)           /* Figure out the exception code again */
+                       stw             r10,PCAlock(r8)                         /* Clear the PTEG lock */
+#if PERFTIMES && DEBUG
+                       mflr    r11
+                       mr              r4,r3
+                       li              r3,33
+                       bl              EXT(dbgLog2)                                            ; Start of hw_add_map
+                       mr              r3,r4
+                       mtlr    r11
+#endif
+                       blr                                                                     /* Blow back and handle exception */
                        
+                       .align  5
                        
-;                      Function 8 - Clear change in mapping
-
-                       .set    .,hwpOpBase+(8*128)                     ; Generate error if previous function too long
-
-hwpCCngMap:    li              r0,lo16(mpC)                            ; Get change bit
-                       lwz             r8,mpVAddr+4(r31)                       ; Get the flag part of mapping
-                       andc    r5,r5,r0                                        ; Clear in PTE copy
-                       andc    r8,r8,r0                                        ; and in the mapping
-                       cmpw    r0,r0                                           ; Make sure we return CR0_EQ
-                       stw             r8,mpVAddr+4(r31)                       ; Set the flag part of mapping
-                       blr                                                                     ; Return...
-
+findAuto:      mr.             r4,r4                                           ; Is there more?
+                       beq-    bmapNone                                        ; No more...
+                       lwz             r5,bmstart(r4)                          ; Get the bottom of range
+                       lwz             r11,bmend(r4)                           ; Get the top of range
+                       cmplw   cr0,r6,r5                                       ; Are we before the entry?
+                       cmplw   cr1,r6,r11                                      ; Are we after the entry?
+                       cror    cr1_eq,cr0_lt,cr1_gt            ; Set cr1_eq if new not in range
+                       bne+    cr1,faGot                                       ; Found it...
                        
-;                      Function 9 - Set reference in physent
-
-                       .set    .,hwpOpBase+(9*128)                     ; Generate error if previous function too long
-
-hwpSRefPhy:    li              r5,ppLink+4                                     ; Get offset for flag part of physent
-
-hwpSRefPhX:    lwarx   r4,r5,r29                                       ; Get the old flags
-                       ori             r4,r4,lo16(ppR)                         ; Set the reference
-                       stwcx.  r4,r5,r29                                       ; Try to stuff it
-                       bne--   hwpSRefPhX                                      ; Try again...
-;                      Note: CR0_EQ is set because of stwcx.
-                       blr                                                                     ; Return...
-
+                       lwz             r4,bmnext(r4)                           ; Get the next one
+                       b               findAuto                                        ; Check it out...
                        
-;                      Function 10 - Set reference in mapping
-
-                       .set    .,hwpOpBase+(10*128)            ; Generate error if previous function too long
-
-hwpSRefMap:    lwz             r8,mpVAddr+4(r31)                       ; Get the flag part of mapping
-                       ori             r5,r5,lo16(mpR)                         ; Set reference in PTE low
-                       ori             r8,r8,lo16(mpR)                         ; Set reference in mapping
-                       cmpw    r0,r0                                           ; Make sure we return CR0_EQ
-                       stw             r8,mpVAddr+4(r31)                       ; Set the flag part of mapping
-                       blr                                                                     ; Return...
+faGot:         
+                       lwz             r7,blkFlags(r4)                         ; Get the flags
+                       rlwinm. r7,r7,0,blkRembit,blkRembit     ; is this mapping partially removed
+                       bne             bmapNone                                        ; Pending remove, bail out
+                       rlwinm  r6,r6,0,0,19                            ; Round to page
+                       lwz             r2,bmPTEr(r4)                           ; Get the real part of the PTE
+                       sub             r5,r6,r5                                        ; Get offset into area
+                       stw             r9,0(r10)                                       ; Unlock it, we are done with it (no sync needed)
+                       add             r2,r2,r5                                        ; Adjust the real address
                        
-;                      Function 11 - Set change in physent
-
-                       .set    .,hwpOpBase+(11*128)            ; Generate error if previous function too long
-
-hwpSCngPhy:    li              r5,ppLink+4                                     ; Get offset for flag part of physent
-
-hwpSCngPhX:    lwarx   r4,r5,r29                                       ; Get the old flags
-                       ori             r4,r4,lo16(ppC)                         ; Set the change bit
-                       stwcx.  r4,r5,r29                                       ; Try to stuff it
-                       bne--   hwpSCngPhX                                      ; Try again...
-;                      Note: CR0_EQ is set because of stwcx.
-                       blr                                                                     ; Return...
+                       lis             r4,0x8080                                       /* Indicate that this was autogened */
+                       li              r0,0x0180                                       /* Autogenned areas always set RC bits.
+                                                                                                  This keeps the hardware from having
+                                                                                                  to do two storage writes */
                        
-;                      Function 12 - Set change in mapping
-
-                       .set    .,hwpOpBase+(12*128)            ; Generate error if previous function too long
-
-hwpSCngMap:    lwz             r8,mpVAddr+4(r31)                       ; Get the flag part of mapping
-                       ori             r5,r5,lo16(mpC)                         ; Set change in PTE low
-                       ori             r8,r8,lo16(mpC)                         ; Set chage in mapping
-                       cmpw    r0,r0                                           ; Make sure we return CR0_EQ
-                       stw             r8,mpVAddr+4(r31)                       ; Set the flag part of mapping
-                       blr                                                                     ; Return...
-
-;                      Function 13 - Test reference in physent
+/*
+ *                     Here where we insert the PTE into the hash.  The PTE image is in R3, R2. 
+ *                     The PTEG allocation controls are a bit map of the state of the PTEG. The
+ *                     PCAlock bits are a temporary lock for the specified PTE.  PCAfree indicates that
+ *                     the PTE slot is empty. PCAauto means that it comes from an autogen area.  These
+ *                     guys do not keep track of reference and change and are actually "wired".
+ *                     They're easy to maintain. PCAsteal
+ *                     is a sliding position mask used to "randomize" PTE slot stealing.  All 4 of these
+ *                     fields fit in a single word and are loaded and stored under control of the
+ *                     PTEG control area lock (PCAlock).
+ *
+ *                     Note that PCAauto does not contribute to the steal calculations at all.  Originally
+ *                     it did, autogens were second in priority.  This can result in a pathalogical
+ *                     case where an instruction can not make forward progress, or one PTE slot
+ *                     thrashes.
+ *
+ *                     Physically, the fields are arranged:
+ *                             0: PCAfree
+ *                             1: PCAauto
+ *                             2: PCAlock
+ *                             3: PCAsteal
+ */
+                       
+insert:                lwz             r10,PCAallo(r8)                         /* Get the PTEG controls */
+                       eqv             r6,r6,r6                                        /* Get all ones */              
+                       mr              r11,r10                                         /* Make a copy */
+                       rlwimi  r6,r10,8,16,23                          /* Insert sliding steal position */
+                       rlwimi  r11,r11,24,24,31                        /* Duplicate the locked field */
+                       addi    r6,r6,-256                                      /* Form mask */
+                       rlwimi  r11,r11,16,0,15                         /* This gives us a quadrupled lock mask */
+                       rlwinm  r5,r10,31,24,0                          /* Slide over the mask for next time */
+                       mr              r9,r10                                          /* Make a copy to test */
+                       not             r11,r11                                         /* Invert the quadrupled lock */
+                       or              r2,r2,r0                                        /* Force on R, and maybe C bit */
+                       and             r9,r9,r11                                       /* Remove the locked guys */
+                       rlwimi  r5,r5,8,24,24                           /* Wrap bottom bit to top in mask */
+                       rlwimi  r9,r11,0,16,31                          /* Put two copies of the unlocked entries at the end */
+                       rlwinm  r6,r6,0,16,7                            ; Remove the autogens from the priority calculations
+                       rlwimi  r10,r5,0,24,31                          /* Move steal map back in */
+                       and             r9,r9,r6                                        /* Set the starting point for stealing */
+
+/*                     So, now we have in R9:
+                               byte 0 = ~locked & free 
+                               byte 1 = 0 
+                               byte 2 = ~locked & (PCAsteal - 1)
+                               byte 3 = ~locked
+
+                               Each bit position represents (modulo 8) a PTE. If it is 1, it is available for 
+                               allocation at its priority level, left to right.  
+                               
+                       Additionally, the PCA steal field in R10 has been rotated right one bit.
+*/
+                       
+
+                       rlwinm  r21,r10,8,0,7                           ; Isolate just the old autogen bits
+                       cntlzw  r6,r9                                           /* Allocate a slot */
+                       mr              r14,r12                                         /* Save our mapping for later */
+                       cmplwi  r6,32                                           ; Was there anything available?
+                       rlwinm  r7,r6,29,30,31                          /* Get the priority slot we got this from */
+                       rlwinm  r6,r6,0,29,31                           ; Isolate bit position
+                       srw             r11,r4,r6                                       /* Position the PTEG control bits */
+                       slw             r21,r21,r6                                      ; Move corresponding old autogen flag to bit 0
+                       mr              r22,r11                                         ; Get another copy of the selected slot
+                       
+                       beq-    realFault                                       /* Arghh, no slots! Take the long way 'round... */
+                       
+                                                                                               /* Remember, we've already set up the mask pattern
+                                                                                                  depending upon how we got here:
+                                                                                                    if got here from simple mapping, R4=0x80000000,
+                                                                                                    if we got here from autogen it is 0x80800000. */
+                       
+                       rlwinm  r6,r6,3,26,28                           /* Start calculating actual PTE address */
+                       rlwimi  r22,r22,24,8,15                         ; Duplicate selected slot in second byte
+                       rlwinm. r11,r11,0,8,15                          /* Isolate just the auto bit (remember about it too) */
+                       andc    r10,r10,r22                                     /* Turn off the free and auto bits */
+                       add             r6,r8,r6                                        /* Get position into PTEG control area */
+                       cmplwi  cr1,r7,1                                        /* Set the condition based upon the old PTE type */
+                       sub             r6,r6,r1                                        /* Switch it to the hash table */
+                       or              r10,r10,r11                                     /* Turn auto on if it is (PTEG control all set up now) */                       
+                       subi    r6,r6,1                                         /* Point right */
+                       stw             r10,PCAallo(r8)                         /* Allocate our slot */
+                       dcbt    br0,r6                                          ; Touch in the PTE
+                       bne             wasauto                                         /* This was autogenned... */
+                       
+                       stw             r6,mmPTEent(r14)                        /* Link the mapping to the PTE slot */
+                       
+/*
+ *                     So, now we're here and what exactly do we have?  We've got: 
+ *                             1)      a full PTE entry, both top and bottom words in R3 and R2
+ *                             2)      an allocated slot in the PTEG.
+ *                             3)      R8 still points to the PTEG Control Area (PCA)
+ *                             4)      R6 points to the PTE entry.
+ *                             5)      R1 contains length of the hash table-1. We use this to back-translate
+ *                                     a PTE to a virtual address so we can invalidate TLBs.
+ *                             6)      R11 has a copy of the PCA controls we set.
+ *                             7a)     R7 indicates what the PTE slot was before we got to it. 0 shows
+ *                                     that it was empty and 2 or 3, that it was
+ *                                     a we've stolen a live one. CR1 is set to LT for empty and GT
+ *                                     otherwise.
+ *                             7b)     Bit 0 of R21 is 1 if the stolen PTE was autogenned
+ *                             8)      So far as our selected PTE, it should be valid if it was stolen
+ *                                     and invalid if not.  We could put some kind of assert here to
+ *                                     check, but I think that I'd rather leave it in as a mysterious,
+ *                                     non-reproducable bug.
+ *                             9)      The new PTE's mapping has been moved to the front of its PTEG hash list
+ *                                     so that it's kept in some semblance of a MRU list.
+ *                        10)  R14 points to the mapping we're adding.
+ *
+ *                     So, what do we have to do yet?
+ *                             1)      If we stole a slot, we need to invalidate the PTE completely.
+ *                             2)      If we stole one AND it was not an autogen, 
+ *                                     copy the entire old PTE (including R and C bits) to its mapping.
+ *                             3)      Set the new PTE in the PTEG and make sure it is valid.
+ *                             4)      Unlock the PTEG control area.
+ *                             5)      Go back to the interrupt handler, changing the interrupt
+ *                                     code to "in vain" which will restore the registers and bail out.
+ *
+ */
+wasauto:       oris    r3,r3,0x8000                            /* Turn on the valid bit */
+                       blt+    cr1,slamit                                      /* It was empty, go slam it on in... */
+                       
+                       lwz             r10,0(r6)                                       /* Grab the top part of the PTE */
+                       rlwinm  r12,r6,6,4,19                           /* Match up the hash to a page boundary */
+                       rlwinm  r5,r10,5,4,19                           /* Extract the VSID to a page boundary */
+                       rlwinm  r10,r10,0,1,31                          /* Make it invalid */
+                       xor             r12,r5,r12                                      /* Calculate vaddr */
+                       stw             r10,0(r6)                                       /* Invalidate the PTE */
+                       rlwinm  r5,r10,7,27,29                          ; Move nybble 0 up to subhash position
+                       rlwimi  r12,r10,1,0,3                           /* Move in the segment portion */
+                       lis             r9,HIGH_ADDR(EXT(tlb_system_lock))      /* Get the TLBIE lock */
+                       xor             r5,r5,r10                                       ; Splooch nybble 0 and 1
+                       rlwimi  r12,r10,22,4,9                          /* Move in the API */
+                       ori             r9,r9,LOW_ADDR(EXT(tlb_system_lock))    /* Grab up the bottom part */
+                       rlwinm  r4,r10,27,27,29                         ; Get low 3 bits of the VSID for look-aside hash
+                       
+                       sync                                                            /* Make sure the invalid is stored */
+
+                       xor             r4,r4,r5                                        ; Finish splooching nybble 0, 1, and the low bits of the VSID
+                                               
+tlbhang:       lwarx   r5,0,r9                                         /* Get the TLBIE lock */
+               
+                       rlwinm  r4,r4,0,27,29                           ; Clean up splooched hash value
 
-                       .set    .,hwpOpBase+(13*128)            ; Generate error if previous function too long
+                       mr.             r5,r5                                           /* Is it locked? */
+                       add             r4,r4,r8                                        /* Point to the offset into the PCA area */
+                       li              r5,1                                            /* Get our lock word */
+                       bne-    tlbhang                                         /* It's locked, go wait... */
+                       
+                       la              r4,PCAhash(r4)                          /* Point to the start of the hash chain for the PTE we're replacing */
                        
-hwpTRefPhy:    lwz             r0,ppLink+4(r29)                        ; Get the flags from physent    
-                       rlwinm. r0,r0,0,ppRb-32,ppRb-32         ; Isolate reference bit and see if 0
-                       blr                                                                     ; Return (CR0_EQ set to continue if reference is off)...
+                       stwcx.  r5,0,r9                                         /* Try to get it */
+                       bne-    tlbhang                                         /* We was beat... */
+                       
+                       mfspr   r7,pvr                                          /* Find out what kind of machine we are */
+                       li              r5,0                                            /* Lock clear value */
+                       rlwinm  r7,r7,16,16,31                          /* Isolate CPU type */
 
+                       tlbie   r12                                                     /* Invalidate it everywhere */
 
-;                      Function 14 - Test reference in mapping
+                       cmplwi  r7,3                                            /* Is this a 603? */
+                       stw             r5,0(r9)                                        /* Clear the lock */
+                       
+                       beq-    its603                                          /* It's a 603, skip the tlbsync... */
+                       
+                       eieio                                                           /* Make sure that the tlbie happens first */
+                       tlbsync                                                         /* wait for everyone to catch up */
+                       isync                                                           
+                       
+its603:                rlwinm. r21,r21,0,0,0                           ; See if we just stole an autogenned entry
+                       sync                                                            /* Make sure of it all */
 
-                       .set    .,hwpOpBase+(14*128)            ; Generate error if previous function too long
+                       bne             slamit                                          ; The old was an autogen, time to slam the new in...
+                       
+                       lwz             r9,4(r6)                                        /* Get the real portion of old PTE */
+                       lwz             r7,0(r4)                                        /* Get the first element.  We can't get to here
+                                                                                                  if we aren't working with a mapping... */
+                       mr              r0,r7                                           ; Save pointer to first element
+                                                                                                  
+findold:       mr              r1,r11                                          ; Save the previous guy
+                       mr.             r11,r7                                          /* Copy and test the chain */
+                       beq-    bebad                                           /* Assume it's not zero... */
                        
-hwpTRefMap:    rlwinm. r0,r5,0,mpRb-32,mpRb-32         ; Isolate reference bit and see if 0
-                       blr                                                                     ; Return (CR0_EQ set to continue if reference is off)...
+                       lwz             r5,mmPTEv(r11)                          /* See if this is the old active one */
+                       cmplw   cr2,r11,r14                                     /* Check if this is actually the new one */
+                       cmplw   r5,r10                                          /* Is this us?  (Note: valid bit kept off in mappings) */
+                       lwz             r7,mmhashnext(r11)                      /* Get the next one in line */
+                       beq-    cr2,findold                                     /* Don't count the new one... */
+                       cmplw   cr2,r11,r0                                      ; Check if we are first on the list
+                       bne+    findold                                         /* Not it (and assume the worst)... */
+                       
+                       lwz             r12,mmphysent(r11)                      /* Get the pointer to the physical entry */
+                       beq-    cr2,nomove                                      ; We are first, no need to requeue...
 
-;                      Function 15 - Test change in physent
+                       stw             r11,0(r4)                                       ; Chain us to the head
+                       stw             r0,mmhashnext(r11)                      ; Chain the old head to us
+                       stw             r7,mmhashnext(r1)                       ; Unlink us
 
-                       .set    .,hwpOpBase+(15*128)            ; Generate error if previous function too long
+nomove:                li              r5,0                                            /* Clear this on out */
+                       
+                       mr.             r12,r12                                         /* Is there a physical entry? */
+                       stw             r5,mmPTEent(r11)                        ; Clear the PTE entry pointer
+                       li              r5,pepte1                                       /* Point to the PTE last half */
+                       stw             r9,mmPTEr(r11)                          ; Squirrel away the whole thing (RC bits are in here)
                        
-hwpTCngPhy:    lwz             r0,ppLink+4(r29)                        ; Get the flags from physent    
-                       rlwinm. r0,r0,0,ppCb-32,ppCb-32         ; Isolate change bit and see if 0
-                       blr                                                                     ; Return (CR0_EQ set to continue if reference is off)...
+                       beq-    mrgmrcx                                         ; No physical entry for this one...
+                       
+                       rlwinm  r11,r9,0,23,24                          /* Keep only the RC bits */
 
+mrgmrcx:       lwarx   r9,r5,r12                                       /* Get the master copy */
+                       or              r9,r9,r11                                       /* Merge in latest RC */
+                       stwcx.  r9,r5,r12                                       /* Save it back */
+                       bne-    mrgmrcx                                         /* If it changed, try again... */
 
-;                      Function 16 - Test change in mapping
+/*
+ *                     Here's where we finish up.  We save the real part of the PTE, eieio it, to make sure it's
+ *                     out there before the top half (with the valid bit set).
+ */
 
-                       .set    .,hwpOpBase+(16*128)            ; Generate error if previous function too long
+slamit:                stw             r2,4(r6)                                        /* Stash the real part */
+                       li              r4,0                                            /* Get a lock clear value */
+                       eieio                                                           /* Erect a barricade */
+                       stw             r3,0(r6)                                        /* Stash the virtual part and set valid on */
+
+                       stw             r4,PCAlock(r8)                          /* Clear the PCA lock */
+
+                       li              r3,T_IN_VAIN                            /* Say that we handled it */
+                       sync                                                            /* Go no further until the stores complete */
+#if PERFTIMES && DEBUG
+                       mflr    r11
+                       mr              r4,r3
+                       li              r3,33
+                       bl              EXT(dbgLog2)                                            ; Start of hw_add_map
+                       mr              r3,r4
+                       mtlr    r11
+#endif
+                       blr                                                                     /* Back to the fold... */
+                                       
+bebad:         lis             r0,HIGH_ADDR(Choke)                     /* We have a kernel choke!!! */
+                       ori             r0,r0,LOW_ADDR(Choke)                           
+                       sc                                                                      /* Firmware Heimlich maneuver */
                        
-hwpTCngMap:    rlwinm. r0,r5,0,mpCb-32,mpCb-32         ; Isolate change bit and see if 0
-                       blr                                                                     ; Return (CR0_EQ set to continue if reference is off)...
-
-                       .set    .,hwpOpBase+(17*128)            ; Generate error if previous function too long
+/*
+ *                     This walks the hash table or DBATs to locate the physical address of a virtual one.
+ *                     The space is provided.  If it is the kernel space, the DBATs are searched first.  Failing
+ *                     that, the hash table is accessed. Zero is returned for failure, so it must be special cased.
+ *                     This is usually used for debugging, so we try not to rely
+ *                     on anything that we don't have to.
+ */
 
+ENTRY(LRA, TAG_NO_FRAME_USED)
 
+                       mfsprg  r8,2                                            ; Get feature flags 
+                       mfmsr   r10                                                     /* Save the current MSR */
+                       rlwinm  r10,r10,0,MSR_FP_BIT+1,MSR_FP_BIT-1     ; Force floating point off
+                       rlwinm  r10,r10,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1   ; Force vectors off
+                       mtcrf   0x04,r8                                         ; Set the features                      
+                       xoris   r5,r3,HIGH_ADDR(PPC_SID_KERNEL)         /* Clear the top half if equal */
+                       andi.   r9,r10,0x7FCF                           /* Turn off interrupts and translation */
+                       eqv             r12,r12,r12                                     /* Fill the bottom with foxes */
 
-;
-;                      int hw_protect(pmap, va, prot, *nextva) - Changes protection on a specific mapping.
-;                      
-;                      Returns:
-;                              mapRtOK     - if all is ok
-;                              mapRtBadLk  - if mapping lock fails
-;                              mapRtPerm   - if mapping is permanent
-;                              mapRtNotFnd - if mapping is not found
-;                              mapRtBlock  - if mapping is a block
-;
-                       .align  5
-                       .globl  EXT(hw_protect)
+                       bt              pfNoMSRirb,lraNoMSR                     ; No MSR...
 
-LEXT(hw_protect)
-                       stwu    r1,-(FM_ALIGN((31-24+1)*4)+FM_SIZE)(r1) ; Make some space on the stack
-                       mflr    r0                                                      ; Save the link register
-                       stw             r24,FM_ARG0+0x00(r1)            ; Save a register
-                       stw             r25,FM_ARG0+0x04(r1)            ; Save a register
-                       mr              r25,r7                                          ; Remember address of next va
-                       stw             r26,FM_ARG0+0x08(r1)            ; Save a register
-                       stw             r27,FM_ARG0+0x0C(r1)            ; Save a register
-                       stw             r28,FM_ARG0+0x10(r1)            ; Save a register
-                       mr              r24,r6                                          ; Save the new protection flags
-                       stw             r29,FM_ARG0+0x14(r1)            ; Save a register
-                       stw             r30,FM_ARG0+0x18(r1)            ; Save a register
-                       stw             r31,FM_ARG0+0x1C(r1)            ; Save a register
-                       stw             r0,(FM_ALIGN((31-24+1)*4)+FM_SIZE+FM_LR_SAVE)(r1)       ; Save the return
+                       mtmsr   r9                                                      ; Translation and all off
+                       isync                                                           ; Toss prefetch
+                       b               lraNoMSRx
+                       
+lraNoMSR:      
+                       mr              r7,r3
+                       li              r0,loadMSR                                      ; Get the MSR setter SC
+                       mr              r3,r9                                           ; Get new MSR
+                       sc                                                                      ; Set it
+                       mr              r3,r7
+lraNoMSRx:
+
+                       cmplwi  r5,LOW_ADDR(PPC_SID_KERNEL)     /* See if this is kernel space */
+                       rlwinm  r11,r3,6,6,25                           /* Position the space for the VSID */
+                       isync                                                           /* Purge pipe */
+                       bne-    notkernsp                                       /* This is not for the kernel... */             
+                       
+                       mfspr   r5,dbat0u                                       /* Get the virtual address and length */
+                       eqv             r8,r8,r8                                        /* Get all foxes */
+                       rlwinm. r0,r5,0,30,30                           /* Check if valid for supervisor state */
+                       rlwinm  r7,r5,0,0,14                            /* Clean up the base virtual address */
+                       beq-    ckbat1                                          /* not valid, skip this one... */
+                       sub             r7,r4,r7                                        /* Subtract out the base */
+                       rlwimi  r8,r5,15,0,14                           /* Get area length - 1 */
+                       mfspr   r6,dbat0l                                       /* Get the real part */
+                       cmplw   r7,r8                                           /* Check if it is in the range */
+                       bng+    fndbat                                          /* Yup, she's a good un... */
+
+ckbat1:                mfspr   r5,dbat1u                                       /* Get the virtual address and length */                        
+                       eqv             r8,r8,r8                                        /* Get all foxes */
+                       rlwinm. r0,r5,0,30,30                           /* Check if valid for supervisor state */
+                       rlwinm  r7,r5,0,0,14                            /* Clean up the base virtual address */
+                       beq-    ckbat2                                          /* not valid, skip this one... */
+                       sub             r7,r4,r7                                        /* Subtract out the base */
+                       rlwimi  r8,r5,15,0,14                           /* Get area length - 1 */
+                       mfspr   r6,dbat1l                                       /* Get the real part */
+                       cmplw   r7,r8                                           /* Check if it is in the range */
+                       bng+    fndbat                                          /* Yup, she's a good un... */
+                       
+ckbat2:                mfspr   r5,dbat2u                                       /* Get the virtual address and length */
+                       eqv             r8,r8,r8                                        /* Get all foxes */
+                       rlwinm. r0,r5,0,30,30                           /* Check if valid for supervisor state */
+                       rlwinm  r7,r5,0,0,14                            /* Clean up the base virtual address */
+                       beq-    ckbat3                                          /* not valid, skip this one... */
+                       sub             r7,r4,r7                                        /* Subtract out the base */
+                       rlwimi  r8,r5,15,0,14                           /* Get area length - 1 */
+                       mfspr   r6,dbat2l                                       /* Get the real part */
+                       cmplw   r7,r8                                           /* Check if it is in the range */
+                       bng-    fndbat                                          /* Yup, she's a good un... */
+                       
+ckbat3:                mfspr   r5,dbat3u                                       /* Get the virtual address and length */
+                       eqv             r8,r8,r8                                        /* Get all foxes */
+                       rlwinm. r0,r5,0,30,30                           /* Check if valid for supervisor state */
+                       rlwinm  r7,r5,0,0,14                            /* Clean up the base virtual address */
+                       beq-    notkernsp                                       /* not valid, skip this one... */
+                       sub             r7,r4,r7                                        /* Subtract out the base */
+                       rlwimi  r8,r5,15,0,14                           /* Get area length - 1 */
+                       mfspr   r6,dbat3l                                       /* Get the real part */
+                       cmplw   r7,r8                                           /* Check if it is in the range */
+                       bgt+    notkernsp                                       /* No good... */
+                       
+fndbat:                rlwinm  r6,r6,0,0,14                            /* Clean up the real address */
+                       mtmsr   r10                                                     /* Restore state */
+                       add             r3,r7,r6                                        /* Relocate the offset to real */
+                       isync                                                           /* Purge pipe */
+                       blr                                                                     /* Bye, bye... */
+
+notkernsp:     mfspr   r5,sdr1                                         /* Get hash table base and size */
+                       rlwimi  r11,r4,30,2,5                           /* Insert the segment no. to make a VSID */
+                       rlwimi  r12,r5,16,0,15                          /* Make table size -1 out of mask */
+                       rlwinm  r7,r4,26,10,25                          /* Isolate the page index */
+                       andc    r5,r5,r12                                       /* Clean up the hash table */
+                       xor             r7,r7,r11                                       /* Get primary hash */
+                       rlwinm  r11,r11,1,1,24                          /* Position VSID for pte ID */
+                       and             r7,r7,r12                                       /* Wrap the hash */
+                       rlwimi  r11,r4,10,26,31                         /* Move API into pte ID */
+                       add             r5,r7,r5                                        /* Point to the PTEG */
+                       oris    r11,r11,0x8000                          /* Slam on valid bit so's we don't match an invalid one */
+
+                       li              r9,8                                            /* Get the number of PTEs to check */
+                       lwz             r6,0(r5)                                        /* Preload the virtual half */
+                       
+fndpte:                subi    r9,r9,1                                         /* Count the pte */
+                       lwz             r3,4(r5)                                        /* Get the real half */
+                       cmplw   cr1,r6,r11                                      /* Is this what we want? */
+                       lwz             r6,8(r5)                                        /* Start to get the next virtual half */
+                       mr.             r9,r9                                           /* Any more to try? */
+                       addi    r5,r5,8                                         /* Bump to next slot */
+                       beq             cr1,gotxlate                            /* We found what we were looking for... */
+                       bne+    fndpte                                          /* Go try the next PTE... */
+                       
+                       mtmsr   r10                                                     /* Restore state */
+                       li              r3,0                                            /* Show failure */
+                       isync                                                           /* Purge pipe */
+                       blr                                                                     /* Leave... */
+
+gotxlate:      mtmsr   r10                                                     /* Restore state */
+                       rlwimi  r3,r4,0,20,31                           /* Cram in the page displacement */
+                       isync                                                           /* Purge pipe */
+                       blr                                                                     /* Return... */
 
-                       lwz             r6,pmapvr(r3)                           ; Get the first part of the VR translation for pmap
-                       lwz             r7,pmapvr+4(r3)                         ; Get the second part
 
 
-                       bl              EXT(mapSetUp)                           ; Turn off interrupts, translation, and possibly enter 64-bit
+/*
+ *                     struct blokmap *hw_add_blk(pmap_t pmap, struct blokmap *bmr)
+ *     
+ *                     This is used to add a block mapping entry to the MRU list whose top
+ *                     node is anchored at bmaps.  This is a real address and is also used as
+ *                     the lock.
+ *
+ *                     Overlapping areas are not allowed.  If we find one, we return it's address and
+ *                     expect the upper layers to panic.  We only check this for a debug build...
+ *
+ */
 
-                       mr              r27,r11                                         ; Remember the old MSR
-                       mr              r26,r12                                         ; Remember the feature bits
+                       .align  5
+                       .globl  EXT(hw_add_blk)
 
-                       xor             r28,r3,r7                                       ; Change the common 32- and 64-bit half
+LEXT(hw_add_blk)
 
-                       bf--    pf64Bitb,hpSF1                          ; skip if 32-bit...
+                       mfsprg  r9,2                                            ; Get feature flags 
+                       lwz             r6,PMAP_PMAPVR(r3)                      ; Get the v to r translation
+                       mfmsr   r0                                                      /* Save the MSR  */
+                       rlwinm  r0,r0,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r0,r0,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r12,r0,0,MSR_EE_BIT+1,MSR_EE_BIT-1      /* Clear interruptions */
+                       mtcrf   0x04,r9                                         ; Set the features                      
+                       xor             r3,r3,r6                                        ; Get real address of bmap anchor
+                       rlwinm  r12,r12,0,28,25                         /* Clear IR and DR */
+                       la              r3,PMAP_BMAPS(r3)                       ; Point to bmap header
                        
-                       rldimi  r28,r6,32,0                                     ; Shift the fixed upper part of the physical over and cram in top
-
-hpSF1:         mr              r29,r4                                          ; Save top half of vaddr
-                       mr              r30,r5                                          ; Save the bottom half
-                                               
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkShared                                      ; Go get a shared lock on the mapping lists
-                       mr.             r3,r3                                           ; Did we get the lock?
-                       bne--   hpBadLock                                       ; Nope...
+                       bt              pfNoMSRirb,habNoMSR                     ; No MSR...
 
-                       mr              r3,r28                                          ; get the pmap address
-                       mr              r4,r29                                          ; Get bits 0:31 to look for
-                       mr              r5,r30                                          ; Get bits 32:64
+                       mtmsr   r12                                                     ; Translation and all off
+                       isync                                                           ; Toss prefetch
+                       b               habNoMSRx
                        
-                       bl              EXT(mapSearch)                          ; Go see if we can find it (note: R7 comes back with mpFlags)
-
-                       andi.   r7,r7,lo16(mpSpecial|mpNest|mpPerm|mpBlock|mpRIP)       ; Are we allowed to change it or is it being removed?
-                       mr.             r31,r3                                          ; Save the mapping if we found it
-                       cmplwi  cr1,r7,0                                        ; Anything special going on?
-                       mr              r29,r4                                          ; Save next va high half
-                       mr              r30,r5                                          ; Save next va low half
+habNoMSR:      
+                       mr              r9,r0
+                       mr              r8,r3
+                       li              r0,loadMSR                                      ; Get the MSR setter SC
+                       mr              r3,r12                                          ; Get new MSR
+                       sc                                                                      ; Set it
+                       mr              r3,r8
+                       mr              r0,r9
+habNoMSRx:
+                       
+abLck:         lwarx   r9,0,r3                                         ; Get the block map anchor and lock
+                       rlwinm. r8,r9,0,31,31                           ; Is it locked?
+                       ori             r8,r9,1                                         ; Set the lock
+                       bne-    abLckw                                          ; Yeah...
+                       stwcx.  r8,0,r3                                         ; Lock the bmap list
+                       bne-    abLck                                           ; Someone else was trying, try again...
+                       b               abSXg                                           ; All done...
                        
-                       beq--   hpNotFound                                      ; Not found...
+                       .align  4
 
-                       bne--   cr1,hpNotAllowed                        ; Something special is happening...
+abLckw:                rlwinm. r5,r9,0,31,31                           ; Check if it is still held
+                       beq+    abLck                                           ; Not no more...
+                       lwz             r9,0(r3)                                        ; Get lock word again...
+                       b               abLckw                                          ; Check it out...
                        
-                       bt++    pf64Bitb,hpDo64                         ; Split for 64 bit
+                       .align  5
                        
-                       bl              mapInvPte32                                     ; Invalidate and lock PTEG, also merge into physent
-                                               
-                       rlwimi  r5,r24,0,mpPPb-32,mpPPb-32+2    ; Stick in the new pp
-                       mr.             r3,r3                                           ; Was there a previously valid PTE?
+                       nop                                                                     ; Force ISYNC to last instruction in IFETCH
+                       nop                                                                     
 
-                       stb             r5,mpVAddr+7(r31)                       ; Set the new pp field (do not muck with the rest)                      
+abSXg:         rlwinm  r11,r9,0,0,26                           ; Clear out flags and lock
+                       isync                                                           ; Make sure we have not used anything yet
 
-                       beq--   hpNoOld32                                       ; Nope...
-                       
-                       stw             r5,4(r3)                                        ; Store second half of PTE
-                       eieio                                                           ; Make sure we do not reorder
-                       stw             r4,0(r3)                                        ; Revalidate the PTE
-
-                       eieio                                                           ; Make sure all updates come first
-                       stw             r6,0(r7)                                        ; Unlock PCA
-               
-hpNoOld32:     la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkUnlock                                      ; Unlock the search list
+;
+;
+;
 
-                       li              r3,mapRtOK                                      ; Set normal return             
-                       b               hpR32                                           ; Join common...
+                       lwz             r7,bmstart(r4)                          ; Get start
+                       lwz             r8,bmend(r4)                            ; Get end               
+                       mr              r2,r11                                          ; Get chain
+       
+abChk:         mr.             r10,r2                                          ; End of chain?
+                       beq             abChkD                                          ; Yes, chain is ok...
+                       lwz             r5,bmstart(r10)                         ; Get start of current area
+                       lwz             r6,bmend(r10)                           ; Get end of current area
+                       
+                       cmplw   cr0,r8,r5                                       ; Is the end of the new before the old?
+                       cmplw   cr1,r8,r6                                       ; Is the end of the new after the old?
+                       cmplw   cr6,r6,r7                                       ; Is the end of the old before the new?
+                       cror    cr1_eq,cr0_lt,cr1_gt            ; Set cr1_eq if new not in old
+                       cmplw   cr7,r6,r8                                       ; Is the end of the old after the new?
+                       lwz             r2,bmnext(r10)                          ; Get pointer to the next
+                       cror    cr6_eq,cr6_lt,cr7_gt            ; Set cr2_eq if old not in new
+                       crand   cr1_eq,cr1_eq,cr6_eq            ; Set cr1_eq if no overlap
+                       beq+    cr1,abChk                                       ; Ok check the next...
+                       
+                       lwz             r8,blkFlags(r10)                        ; Get the flags
+                       rlwinm. r8,r8,0,blkRembit,blkRembit     ; Check the blkRem bit
+                       beq             abRet                                           ; Is the mapping partially removed
+                       ori             r10,r10,2                                       ; Indicate that this block is partially removed
+abRet:
+                       stw             r9,0(r3)                                        ; Unlock
+                       mtmsr   r0                                                      ; Restore xlation and rupts
+                       mr              r3,r10                                          ; Pass back the overlap
+                       isync                                                           ;  
+                       blr                                                                     ; Return...
 
-                       .align  5                       
-                       
+abChkD:                stw             r11,bmnext(r4)                          ; Chain this on in
+                       rlwimi  r4,r9,0,27,31                           ; Copy in locks and flags
+                       sync                                                            ; Make sure that is done
                        
-hpDo64:                bl              mapInvPte64                                     ; Invalidate and lock PTEG, also merge into physent
-                                               
-                       rldimi  r5,r24,0,mpPPb                          ; Stick in the new pp
-                       mr.             r3,r3                                           ; Was there a previously valid PTE?
+                       stw             r4,0(r3)                                        ; Unlock and chain the new first one
+                       mtmsr   r0                                                      ; Restore xlation and rupts
+                       li              r3,0                                            ; Pass back a no failure return code
+                       isync
+                       blr                                                                     ; Return...
 
-                       stb             r5,mpVAddr+7(r31)                       ; Set the new pp field (do not muck with the rest)                      
 
-                       beq--   hpNoOld64                                       ; Nope...
-                       
-                       std             r5,8(r3)                                        ; Store second half of PTE
-                       eieio                                                           ; Make sure we do not reorder
-                       std             r4,0(r3)                                        ; Revalidate the PTE
+/*
+ *                     struct blokmap *hw_rem_blk(pmap_t pmap, vm_offset_t sva, vm_offset_t eva)
+ *     
+ *                     This is used to remove a block mapping entry from the list that
+ *                     is anchored at bmaps.  bmaps is a virtual address and is also used as
+ *                     the lock.
+ *
+ *                     Note that this function clears a single block that contains
+ *                     any address within the range sva to eva (inclusive).  To entirely
+ *                     clear any range, hw_rem_blk must be called repeatedly until it
+ *                     returns a 0.
+ *
+ *                     The block is removed from the list and all hash table entries
+ *                     corresponding to the mapped block are invalidated and the TLB
+ *                     entries are purged.  If the block is large, this could take
+ *                     quite a while. We need to hash every possible address in the
+ *                     range and lock down the PCA.
+ *
+ *                     If we attempt to remove a permanent entry, we will not do it.
+ *                     The block address will be ored with 1 and returned.
+ *
+ *
+ */
 
-                       eieio                                                           ; Make sure all updates come first
-                       stw             r6,0(r7)                                        ; Unlock PCA
+                       .align  5
+                       .globl  EXT(hw_rem_blk)
 
-hpNoOld64:     la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkUnlock                                      ; Unlock the search list
+LEXT(hw_rem_blk)
 
-                       li              r3,mapRtOK                                      ; Set normal return             
-                       b               hpR64                                           ; Join common...
+                       mfsprg  r9,2                                            ; Get feature flags
+                       lwz             r6,PMAP_PMAPVR(r3)                      ; Get the v to r translation
+                       mfmsr   r0                                                      /* Save the MSR  */
+                       rlwinm  r0,r0,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r0,r0,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r12,r0,0,MSR_EE_BIT+1,MSR_EE_BIT-1      /* Clear interruptions */
+                       mtcrf   0x04,r9                                         ; Set the features                      
+                       xor             r3,r3,r6                                        ; Get real address of bmap anchor
+                       rlwinm  r12,r12,0,28,25                         /* Clear IR and DR */
+                       la              r3,PMAP_BMAPS(r3)                       ; Point to the bmap chain head
 
-                       .align  5                                                       
-                                               
-hpReturn:      bt++    pf64Bitb,hpR64                          ; Yes...
+                       bt              pfNoMSRirb,hrbNoMSR                     ; No MSR...
 
-hpR32:         mtmsr   r27                                                     ; Restore enables/translation/etc.
-                       isync
-                       b               hpReturnC                                       ; Join common...
+                       mtmsr   r12                                                     ; Translation and all off
+                       isync                                                           ; Toss prefetch
+                       b               hrbNoMSRx
+                       
+hrbNoMSR:      
+                       mr              r9,r0
+                       mr              r8,r3
+                       li              r0,loadMSR                                      ; Get the MSR setter SC
+                       mr              r3,r12                                          ; Get new MSR
+                       sc                                                                      ; Set it
+                       mr              r3,r8
+                       mr              r0,r9
+hrbNoMSRx:
+                       li              r7,0
+                       cmp             cr5,r0,r7                                       ; Request to invalidate the ptes
+                       b               rbLck
 
-hpR64:         mtmsrd  r27                                                     ; Restore enables/translation/etc.
-                       isync                                                           
+rbunlink:
+                       lwz             r4,bmstart(r10)                         ; Get start of current mapping
+                       lwz             r5,bmend(r10)                           ; Get end of current mapping
+                       cmp             cr5,r3,r3                                       ; Request to unlink the mapping
+
+rbLck:         lwarx   r9,0,r3                                         ; Get the block map anchor and lock
+                       rlwinm. r8,r9,0,31,31                           ; Is it locked?
+                       ori             r8,r9,1                                         ; Set the lock
+                       bne-    rbLckw                                          ; Yeah...
+                       stwcx.  r8,0,r3                                         ; Lock the bmap list
+                       bne-    rbLck                                           ; Someone else was trying, try again...
+                       b               rbSXg                                           ; All done...
                        
-hpReturnC:     stw             r29,0(r25)                                      ; Save the top of the next va
-                       stw             r30,4(r25)                                      ; Save the bottom of the next va
-                       lwz             r0,(FM_ALIGN((31-24+1)*4)+FM_SIZE+FM_LR_SAVE)(r1)       ; Save the return
-                       lwz             r24,FM_ARG0+0x00(r1)            ; Save a register
-                       lwz             r25,FM_ARG0+0x04(r1)            ; Save a register
-                       lwz             r26,FM_ARG0+0x08(r1)            ; Save a register
-                       mtlr    r0                                                      ; Restore the return
-                       lwz             r27,FM_ARG0+0x0C(r1)            ; Save a register
-                       lwz             r28,FM_ARG0+0x10(r1)            ; Save a register
-                       lwz             r29,FM_ARG0+0x14(r1)            ; Save a register
-                       lwz             r30,FM_ARG0+0x18(r1)            ; Save a register
-                       lwz             r31,FM_ARG0+0x1C(r1)            ; Save a register
-                       lwz             r1,0(r1)                                        ; Pop the stack
-                       blr                                                                     ; Leave...
+                       .align  4
+
+rbLckw:                rlwinm. r11,r9,0,31,31                          ; Check if it is still held
+                       beq+    rbLck                                           ; Not no more...
+                       lwz             r9,0(r3)                                        ; Get lock word again...
+                       b               rbLckw                                          ; Check it out...
                        
                        .align  5
                        
-hpBadLock:     li              r3,mapRtBadLk                           ; Set lock time out error code
-                       b               hpReturn                                        ; Leave....
+                       nop                                                                     ; Force ISYNC to last instruction in IFETCH
+                       nop                                                                     
+
+rbSXg:         rlwinm. r2,r9,0,0,26                            ; Clear out flags and lock
+                       mr              r10,r3                                          ; Keep anchor as previous pointer
+                       isync                                                           ; Make sure we have not used anything yet
                        
-hpNotFound:    la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkUnlock                                      ; Unlock the search list
+                       beq-    rbMT                                            ; There is nothing in the list
                        
-                       li              r3,mapRtNotFnd                          ; Set that we did not find the requested page
-                       b               hpReturn                                        ; Leave....
+rbChk:         mr              r12,r10                                         ; Save the previous
+                       mr.             r10,r2                                          ; End of chain?
+                       beq             rbMT                                            ; Yes, nothing to do...
+                       lwz             r11,bmstart(r10)                        ; Get start of current area
+                       lwz             r6,bmend(r10)                           ; Get end of current area
                        
-hpNotAllowed:  
-                       rlwinm. r0,r7,0,mpRIPb,mpRIPb           ; Is it actually being removed?
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bne--   hpNotFound                                      ; Yeah...
-                       bl              sxlkUnlock                                      ; Unlock the search list
+                       cmplw   cr0,r5,r11                                      ; Is the end of range before the start of the area?
+                       cmplw   cr1,r4,r6                                       ; Is the start of range after the end of the area?
+                       cror    cr1_eq,cr0_lt,cr1_gt            ; Set cr1_eq if new not in range
+                       lwz             r2,bmnext(r10)                          ; Get the next one
+                       beq+    cr1,rbChk                                       ; Not this one, check the next...
+
+                       cmplw   cr1,r12,r3                                      ; Is the current mapping the first one?
+
+                       bne             cr5,rbblkRem                            ; Do we have to unchain the mapping
+
+                       bne             cr1,rbnFirst                            ; Yes, is this the first mapping?
+                       rlwimi  r9,r2,0,0,26                            ; Yes, Change the lock value
+                       ori             r2,r9,1                                         ; Turn on the lock bit
+rbnFirst:
+                       stw             r2,bmnext(r12)                          ; Unchain us
+                       sync
+                       b               rbDone
+
+rbblkRem:
+               
+                       lwz             r8,blkFlags(r10)                        ; Get the flags
                        
-                       li              r3,mapRtBlock                           ; Assume it was a block
-                       andi.   r7,r7,lo16(mpBlock)                     ; Is this a block?
-                       bne++   hpReturn                                        ; Yes, leave...
+                       rlwinm. r7,r8,0,blkPermbit,blkPermbit   ; is this a permanent block?
                        
-                       li              r3,mapRtPerm                            ; Set that we hit a permanent page
-                       b               hpReturn                                        ; Leave....
+                       bne-    rbPerm                                          ; This is permanent, do not remove...
 
+                       rlwinm. r7,r8,0,blkRembit,blkRembit     ; is this mapping partially removed
 
-;
-;                      int hw_test_rc(pmap, va, reset) - tests RC on a specific va
-;                      
-;                      Returns following code ORed with RC from mapping
-;                              mapRtOK     - if all is ok
-;                              mapRtBadLk  - if mapping lock fails
-;                              mapRtNotFnd - if mapping is not found
-;
-                       .align  5
-                       .globl  EXT(hw_test_rc)
+                       beq             rbblkRemcont                            ; If not, check the max size
+                       lwz             r11,bmcurrent(r10)                      ; If yes, resume for the current page
 
-LEXT(hw_test_rc)
-                       stwu    r1,-(FM_ALIGN((31-24+1)*4)+FM_SIZE)(r1) ; Make some space on the stack
-                       mflr    r0                                                      ; Save the link register
-                       stw             r24,FM_ARG0+0x00(r1)            ; Save a register
-                       stw             r25,FM_ARG0+0x04(r1)            ; Save a register
-                       stw             r26,FM_ARG0+0x08(r1)            ; Save a register
-                       stw             r27,FM_ARG0+0x0C(r1)            ; Save a register
-                       stw             r28,FM_ARG0+0x10(r1)            ; Save a register
-                       mr              r24,r6                                          ; Save the reset request
-                       stw             r29,FM_ARG0+0x14(r1)            ; Save a register
-                       stw             r30,FM_ARG0+0x18(r1)            ; Save a register
-                       stw             r31,FM_ARG0+0x1C(r1)            ; Save a register
-                       stw             r0,(FM_ALIGN((31-24+1)*4)+FM_SIZE+FM_LR_SAVE)(r1)       ; Save the return
+                       cmp             cr5,r11,r6                                      ; No partial remove left
+                       beq             cr5, rbpendret                          ; But there is  a pending remove
 
-                       lwz             r6,pmapvr(r3)                           ; Get the first part of the VR translation for pmap
-                       lwz             r7,pmapvr+4(r3)                         ; Get the second part
+rbblkRemcont:
+                       bne             rbblkRemcont1                           ; Is it the first remove
 
+                       oris    r8,r8,hi16(blkRem)                      ; Yes
+                       stw             r8,blkFlags(r10)                        ; set the blkRem bit in blkFlags
 
-                       bl              EXT(mapSetUp)                           ; Turn off interrupts, translation, and possibly enter 64-bit
+rbblkRemcont1:
+                       lis             r5,hi16(BLKREMMAX*4096)                 ; Load maximun size tear down
+                       ori             r5,r5,lo16(BLKREMMAX*4096)              ; Load maximun size tear down
+                       sub             r7,r6,r11                                       ; Get the remaining size to tear down
+                       cmp             cr5,r7,r5                                       ; Compare against the maximun size
+                       ble             cr5,rbfullblk                           ; If less or equal, go remove the mapping
 
-                       mr              r27,r11                                         ; Remember the old MSR
-                       mr              r26,r12                                         ; Remember the feature bits
+                       add             r7,r11,r5                                       ; Add the max size tear down to the current page
+                       stw             r7,bmcurrent(r10)                       ; Update the current page
+                       subi    r6,r7,1                                         ; Set the current end of the partial tear down
+                       b               rbcont
 
-                       xor             r28,r3,r7                                       ; Change the common 32- and 64-bit half
+rbfullblk:
+                       stw             r6,bmcurrent(r10)                       ; Update the current page
 
-                       bf--    pf64Bitb,htrSF1                         ; skip if 32-bit...
+rbcont:
+                       lwz             r8,bmspace(r10)                         ; Get the VSID
+                       sync
+                       stw             r9,0(r3)                                        ; Unlock and chain the new first one
+                       
+                       eqv             r4,r4,r4                                        ; Fill the bottom with foxes
+                       mfspr   r12,sdr1                                        ; Get hash table base and size
+                       rlwinm  r8,r8,6,0,25                            ; Align VSID to PTEG
+                       rlwimi  r4,r12,16,0,15                          ; Make table size - 1 out of mask
+                       andc    r12,r12,r4                                      ; Clean up address of hash table
+                       rlwinm  r5,r11,26,6,25                          ; Rotate virtual start address into PTEG units
+                       add             r12,r12,r4                                      ; Point to PCA - 1
+                       rlwinm  r6,r6,26,6,25                           ; Rotate virtual end address into PTEG units
+                       addi    r12,r12,1                                       ; Point to PCA base
+                       sub             r6,r6,r5                                        ; Get the total number of PTEGs to clear
+                       cmplw   r6,r4                                           ; See if this wraps all the way around
+                       blt             rbHash                                          ; Nope, length is right
+                       subi    r6,r4,32+31                                     ; Back down to correct length
+                       
+rbHash:                rlwinm  r5,r5,0,10,25                           ; Keep only the page index
+                       xor             r2,r8,r5                                        ; Hash into table
+                       and             r2,r2,r4                                        ; Wrap into the table
+                       add             r2,r2,r12                                       ; Point right at the PCA
+
+rbLcka:                lwarx   r7,0,r2                                         ; Get the PTEG lock
+                       mr.             r7,r7                                           ; Is it locked?
+                       bne-    rbLckwa                                         ; Yeah...
+                       li              r7,1                                            ; Get the locked value
+                       stwcx.  r7,0,r2                                         ; Take it
+                       bne-    rbLcka                                          ; Someone else was trying, try again...
+                       b               rbSXga                                          ; All done... 
+
+rbLckwa:       mr.             r7,r7                                           ; Check if it is already held
+                       beq+    rbLcka                                          ; It is clear...
+                       lwz             r7,0(r2)                                        ; Get lock word again...
+                       b               rbLckwa                                         ; Wait...
+                       
+rbSXga:                isync                                                           ; Make sure nothing used yet
+                       lwz             r7,PCAallo(r2)                          ; Get the allocation word
+                       rlwinm. r11,r7,8,0,7                            ; Isolate the autogenerated PTEs
+                       or              r7,r7,r11                                       ; Release the autogen slots
+                       beq+    rbAintNone                                      ; There are not any here
+                       mtcrf   0xC0,r11                                        ; Set the branch masks for autogens
+                       sub             r11,r2,r4                                       ; Move back to the hash table + 1
+                       rlwinm  r7,r7,0,16,7                            ; Clear the autogen field
+                       subi    r11,r11,1                                       ; Point to the PTEG
+                       stw             r7,PCAallo(r2)                          ; Update the flags
+                       li              r7,0                                            ; Get an invalid PTE value
+
+                       bf              0,rbSlot1                                       ; No autogen here
+                       stw             r7,0x00(r11)                            ; Invalidate PTE
+rbSlot1:       bf              1,rbSlot2                                       ; No autogen here
+                       stw             r7,0x08(r11)                            ; Invalidate PTE
+rbSlot2:       bf              2,rbSlot3                                       ; No autogen here
+                       stw             r7,0x10(r11)                            ; Invalidate PTE
+rbSlot3:       bf              3,rbSlot4                                       ; No autogen here
+                       stw             r7,0x18(r11)                            ; Invalidate PTE
+rbSlot4:       bf              4,rbSlot5                                       ; No autogen here
+                       stw             r7,0x20(r11)                            ; Invalidate PTE
+rbSlot5:       bf              5,rbSlot6                                       ; No autogen here
+                       stw             r7,0x28(r11)                            ; Invalidate PTE
+rbSlot6:       bf              6,rbSlot7                                       ; No autogen here
+                       stw             r7,0x30(r11)                            ; Invalidate PTE
+rbSlot7:       bf              7,rbSlotx                                       ; No autogen here
+                       stw             r7,0x38(r11)                            ; Invalidate PTE
+rbSlotx:
+
+rbAintNone:    li              r7,0                                            ; Clear this out
+                       sync                                                            ; To make SMP happy
+                       addic.  r6,r6,-64                                       ; Decrement the count
+                       stw             r7,PCAlock(r2)                          ; Release the PTEG lock
+                       addi    r5,r5,64                                        ; Move up by adjusted page number
+                       bge+    rbHash                                          ; Not done...
+       
+                       sync                                                            ; Make sure the memory is quiet
                        
-                       rldimi  r28,r6,32,0                                     ; Shift the fixed upper part of the physical over and cram in top
+;
+;                      Here we take the easy way out and just purge the entire TLB. This is 
+;                      certainly faster and definitly easier than blasting just the correct ones
+;                      in the range, we only need one lock and one TLBSYNC. We would hope
+;                      that most blocks are more than 64 pages (256K) and on every machine
+;                      up to Book E, 64 TLBIEs will invalidate the entire table.
+;
 
-htrSF1:                mr              r29,r4                                          ; Save top half of vaddr
-                       mr              r30,r5                                          ; Save the bottom half
+                       li              r5,64                                           ; Get number of TLB entries to purge
+                       lis             r12,HIGH_ADDR(EXT(tlb_system_lock))     ; Get the TLBIE lock
+                       li              r6,0                                            ; Start at 0
+                       ori             r12,r12,LOW_ADDR(EXT(tlb_system_lock))  ; Grab up the bottom part
                                                
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkShared                                      ; Go get a shared lock on the mapping lists
-                       mr.             r3,r3                                           ; Did we get the lock?
-                       li              r25,0                                           ; Clear RC
-                       bne--   htrBadLock                                      ; Nope...
-
-                       mr              r3,r28                                          ; get the pmap address
-                       mr              r4,r29                                          ; Get bits 0:31 to look for
-                       mr              r5,r30                                          ; Get bits 32:64
-                       
-                       bl              EXT(mapSearch)                          ; Go see if we can find it (R7 comes back with mpFlags)
-
-                       andi.   r0,r7,lo16(mpSpecial|mpNest|mpPerm|mpBlock|mpRIP)       ; Are we allowed to change it or is it being removed?
-                       mr.             r31,r3                                          ; Save the mapping if we found it
-                       cmplwi  cr1,r0,0                                        ; Are we removing it?
-                       crorc   cr0_eq,cr0_eq,cr1_eq            ; Did we not find it or is it being removed?
+rbTlbL:                lwarx   r2,0,r12                                        ; Get the TLBIE lock
+                       mr.             r2,r2                                           ; Is it locked?
+                       li              r2,1                                            ; Get our lock value
+                       bne-    rbTlbL                                          ; It is locked, go wait...
+                       stwcx.  r2,0,r12                                        ; Try to get it
+                       bne-    rbTlbL                                          ; We was beat...
+       
+rbTlbN:                addic.  r5,r5,-1                                        ; See if we did them all
+                       tlbie   r6                                                      ; Invalidate it everywhere
+                       addi    r6,r6,0x1000                            ; Up to the next page
+                       bgt+    rbTlbN                                          ; Make sure we have done it all...
                        
-                       bt--    cr0_eq,htrNotFound                      ; Not found, something special, or being removed...
+                       mfspr   r5,pvr                                          ; Find out what kind of machine we are
+                       li              r2,0                                            ; Lock clear value
                        
-                       bt++    pf64Bitb,htrDo64                        ; Split for 64 bit
+                       rlwinm  r5,r5,16,16,31                          ; Isolate CPU type
+                       cmplwi  r5,3                                            ; Is this a 603?
+                       sync                                                            ; Make sure all is quiet
+                       beq-    rbits603a                                       ; It is a 603, skip the tlbsync...
                        
-                       bl              mapInvPte32                                     ; Invalidate and lock PTEG, also merge into physent
-                                               
-                       cmplwi  cr1,r24,0                                       ; Do we want to clear RC?
-                       lwz             r12,mpVAddr+4(r31)                      ; Get the bottom of the mapping vaddr field
-                       mr.             r3,r3                                           ; Was there a previously valid PTE?
-                       li              r0,lo16(mpR|mpC)                        ; Get bits to clear
+                       eieio                                                           ; Make sure that the tlbie happens first
+                       tlbsync                                                         ; wait for everyone to catch up
+                       isync                                                           
 
-                       and             r25,r5,r0                                       ; Save the RC bits
-                       beq++   cr1,htrNoClr32                          ; Nope...
+rbits603a:     sync                                                            ; Wait for quiet again
+                       stw             r2,0(r12)                                       ; Unlock invalidates
                        
-                       andc    r12,r12,r0                                      ; Clear mapping copy of RC
-                       andc    r5,r5,r0                                        ; Clear PTE copy of RC
-                       sth             r12,mpVAddr+6(r31)                      ; Set the new RC                        
-
-htrNoClr32:    beq--   htrNoOld32                                      ; No previously valid PTE...
+                       sync                                                            ; Make sure that is done
                        
-                       sth             r5,6(r3)                                        ; Store updated RC
-                       eieio                                                           ; Make sure we do not reorder
-                       stw             r4,0(r3)                                        ; Revalidate the PTE
+                       ble             cr5,rbunlink                            ; If all ptes are flush, go unlink the mapping
+                       mtmsr   r0                                                      ; Restore xlation and rupts
+                       mr              r3,r10                                          ; Pass back the removed block in progress
+                       ori             r3,r3,2                                         ; Indicate that the block remove isn't completed yet
+                       isync
+                       blr                                                                     ; Return...
 
-                       eieio                                                           ; Make sure all updates come first
-                       stw             r6,0(r7)                                        ; Unlock PCA
+rbpendret:
+                       stw             r9,0(r3)                                        ; Unlock
+                       mtmsr   r0                                                      ; Restore xlation and rupts
+                       mr              r3,r10                                          ; Pass back the removed block in progress
+                       ori             r3,r3,2                                         ; Indicate that the block remove isn't completed yet
+                       isync
+                       blr                                                                     ; Return...
 
-htrNoOld32:    la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkUnlock                                      ; Unlock the search list
-                       li              r3,mapRtOK                                      ; Set normal return             
-                       b               htrR32                                          ; Join common...
 
-                       .align  5                       
-                       
+rbMT:          stw             r9,0(r3)                                        ; Unlock
+                       mtmsr   r0                                                      ; Restore xlation and rupts
+                       li              r3,0                                            ; Say we did not find one
+                       isync
+                       blr                                                                     ; Return...
                        
-htrDo64:       bl              mapInvPte64                                     ; Invalidate and lock PTEG, also merge into physent
-                                               
-                       cmplwi  cr1,r24,0                                       ; Do we want to clear RC?
-                       lwz             r12,mpVAddr+4(r31)                      ; Get the bottom of the mapping vaddr field
-                       mr.             r3,r3                                           ; Was there a previously valid PTE?
-                       li              r0,lo16(mpR|mpC)                        ; Get bits to clear
+rbPerm:                stw             r9,0(r3)                                        ; Unlock
+                       mtmsr   r0                                                      ; Restore xlation and rupts
+                       ori             r3,r10,1                                        ; Say we did not remove it
+                       isync
+                       blr                                                                     ; Return...
 
-                       and             r25,r5,r0                                       ; Save the RC bits
-                       beq++   cr1,htrNoClr64                          ; Nope...
-                       
-                       andc    r12,r12,r0                                      ; Clear mapping copy of RC
-                       andc    r5,r5,r0                                        ; Clear PTE copy of RC
-                       sth             r12,mpVAddr+6(r31)                      ; Set the new RC                        
+rbDone:                stw     r9,0(r3)                                        ; Unlock
+                       mtmsr   r0                                                      ; Restore xlation and rupts
+                       mr      r3,r10                                          ; Pass back the removed block
+                       isync
+                       blr                                                                     ; Return...
 
-htrNoClr64:    beq--   htrNoOld64                                      ; Nope, no pevious pte...
-                       
-                       sth             r5,14(r3)                                       ; Store updated RC
-                       eieio                                                           ; Make sure we do not reorder
-                       std             r4,0(r3)                                        ; Revalidate the PTE
+/*
+ *                     hw_select_mappings(struct mappingflush *mappingflush)
+ *
+ *                     Input: PCA addr
+ *                     Ouput: up to 8 user mappings
+ *
+ *                     hw_select_mappings() scans every PCA mapping hash lists and select
+ *                     the last user mapping if it exists.
+ *
+ */
 
-                       eieio                                                           ; Make sure all updates come first
-                       stw             r6,0(r7)                                        ; Unlock PCA
+                       .align  5
+                       .globl  EXT(hw_select_mappings)
 
-htrNoOld64:    la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkUnlock                                      ; Unlock the search list
-                       li              r3,mapRtOK                                      ; Set normal return             
-                       b               htrR64                                          ; Join common...
+LEXT(hw_select_mappings)
+                       mr              r5,r3                                           ; Get the mapping flush addr
+                       mfmsr   r12                                                     ; Get the MSR 
+                       rlwinm  r12,r12,0,MSR_FP_BIT+1,MSR_FP_BIT-1     ; Force floating point off
+                       rlwinm  r12,r12,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1   ; Force vectors off
+                       mfsprg  r9,2                                            ; Get feature flags
+                       andi.   r0,r12,0x7FCF                           ; Disable translation and interruptions
+                       mtcrf   0x04,r9                                         ; Set the features
+                       bt              pfNoMSRirb,hvmNoMSR                     ; No MSR...
+                       mtmsr   r0
+                       isync
+                       b               hvmNoMSRx
+hvmNoMSR:
+                       mr              r3,r0                                           ; Get the new MSR
+                       li              r0,loadMSR                                      ; Get the MSR setter SC
+                       sc
+hvmNoMSRx:
+                       mr              r0,r12
+                       li              r11,1                                           ; Get the locked value 
+
+hvmptegLckx:   
+                       lwz             r3,MFpcaptr(r5)                         ; Get the PCA pointer
+                       lwarx   r10,0,r3                                        ; Get the PTEG lock
+                       mr.             r10,r10                                         ; Is it locked?
+                       bne-    hvmptegLckwx                            ; Yeah...
+                       stwcx.  r11,0,r3                                        ; Take take it
+                       bne-    hvmptegLckx                                     ; Someone else was trying, try again...
+                       b               hvmptegSXgx                                     ; All done...
+
+                       .align  4
+
+hvmptegLckwx:
+                       mr.             r10,r10                                         ; Check if it is already held
+                       beq+    hvmptegLckx                                     ; It's clear...
+                       lwz             r10,0(r3)                                       ; Get lock word again...
+                       b               hvmptegLckwx                            ; Wait...
+
+                       .align  4
+
+hvmptegSXgx:
+                       isync                                                           ; Make sure we haven't used anything yet
+
+                       li              r11,8                                           ; set count to 8 
+
+                       lwz             r6,PCAhash(r3)                          ; load the first mapping hash list
+                       la              r12,PCAhash(r3)                         ; Point to the mapping hash area
+                       la              r4,MFmapping(r5)                        ; Point to the mapping flush mapping area
+                       li              r7,0                                            ; Load zero
+                       stw             r7,MFmappingcnt(r5)                     ; Set the current count to 0
+hvmnexthash:
+                       li              r10,0                                           ; Mapping test
+
+hvmfindmap:
+                       mr.             r6,r6                                           ; Test if the hash list current pointer is zero
+                       beq             hvmfindmapret                           ; Did we hit the end of the hash list
+                       lwz             r7,mmPTEv(r6)                           ; Pick up our virtual ID
+                       rlwinm  r8,r7,5,0,19                            ; Pick VSID 20 lower bits
+                       mr.             r8,r8
+                       beq             hvmfindmapnext                          ; Skip Kernel VSIDs
+                       rlwinm  r8,r7,1,0,3                                     ; Extract the Segment index 
+                       rlwinm  r9,r7,22,4,9                            ; Extract API 6 upper bits
+                       or              r8,r8,r9                                        ; Add to the virtual address
+                       rlwinm  r9,r7,31,6,25                           ; Pick VSID 19 lower bits
+                       xor             r9,r9,r3                                        ; Exclusive or with the PCA address
+                       rlwinm  r9,r9,6,10,19                           ; Extract API 10 lower bits
+                       or              r8,r8,r9                                        ; Add to the virtual address
+
+                       stw             r8,4(r4)                                        ; Store the virtual address
+                       lwz             r8,mmpmap(r6)                           ; Get the pmap
+                       stw             r8,0(r4)                                        ; Store the pmap
+                       li              r10,1                                           ; Found one
+
+hvmfindmapnext:
+                       lwz             r6,mmhashnext(r6)                       ; Pick up next mapping block
+                       b               hvmfindmap                                      ; Scan the next mapping
+hvmfindmapret:
+                       mr.             r10,r10                                         ; Found mapping
+                       beq             hvmnexthashprep                         ; If not, do not update the mappingflush array
+                       lwz             r7,MFmappingcnt(r5)                     ; Get the current count
+                       addi    r7,r7,1                                         ; Increment the current count
+                       stw             r7,MFmappingcnt(r5)                     ; Store the current count
+                       addi    r4,r4,MFmappingSize                     ; Point to the next mapping flush entry
+hvmnexthashprep:
+                       addi    r12,r12,4                                       ; Load the next hash list
+                       lwz             r6,0(r12)                                       ; Load the next hash list entry
+                       subi    r11,r11,1                                       ; Decrement hash list index 
+                       mr.             r11,r11                                         ; Test for a remaining hash list
+                       bne             hvmnexthash                                     ; Loop to scan the next hash list
+
+                       li              r10,0
+                       stw             r10,0(r3)                                       ; Unlock the hash list
+                       mtmsr   r0                                                      ; Restore translation and interruptions
+                       isync
+                       blr
 
-                       .align  5                                                       
-                                               
-htrReturn:     bt++    pf64Bitb,htrR64                         ; Yes...
+/*
+ *                     vm_offset_t hw_cvp_blk(pmap_t pmap, vm_offset_t va)
+ *     
+ *                     This is used to translate a virtual address within a block mapping entry
+ *                     to a physical address.  If not found, 0 is returned.
+ *
+ */
 
-htrR32:                mtmsr   r27                                                     ; Restore enables/translation/etc.
-                       isync
-                       b               htrReturnC                                      ; Join common...
+                       .align  5
+                       .globl  EXT(hw_cvp_blk)
 
-htrR64:                mtmsrd  r27                                                     ; Restore enables/translation/etc.
-                       isync                                                           
+LEXT(hw_cvp_blk)
+
+                       mfsprg  r9,2                                            ; Get feature flags
+                       lwz             r6,PMAP_PMAPVR(r3)                      ; Get the v to r translation
+                       mfmsr   r0                                                      /* Save the MSR  */
+                       rlwinm  r0,r0,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r0,r0,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r12,r0,0,MSR_EE_BIT+1,MSR_EE_BIT-1      /* Clear interruptions */
+                       mtcrf   0x04,r9                                         ; Set the features                      
+                       xor             r3,r3,r6                                        ; Get real address of bmap anchor
+                       rlwinm  r12,r12,0,28,25                         /* Clear IR and DR */
+                       la              r3,PMAP_BMAPS(r3)                       ; Point to chain header
+
+                       bt              pfNoMSRirb,hcbNoMSR                     ; No MSR...
+
+                       mtmsr   r12                                                     ; Translation and all off
+                       isync                                                           ; Toss prefetch
+                       b               hcbNoMSRx
                        
-htrReturnC:    lwz             r0,(FM_ALIGN((31-24+1)*4)+FM_SIZE+FM_LR_SAVE)(r1)       ; Save the return
-                       or              r3,r3,r25                                       ; Send the RC bits back
-                       lwz             r24,FM_ARG0+0x00(r1)            ; Save a register
-                       lwz             r25,FM_ARG0+0x04(r1)            ; Save a register
-                       lwz             r26,FM_ARG0+0x08(r1)            ; Save a register
-                       mtlr    r0                                                      ; Restore the return
-                       lwz             r27,FM_ARG0+0x0C(r1)            ; Save a register
-                       lwz             r28,FM_ARG0+0x10(r1)            ; Save a register
-                       lwz             r29,FM_ARG0+0x14(r1)            ; Save a register
-                       lwz             r30,FM_ARG0+0x18(r1)            ; Save a register
-                       lwz             r31,FM_ARG0+0x1C(r1)            ; Save a register
-                       lwz             r1,0(r1)                                        ; Pop the stack
+hcbNoMSR:      
+                       mr              r9,r0
+                       mr              r8,r3
+                       li              r0,loadMSR                                      ; Get the MSR setter SC
+                       mr              r3,r12                                          ; Get new MSR
+                       sc                                                                      ; Set it
+                       mr              r3,r8
+                       mr              r0,r9
+hcbNoMSRx:
+
+cbLck:         lwarx   r9,0,r3                                         ; Get the block map anchor and lock
+                       rlwinm. r8,r9,0,31,31                           ; Is it locked?
+                       ori             r8,r9,1                                         ; Set the lock
+                       bne-    cbLckw                                          ; Yeah...
+                       stwcx.  r8,0,r3                                         ; Lock the bmap list
+                       bne-    cbLck                                           ; Someone else was trying, try again...
+                       b               cbSXg                                           ; All done...
+                       
+                       .align  4
+
+cbLckw:                rlwinm. r5,r9,0,31,31                           ; Check if it is still held
+                       beq+    cbLck                                           ; Not no more...
+                       lwz             r9,0(r3)                                        ; Get lock word again...
+                       b               cbLckw                                          ; Check it out...
+                       
+                       .align  5
+                       
+                       nop                                                                     ; Force ISYNC to last instruction in IFETCH
+                       nop
+                       nop
+                       nop
+                       nop
+
+cbSXg:         rlwinm. r11,r9,0,0,26                           ; Clear out flags and lock
+                       li              r2,0                                            ; Assume we do not find anything                        
+                       isync                                                           ; Make sure we have not used anything yet
+
+cbChk:         mr.             r11,r11                                         ; Is there more?
+                       beq-    cbDone                                          ; No more...
+                       lwz             r5,bmstart(r11)                         ; Get the bottom of range
+                       lwz             r12,bmend(r11)                          ; Get the top of range
+                       cmplw   cr0,r4,r5                                       ; Are we before the entry?
+                       cmplw   cr1,r4,r12                                      ; Are we after of the entry?
+                       cror    cr1_eq,cr0_lt,cr1_gt            ; Set cr1_eq if new not in range
+                       beq-    cr1,cbNo                                        ; We are not in the range...
+
+                       lwz             r2,bmPTEr(r11)                          ; Get the real part of the PTE
+                       sub             r5,r4,r5                                        ; Get offset into area
+                       rlwinm  r2,r2,0,0,19                            ; Clean out everything but the page
+                       add             r2,r2,r5                                        ; Adjust the real address
+
+cbDone:                stw             r9,0(r3)                                        ; Unlock it, we are done with it (no sync needed)
+                       mtmsr   r0                                                      ; Restore translation and interrupts...
+                       isync                                                           ; Make sure it is on
+                       mr              r3,r2                                           ; Set return physical address
                        blr                                                                     ; Leave...
                        
                        .align  5
                        
-htrBadLock:    li              r3,mapRtBadLk                           ; Set lock time out error code
-                       b               htrReturn                                       ; Leave....
+cbNo:          lwz             r11,bmnext(r11)                         ; Link next
+                       b               cbChk                                           ; Check it out...
                        
-htrNotFound:   
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkUnlock                                      ; Unlock the search list
                        
-                       li              r3,mapRtNotFnd                          ; Set that we did not find the requested page
-                       b               htrReturn                                       ; Leave....
-
-
-
-;
-;                      mapPhysFindLock - find physent list and lock it
-;                      R31 points to mapping
-;
-                       .align  5
-                       
-mapPhysFindLock:       
-                       lbz             r4,mpFlags+1(r31)                       ; Get the index into the physent bank table
-                       lis             r3,ha16(EXT(pmap_mem_regions))  ; Get high order of physent table (note use of ha16 to get value appropriate for an addi of low part)
-                       rlwinm  r4,r4,2,0,29                            ; Change index into byte offset
-                       addi    r4,r4,lo16(EXT(pmap_mem_regions))       ; Get low part of address of entry
-                       add             r3,r3,r4                                        ; Point to table entry
-                       lwz             r5,mpPAddr(r31)                         ; Get physical page number
-                       lwz             r7,mrStart(r3)                          ; Get the start of range
-                       lwz             r3,mrPhysTab(r3)                        ; Get the start of the entries for this bank
-                       sub             r6,r5,r7                                        ; Get index to physent
-                       rlwinm  r6,r6,3,0,28                            ; Get offset to physent
-                       add             r3,r3,r6                                        ; Point right to the physent
-                       b               mapPhysLock                                     ; Join in the lock...
-
-;
-;                      mapPhysLock - lock a physent list
-;                      R3 contains list header
-;
-                       .align  5
-
-mapPhysLockS:
-                       li              r2,lgKillResv                           ; Get a spot to kill reservation
-                       stwcx.  r2,0,r2                                         ; Kill it...
-                       
-mapPhysLockT:
-                       lwz             r2,ppLink(r3)                           ; Get physent chain header
-                       rlwinm. r2,r2,0,0,0                                     ; Is lock clear?
-                       bne--   mapPhysLockT                            ; Nope, still locked...
-                       
-mapPhysLock:   
-                       lwarx   r2,0,r3                                         ; Get the lock
-                       rlwinm. r0,r2,0,0,0                                     ; Is it locked?
-                       oris    r0,r2,0x8000                            ; Set the lock bit
-                       bne--   mapPhysLockS                            ; It is locked, spin on it...
-                       stwcx.  r0,0,r3                                         ; Try to stuff it back...
-                       bne--   mapPhysLock                                     ; Collision, try again...
-                       isync                                                           ; Clear any speculations
-                       blr                                                                     ; Leave...
-                       
-
-;
-;                      mapPhysUnlock - unlock a physent list
-;                      R3 contains list header
-;
-                       .align  5
-                       
-mapPhysUnlock: 
-                       lwz             r0,ppLink(r3)                           ; Get physent chain header
-                       rlwinm  r0,r0,0,1,31                            ; Clear the lock bit
-                       eieio                                                           ; Make sure unlock comes last
-                       stw             r0,ppLink(r3)                           ; Unlock the list
-                       blr
-
-;
-;                      mapPhysMerge - merge the RC bits into the master copy
-;                      R3 points to the physent 
-;                      R4 contains the RC bits
-;
-;                      Note: we just return if RC is 0
-;
-                       .align  5
-                       
-mapPhysMerge:  
-                       rlwinm. r4,r4,PTE1_REFERENCED_BIT+(64-ppRb),ppRb-32,ppCb-32     ; Isolate RC bits
-                       la              r5,ppLink+4(r3)                         ; Point to the RC field
-                       beqlr--                                                         ; Leave if RC is 0...
-                       
-mapPhysMergeT:
-                       lwarx   r6,0,r5                                         ; Get the RC part
-                       or              r6,r6,r4                                        ; Merge in the RC
-                       stwcx.  r6,0,r5                                         ; Try to stuff it back...
-                       bne--   mapPhysMergeT                           ; Collision, try again...
-                       blr                                                                     ; Leave...
-
-;
-;                      Sets the physent link pointer and preserves all flags
-;                      The list is locked
-;                      R3 points to physent
-;                      R4 has link to set
-;
-
-                       .align  5
-
-mapPhyCSet32:
-                       la              r5,ppLink+4(r3)                         ; Point to the link word
-
-mapPhyCSetR:
-                       lwarx   r2,0,r5                                         ; Get the link and flags
-                       rlwimi  r4,r2,0,26,31                           ; Insert the flags
-                       stwcx.  r4,0,r5                                         ; Stick them back
-                       bne--   mapPhyCSetR                                     ; Someone else did something, try again...
-                       blr                                                                     ; Return...
-
-                       .align  5
-
-mapPhyCSet64:
-                       li              r0,0xFF                                         ; Get mask to clean up mapping pointer
-                       rldicl  r0,r0,62,0                                      ; Rotate clean up mask to get 0xC0000000000000003F
-               
-mapPhyCSet64x:
-                       ldarx   r2,0,r3                                         ; Get the link and flags
-                       and             r5,r2,r0                                        ; Isolate the flags
-                       or              r6,r4,r5                                        ; Add them to the link
-                       stdcx.  r6,0,r3                                         ; Stick them back
-                       bne--   mapPhyCSet64x                           ; Someone else did something, try again...
-                       blr                                                                     ; Return...                                             
-
-;
-;                      mapBumpBusy - increment the busy count on a mapping
-;                      R3 points to mapping
-;
-
-                       .align  5
-
-mapBumpBusy:
-                       lwarx   r4,0,r3                                         ; Get mpBusy
-                       addis   r4,r4,0x0100                            ; Bump the busy count
-                       stwcx.  r4,0,r3                                         ; Save it back
-                       bne--   mapBumpBusy                                     ; This did not work, try again...
-                       blr                                                                     ; Leave...
-
-;
-;                      mapDropBusy - increment the busy count on a mapping
-;                      R3 points to mapping
-;
-
-                       .globl  EXT(mapping_drop_busy)
-                       .align  5
-
-LEXT(mapping_drop_busy)
-mapDropBusy:
-                       lwarx   r4,0,r3                                         ; Get mpBusy
-                       addis   r4,r4,0xFF00                            ; Drop the busy count
-                       stwcx.  r4,0,r3                                         ; Save it back
-                       bne--   mapDropBusy                                     ; This did not work, try again...
-                       blr                                                                     ; Leave...
-
-;
-;                      mapDrainBusy - drain the busy count on a mapping
-;                      R3 points to mapping
-;                      Note: we already have a busy for ourselves. Only one
-;                      busy per processor is allowed, so we just spin here
-;                      waiting for the count to drop to 1.
-;                      Also, the mapping can not be on any lists when we do this
-;                      so all we are doing is waiting until it can be released.
-;
-
-                       .align  5
-
-mapDrainBusy:
-                       lwz             r4,mpFlags(r3)                          ; Get mpBusy
-                       rlwinm  r4,r4,8,24,31                           ; Clean it up
-                       cmplwi  r4,1                                            ; Is is just our busy?
-                       beqlr++                                                         ; Yeah, it is clear...
-                       b               mapDrainBusy                            ; Try again...
-
-
-       
-;
-;                      handleDSeg - handle a data segment fault
-;                      handleISeg - handle an instruction segment fault
-;
-;                      All that we do here is to map these to DSI or ISI and insure
-;                      that the hash bit is not set.  This forces the fault code
-;                      to also handle the missing segment.
-;
-;                      At entry R2 contains per_proc, R13 contains savarea pointer,
-;                      and R11 is the exception code.
-;
-
-                       .align  5
-                       .globl  EXT(handleDSeg)
-
-LEXT(handleDSeg)
-
-                       li              r11,T_DATA_ACCESS                       ; Change fault to DSI
-                       stw             r11,saveexception(r13)          ; Change the exception code from seg fault to PTE miss
-                       b               EXT(handlePF)                           ; Join common...
-
-                       .align  5
-                       .globl  EXT(handleISeg)
-
-LEXT(handleISeg)
-
-                       li              r11,T_INSTRUCTION_ACCESS        ; Change fault to ISI
-                       stw             r11,saveexception(r13)          ; Change the exception code from seg fault to PTE miss
-                       b               EXT(handlePF)                           ; Join common...
-
-
-/*
- *                     handlePF - handle a page fault interruption
- *
- *                     At entry R2 contains per_proc, R13 contains savarea pointer,
- *                     and R11 is the exception code.
- *
- *                     This first part does a quick check to see if we can handle the fault.
- *                     We canot handle any kind of protection exceptions here, so we pass
- *                     them up to the next level.
- *
- *                     NOTE: In order for a page-fault redrive to work, the translation miss
- *                     bit must be set in the DSISR (or SRR1 for IFETCH).  That must occur
- *                     before we come here.
- */
-
-                       .align  5
-                       .globl  EXT(handlePF)
-
-LEXT(handlePF)
-
-                       mfsprg  r12,2                                           ; Get feature flags 
-                       cmplwi  r11,T_INSTRUCTION_ACCESS                ; See if this is for the instruction 
-                       lwz             r8,savesrr1+4(r13)                      ; Get the MSR to determine mode
-                       mtcrf   0x02,r12                                        ; move pf64Bit to cr6
-                       lis             r0,hi16(dsiNoEx|dsiProt|dsiInvMode|dsiAC)       ; Get the types that we cannot handle here
-                       lwz             r18,SAVflags(r13)                       ; Get the flags
-                       
-                       beq--   gotIfetch                                       ; We have an IFETCH here...
-                       
-                       lwz             r27,savedsisr(r13)                      ; Get the DSISR
-                       lwz             r29,savedar(r13)                        ; Get the first half of the DAR
-                       lwz             r30,savedar+4(r13)                      ; And second half
-
-                       b               ckIfProt                                        ; Go check if this is a protection fault...
-
-gotIfetch:     andis.  r27,r8,hi16(dsiValid)           ; Clean this up to construct a DSISR value
-                       lwz             r29,savesrr0(r13)                       ; Get the first half of the instruction address
-                       lwz             r30,savesrr0+4(r13)                     ; And second half
-                       stw             r27,savedsisr(r13)                      ; Save the "constructed" DSISR
-
-ckIfProt:      and.    r4,r27,r0                                       ; Is this a non-handlable exception?
-                       li              r20,64                                          ; Set a limit of 64 nests for sanity check
-                       bne--   hpfExit                                         ; Yes... (probably not though)
-
-;
-;                      Note: if the RI is on, we are accessing user space from the kernel, therefore we
-;                      should be loading the user pmap here.
-;
-
-                       andi.   r0,r8,lo16(MASK(MSR_PR)|MASK(MSR_RI))   ; Are we addressing user or kernel space?
-                       lis             r8,hi16(EXT(kernel_pmap_phys))  ; Assume kernel
-                       mr              r19,r2                                          ; Remember the per_proc
-                       ori             r8,r8,lo16(EXT(kernel_pmap_phys))       ; Assume kernel (bottom of address)
-                       mr              r23,r30                                         ; Save the low part of faulting address
-                       beq--   hpfInKern                                       ; Skip if we are in the kernel
-                       la              r8,ppUserPmap(r19)                      ; Point to the current user pmap
-                       
-hpfInKern:     mr              r22,r29                                         ; Save the high part of faulting address
-                       
-                       bt--    pf64Bitb,hpf64a                         ; If 64-bit, skip the next bit...
-
-;
-;                      On 32-bit machines we emulate a segment exception by loading unused SRs with a
-;                      predefined value that corresponds to no address space.  When we see that value
-;                      we turn off the PTE miss bit in the DSISR to drive the code later on that will
-;                      cause the proper SR to be loaded.
-;
-
-                       lwz             r28,4(r8)                                       ; Pick up the pmap
-                       rlwinm. r18,r18,0,SAVredriveb,SAVredriveb       ; Was this a redrive?
-                       mr              r25,r28                                         ; Save the original pmap (in case we nest)
-                       bne             hpfNest                                         ; Segs are not ours if so...
-                       mfsrin  r4,r30                                          ; Get the SR that was used for translation
-                       cmplwi  r4,invalSpace                           ; Is this a simulated segment fault?
-                       bne++   hpfNest                                         ; No...
-                       
-                       rlwinm  r27,r27,0,dsiMissb+1,dsiMissb-1 ; Clear the PTE miss bit in DSISR
-                       b               hpfNest                                         ; Join on up...
-                       
-                       .align  5
-
-                       nop                                                                     ; Push hpfNest to a 32-byte boundary
-                       nop                                                                     ; Push hpfNest to a 32-byte boundary
-                       nop                                                                     ; Push hpfNest to a 32-byte boundary
-                       nop                                                                     ; Push hpfNest to a 32-byte boundary
-                       nop                                                                     ; Push hpfNest to a 32-byte boundary
-                       nop                                                                     ; Push hpfNest to a 32-byte boundary
-
-hpf64a:                ld              r28,0(r8)                                       ; Get the pmap pointer (64-bit)
-                       mr              r25,r28                                         ; Save the original pmap (in case we nest)
-
-;
-;                      This is where we loop descending nested pmaps
-;
-
-hpfNest:       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       addi    r20,r20,-1                                      ; Count nest try
-                       bl              sxlkShared                                      ; Go get a shared lock on the mapping lists
-                       mr.             r3,r3                                           ; Did we get the lock?
-                       bne--   hpfBadLock                                      ; Nope...
-
-                       mr              r3,r28                                          ; Get the pmap pointer
-                       mr              r4,r22                                          ; Get top of faulting vaddr
-                       mr              r5,r23                                          ; Get bottom of faulting vaddr
-                       bl              EXT(mapSearch)                          ; Go see if we can find it (R7 gets mpFlags)
-
-                       rlwinm  r0,r7,0,mpRIPb,mpRIPb           ; Are we removing this one?
-                       mr.             r31,r3                                          ; Save the mapping if we found it
-                       cmplwi  cr1,r0,0                                        ; Check for removal
-                       crorc   cr0_eq,cr0_eq,cr1_eq            ; Merge not found and removing
-                       
-                       bt--    cr0_eq,hpfNotFound                      ; Not found or removing...
-                       
-                       rlwinm. r0,r7,0,mpNestb,mpNestb         ; Are we nested?
-                       mr              r26,r7                                          ; Get the flags for this mapping (passed back from search call)
-                       
-                       lhz             r21,mpSpace(r31)                        ; Get the space
-
-                       beq++   hpfFoundIt                                      ; No, we found our guy...
-                       
-
-#if pmapTransSize != 12
-#error pmapTrans entry size is not 12 bytes!!!!!!!!!!!! It is pmapTransSize
-#endif
-                       rlwinm. r0,r26,0,mpSpecialb,mpSpecialb  ; Special handling?
-                       cmplwi  cr1,r20,0                                       ; Too many nestings?
-                       bne--   hpfSpclNest                                     ; Do we need to do special handling?
-
-hpfCSrch:      lhz             r21,mpSpace(r31)                        ; Get the space
-                       lwz             r8,mpNestReloc(r31)                     ; Get the vaddr relocation
-                       lwz             r9,mpNestReloc+4(r31)           ; Get the vaddr relocation bottom half
-                       la              r3,pmapSXlk(r28)                        ; Point to the old pmap search lock
-                       lis             r0,0x8000                                       ; Get 0xFFFFFFFF80000000
-                       lis             r10,hi16(EXT(pmapTrans))        ; Get the translate table
-                       add             r0,r0,r0                                        ; Get 0xFFFFFFFF00000000 for 64-bit or 0 for 32-bit
-                       blt--   cr1,hpfNestTooMuch                      ; Too many nestings, must be a loop...
-                       or              r23,r23,r0                                      ; Make sure a carry will propagate all the way in 64-bit
-                       slwi    r11,r21,3                                       ; Multiply space by 8
-                       ori             r10,r10,lo16(EXT(pmapTrans))    ; Get the translate table low part
-                       addc    r23,r23,r9                                      ; Relocate bottom half of vaddr
-                       lwz             r10,0(r10)                                      ; Get the actual translation map
-                       slwi    r12,r21,2                                       ; Multiply space by 4
-                       add             r10,r10,r11                                     ; Add in the higher part of the index
-                       rlwinm  r23,r23,0,0,31                          ; Clean up the relocated address (does nothing in 32-bit)
-                       adde    r22,r22,r8                                      ; Relocate the top half of the vaddr
-                       add             r12,r12,r10                                     ; Now we are pointing at the space to pmap translation entry
-                       bl              sxlkUnlock                                      ; Unlock the search list
-                       
-                       lwz             r28,pmapPAddr+4(r12)            ; Get the physical address of the new pmap
-                       bf--    pf64Bitb,hpfNest                        ; Done if 32-bit...
-                       
-                       ld              r28,pmapPAddr(r12)                      ; Get the physical address of the new pmap
-                       b               hpfNest                                         ; Go try the new pmap...
-
-;
-;                      Error condition.  We only allow 64 nestings.  This keeps us from having to 
-;                      check for recusive nests when we install them.
-;
-               
-                       .align  5
-
-hpfNestTooMuch:
-                       lwz             r20,savedsisr(r13)                      ; Get the DSISR
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkUnlock                                      ; Unlock the search list (R3 good from above)
-                       ori             r20,r20,1                                       ; Indicate that there was a nesting problem 
-                       stw             r20,savedsisr(r13)                      ; Stash it
-                       lwz             r11,saveexception(r13)          ; Restore the exception code
-                       b               EXT(PFSExit)                            ; Yes... (probably not though)
-
-;
-;                      Error condition - lock failed - this is fatal
-;
-               
-                       .align  5
-
-hpfBadLock:
-                       lis             r0,hi16(Choke)                          ; System abend
-                       ori             r0,r0,lo16(Choke)                       ; System abend
-                       li              r3,failMapping                          ; Show mapping failure
-                       sc
-;
-;                      Did not find any kind of mapping
-;
-
-                       .align  5
-                       
-hpfNotFound:
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkUnlock                                      ; Unlock it
-                       lwz             r11,saveexception(r13)          ; Restore the exception code
-                       
-hpfExit:                                                                               ; We need this because we can not do a relative branch
-                       b               EXT(PFSExit)                            ; Yes... (probably not though)
-
-
-;
-;                      Here is where we handle special mappings.  So far, the only use is to load a 
-;                      processor specific segment register for copy in/out handling.
-;
-;                      The only (so far implemented) special map is used for copyin/copyout.
-;                      We keep a mapping of a "linkage" mapping in the per_proc.
-;                      The linkage mapping is basically a nested pmap that is switched in
-;                      as part of context switch.  It relocates the appropriate user address
-;                      space slice into the right place in the kernel.
-;
-
-                       .align  5
-
-hpfSpclNest:   
-                       la              r31,ppCIOmp(r19)                        ; Just point to the mapping
-                       oris    r27,r27,hi16(dsiSpcNest)        ; Show that we had a special nesting here
-                       b               hpfCSrch                                        ; Go continue search...
-
-
-;
-;                      We have now found a mapping for the address we faulted on. 
-;                      
-
-;
-;                      Here we go about calculating what the VSID should be. We concatanate
-;                      the space ID (14 bits wide) 3 times.  We then slide the vaddr over
-;                      so that bits 0:35 are in 14:49 (leaves a hole for one copy of the space ID).
-;                      Then we XOR and expanded space ID and the shifted vaddr.  This gives us
-;                      the VSID.  
-;
-;                      This is used both for segment handling and PTE handling
-;
-
-
-#if maxAdrSpb != 14
-#error maxAdrSpb (address space id size) is not 14 bits!!!!!!!!!!!!
-#endif
-
-                       .align  5
-                       
-hpfFoundIt:    lwz             r12,pmapFlags(r28)                      ; Get the pmap flags so we can find the keys for this segment
-                       rlwinm. r0,r27,0,dsiMissb,dsiMissb      ; Did we actually miss the segment?
-                       rlwinm  r15,r23,18,14,17                        ; Shift 32:35 (0:3) of vaddr just above space ID
-                       rlwinm  r20,r21,28,22,31                        ; Shift upper 10 bits of space into high order
-                       rlwinm  r14,r22,18,14,31                        ; Shift 0:17 of vaddr over
-                       rlwinm  r0,r27,0,dsiSpcNestb,dsiSpcNestb        ; Isolate special nest flag
-                       rlwimi  r21,r21,14,4,17                         ; Make a second copy of space above first
-                       cmplwi  cr5,r0,0                                        ; Did we just do a special nesting?
-                       rlwimi  r15,r22,18,0,13                         ; Shift 18:31 of vaddr just above shifted 32:35 
-                       crorc   cr0_eq,cr0_eq,cr5_eq            ; Force outselves through the seg load code if special nest
-                       rlwimi  r21,r21,28,0,3                          ; Get low order of 3rd copy of space at top of register
-                       xor             r14,r14,r20                                     ; Calculate the top half of VSID
-                       xor             r15,r15,r21                                     ; Calculate the bottom half of the VSID
-                       rlwinm  r14,r14,12,15,19                        ; Slide the top of the VSID over to correct position (trim for 65 bit addressing)
-                       rlwinm  r12,r12,9,20,22                         ; Isolate and position key for cache entry
-                       rlwimi  r14,r15,12,20,31                        ; Slide top of bottom of VSID over into the top
-                       rlwinm  r15,r15,12,0,19                         ; Slide the last nybble into the low order segment position
-                       or              r12,r12,r15                                     ; Add key into the bottom of VSID
-;
-;                      Note: ESID is in R22:R23 pair; VSID is in R14:R15; cache form VSID is R14:R12
-                       
-                       bne++   hpfPteMiss                                      ; Nope, normal PTE miss...
-
-;
-;                      Here is the only place that we make an entry in the pmap segment cache.
-;
-;                      Note that we do not make an entry in the segment cache for special
-;                      nested mappings.  This makes the copy in/out segment get refreshed
-;                      when switching threads.
-;
-;                      The first thing that we do is to look up the ESID we are going to load
-;                      into a segment in the pmap cache.  If it is already there, this is
-;                      a segment that appeared since the last time we switched address spaces.
-;                      If all is correct, then it was another processors that made the cache
-;                      entry.  If not, well, it is an error that we should die on, but I have
-;                      not figured a good way to trap it yet.
-;
-;                      If we get a hit, we just bail, otherwise, lock the pmap cache, select
-;                      an entry based on the generation number, update the cache entry, and 
-;                      also update the pmap sub-tag as well.  The sub-tag is a table of 4 bit
-;                      entries that correspond to the last 4 bits (32:35 for 64-bit and 
-;                      0:3 for 32-bit) of the ESID.
-;
-;                      Then we unlock and bail.
-;
-;                      First lock it.  Then select a free slot or steal one based on the generation
-;                      number. Then store it, update the allocation flags, and unlock.
-;
-;                      The cache entry contains an image of the ESID/VSID pair we would load for
-;                      64-bit architecture.  For 32-bit, it is a simple transform to an SR image.
-;
-;                      Remember, this cache entry goes in the ORIGINAL pmap (saved in R25), not
-;                      the current one, which may have changed because we nested.
-;
-;                      Also remember that we do not store the valid bit in the ESID.  If we 
-;                      od, this will break some other stuff.
-;
-
-                       bne--   cr5,hpfNoCacheEnt2                      ; Skip the cache entry if this is a "special nest" fault....
-                       
-                       mr              r3,r25                                          ; Point to the pmap
-                       mr              r4,r22                                          ; ESID high half
-                       mr              r5,r23                                          ; ESID low half
-                       bl              pmapCacheLookup                         ; Go see if this is in the cache already
-                       
-                       mr.             r3,r3                                           ; Did we find it?
-                       mr              r4,r11                                          ; Copy this to a different register
-
-                       bne--   hpfNoCacheEnt                           ; Yes, we found it, no need to make another entry...
-                       
-                       lwz             r10,pmapSCSubTag(r25)           ; Get the first part of the sub-tag lookup table
-                       lwz             r11,pmapSCSubTag+4(r25)         ; Get the second part of the sub-tag lookup table
-                       
-                       cntlzw  r7,r4                                           ; Find a free slot
-
-                       subi    r6,r7,pmapSegCacheUse           ; We end up with a negative if we find one
-                       rlwinm  r30,r30,0,0,3                           ; Clean up the ESID
-                       srawi   r6,r6,31                                        ; Get 0xFFFFFFFF if we have one, 0 if not
-                       addi    r5,r4,1                                         ; Bump the generation number
-                       and             r7,r7,r6                                        ; Clear bit number if none empty
-                       andc    r8,r4,r6                                        ; Clear generation count if we found an empty
-                       rlwimi  r4,r5,0,17,31                           ; Insert the new generation number into the control word                        
-                       or              r7,r7,r8                                        ; Select a slot number
-                       li              r8,0                                            ; Clear
-                       andi.   r7,r7,pmapSegCacheUse-1         ; Wrap into the number we are using
-                       oris    r8,r8,0x8000                            ; Get the high bit on
-                       la              r9,pmapSegCache(r25)            ; Point to the segment cache
-                       slwi    r6,r7,4                                         ; Get index into the segment cache
-                       slwi    r2,r7,2                                         ; Get index into the segment cache sub-tag index
-                       srw             r8,r8,r7                                        ; Get the mask
-                       cmplwi  r2,32                                           ; See if we are in the first or second half of sub-tag
-                       li              r0,0                                            ; Clear
-                       rlwinm  r2,r2,0,27,31                           ; Wrap shift so we do not shift cache entries 8-F out
-                       oris    r0,r0,0xF000                            ; Get the sub-tag mask
-                       add             r9,r9,r6                                        ; Point to the cache slot
-                       srw             r0,r0,r2                                        ; Slide sub-tag mask to right slot (shift work for either half)
-                       srw             r5,r30,r2                                       ; Slide sub-tag to right slot (shift work for either half)
-                       
-                       stw             r29,sgcESID(r9)                         ; Save the top of the ESID
-                       andc    r10,r10,r0                                      ; Clear sub-tag slot in case we are in top
-                       andc    r11,r11,r0                                      ; Clear sub-tag slot in case we are in bottom
-                       stw             r30,sgcESID+4(r9)                       ; Save the bottom of the ESID
-                       or              r10,r10,r5                                      ; Stick in subtag in case top half
-                       or              r11,r11,r5                                      ; Stick in subtag in case bottom half
-                       stw             r14,sgcVSID(r9)                         ; Save the top of the VSID
-                       andc    r4,r4,r8                                        ; Clear the invalid bit for the slot we just allocated
-                       stw             r12,sgcVSID+4(r9)                       ; Save the bottom of the VSID and the key
-                       bge             hpfSCSTbottom                           ; Go save the bottom part of sub-tag
-                       
-                       stw             r10,pmapSCSubTag(r25)           ; Save the top of the sub-tag
-                       b               hpfNoCacheEnt                           ; Go finish up...
-                       
-hpfSCSTbottom:
-                       stw             r11,pmapSCSubTag+4(r25)         ; Save the bottom of the sub-tag
-
-
-hpfNoCacheEnt: 
-                       eieio                                                           ; Make sure cache is updated before lock
-                       stw             r4,pmapCCtl(r25)                        ; Unlock, allocate, and bump generation number
-
-
-hpfNoCacheEnt2:
-                       lwz             r4,ppMapFlags(r19)                      ; Get the protection key modifier
-                       bt++    pf64Bitb,hpfLoadSeg64           ; If 64-bit, go load the segment...
-                                               
-;
-;                      Make and enter 32-bit segment register
-;
-
-                       lwz             r16,validSegs(r19)                      ; Get the valid SR flags
-                       xor             r12,r12,r4                                      ; Alter the storage key before loading segment register
-                       rlwinm  r2,r30,4,28,31                          ; Isolate the segment we are setting
-                       rlwinm  r6,r12,19,1,3                           ; Insert the keys and N bit                     
-                       lis             r0,0x8000                                       ; Set bit 0
-                       rlwimi  r6,r12,20,12,31                         ; Insert 4:23 the VSID
-                       srw             r0,r0,r2                                        ; Get bit corresponding to SR
-                       rlwimi  r6,r14,20,8,11                          ; Get the last nybble of the SR contents                        
-                       or              r16,r16,r0                                      ; Show that SR is valid
-               
-                       mtsrin  r6,r30                                          ; Set the actual SR
-                       
-                       stw             r16,validSegs(r19)                      ; Set the valid SR flags
-               
-                       b               hpfPteMiss                                      ; SR loaded, go do a PTE...
-                       
-;
-;                      Make and enter 64-bit segment look-aside buffer entry.
-;                      Note that the cache entry is the right format except for valid bit.
-;                      We also need to convert from long long to 64-bit register values.
-;
-
-
-                       .align  5
-                       
-hpfLoadSeg64:
-                       ld              r16,validSegs(r19)                      ; Get the valid SLB entry flags
-                       sldi    r8,r29,32                                       ; Move high order address over
-                       sldi    r10,r14,32                                      ; Move high part of VSID over
-                       
-                       not             r3,r16                                          ; Make valids be 0s
-                       li              r0,1                                            ; Prepare to set bit 0
-                       
-                       cntlzd  r17,r3                                          ; Find a free SLB       
-                       xor             r12,r12,r4                                      ; Alter the storage key before loading segment table entry
-                       or              r9,r8,r30                                       ; Form full 64-bit address
-                       cmplwi  r17,63                                          ; Did we find a free SLB entry?         
-                       sldi    r0,r0,63                                        ; Get bit 0 set
-                       or              r10,r10,r12                                     ; Move in low part and keys
-                       addi    r17,r17,1                                       ; Skip SLB 0 always
-                       blt++   hpfFreeSeg                                      ; Yes, go load it...
-
-;
-;                      No free SLB entries, select one that is in use and invalidate it
-;
-                       lwz             r4,ppSegSteal(r19)                      ; Get the next slot to steal
-                       addi    r17,r4,pmapSegCacheUse+1        ; Select stealee from non-cached slots only
-                       addi    r4,r4,1                                         ; Set next slot to steal
-                       slbmfee r7,r17                                          ; Get the entry that is in the selected spot
-                       subi    r2,r4,63-pmapSegCacheUse        ; Force steal to wrap
-                       rldicr  r7,r7,0,35                                      ; Clear the valid bit and the rest
-                       srawi   r2,r2,31                                        ; Get -1 if steal index still in range
-                       slbie   r7                                                      ; Invalidate the in-use SLB entry
-                       and             r4,r4,r2                                        ; Reset steal index when it should wrap
-                       isync                                                           ; 
-                       
-                       stw             r4,ppSegSteal(r19)                      ; Set the next slot to steal
-;
-;                      We are now ready to stick the SLB entry in the SLB and mark it in use
-;
-
-hpfFreeSeg:    
-                       subi    r4,r17,1                                        ; Adjust shift to account for skipping slb 0
-                       mr              r7,r9                                           ; Get a copy of the ESID with bits 36:63 clear
-                       srd             r0,r0,r4                                        ; Set bit mask for allocation
-                       oris    r9,r9,0x0800                            ; Turn on the valid bit
-                       or              r16,r16,r0                                      ; Turn on the allocation flag
-                       rldimi  r9,r17,0,58                                     ; Copy in the SLB entry selector
-                       
-                       beq++   cr5,hpfNoBlow                           ; Skip blowing away the SLBE if this is not a special nest...
-                       slbie   r7                                                      ; Blow away a potential duplicate
-                       
-hpfNoBlow:     slbmte  r10,r9                                          ; Make that SLB entry
-
-                       std             r16,validSegs(r19)                      ; Mark as valid
-                       b               hpfPteMiss                                      ; STE loaded, go do a PTE...
-                       
-;
-;                      The segment has been set up and loaded if need be.  Now we are ready to build the
-;                      PTE and get it into the hash table.
-;
-;                      Note that there is actually a race here.  If we start fault processing on
-;                      a different pmap, i.e., we have descended into a nested pmap, it is possible
-;                      that the nest could have been removed from the original pmap.  We would
-;                      succeed with this translation anyway.  I do not think we need to worry
-;                      about this (famous last words) because nobody should be unnesting anything 
-;                      if there are still people activily using them.  It should be up to the
-;                      higher level VM system to put the kibosh on this.
-;
-;                      There is also another race here: if we fault on the same mapping on more than
-;                      one processor at the same time, we could end up with multiple PTEs for the same
-;                      mapping.  This is not a good thing....   We really only need one of the
-;                      fault handlers to finish, so what we do is to set a "fault in progress" flag in
-;                      the mapping.  If we see that set, we just abandon the handler and hope that by
-;                      the time we restore context and restart the interrupted code, the fault has
-;                      been resolved by the other guy.  If not, we will take another fault.
-;
-               
-;
-;                      NOTE: IMPORTANT - CR7 contains a flag indicating if we have a block mapping or not.
-;                      It is required to stay there until after we call mapSelSlot!!!!
-;
-
-                       .align  5
-                       
-hpfPteMiss:    lwarx   r0,0,r31                                        ; Load the mapping flag field
-                       lwz             r12,mpPte(r31)                          ; Get the quick pointer to PTE
-                       li              r3,mpHValid                                     ; Get the PTE valid bit
-                       andi.   r2,r0,lo16(mpFIP)                       ; Are we handling a fault on the other side?
-                       ori             r2,r0,lo16(mpFIP)                       ; Set the fault in progress flag
-                       crnot   cr1_eq,cr0_eq                           ; Remember if FIP was on
-                       and.    r12,r12,r3                                      ; Isolate the valid bit
-                       crorc   cr0_eq,cr1_eq,cr0_eq            ; Bail if FIP is on.  Then, if already have PTE, bail...
-                       beq--   hpfAbandon                                      ; Yes, other processor is or already has handled this...
-                       andi.   r0,r2,mpBlock                           ; Is this a block mapping?
-                       crmove  cr7_eq,cr0_eq                           ; Remember if we have a block mapping
-                       stwcx.  r2,0,r31                                        ; Store the flags
-                       bne--   hpfPteMiss                                      ; Collision, try again...
-
-                       bt++    pf64Bitb,hpfBldPTE64            ; Skip down to the 64 bit stuff...
-
-;
-;                      At this point we are about to do the 32-bit PTE generation.
-;
-;                      The following is the R14:R15 pair that contains the "shifted" VSID:
-;
-;                             1        2        3        4        4        5      6 
-;           0        8        6        4        2        0        8        6      3
-;          +--------+--------+--------+--------+--------+--------+--------+--------+
-;          |00000000|0000000V|VVVVVVVV|VVVVVVVV|VVVVVVVV|VVVVVVVV|VVVV////|////////|    
-;          +--------+--------+--------+--------+--------+--------+--------+--------+                   
-;
-;                      The 24 bits of the 32-bit architecture VSID is in the following:
-;
-;                             1        2        3        4        4        5      6 
-;           0        8        6        4        2        0        8        6      3
-;          +--------+--------+--------+--------+--------+--------+--------+--------+
-;          |////////|////////|////////|////VVVV|VVVVVVVV|VVVVVVVV|VVVV////|////////|    
-;          +--------+--------+--------+--------+--------+--------+--------+--------+                   
-;
-
-
-hpfBldPTE32:
-                       lwz             r25,mpVAddr+4(r31)                      ; Grab the base virtual address for the mapping (32-bit portion)        
-                       lwz             r24,mpPAddr(r31)                        ; Grab the base physical page number for the mapping    
-
-                       mfsdr1  r27                                                     ; Get the hash table base address
-
-                       rlwinm  r0,r23,0,4,19                           ; Isolate just the page index
-                       rlwinm  r18,r23,10,26,31                        ; Extract the API
-                       xor             r19,r15,r0                                      ; Calculate hash << 12
-                       mr              r2,r25                                          ; Save the flag part of the mapping
-                       rlwimi  r18,r14,27,1,4                          ; Move bits 28:31 of the "shifted" VSID into the PTE image
-                       rlwinm  r16,r27,16,7,15                         ; Extract the hash table size
-                       rlwinm  r25,r25,0,0,19                          ; Clear out the flags
-                       slwi    r24,r24,12                                      ; Change ppnum to physical address (note: 36-bit addressing no supported)
-                       sub             r25,r23,r25                                     ; Get offset in mapping to page (0 unless block map)
-                       ori             r16,r16,lo16(0xFFC0)            ; Slap in the bottom of the mask
-                       rlwinm  r27,r27,0,0,15                          ; Extract the hash table base
-                       rlwinm  r19,r19,26,6,25                         ; Shift hash over to make offset into hash table
-                       add             r24,r24,r25                                     ; Adjust to true physical address
-                       rlwimi  r18,r15,27,5,24                         ; Move bits 32:31 of the "shifted" VSID into the PTE image
-                       rlwimi  r24,r2,0,20,31                          ; Slap in the WIMG and prot
-                       and             r19,r19,r16                                     ; Wrap hash table offset into the hash table
-                       ori             r24,r24,lo16(mpR)                       ; Turn on the reference bit right now
-                       rlwinm  r20,r19,28,10,29                        ; Shift hash over to make offset into PCA
-                       add             r19,r19,r27                                     ; Point to the PTEG
-                       subfic  r20,r20,-4                                      ; Get negative offset to PCA
-                       oris    r18,r18,lo16(0x8000)            ; Make sure the valid bit is on
-                       add             r20,r20,r27                                     ; Point to the PCA slot
-               
-;
-;                      We now have a valid PTE pair in R18/R24.  R18 is PTE upper and R24 is PTE lower.
-;                      R19 contains the offset of the PTEG in the hash table. R20 has offset into the PCA.
-;              
-;                      We need to check PTE pointer (mpPte) again after we lock the PTEG.  It is possible 
-;                      that some other processor beat us and stuck in a PTE or that 
-;                      all we had was a simple segment exception and the PTE was there the whole time.
-;                      If we find one a pointer, we are done.
-;
-
-                       mr              r7,r20                                          ; Copy the PCA pointer
-                       bl              mapLockPteg                                     ; Lock the PTEG
-       
-                       lwz             r12,mpPte(r31)                          ; Get the offset to the PTE
-                       mr              r17,r6                                          ; Remember the PCA image
-                       mr              r16,r6                                          ; Prime the post-select PCA image
-                       andi.   r0,r12,mpHValid                         ; Is there a PTE here already?
-                       li              r21,8                                           ; Get the number of slots
-
-                       bne-    cr7,hpfNoPte32                          ; Skip this for a block mapping...
-
-                       bne-    hpfBailOut                                      ; Someone already did this for us...
-
-;
-;                      The mapSelSlot function selects a PTEG slot to use. As input, it uses R3 as a 
-;                      pointer to the PCA.  When it returns, R3 contains 0 if an unoccupied slot was
-;                      selected, 1 if it stole a non-block PTE, or 2 if it stole a block mapped PTE.
-;                      R4 returns the slot index.
-;
-;                      REMEMBER: CR7 indicates that we are building a block mapping.
-;
-
-hpfNoPte32:    subic.  r21,r21,1                                       ; See if we have tried all slots
-                       mr              r6,r17                                          ; Get back the original PCA
-                       rlwimi  r6,r16,0,8,15                           ; Insert the updated steal slot
-                       blt-    hpfBailOut                                      ; Holy Cow, all slots are locked...
-                       
-                       bl              mapSelSlot                                      ; Go select a slot (note that the PCA image is already set up)
-
-                       cmplwi  cr5,r3,1                                        ; Did we steal a slot?                  
-                       rlwinm  r5,r4,3,26,28                           ; Convert index to slot offset
-                       add             r19,r19,r5                                      ; Point directly to the PTE
-                       mr              r16,r6                                          ; Remember the PCA image after selection
-                       blt+    cr5,hpfInser32                          ; Nope, no steal...
-                       
-                       lwz             r6,0(r19)                                       ; Get the old PTE
-                       lwz             r7,4(r19)                                       ; Get the real part of the stealee
-                       rlwinm  r6,r6,0,1,31                            ; Clear the valid bit
-                       bgt             cr5,hpfNipBM                            ; Do not try to lock a non-existant physent for a block mapping...
-                       srwi    r3,r7,12                                        ; Change phys address to a ppnum
-                       bl              mapFindPhyTry                           ; Go find and try to lock physent (note: if R3 is 0, there is no physent for this page)
-                       cmplwi  cr1,r3,0                                        ; Check if this is in RAM
-                       bne-    hpfNoPte32                                      ; Could not get it, try for another...
-                       
-                       crmove  cr5_gt,cr1_eq                           ; If we did not find a physent, pretend that this is a block map
-                       
-hpfNipBM:      stw             r6,0(r19)                                       ; Set the invalid PTE
-
-                       sync                                                            ; Make sure the invalid is stored
-                       li              r9,tlbieLock                            ; Get the TLBIE lock
-                       rlwinm  r10,r6,21,0,3                           ; Shift last 4 bits of space to segment part
-                       
-hpfTLBIE32:    lwarx   r0,0,r9                                         ; Get the TLBIE lock 
-                       mfsprg  r4,0                                            ; Get the per_proc
-                       rlwinm  r8,r6,25,18,31                          ; Extract the space ID
-                       rlwinm  r11,r6,25,18,31                         ; Extract the space ID
-                       lwz             r7,hwSteals(r4)                         ; Get the steal count
-                       srwi    r2,r6,7                                         ; Align segment number with hash
-                       rlwimi  r11,r11,14,4,17                         ; Get copy above ourselves
-                       mr.             r0,r0                                           ; Is it locked? 
-                       srwi    r0,r19,6                                        ; Align PTEG offset for back hash
-                       xor             r2,r2,r11                                       ; Get the segment number (plus a whole bunch of extra bits)
-                       xor             r11,r11,r0                                      ; Hash backwards to partial vaddr
-                       rlwinm  r12,r2,14,0,3                           ; Shift segment up
-                       mfsprg  r2,2                                            ; Get feature flags 
-                       li              r0,1                                            ; Get our lock word 
-                       rlwimi  r12,r6,22,4,9                           ; Move up the API
-                       bne-    hpfTLBIE32                                      ; It is locked, go wait...
-                       rlwimi  r12,r11,12,10,19                        ; Move in the rest of the vaddr
-                       
-                       stwcx.  r0,0,r9                                         ; Try to get it
-                       bne-    hpfTLBIE32                                      ; We was beat...
-                       addi    r7,r7,1                                         ; Bump the steal count
-                       
-                       rlwinm. r0,r2,0,pfSMPcapb,pfSMPcapb     ; Can this be an MP box?
-                       li              r0,0                                            ; Lock clear value 
-
-                       tlbie   r12                                                     ; Invalidate it everywhere 
-
-                       stw             r0,tlbieLock(0)                         ; Clear the tlbie lock
-                       
-                       beq-    hpfNoTS32                                       ; Can not have MP on this machine...
-                       
-                       eieio                                                           ; Make sure that the tlbie happens first 
-                       tlbsync                                                         ; Wait for everyone to catch up 
-                       sync                                                            ; Make sure of it all
-                       
-hpfNoTS32:     stw             r7,hwSteals(r4)                         ; Save the steal count
-                       bgt             cr5,hpfInser32                          ; We just stole a block mapping...
-                       
-                       lwz             r4,4(r19)                                       ; Get the RC of the just invalidated PTE
-                       
-                       la              r11,ppLink+4(r3)                        ; Point to the master RC copy
-                       lwz             r7,ppLink+4(r3)                         ; Grab the pointer to the first mapping
-                       rlwinm  r2,r4,27,ppRb-32,ppCb-32        ; Position the new RC
-
-hpfMrgRC32:    lwarx   r0,0,r11                                        ; Get the master RC
-                       or              r0,r0,r2                                        ; Merge in the new RC
-                       stwcx.  r0,0,r11                                        ; Try to stick it back
-                       bne-    hpfMrgRC32                                      ; Try again if we collided...
-                       
-                       
-hpfFPnch:      rlwinm. r7,r7,0,0,25                            ; Clean and test mapping address
-                       beq-    hpfLostPhys                                     ; We could not find our mapping.  Kick the bucket...
-                       
-                       lhz             r10,mpSpace(r7)                         ; Get the space
-                       lwz             r9,mpVAddr+4(r7)                        ; And the vaddr
-                       cmplw   cr1,r10,r8                                      ; Is this one of ours?
-                       xor             r9,r12,r9                                       ; Compare virtual address
-                       cmplwi  r9,0x1000                                       ; See if we really match
-                       crand   cr0_eq,cr1_eq,cr0_lt            ; See if both space and vaddr match
-                       beq+    hpfFPnch2                                       ; Yes, found ours...
-                       
-                       lwz             r7,mpAlias+4(r7)                        ; Chain on to the next
-                       b               hpfFPnch                                        ; Check it out...
-
-hpfFPnch2:     sub             r0,r19,r27                                      ; Get offset to the PTEG
-                       stw             r0,mpPte(r7)                            ; Invalidate the quick pointer (keep quick pointer pointing to PTEG)
-                       bl              mapPhysUnlock                           ; Unlock the physent now
-                       
-hpfInser32:    oris    r18,r18,lo16(0x8000)            ; Make sure the valid bit is on
-
-                       stw             r24,4(r19)                                      ; Stuff in the real part of the PTE
-                       eieio                                                           ; Make sure this gets there first
-
-                       stw             r18,0(r19)                                      ; Stuff the virtual part of the PTE and make it valid
-                       mr              r17,r16                                         ; Get the PCA image to save
-                       b               hpfFinish                                       ; Go join the common exit code...
-                       
-                       
-;
-;                      At this point we are about to do the 64-bit PTE generation.
-;
-;                      The following is the R14:R15 pair that contains the "shifted" VSID:
-;
-;                             1        2        3        4        4        5      6 
-;           0        8        6        4        2        0        8        6      3
-;          +--------+--------+--------+--------+--------+--------+--------+--------+
-;          |00000000|0000000V|VVVVVVVV|VVVVVVVV|VVVVVVVV|VVVVVVVV|VVVV////|////////|    
-;          +--------+--------+--------+--------+--------+--------+--------+--------+                   
-;
-;
-
-                       .align  5
-
-hpfBldPTE64:
-                       ld              r10,mpVAddr(r31)                        ; Grab the base virtual address for the mapping 
-                       lwz             r24,mpPAddr(r31)                        ; Grab the base physical page number for the mapping    
-
-                       mfsdr1  r27                                                     ; Get the hash table base address
-
-                       sldi    r11,r22,32                                      ; Slide top of adjusted EA over
-                       sldi    r14,r14,32                                      ; Slide top of VSID over
-                       rlwinm  r5,r27,0,27,31                          ; Isolate the size
-                       eqv             r16,r16,r16                                     ; Get all foxes here
-                       rlwimi  r15,r23,16,20,24                        ; Stick in EA[36:40] to make AVPN       
-                       mr              r2,r10                                          ; Save the flag part of the mapping
-                       or              r11,r11,r23                                     ; Stick in bottom of adjusted EA for full 64-bit value  
-                       rldicr  r27,r27,0,45                            ; Clean up the hash table base
-                       or              r15,r15,r14                                     ; Stick in bottom of AVPN for full 64-bit value 
-                       rlwinm  r0,r11,0,4,19                           ; Clear out everything but the page
-                       subfic  r5,r5,46                                        ; Get number of leading zeros
-                       xor             r19,r0,r15                                      ; Calculate hash
-                       ori             r15,r15,1                                       ; Turn on valid bit in AVPN to make top of PTE
-                       srd             r16,r16,r5                                      ; Shift over to get length of table
-                       srdi    r19,r19,5                                       ; Convert page offset to hash table offset
-                       rldicr  r16,r16,0,56                            ; Clean up lower bits in hash table size                        
-                       rldicr  r10,r10,0,51                            ; Clear out flags
-                       sldi    r24,r24,12                                      ; Change ppnum to physical address
-                       sub             r11,r11,r10                                     ; Get the offset from the base mapping
-                       and             r19,r19,r16                                     ; Wrap into hash table
-                       add             r24,r24,r11                                     ; Get actual physical address of this page
-                       srdi    r20,r19,5                                       ; Convert PTEG offset to PCA offset
-                       rldimi  r24,r2,0,52                                     ; Insert the keys, WIMG, RC, etc.
-                       subfic  r20,r20,-4                                      ; Get negative offset to PCA
-                       ori             r24,r24,lo16(mpR)                       ; Force on the reference bit
-                       add             r20,r20,r27                                     ; Point to the PCA slot         
-                       add             r19,r19,r27                                     ; Point to the PTEG
-                       
-;
-;                      We now have a valid PTE pair in R15/R24.  R15 is PTE upper and R24 is PTE lower.
-;                      R19 contains the offset of the PTEG in the hash table. R20 has offset into the PCA.
-;              
-;                      We need to check PTE pointer (mpPte) again after we lock the PTEG.  It is possible 
-;                      that some other processor beat us and stuck in a PTE or that 
-;                      all we had was a simple segment exception and the PTE was there the whole time.
-;                      If we find one a pointer, we are done.
-;
-                       
-                       mr              r7,r20                                          ; Copy the PCA pointer
-                       bl              mapLockPteg                                     ; Lock the PTEG
-       
-                       lwz             r12,mpPte(r31)                          ; Get the offset to the PTE
-                       mr              r17,r6                                          ; Remember the PCA image
-                       mr              r18,r6                                          ; Prime post-selection PCA image
-                       andi.   r0,r12,mpHValid                         ; See if we have a PTE now
-                       li              r21,8                                           ; Get the number of slots
-               
-                       bne--   cr7,hpfNoPte64                          ; Skip this for a block mapping...
-
-                       bne--   hpfBailOut                                      ; Someone already did this for us...
-
-;
-;                      The mapSelSlot function selects a PTEG slot to use. As input, it uses R3 as a 
-;                      pointer to the PCA.  When it returns, R3 contains 0 if an unoccupied slot was
-;                      selected, 1 if it stole a non-block PTE, or 2 if it stole a block mapped PTE.
-;                      R4 returns the slot index.
-;
-;                      REMEMBER: CR7 indicates that we are building a block mapping.
-;
-
-hpfNoPte64:    subic.  r21,r21,1                                       ; See if we have tried all slots
-                       mr              r6,r17                                          ; Restore original state of PCA
-                       rlwimi  r6,r18,0,8,15                           ; Insert the updated steal slot
-                       blt-    hpfBailOut                                      ; Holy Cow, all slots are locked...
-                       
-                       bl              mapSelSlot                                      ; Go select a slot
-
-                       cmplwi  cr5,r3,1                                        ; Did we steal a slot?                  
-                       rlwinm  r5,r4,4,25,27                           ; Convert index to slot offset
-                       mr              r18,r6                                          ; Remember the PCA image after selection
-                       add             r19,r19,r5                                      ; Point directly to the PTE
-                       lwz             r10,hwSteals(r2)                        ; Get the steal count
-                       blt++   cr5,hpfInser64                          ; Nope, no steal...
-
-                       ld              r6,0(r19)                                       ; Get the old PTE
-                       ld              r7,8(r19)                                       ; Get the real part of the stealee
-                       rldicr  r6,r6,0,62                                      ; Clear the valid bit
-                       bgt             cr5,hpfNipBMx                           ; Do not try to lock a non-existant physent for a block mapping...
-                       srdi    r3,r7,12                                        ; Change page address to a page number
-                       bl              mapFindPhyTry                           ; Go find and try to lock physent (note: if R3 is 0, there is no physent for this page)
-                       cmplwi  cr1,r3,0                                        ; Check if this is in RAM
-                       bne--   hpfNoPte64                                      ; Could not get it, try for another...
-                       
-                       crmove  cr5_gt,cr1_eq                           ; If we did not find a physent, pretend that this is a block map
-                       
-hpfNipBMx:     std             r6,0(r19)                                       ; Set the invalid PTE
-                       li              r9,tlbieLock                            ; Get the TLBIE lock
-
-                       srdi    r11,r6,5                                        ; Shift VSID over for back hash
-                       mfsprg  r4,0                                            ; Get the per_proc
-                       xor             r11,r11,r19                                     ; Hash backwards to get low bits of VPN
-                       sync                                                            ; Make sure the invalid is stored
-                       
-                       sldi    r12,r6,16                                       ; Move AVPN to EA position
-                       sldi    r11,r11,5                                       ; Move this to the page position
-                       
-hpfTLBIE64:    lwarx   r0,0,r9                                         ; Get the TLBIE lock 
-                       mr.             r0,r0                                           ; Is it locked? 
-                       li              r0,1                                            ; Get our lock word
-                       bne--   hpfTLBIE65                                      ; It is locked, go wait...
-                       
-                       stwcx.  r0,0,r9                                         ; Try to get it
-                       rldimi  r12,r11,0,41                            ; Stick the low part of the page number into the AVPN
-                       rldicl  r8,r6,52,50                                     ; Isolate the address space ID
-                       bne--   hpfTLBIE64                                      ; We was beat...
-                       addi    r10,r10,1                                       ; Bump the steal count
-                       
-                       rldicl  r11,r12,0,16                            ; Clear cause the book says so
-                       li              r0,0                                            ; Lock clear value 
-
-                       tlbie   r11                                                     ; Invalidate it everywhere 
-
-                       stw             r0,tlbieLock(0)                         ; Clear the tlbie lock
-
-                       mr              r7,r8                                           ; Get a copy of the space ID
-                       eieio                                                           ; Make sure that the tlbie happens first
-                       rldimi  r7,r7,14,36                                     ; Copy address space to make hash value
-                       tlbsync                                                         ; Wait for everyone to catch up
-                       rldimi  r7,r7,28,22                                     ; Add in a 3rd copy of the hash up top
-                       isync                                                           
-                       srdi    r2,r6,26                                        ; Shift original segment down to bottom
-                       
-                       ptesync                                                         ; Make sure of it all
-                       xor             r7,r7,r2                                        ; Compute original segment
-
-                       stw             r10,hwSteals(r4)                        ; Save the steal count
-                       bgt             cr5,hpfInser64                          ; We just stole a block mapping...
-                       
-                       rldimi  r12,r7,28,0                                     ; Insert decoded segment
-                       rldicl  r4,r12,0,13                                     ; Trim to max supported address
-                       
-                       ld              r12,8(r19)                                      ; Get the RC of the just invalidated PTE                        
-
-                       la              r11,ppLink+4(r3)                        ; Point to the master RC copy
-                       ld              r7,ppLink(r3)                           ; Grab the pointer to the first mapping
-                       rlwinm  r2,r12,27,ppRb-32,ppCb-32       ; Position the new RC
-
-hpfMrgRC64:    lwarx   r0,0,r11                                        ; Get the master RC
-                       li              r12,0xFF                                        ; Get mask to clean up alias pointer
-                       or              r0,r0,r2                                        ; Merge in the new RC
-                       rldicl  r12,r12,62,0                            ; Rotate clean up mask to get 0xC0000000000000003F
-                       stwcx.  r0,0,r11                                        ; Try to stick it back
-                       bne--   hpfMrgRC64                                      ; Try again if we collided...
-       
-hpfFPnchx:     andc.   r7,r7,r12                                       ; Clean and test mapping address
-                       beq--   hpfLostPhys                                     ; We could not find our mapping.  Kick the bucket...
-                       
-                       lhz             r10,mpSpace(r7)                         ; Get the space
-                       ld              r9,mpVAddr(r7)                          ; And the vaddr
-                       cmplw   cr1,r10,r8                                      ; Is this one of ours?
-                       xor             r9,r4,r9                                        ; Compare virtual address
-                       cmpldi  r9,0x1000                                       ; See if we really match
-                       crand   cr0_eq,cr1_eq,cr0_lt            ; See if both space and vaddr match
-                       beq++   hpfFPnch2x                                      ; Yes, found ours...
-                       
-                       ld              r7,mpAlias(r7)                          ; Chain on to the next
-                       b               hpfFPnchx                                       ; Check it out...
-
-                       .align  5
-
-hpfTLBIE65:    li              r7,lgKillResv                           ; Point to the reservatio kill area
-                       stwcx.  r7,0,r7                                         ; Kill reservation              
-                       
-hpfTLBIE63: lwz                r0,0(r9)                                        ; Get the TLBIE lock
-                       mr.             r0,r0                                           ; Is it locked?
-                       beq++   hpfTLBIE64                                      ; Yup, wait for it...
-                       b               hpfTLBIE63                                      ; Nope, try again..
-
-
-
-hpfFPnch2x:    sub             r0,r19,r27                                      ; Get offset to PTEG
-                       stw             r0,mpPte(r7)                            ; Invalidate the quick pointer (keep pointing at PTEG though)
-                       bl              mapPhysUnlock                           ; Unlock the physent now
-                       
-
-hpfInser64:    std             r24,8(r19)                                      ; Stuff in the real part of the PTE
-                       eieio                                                           ; Make sure this gets there first
-                       std             r15,0(r19)                                      ; Stuff the virtual part of the PTE and make it valid
-                       mr              r17,r18                                         ; Get the PCA image to set
-                       b               hpfFinish                                       ; Go join the common exit code...
-
-hpfLostPhys:
-                       lis             r0,hi16(Choke)                          ; System abend - we must find the stolen mapping or we are dead
-                       ori             r0,r0,lo16(Choke)                       ; System abend
-                       sc
-                       
-;
-;                      This is the common code we execute when we are finished setting up the PTE.
-;
-       
-                       .align  5
-                       
-hpfFinish:     sub             r4,r19,r27                                      ; Get offset of PTE
-                       ori             r4,r4,lo16(mpHValid)            ; Add valid bit to PTE offset
-                       bne             cr7,hpfBailOut                          ; Do not set the PTE pointer for a block map
-                       stw             r4,mpPte(r31)                           ; Remember our PTE
-                       
-hpfBailOut:    eieio                                                           ; Make sure all updates come first
-                       stw             r17,0(r20)                                      ; Unlock and set the final PCA
-                       
-;
-;                      This is where we go if we have started processing the fault, but find that someone
-;                      else has taken care of it.
-;
-
-hpfIgnore:     lwz             r2,mpFlags(r31)                         ; Get the mapping flags
-                       rlwinm  r2,r2,0,mpFIPb+1,mpFIPb-1       ; Clear the "fault in progress" flag
-                       sth             r2,mpFlags+2(r31)                       ; Set it
-                       
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkUnlock                                      ; Unlock the search list
-
-                       li              r11,T_IN_VAIN                           ; Say that it was handled
-                       b               EXT(PFSExit)                            ; Leave...
-
-;
-;                      This is where we go when we  find that someone else
-;                      is in the process of handling the fault.
-;
-
-hpfAbandon:    li              r3,lgKillResv                           ; Kill off any reservation
-                       stwcx.  r3,0,r3                                         ; Do it
-                       
-                       la              r3,pmapSXlk(r28)                        ; Point to the pmap search lock
-                       bl              sxlkUnlock                                      ; Unlock the search list
-
-                       li              r11,T_IN_VAIN                           ; Say that it was handled
-                       b               EXT(PFSExit)                            ; Leave...
-                       
-
-                       
-/*
- *                     hw_set_user_space(pmap) 
- *                     hw_set_user_space_dis(pmap) 
- *
- *                     Indicate whether memory space needs to be switched.
- *                     We really need to turn off interrupts here, because we need to be non-preemptable
- *
- *                     hw_set_user_space_dis is used when interruptions are already disabled. Mind the
- *                     register usage here.   The VMM switch code in vmachmon.s that calls this
- *                     know what registers are in use.  Check that if these change.
- */
-
-
-       
-                       .align  5
-                       .globl  EXT(hw_set_user_space)
-
-LEXT(hw_set_user_space)
-
-                       lis             r8,hi16(MASK(MSR_VEC))          ; Get the vector enable
-                       mfmsr   r10                                                     ; Get the current MSR 
-                       ori             r8,r8,lo16(MASK(MSR_FP))        ; Add in FP
-                       ori             r9,r8,lo16(MASK(MSR_EE))        ; Add in the EE
-                       andc    r10,r10,r8                                      ; Turn off VEC, FP for good
-                       andc    r9,r10,r9                                       ; Turn off EE also
-                       mtmsr   r9                                                      ; Disable them 
-                       isync                                                           ; Make sure FP and vec are off
-                       mfsprg  r6,0                                            ; Get the per_proc_info address
-                       lwz             r2,ppUserPmapVirt(r6)           ; Get our virtual pmap address
-                       mfsprg  r4,2                                            ; The the feature flags
-                       lwz             r7,pmapvr(r3)                           ; Get the v to r translation
-                       lwz             r8,pmapvr+4(r3)                         ; Get the v to r translation
-                       mtcrf   0x80,r4                                         ; Get the Altivec flag
-                       xor             r4,r3,r8                                        ; Get bottom of the real address of bmap anchor
-                       cmplw   cr1,r3,r2                                       ; Same address space as before?
-                       stw             r7,ppUserPmap(r6)                       ; Show our real pmap address
-                       crorc   cr1_eq,cr1_eq,pfAltivecb        ; See if same address space or not altivec machine
-                       stw             r4,ppUserPmap+4(r6)                     ; Show our real pmap address
-                       stw             r3,ppUserPmapVirt(r6)           ; Show our virtual pmap address
-                       mtmsr   r10                                                     ; Restore interruptions 
-                       beqlr-- cr1                                                     ; Leave if the same address space or not Altivec
-
-                       dssall                                                          ; Need to kill all data streams if adrsp changed
-                       sync
-                       blr                                                                     ; Return... 
-       
-                       .align  5
-                       .globl  EXT(hw_set_user_space_dis)
-
-LEXT(hw_set_user_space_dis)
-
-                       lwz             r7,pmapvr(r3)                           ; Get the v to r translation
-                       mfsprg  r4,2                                            ; The the feature flags
-                       lwz             r8,pmapvr+4(r3)                         ; Get the v to r translation
-                       mfsprg  r6,0                                            ; Get the per_proc_info address
-                       lwz             r2,ppUserPmapVirt(r6)           ; Get our virtual pmap address
-                       mtcrf   0x80,r4                                         ; Get the Altivec flag
-                       xor             r4,r3,r8                                        ; Get bottom of the real address of bmap anchor
-                       cmplw   cr1,r3,r2                                       ; Same address space as before?
-                       stw             r7,ppUserPmap(r6)                       ; Show our real pmap address
-                       crorc   cr1_eq,cr1_eq,pfAltivecb        ; See if same address space or not altivec machine
-                       stw             r4,ppUserPmap+4(r6)                     ; Show our real pmap address
-                       stw             r3,ppUserPmapVirt(r6)           ; Show our virtual pmap address
-                       beqlr-- cr1                                                     ; Leave if the same
-
-                       dssall                                                          ; Need to kill all data streams if adrsp changed
-                       sync
-                       blr                                                                     ; Return...
-       
-/*                     int mapalc1(struct mappingblok *mb) - Finds, allocates, and zeros a free 1-bit mapping entry
- *
- *                     Lock must already be held on mapping block list
- *                     returns 0 if all slots filled.
- *                     returns n if a slot is found and it is not the last
- *                     returns -n if a slot is found and it is the last
- *                     when n and -n are returned, the corresponding bit is cleared
- *                     the mapping is zeroed out before return
- *
- */
-
-                       .align  5
-                       .globl  EXT(mapalc1)
-
-LEXT(mapalc1)
-                       lwz             r4,mbfree(r3)                           ; Get the 1st mask 
-                       lis             r0,0x8000                                       ; Get the mask to clear the first free bit
-                       lwz             r5,mbfree+4(r3)                         ; Get the 2nd mask 
-                       mr              r12,r3                                          ; Save the block ptr
-                       cntlzw  r3,r4                                           ; Get first 1-bit in 1st word
-                       srw.    r9,r0,r3                                        ; Get bit corresponding to first free one
-                       cntlzw  r10,r5                                          ; Get first free field in second word
-                       andc    r4,r4,r9                                        ; Turn 1-bit off in 1st word
-                       bne             mapalc1f                                        ; Found one in 1st word
-                       
-                       srw.    r9,r0,r10                                       ; Get bit corresponding to first free one in 2nd word
-            li         r3,0                                            ; assume failure return
-                       andc    r5,r5,r9                                        ; Turn it off
-                       beqlr--                                                         ; There are no 1 bits left...
-            addi       r3,r10,32                                       ; set the correct number
-            
-mapalc1f:
-            or.                r0,r4,r5                                        ; any more bits set?
-            stw                r4,mbfree(r12)                          ; update bitmasks
-            stw                r5,mbfree+4(r12)
-            
-            slwi       r6,r3,6                                         ; get (n * mpBasicSize), ie offset of mapping in block
-            addi       r7,r6,32
-            dcbz       r6,r12                                          ; clear the 64-byte mapping
-            dcbz       r7,r12
-            
-            bnelr++                                                            ; return if another bit remains set
-            
-            neg                r3,r3                                           ; indicate we just returned the last bit
-            blr
-
-
-/*                     int mapalc2(struct mappingblok *mb) - Finds, allocates, and zero's a free 2-bit mapping entry
- *
- *                     Lock must already be held on mapping block list
- *                     returns 0 if all slots filled.
- *                     returns n if a slot is found and it is not the last
- *                     returns -n if a slot is found and it is the last
- *                     when n and -n are returned, the corresponding bits are cleared
- *                     We find runs of 2 consecutive 1 bits by cntlzw(n & (n<<1)).
- *                     the mapping is zero'd out before return
- */
-
-                       .align  5
-                       .globl  EXT(mapalc2)
-LEXT(mapalc2)
-                       lwz             r4,mbfree(r3)                           ; Get the first mask 
-                       lis             r0,0x8000                                       ; Get the mask to clear the first free bit
-                       lwz             r5,mbfree+4(r3)                         ; Get the second mask 
-                       mr              r12,r3                                          ; Save the block ptr
-            slwi       r6,r4,1                                         ; shift first word over
-            and                r6,r4,r6                                        ; lite start of double bit runs in 1st word
-            slwi       r7,r5,1                                         ; shift 2nd word over
-                       cntlzw  r3,r6                                           ; Get first free 2-bit run in 1st word
-            and                r7,r5,r7                                        ; lite start of double bit runs in 2nd word
-                       srw.    r9,r0,r3                                        ; Get bit corresponding to first run in 1st word
-                       cntlzw  r10,r7                                          ; Get first free field in second word
-            srwi       r11,r9,1                                        ; shift over for 2nd bit in 1st word
-                       andc    r4,r4,r9                                        ; Turn off 1st bit in 1st word
-            andc       r4,r4,r11                                       ; turn off 2nd bit in 1st word
-                       bne             mapalc2a                                        ; Found two consecutive free bits in 1st word
-                       
-                       srw.    r9,r0,r10                                       ; Get bit corresponding to first free one in second word
-            li         r3,0                                            ; assume failure
-            srwi       r11,r9,1                                        ; get mask for 2nd bit
-                       andc    r5,r5,r9                                        ; Turn off 1st bit in 2nd word
-            andc       r5,r5,r11                                       ; turn off 2nd bit in 2nd word
-                       beq--   mapalc2c                                        ; There are no runs of 2 bits in 2nd word either
-            addi       r3,r10,32                                       ; set the correct number
-            
-mapalc2a:
-            or.                r0,r4,r5                                        ; any more bits set?
-            stw                r4,mbfree(r12)                          ; update bitmasks
-            stw                r5,mbfree+4(r12)
-            slwi       r6,r3,6                                         ; get (n * mpBasicSize), ie offset of mapping in block
-            addi       r7,r6,32
-            addi       r8,r6,64
-            addi       r9,r6,96
-            dcbz       r6,r12                                          ; zero out the 128-byte mapping
-            dcbz       r7,r12                                          ; we use the slow 32-byte dcbz even on 64-bit machines
-            dcbz       r8,r12                                          ; because the mapping may not be 128-byte aligned
-            dcbz       r9,r12
-            
-            bnelr++                                                            ; return if another bit remains set
-            
-            neg                r3,r3                                           ; indicate we just returned the last bit
-            blr
-            
-mapalc2c:
-            rlwinm     r7,r5,1,31,31                           ; move bit 0 of 2nd word to bit 31
-            and.       r0,r4,r7                                        ; is the 2-bit field that spans the 2 words free?
-            beqlr                                                              ; no, we failed
-            rlwinm     r4,r4,0,0,30                            ; yes, turn off bit 31 of 1st word
-            rlwinm     r5,r5,0,1,31                            ; turn off bit 0 of 2nd word
-            li         r3,31                                           ; get index of this field
-            b          mapalc2a
-                       
-
-;
-;                      This routine initialzes the hash table and PCA.
-;                      It is done here because we may need to be 64-bit to do it.
-;
-
-                       .align  5
-                       .globl  EXT(hw_hash_init)
-
-LEXT(hw_hash_init)
-
-                       mfsprg  r10,2                                           ; Get feature flags 
-                       lis             r12,hi16(EXT(hash_table_size))          ; Get hash table size address
-                       mtcrf   0x02,r10                                        ; move pf64Bit to cr6
-                       lis             r11,hi16(EXT(hash_table_base))          ; Get hash table base address
-                       lis             r4,0xFF01                                       ; Set all slots free and start steal at end
-                       ori             r12,r12,lo16(EXT(hash_table_size))      ; Get hash table size address
-                       ori             r11,r11,lo16(EXT(hash_table_base))      ; Get hash table base address
-
-                       lwz             r12,0(r12)                                      ; Get hash table size
-                       li              r3,0                                            ; Get start
-                       bt++    pf64Bitb,hhiSF                          ; skip if 64-bit (only they take the hint)
-
-                       lwz             r11,4(r11)                                      ; Get hash table base
-                       
-hhiNext32:     cmplw   r3,r12                                          ; Have we reached the end?
-                       bge-    hhiCPCA32                                       ; Yes...                        
-                       dcbz    r3,r11                                          ; Clear the line
-                       addi    r3,r3,32                                        ; Next one...
-                       b               hhiNext32                                       ; Go on...
-
-hhiCPCA32:     rlwinm  r12,r12,28,4,29                         ; Get number of slots * 4
-                       li              r3,-4                                           ; Displacement to first PCA entry
-                       neg             r12,r12                                         ; Get negative end of PCA       
-                       
-hhiNPCA32:     stwx    r4,r3,r11                                       ; Initialize the PCA entry
-                       subi    r3,r3,4                                         ; Next slot
-                       cmpw    r3,r12                                          ; Have we finished?
-                       bge+    hhiNPCA32                                       ; Not yet...
-                       blr                                                                     ; Leave...
-
-hhiSF:         mfmsr   r9                                                      ; Save the MSR
-                       li              r8,1                                            ; Get a 1
-                       mr              r0,r9                                           ; Get a copy of the MSR
-                       ld              r11,0(r11)                                      ; Get hash table base
-                       rldimi  r0,r8,63,MSR_SF_BIT                     ; Set SF bit (bit 0)
-                       mtmsrd  r0                                                      ; Turn on SF
-                       isync
-                       
-                       
-hhiNext64:     cmpld   r3,r12                                          ; Have we reached the end?
-                       bge--   hhiCPCA64                                       ; Yes...                        
-                       dcbz128 r3,r11                                          ; Clear the line
-                       addi    r3,r3,128                                       ; Next one...
-                       b               hhiNext64                                       ; Go on...
-
-hhiCPCA64:     rlwinm  r12,r12,27,5,29                         ; Get number of slots * 4
-                       li              r3,-4                                           ; Displacement to first PCA entry
-                       neg             r12,r12                                         ; Get negative end of PCA       
-               
-hhiNPCA64:     stwx    r4,r3,r11                                       ; Initialize the PCA entry
-                       subi    r3,r3,4                                         ; Next slot
-                       cmpd    r3,r12                                          ; Have we finished?
-                       bge++   hhiNPCA64                                       ; Not yet...
-
-                       mtmsrd  r9                                                      ; Turn off SF if it was off
-                       isync
-                       blr                                                                     ; Leave...
-                       
-                       
-;
-;                      This routine sets up the hardware to start translation.
-;                      Note that we do NOT start translation.
-;
-
-                       .align  5
-                       .globl  EXT(hw_setup_trans)
-
-LEXT(hw_setup_trans)
-
-                       mfsprg  r11,0                                           ; Get the per_proc block
-                       mfsprg  r12,2                                           ; Get feature flags 
-                       li              r0,0                                            ; Get a 0
-                       li              r2,1                                            ; And a 1
-                       mtcrf   0x02,r12                                        ; Move pf64Bit to cr6
-                       stw             r0,validSegs(r11)                       ; Make sure we think all SR/STEs are invalid
-                       stw             r0,validSegs+4(r11)                     ; Make sure we think all SR/STEs are invalid, part deux
-                       sth             r2,ppInvSeg(r11)                        ; Force a reload of the SRs
-                       sth             r0,ppCurSeg(r11)                        ; Set that we are starting out in kernel
-                       
-                       bt++    pf64Bitb,hstSF                          ; skip if 64-bit (only they take the hint)
-
-                       li              r9,0                                            ; Clear out a register
-                       sync
-                       isync
-                       mtdbatu 0,r9                                            ; Invalidate maps
-                       mtdbatl 0,r9                                            ; Invalidate maps
-                       mtdbatu 1,r9                                            ; Invalidate maps
-                       mtdbatl 1,r9                                            ; Invalidate maps
-                       mtdbatu 2,r9                                            ; Invalidate maps
-                       mtdbatl 2,r9                                            ; Invalidate maps
-                       mtdbatu 3,r9                                            ; Invalidate maps
-                       mtdbatl 3,r9                                            ; Invalidate maps
-
-                       mtibatu 0,r9                                            ; Invalidate maps
-                       mtibatl 0,r9                                            ; Invalidate maps
-                       mtibatu 1,r9                                            ; Invalidate maps
-                       mtibatl 1,r9                                            ; Invalidate maps
-                       mtibatu 2,r9                                            ; Invalidate maps
-                       mtibatl 2,r9                                            ; Invalidate maps
-                       mtibatu 3,r9                                            ; Invalidate maps
-                       mtibatl 3,r9                                            ; Invalidate maps
-
-                       lis             r11,hi16(EXT(hash_table_base))          ; Get hash table base address
-                       lis             r12,hi16(EXT(hash_table_size))          ; Get hash table size address
-                       ori             r11,r11,lo16(EXT(hash_table_base))      ; Get hash table base address
-                       ori             r12,r12,lo16(EXT(hash_table_size))      ; Get hash table size address
-                       lwz             r11,4(r11)                                      ; Get hash table base
-                       lwz             r12,0(r12)                                      ; Get hash table size
-                       subi    r12,r12,1                                       ; Back off by 1
-                       rlwimi  r11,r12,16,23,31                        ; Stick the size into the sdr1 image
-                       
-                       mtsdr1  r11                                                     ; Ok, we now have the hash table set up
-                       sync
-                       
-                       li              r12,invalSpace                          ; Get the invalid segment value
-                       li              r10,0                                           ; Start low
-                       
-hstsetsr:      mtsrin  r12,r10                                         ; Set the SR
-                       addis   r10,r10,0x1000                          ; Bump the segment
-                       mr.             r10,r10                                         ; Are we finished?
-                       bne+    hstsetsr                                        ; Nope...       
-                       sync
-                       blr                                                                     ; Return...
-
-;
-;                      64-bit version
-;
-
-hstSF:         lis             r11,hi16(EXT(hash_table_base))          ; Get hash table base address
-                       lis             r12,hi16(EXT(hash_table_size))          ; Get hash table size address
-                       ori             r11,r11,lo16(EXT(hash_table_base))      ; Get hash table base address
-                       ori             r12,r12,lo16(EXT(hash_table_size))      ; Get hash table size address
-                       ld              r11,0(r11)                                      ; Get hash table base
-                       lwz             r12,0(r12)                                      ; Get hash table size
-                       cntlzw  r10,r12                                         ; Get the number of bits
-                       subfic  r10,r10,13                                      ; Get the extra bits we need
-                       or              r11,r11,r10                                     ; Add the size field to SDR1
-                       
-                       mtsdr1  r11                                                     ; Ok, we now have the hash table set up
-                       sync
-
-                       li              r0,0                                            ; Set an SLB slot index of 0
-                       slbia                                                           ; Trash all SLB entries (except for entry 0 that is)
-                       slbmfee r7,r0                                           ; Get the entry that is in SLB index 0
-                       rldicr  r7,r7,0,35                                      ; Clear the valid bit and the rest
-                       slbie   r7                                                      ; Invalidate it
-
-                       blr                                                                     ; Return...
-
-
-;
-;                      This routine turns on translation for the first time on a processor
-;
-
-                       .align  5
-                       .globl  EXT(hw_start_trans)
-
-LEXT(hw_start_trans)
-
-                       
-                       mfmsr   r10                                                     ; Get the msr
-                       ori             r10,r10,lo16(MASK(MSR_IR) | MASK(MSR_DR))       ; Turn on translation
-
-                       mtmsr   r10                                                     ; Everything falls apart here
-                       isync
-                       
-                       blr                                                                     ; Back to it.
-
-
-
-;
-;                      This routine validates a segment register.
-;                              hw_map_seg(pmap_t pmap, addr64_t seg, addr64_t va)
-;
-;                              r3 = virtual pmap
-;                              r4 = segment[0:31]
-;                              r5 = segment[32:63]
-;                              r6 = va[0:31]
-;                              r7 = va[32:63]
-;
-;                      Note that we transform the addr64_t (long long) parameters into single 64-bit values.
-;                      Note that there is no reason to apply the key modifier here because this is only
-;                      used for kernel accesses.
-;
-
-                       .align  5
-                       .globl  EXT(hw_map_seg)
-
-LEXT(hw_map_seg)
-
-                       lwz             r0,pmapSpace(r3)                        ; Get the space, we will need it soon
-                       lwz             r9,pmapFlags(r3)                        ; Get the flags for the keys now
-                       mfsprg  r10,2                                           ; Get feature flags 
-                       mfsprg  r12,0                                           ; Get the per_proc
-
-;
-;                      Note: the following code would problably be easier to follow if I split it,
-;                      but I just wanted to see if I could write this to work on both 32- and 64-bit
-;                      machines combined.
-;
-                       
-;
-;                      Here we enter with va[0:31] in r6[0:31] (or r6[32:63] on 64-bit machines)
-;                      and va[32:63] in r7[0:31] (or r7[32:63] on 64-bit machines)
-
-                       rlwinm  r4,r4,0,1,0                                     ; Copy seg[0:31] into r4[0;31] - no-op for 32-bit
-                       rlwinm  r7,r7,18,14,17                          ; Slide va[32:35] east to just west of space ID
-                       mtcrf   0x02,r10                                        ; Move pf64Bit and pfNoMSRirb to cr5 and 6
-                       srwi    r8,r6,14                                        ; Slide va[0:17] east to just west of the rest
-                       rlwimi  r7,r6,18,0,13                           ; Slide va[18:31] east to just west of slid va[32:25]
-                       rlwimi  r0,r0,14,4,17                           ; Dup address space ID above itself
-                       rlwinm  r8,r8,0,1,0                                     ; Dup low part into high (does nothing on 32-bit machines)
-                       rlwinm  r2,r0,28,0,31                           ; Rotate rotate low nybble to top of low half
-                       rlwimi  r2,r2,0,1,0                                     ; Replicate bottom 32 into top 32
-                       rlwimi  r8,r7,0,0,31                            ; Join va[0:17] with va[18:35] (just like mr on 32-bit machines)                        
-
-                       rlwimi  r2,r0,0,4,31                            ; We should now have 4 copies of the space
-                                                                                               ; concatenated together.   There is garbage
-                                                                                               ; at the top for 64-bit but we will clean
-                                                                                               ; that out later.
-                       rlwimi  r4,r5,0,0,31                            ; Copy seg[32:63] into r4[32:63] - just like mr for 32-bit
-
-                       
-;
-;                      Here we exit with va[0:35] shifted into r8[14:51], zeros elsewhere, or
-;                      va[18:35] shifted into r8[0:17], zeros elsewhere on 32-bit machines
-;                      
-                                                                                               
-;
-;                      What we have now is:
-;
-;                                       0        0        1        2        3        4        4        5      6
-;                                       0        8        6        4        2        0        8        6      3        - for 64-bit machines
-;                                      +--------+--------+--------+--------+--------+--------+--------+--------+
-;                      r2 =    |xxxx0000|AAAAAAAA|AAAAAABB|BBBBBBBB|BBBBCCCC|CCCCCCCC|CCDDDDDD|DDDDDDDD|       - hash value
-;                                      +--------+--------+--------+--------+--------+--------+--------+--------+
-;                                                                                                               0        0        1        2      3    - for 32-bit machines
-;                                                                                                               0        8        6        4      1
-;
-;                                       0        0        1        2        3        4        4        5      6
-;                                       0        8        6        4        2        0        8        6      3        - for 64-bit machines
-;                                      +--------+--------+--------+--------+--------+--------+--------+--------+
-;                      r8 =    |00000000|000000SS|SSSSSSSS|SSSSSSSS|SSSSSSSS|SSSSSSSS|SS000000|00000000|       - shifted and cleaned EA
-;                                      +--------+--------+--------+--------+--------+--------+--------+--------+
-;                                                                                                               0        0        1        2      3    - for 32-bit machines
-;                                                                                                               0        8        6        4      1
-;
-;                                       0        0        1        2        3        4        4        5      6
-;                                       0        8        6        4        2        0        8        6      3        - for 64-bit machines
-;                                      +--------+--------+--------+--------+--------+--------+--------+--------+
-;                      r4 =    |SSSSSSSS|SSSSSSSS|SSSSSSSS|SSSSSSSS|SSSS0000|00000000|00000000|00000000|       - Segment
-;                                      +--------+--------+--------+--------+--------+--------+--------+--------+
-;                                                                                                               0        0        1        2      3    - for 32-bit machines
-;                                                                                                               0        8        6        4      1
-
-
-                       xor             r8,r8,r2                                        ; Calculate VSID
-                       
-                       bf--    pf64Bitb,hms32bit                       ; Skip out if 32-bit...
-                       
-                       li              r0,1                                            ; Prepare to set bit 0 (also to clear EE)
-                       mfmsr   r6                                                      ; Get current MSR
-                       li              r2,MASK(MSR_IR)|MASK(MSR_DR)    ; Get the translation bits
-                       mtmsrd  r0,1                                            ; Set only the EE bit to 0
-                       rlwinm  r6,r6,0,MSR_EE_BIT,MSR_EE_BIT   ; See if EE bit is on
-                       mfmsr   r11                                                     ; Get the MSR right now, after disabling EE
-                       andc    r2,r11,r2                                       ; Turn off translation now
-                       rldimi  r2,r0,63,0                                      ; Get bit 64-bit turned on
-                       or              r11,r11,r6                                      ; Turn on the EE bit if it was on
-                       mtmsrd  r2                                                      ; Make sure translation and EE are off and 64-bit is on
-                       isync                                                           ; Hang out a bit
-                                               
-                       ld              r6,validSegs(r12)                       ; Get the valid SLB entry flags
-                       sldi    r9,r9,9                                         ; Position the key and noex bit
-                       
-                       rldimi  r5,r8,12,0                                      ; Form the VSID/key
-                       
-                       not             r3,r6                                           ; Make valids be 0s
-                       
-                       cntlzd  r7,r3                                           ; Find a free SLB       
-                       cmplwi  r7,63                                           ; Did we find a free SLB entry?         
-                       
-                       slbie   r4                                                      ; Since this ESID may still be in an SLBE, kill it
-
-                       oris    r4,r4,0x0800                            ; Turn on the valid bit in ESID
-                       addi    r7,r7,1                                         ; Make sure we skip slb 0
-                       blt++   hmsFreeSeg                                      ; Yes, go load it...
-
-;
-;                      No free SLB entries, select one that is in use and invalidate it
-;
-                       lwz             r2,ppSegSteal(r12)                      ; Get the next slot to steal
-                       addi    r7,r2,pmapSegCacheUse+1         ; Select stealee from non-cached slots only
-                       addi    r2,r2,1                                         ; Set next slot to steal
-                       slbmfee r3,r7                                           ; Get the entry that is in the selected spot
-                       subi    r8,r2,64-(pmapSegCacheUse+1)    ; Force steal to wrap
-                       rldicr  r3,r3,0,35                                      ; Clear the valid bit and the rest
-                       srawi   r8,r8,31                                        ; Get -1 if steal index still in range
-                       slbie   r3                                                      ; Invalidate the in-use SLB entry
-                       and             r2,r2,r8                                        ; Reset steal index when it should wrap
-                       isync                                                           ; 
-                       
-                       stw             r2,ppSegSteal(r12)                      ; Set the next slot to steal
-;
-;                      We are now ready to stick the SLB entry in the SLB and mark it in use
-;
-
-hmsFreeSeg:    subi    r2,r7,1                                         ; Adjust for skipped slb 0
-                       rldimi  r4,r7,0,58                                      ; Copy in the SLB entry selector
-                       srd             r0,r0,r2                                        ; Set bit mask for allocation
-                       rldicl  r5,r5,0,15                                      ; Clean out the unsupported bits
-                       or              r6,r6,r0                                        ; Turn on the allocation flag
-                       
-                       slbmte  r5,r4                                           ; Make that SLB entry
-
-                       std             r6,validSegs(r12)                       ; Mark as valid
-                       mtmsrd  r11                                                     ; Restore the MSR
-                       isync
-                       blr                                                                     ; Back to it...
-
-                       .align  5
-
-hms32bit:      rlwinm  r8,r8,0,8,31                            ; Clean up the VSID
-                       rlwinm  r2,r4,4,28,31                           ; Isolate the segment we are setting
-                       lis             r0,0x8000                                       ; Set bit 0
-                       rlwimi  r8,r9,28,1,3                            ; Insert the keys and N bit                     
-                       srw             r0,r0,r2                                        ; Get bit corresponding to SR
-                       addi    r7,r12,validSegs                        ; Point to the valid segment flags directly
-               
-                       mtsrin  r8,r4                                           ; Set the actual SR     
-                       isync                                                           ; Need to make sure this is done
-               
-hmsrupt:       lwarx   r6,0,r7                                         ; Get and reserve the valid segment flags
-                       or              r6,r6,r0                                        ; Show that SR is valid
-                       stwcx.  r6,0,r7                                         ; Set the valid SR flags
-                       bne--   hmsrupt                                         ; Had an interrupt, need to get flags again...
-
-                       blr                                                                     ; Back to it...
-
-
-;
-;                      This routine invalidates a segment register.
-;
-
-                       .align  5
-                       .globl  EXT(hw_blow_seg)
-
-LEXT(hw_blow_seg)
-
-                       mfsprg  r10,2                                           ; Get feature flags 
-                       mfsprg  r12,0                                           ; Get the per_proc
-                       mtcrf   0x02,r10                                        ; move pf64Bit and pfNoMSRirb to cr5 and 6
-               
-                       addi    r7,r12,validSegs                        ; Point to the valid segment flags directly
-                       rlwinm  r9,r4,0,0,3                                     ; Save low segment address and make sure it is clean
-                       
-                       bf--    pf64Bitb,hbs32bit                       ; Skip out if 32-bit...
-                       
-                       li              r0,1                                            ; Prepare to set bit 0 (also to clear EE)
-                       mfmsr   r6                                                      ; Get current MSR
-                       li              r2,MASK(MSR_IR)|MASK(MSR_DR)    ; Get the translation bits
-                       mtmsrd  r0,1                                            ; Set only the EE bit to 0
-                       rlwinm  r6,r6,0,MSR_EE_BIT,MSR_EE_BIT   ; See if EE bit is on
-                       mfmsr   r11                                                     ; Get the MSR right now, after disabling EE
-                       andc    r2,r11,r2                                       ; Turn off translation now
-                       rldimi  r2,r0,63,0                                      ; Get bit 64-bit turned on
-                       or              r11,r11,r6                                      ; Turn on the EE bit if it was on
-                       mtmsrd  r2                                                      ; Make sure translation and EE are off and 64-bit is on
-                       isync                                                           ; Hang out a bit
-
-                       rldimi  r9,r3,32,0                                      ; Insert the top part of the ESID
-                       
-                       slbie   r9                                                      ; Invalidate the associated SLB entry
-                       
-                       mtmsrd  r11                                                     ; Restore the MSR
-                       isync
-                       blr                                                                     ; Back to it.
-
-                       .align  5
-
-hbs32bit:      lwarx   r4,0,r7                                         ; Get and reserve the valid segment flags
-                       rlwinm  r6,r9,4,28,31                           ; Convert segment to number
-                       lis             r2,0x8000                                       ; Set up a mask
-                       srw             r2,r2,r6                                        ; Make a mask
-                       and.    r0,r4,r2                                        ; See if this is even valid
-                       li              r5,invalSpace                           ; Set the invalid address space VSID
-                       beqlr                                                           ; Leave if already invalid...
-                       
-                       mtsrin  r5,r9                                           ; Slam the segment register
-                       isync                                                           ; Need to make sure this is done
-               
-hbsrupt:       andc    r4,r4,r2                                        ; Clear the valid bit for this segment
-                       stwcx.  r4,0,r7                                         ; Set the valid SR flags
-                       beqlr++                                                         ; Stored ok, no interrupt, time to leave...
-                       
-                       lwarx   r4,0,r7                                         ; Get and reserve the valid segment flags again
-                       b               hbsrupt                                         ; Try again...
-
-;
-;                      This routine invadates the entire pmap segment cache
-;
-;                      Translation is on, interrupts may or may not be enabled.
-;
-
-                       .align  5
-                       .globl  EXT(invalidateSegs)
-
-LEXT(invalidateSegs)
-
-                       la              r10,pmapCCtl(r3)                        ; Point to the segment cache control
-                       eqv             r0,r0,r0                                        ; Get all foxes
-                       
-isInv:         lwarx   r4,0,r10                                        ; Get the segment cache control value
-                       rlwimi  r4,r0,0,0,15                            ; Slam in all invalid bits
-                       rlwinm. r0,r4,0,pmapCCtlLckb,pmapCCtlLckb       ; Is it already locked?
-                       bne--   isInv0                                          ; Yes, try again...
-                       
-                       stwcx.  r4,0,r10                                        ; Try to invalidate it
-                       bne--   isInv                                           ; Someone else just stuffed it...
-                       blr                                                                     ; Leave...
-                       
-
-isInv0:                li              r4,lgKillResv                           ; Get reservation kill zone
-                       stwcx.  r4,0,r4                                         ; Kill reservation
-
-isInv1:                lwz             r4,pmapCCtl(r3)                         ; Get the segment cache control
-                       rlwinm. r0,r4,0,pmapCCtlLckb,pmapCCtlLckb       ; Is it already locked?
-                       bne--   isInv                                           ; Nope...
-                       b               isInv1                                          ; Still locked do it again...
-                       
-;
-;                      This routine switches segment registers between kernel and user.
-;                      We have some assumptions and rules:
-;                              We are in the exception vectors
-;                              pf64Bitb is set up
-;                              R3 contains the MSR we going to
-;                              We can not use R4, R13, R20, R21, R29
-;                              R13 is the savearea
-;                              R29 has the per_proc
-;
-;                      We return R3 as 0 if we did not switch between kernel and user
-;                      We also maintain and apply the user state key modifier used by VMM support;     
-;                      If we go to the kernel it is set to 0, otherwise it follows the bit 
-;                      in spcFlags.
-;
-
-                       .align  5
-                       .globl  EXT(switchSegs)
-
-LEXT(switchSegs)
-
-                       lwz             r22,ppInvSeg(r29)                       ; Get the ppInvSeg (force invalidate) and ppCurSeg (user or kernel segments indicator)
-                       lwz             r9,spcFlags(r29)                        ; Pick up the special user state flags
-                       rlwinm  r2,r3,MSR_PR_BIT+1,31,31        ; Isolate the problem mode bit
-                       rlwinm  r3,r3,MSR_RI_BIT+1,31,31        ; Isolate the recoverable interrupt bit
-                       lis             r8,hi16(EXT(kernel_pmap_phys))  ; Assume kernel
-                       or              r2,r2,r3                                        ; This will 1 if we will be using user segments
-                       li              r3,0                                            ; Get a selection mask
-                       cmplw   r2,r22                                          ; This will be EQ if same state and not ppInvSeg
-                       ori             r8,r8,lo16(EXT(kernel_pmap_phys))       ; Assume kernel (bottom of address)
-                       sub             r3,r3,r2                                        ; Form select mask - 0 if kernel, -1 if user
-                       la              r19,ppUserPmap(r29)                     ; Point to the current user pmap
-
-;                      The following line is an exercise of a generally unreadable but recompile-friendly programing practice
-                       rlwinm  r30,r9,userProtKeybit+1+(63-sgcVSKeyUsr),sgcVSKeyUsr-32,sgcVSKeyUsr-32  ; Isolate the user state protection key 
-
-                       andc    r8,r8,r3                                        ; Zero kernel pmap ptr if user, untouched otherwise
-                       and             r19,r19,r3                                      ; Zero user pmap ptr if kernel, untouched otherwise
-                       and             r30,r30,r3                                      ; Clear key modifier if kernel, leave otherwise
-                       or              r8,r8,r19                                       ; Get the pointer to the pmap we are using
-
-                       beqlr                                                           ; We are staying in the same mode, do not touch segs...
-
-                       lwz             r28,0(r8)                                       ; Get top half of pmap address
-                       lwz             r10,4(r8)                                       ; Get bottom half
-
-                       stw             r2,ppInvSeg(r29)                        ; Clear request for invalidate and save ppCurSeg
-                       rlwinm  r28,r28,0,1,0                           ; Copy top to top
-                       stw             r30,ppMapFlags(r29)                     ; Set the key modifier
-                       rlwimi  r28,r10,0,0,31                          ; Insert bottom
-                       
-                       la              r10,pmapCCtl(r28)                       ; Point to the segment cache control
-                       la              r9,pmapSegCache(r28)            ; Point to the segment cache
-
-ssgLock:       lwarx   r15,0,r10                                       ; Get and reserve the segment cache control
-                       rlwinm. r0,r15,0,pmapCCtlLckb,pmapCCtlLckb      ; Someone have the lock?
-                       ori             r16,r15,lo16(pmapCCtlLck)       ; Set lock bit
-                       bne--   ssgLock0                                        ; Yup, this is in use...
-
-                       stwcx.  r16,0,r10                                       ; Try to set the lock
-                       bne--   ssgLock                                         ; Did we get contention?
-                       
-                       not             r11,r15                                         ; Invert the invalids to valids
-                       li              r17,0                                           ; Set a mask for the SRs we are loading
-                       isync                                                           ; Make sure we are all caught up
-
-                       bf--    pf64Bitb,ssg32Enter                     ; If 32-bit, jump into it...
-               
-                       li              r0,0                                            ; Clear
-                       slbia                                                           ; Trash all SLB entries (except for entry 0 that is)
-                       li              r17,1                                           ; Get SLB index to load (skip slb 0)
-                       oris    r0,r0,0x8000                            ; Get set for a mask
-                       b               ssg64Enter                                      ; Start on a cache line...
-
-                       .align  5
-
-ssgLock0:      li              r15,lgKillResv                          ; Killing field
-                       stwcx.  r15,0,r15                                       ; Kill reservation
-
-ssgLock1:      lwz             r15,pmapCCtl(r28)                       ; Get the segment cache controls
-                       rlwinm. r15,r15,0,pmapCCtlLckb,pmapCCtlLckb     ; Someone have the lock?
-                       beq++   ssgLock                                         ; Yup, this is in use...
-                       b               ssgLock1                                        ; Nope, try again...
-;
-;                      This is the 32-bit address space switch code.
-;                      We take a reservation on the segment cache and walk through.
-;                      For each entry, we load the specified entries and remember which
-;                      we did with a mask.  Then, we figure out which segments should be
-;                      invalid and then see which actually are.  Then we load those with the
-;                      defined invalid VSID. 
-;                      Afterwards, we unlock the segment cache.
-;
-
-                       .align  5
-
-ssg32Enter:    cntlzw  r12,r11                                         ; Find the next slot in use
-                       cmplwi  r12,pmapSegCacheUse                     ; See if we are done
-                       slwi    r14,r12,4                                       ; Index to the cache slot
-                       lis             r0,0x8000                                       ; Get set for a mask
-                       add             r14,r14,r9                                      ; Point to the entry
-               
-                       bge-    ssg32Done                                       ; All done...
-               
-                       lwz             r5,sgcESID+4(r14)                       ; Get the ESID part
-                       srw             r2,r0,r12                                       ; Form a mask for the one we are loading
-                       lwz             r7,sgcVSID+4(r14)                       ; And get the VSID bottom
-
-                       andc    r11,r11,r2                                      ; Clear the bit
-                       lwz             r6,sgcVSID(r14)                         ; And get the VSID top
-
-                       rlwinm  r2,r5,4,28,31                           ; Change the segment number to a number
-
-                       xor             r7,r7,r30                                       ; Modify the key before we actually set it
-                       srw             r0,r0,r2                                        ; Get a mask for the SR we are loading
-                       rlwinm  r8,r7,19,1,3                            ; Insert the keys and N bit                     
-                       or              r17,r17,r0                                      ; Remember the segment
-                       rlwimi  r8,r7,20,12,31                          ; Insert 4:23 the VSID
-                       rlwimi  r8,r6,20,8,11                           ; Get the last nybble of the SR contents                        
-
-                       mtsrin  r8,r5                                           ; Load the segment
-                       b               ssg32Enter                                      ; Go enter the next...
-                       
-                       .align  5
-                       
-ssg32Done:     lwz             r16,validSegs(r29)                      ; Get the valid SRs flags
-                       stw             r15,pmapCCtl(r28)                       ; Unlock the segment cache controls
-
-                       lis             r0,0x8000                                       ; Get set for a mask
-                       li              r2,invalSpace                           ; Set the invalid address space VSID
-
-                       nop                                                                     ; Align loop
-                       nop                                                                     ; Align loop
-                       andc    r16,r16,r17                                     ; Get list of SRs that were valid before but not now
-                       nop                                                                     ; Align loop
-
-ssg32Inval:    cntlzw  r18,r16                                         ; Get the first one to invalidate
-                       cmplwi  r18,16                                          ; Have we finished?
-                       srw             r22,r0,r18                                      ; Get the mask bit
-                       rlwinm  r23,r18,28,0,3                          ; Get the segment register we need
-                       andc    r16,r16,r22                                     ; Get rid of the guy we just did
-                       bge             ssg32Really                                     ; Yes, we are really done now...
-
-                       mtsrin  r2,r23                                          ; Invalidate the SR
-                       b               ssg32Inval                                      ; Do the next...
-                       
-                       .align  5
-
-ssg32Really:
-                       stw             r17,validSegs(r29)                      ; Set the valid SR flags
-                       li              r3,1                                            ; Set kernel/user transition
-                       blr
-
-;
-;                      This is the 64-bit address space switch code.
-;                      First we blow away all of the SLB entries.
-;                      Walk through,
-;                      loading the SLB.  Afterwards, we release the cache lock
-;
-;                      Note that because we have to treat SLBE 0 specially, we do not ever use it...
-;                      Its a performance thing...
-;
+/*
+ *                     hw_set_user_space(pmap) 
+ *                     hw_set_user_space_dis(pmap) 
+ *
+ *                     Indicate whether memory space needs to be switched.
+ *                     We really need to turn off interrupts here, because we need to be non-preemptable
+ *
+ *                     hw_set_user_space_dis is used when interruptions are already disabled. Mind the
+ *                     register usage here.   The VMM switch code in vmachmon.s that calls this
+ *                     know what registers are in use.  Check that if these change.
+ */
 
-                       .align  5
 
-ssg64Enter:    cntlzw  r12,r11                                         ; Find the next slot in use
-                       cmplwi  r12,pmapSegCacheUse                     ; See if we are done
-                       slwi    r14,r12,4                                       ; Index to the cache slot
-                       srw             r16,r0,r12                                      ; Form a mask for the one we are loading
-                       add             r14,r14,r9                                      ; Point to the entry
-                       andc    r11,r11,r16                                     ; Clear the bit
-                       bge--   ssg64Done                                       ; All done...
-
-                       ld              r5,sgcESID(r14)                         ; Get the ESID part
-                       ld              r6,sgcVSID(r14)                         ; And get the VSID part
-                       oris    r5,r5,0x0800                            ; Turn on the valid bit
-                       or              r5,r5,r17                                       ; Insert the SLB slot
-                       xor             r6,r6,r30                                       ; Modify the key before we actually set it
-                       addi    r17,r17,1                                       ; Bump to the next slot
-                       slbmte  r6,r5                                           ; Make that SLB entry
-                       b               ssg64Enter                                      ; Go enter the next...
-                       
+       
                        .align  5
-                       
-ssg64Done:     stw             r15,pmapCCtl(r28)                       ; Unlock the segment cache controls
-
-                       eqv             r16,r16,r16                                     ; Load up with all foxes
-                       subfic  r17,r17,64                                      ; Get the number of 1 bits we need
-
-                       sld             r16,r16,r17                                     ; Get a mask for the used SLB entries
-                       li              r3,1                                            ; Set kernel/user transition
-                       std             r16,validSegs(r29)                      ; Set the valid SR flags
-                       blr
+                       .globl  EXT(hw_set_user_space)
 
-;
-;                      mapSetUp - this function sets initial state for all mapping functions.
-;                      We turn off all translations (physical), disable interruptions, and 
-;                      enter 64-bit mode if applicable.
-;
-;                      We also return the original MSR in r11, the feature flags in R12,
-;                      and CR6 set up so we can do easy branches for 64-bit
-;
+LEXT(hw_set_user_space)
 
+                       mfmsr   r10                                                     /* Get the current MSR */
+                       rlwinm  r10,r10,0,MSR_FP_BIT+1,MSR_FP_BIT-1     ; Force floating point off
+                       rlwinm  r10,r10,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1   ; Force vectors off
+                       rlwinm  r9,r10,0,MSR_EE_BIT+1,MSR_EE_BIT-1      /* Turn off 'rupts */
+                       mtmsr   r9                                                      /* Disable 'em */
+                       lwz             r7,PMAP_PMAPVR(r3)                      ; Get the v to r translation
+                       lwz             r4,PMAP_SPACE(r3)                       ; Get the space
+                       mfsprg  r6,0                                            /* Get the per_proc_info address */
+                       xor             r3,r3,r7                                        ; Get real address of bmap anchor
+                       stw             r4,PP_USERSPACE(r6)                     /* Show our new address space */
+                       stw             r3,PP_USERPMAP(r6)                      ; Show our real pmap address
+                       mtmsr   r10                                                     /* Restore interruptions */
+                       blr                                                                     /* Return... */
+       
                        .align  5
-                       .globl  EXT(mapSetUp)
-
-LEXT(mapSetUp)
-
-                       lis             r0,hi16(MASK(MSR_VEC))          ; Get the vector mask
-                       mfsprg  r12,2                                           ; Get feature flags 
-                       ori             r0,r0,lo16(MASK(MSR_FP))        ; Get the FP as well
-                       mtcrf   0x04,r12                                        ; move pf64Bit and pfNoMSRirb to cr5 and 6
-                       mfmsr   r11                                                     ; Save the MSR 
-                       mtcrf   0x02,r12                                        ; move pf64Bit and pfNoMSRirb to cr5 and 6
-                       andc    r11,r11,r0                                      ; Clear VEC and FP for good
-                       ori             r0,r0,lo16(MASK(MSR_EE)|MASK(MSR_DR)|MASK(MSR_IR))      ; Get rid of EE, IR, and DR
-                       li              r2,1                                            ; Prepare for 64 bit
-                       andc    r0,r11,r0                                       ; Clear the rest
-                       bt              pfNoMSRirb,msuNoMSR                     ; No MSR...
-                       bt++    pf64Bitb,msuSF                          ; skip if 64-bit (only they take the hint)
-
-                       mtmsr   r0                                                      ; Translation and all off
-                       isync                                                           ; Toss prefetch
-                       blr                                                                     ; Return...
+                       .globl  EXT(hw_set_user_space_dis)
 
-                       .align  5
+LEXT(hw_set_user_space_dis)
 
-msuSF:         rldimi  r0,r2,63,MSR_SF_BIT                     ; set SF bit (bit 0)
-                       mtmsrd  r0                                                      ; set 64-bit mode, turn off EE, DR, and IR
-                       isync                                                           ; synchronize
+                       lwz             r7,PMAP_PMAPVR(r3)                      ; Get the v to r translation
+                       lwz             r4,PMAP_SPACE(r3)                       ; Get the space
+                       mfsprg  r6,0                                            ; Get the per_proc_info address
+                       xor             r3,r3,r7                                        ; Get real address of bmap anchor
+                       stw             r4,PP_USERSPACE(r6)                     ; Show our new address space
+                       stw             r3,PP_USERPMAP(r6)                      ; Show our real pmap address
                        blr                                                                     ; Return...
-
-                       .align  5
-
-msuNoMSR:      mr              r2,r3                                           ; Save R3 across call
-                       mr              r3,r0                                           ; Get the new MSR value
-                       li              r0,loadMSR                                      ; Get the MSR setter SC
-                       sc                                                                      ; Set it
-                       mr              r3,r2                                           ; Restore R3
-                       blr                                                                     ; Go back all set up...
-                       
-
-;
-;                      Find the physent based on a physical page and try to lock it (but not too hard) 
-;                      Note that this table always has an entry that with a 0 table pointer at the end 
-;                      
-;                      R3 contains ppnum on entry
-;                      R3 is 0 if no entry was found
-;                      R3 is physent if found
-;                      cr0_eq is true if lock was obtained or there was no entry to lock
-;                      cr0_eq is false of there was an entry and it was locked
-;      
-
-                       .align  5
-                       
-mapFindPhyTry: 
-                       lis             r9,hi16(EXT(pmap_mem_regions))          ; Point to the start of the region table
-                       mr              r2,r3                                           ; Save our target
-                       ori             r9,r9,lo16(EXT(pmap_mem_regions))       ; Point to the start of the region table                        
-
-mapFindPhz:    lwz             r3,mrPhysTab(r9)                        ; Get the actual table address
-                       lwz             r5,mrStart(r9)                          ; Get start of table entry
-                       lwz             r0,mrEnd(r9)                            ; Get end of table entry
-                       addi    r9,r9,mrSize                            ; Point to the next slot
-                       cmplwi  cr2,r3,0                                        ; Are we at the end of the table?
-                       cmplw   r2,r5                                           ; See if we are in this table
-                       cmplw   cr1,r2,r0                                       ; Check end also
-                       sub             r4,r2,r5                                        ; Calculate index to physical entry
-                       beq--   cr2,mapFindNo                           ; Leave if we did not find an entry...
-                       cror    cr0_lt,cr0_lt,cr1_gt            ; Set CR0_LT if it is NOT this entry
-                       slwi    r4,r4,3                                         ; Get offset to physical entry
-
-                       blt--   mapFindPhz                                      ; Did not find it...
-                       
-                       add             r3,r3,r4                                        ; Point right to the slot
        
-mapFindOv:     lwz             r2,0(r3)                                        ; Get the lock contents right now
-                       rlwinm. r0,r2,0,0,0                                     ; Is it locked?
-                       bnelr--                                                         ; Yes it is...
-                       
-                       lwarx   r2,0,r3                                         ; Get the lock
-                       rlwinm. r0,r2,0,0,0                                     ; Is it locked?
-                       oris    r0,r2,0x8000                            ; Set the lock bit
-                       bne--   mapFindKl                                       ; It is locked, go get rid of reservation and leave...
-                       stwcx.  r0,0,r3                                         ; Try to stuff it back...
-                       bne--   mapFindOv                                       ; Collision, try again...
-                       isync                                                           ; Clear any speculations
-                       blr                                                                     ; Leave...
-
-mapFindKl:     li              r2,lgKillResv                           ; Killing field
-                       stwcx.  r2,0,r2                                         ; Trash reservation...
-                       crclr   cr0_eq                                          ; Make sure we do not think we got the lock
-                       blr                                                                     ; Leave...
-
-mapFindNo:     crset   cr0_eq                                          ; Make sure that we set this
-                       li              r3,0                                            ; Show that we did not find it
-                       blr                                                                     ; Leave...                      
-;
-;                      pmapCacheLookup - This function will look up an entry in the pmap segment cache.
-;
-;                      How the pmap cache lookup works:
-;
-;                      We use a combination of three things: a mask of valid entries, a sub-tag, and the
-;                      ESID (aka the "tag").  The mask indicates which of the cache slots actually contain
-;                      an entry.  The sub-tag is a 16 entry 4 bit array that contains the low order 4 bits
-;                      of the ESID, bits 32:36 of the effective for 64-bit and 0:3 for 32-bit.  The cache
-;                      entry contains the full 36 bit ESID.
-;
-;                      The purpose of the sub-tag is to limit the number of searches necessary when looking
-;                      for an existing cache entry.  Because there are 16 slots in the cache, we could end up
-;                      searching all 16 if an match is not found.  
-;
-;                      Essentially, we will search only the slots that have a valid entry and whose sub-tag
-;                      matches. More than likely, we will eliminate almost all of the searches.
-;              
-;                      Inputs:
-;                              R3 = pmap
-;                              R4 = ESID high half
-;                              R5 = ESID low half
-;
-;                      Outputs:
-;                              R3 = pmap cache slot if found, 0 if not
-;                              R10 = pmapCCtl address
-;                              R11 = pmapCCtl image
-;                              pmapCCtl locked on exit
-;
 
-                       .align  5
-
-pmapCacheLookup:               
-                       la              r10,pmapCCtl(r3)                        ; Point to the segment cache control
-
-pmapCacheLookuq:               
-                       lwarx   r11,0,r10                                       ; Get the segment cache control value
-                       rlwinm. r0,r11,0,pmapCCtlLckb,pmapCCtlLckb      ; Is it already locked?
-                       ori             r0,r11,lo16(pmapCCtlLck)        ; Turn on the lock bit
-                       bne--   pmapCacheLookur                         ; Nope...
-                       stwcx.  r0,0,r10                                        ; Try to take the lock
-                       bne--   pmapCacheLookuq                         ; Someone else just stuffed it, try again...
-
-                       isync                                                           ; Make sure we get reservation first
-                       lwz             r9,pmapSCSubTag(r3)                     ; Get the high part of the sub-tag
-                       rlwimi  r5,r5,28,4,7                            ; Copy sub-tag just to right of itself (XX------)
-                       lwz             r10,pmapSCSubTag+4(r3)          ; And the bottom half
-                       rlwimi  r5,r5,24,8,15                           ; Copy doubled sub-tag to right of itself (XXXX----)
-                       lis             r8,0x8888                                       ; Get some eights
-                       rlwimi  r5,r5,16,16,31                          ; Copy quadrupled sub-tags to the right
-                       ori             r8,r8,0x8888                            ; Fill the rest with eights
-
-                       eqv             r10,r10,r5                                      ; Get 0xF where we hit in bottom half
-                       eqv             r9,r9,r5                                        ; Get 0xF where we hit in top half
-                       
-                       rlwinm  r2,r10,1,0,30                           ; Shift over 1
-                       rlwinm  r0,r9,1,0,30                            ; Shift over 1
-                       and             r2,r2,r10                                       ; AND the even/odd pair into the even
-                       and             r0,r0,r9                                        ; AND the even/odd pair into the even
-                       rlwinm  r10,r2,2,0,28                           ; Shift over 2
-                       rlwinm  r9,r0,2,0,28                            ; Shift over 2
-                       and             r10,r2,r10                                      ; AND the even of the ANDed pairs giving the AND of all 4 bits in 0, 4, ...
-                       and             r9,r0,r9                                        ; AND the even of the ANDed pairs giving the AND of all 4 bits in 0, 4, ...
-                       
-                       and             r10,r10,r8                                      ; Clear out extras
-                       and             r9,r9,r8                                        ; Clear out extras
-                       
-                       rlwinm  r0,r10,3,1,28                           ; Slide adjacent next to each other
-                       rlwinm  r2,r9,3,1,28                            ; Slide adjacent next to each other
-                       or              r10,r0,r10                                      ; Merge them
-                       or              r9,r2,r9                                        ; Merge them
-                       rlwinm  r0,r10,6,2,26                           ; Slide adjacent pairs next to each other
-                       rlwinm  r2,r9,6,2,26                            ; Slide adjacent pairs next to each other
-                       or              r10,r0,r10                                      ; Merge them
-                       or              r9,r2,r9                                        ; Merge them
-                       rlwimi  r10,r10,12,4,7                          ; Stick in the low-order adjacent quad
-                       rlwimi  r9,r9,12,4,7                            ; Stick in the low-order adjacent quad
-                       not             r6,r11                                          ; Turn invalid into valid
-                       rlwimi  r9,r10,24,8,15                          ; Merge in the adjacent octs giving a hit mask
-                       
-                       la              r10,pmapSegCache(r3)            ; Point at the cache slots
-                       and.    r6,r9,r6                                        ; Get mask of valid and hit
-                       li              r0,0                                            ; Clear
-                       li              r3,0                                            ; Assume not found
-                       oris    r0,r0,0x8000                            ; Start a mask
-                       beqlr++                                                         ; Leave, should usually be no hits...
-                       
-pclNextEnt:    cntlzw  r5,r6                                           ; Find an in use one
-                       cmplwi  cr1,r5,pmapSegCacheUse          ; Did we find one?
-                       rlwinm  r7,r5,4,0,27                            ; Index to the cache entry
-                       srw             r2,r0,r5                                        ; Get validity mask bit
-                       add             r7,r7,r10                                       ; Point to the cache slot
-                       andc    r6,r6,r2                                        ; Clear the validity bit we just tried
-                       bgelr-- cr1                                                     ; Leave if there are no more to check...
-                       
-                       lwz             r5,sgcESID(r7)                          ; Get the top half
-                       
-                       cmplw   r5,r4                                           ; Only need to check top because sub-tag is the entire other half
-                       
-                       bne++   pclNextEnt                                      ; Nope, try again...
-
-                       mr              r3,r7                                           ; Point to the slot
-                       blr                                                                     ; Leave....
+/*                     struct mapping *hw_cpv(struct mapping *mp) - Converts a physcial mapping CB address to virtual
+ *
+ */
 
                        .align  5
+                       .globl  EXT(hw_cpv)
 
-pmapCacheLookur:
-                       li              r11,lgKillResv                          ; The killing spot
-                       stwcx.  r11,0,r11                                       ; Kill the reservation
+LEXT(hw_cpv)
                        
-pmapCacheLookus:               
-                       lwz             r11,pmapCCtl(r3)                        ; Get the segment cache control
-                       rlwinm. r0,r11,0,pmapCCtlLckb,pmapCCtlLckb      ; Is it already locked?
-                       beq++   pmapCacheLookup                         ; Nope...
-                       b               pmapCacheLookus                         ; Yup, keep waiting...
-
+                       rlwinm. r4,r3,0,0,19                            ; Round back to the mapping block allocation control block
+                       mfmsr   r10                                                     ; Get the current MSR
+                       beq-    hcpvret                                         ; Skip if we are passed a 0...
+                       rlwinm  r10,r10,0,MSR_FP_BIT+1,MSR_FP_BIT-1     ; Force floating point off
+                       rlwinm  r10,r10,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1   ; Force vectors off
+                       andi.   r9,r10,0x7FEF                           ; Turn off interrupts and data translation
+                       mtmsr   r9                                                      ; Disable DR and EE
+                       isync
                        
+                       lwz             r4,mbvrswap(r4)                         ; Get the conversion value
+                       mtmsr   r10                                                     ; Interrupts and DR back on
+                       isync
+                       xor             r3,r3,r4                                        ; Convert to physical
 
-
-;
-;                      This routine, given a mapping, will find and lock the PTEG
-;                      If mpPte does not point to a PTE (checked before and after lock), it will unlock the
-;                      PTEG and return.  In this case we will have undefined in R4
-;                      and the low 12 bits of mpVAddr valid in R5.  R3 will contain 0.
-;
-;                      If the mapping is still valid, we will invalidate the PTE and merge
-;                      the RC bits into the physent and also save them into the mapping.
-;
-;                      We then return with R3 pointing to the PTE slot, R4 is the
-;                      top of the PTE and R5 is the bottom.  R6 contains the PCA.
-;                      R7 points to the PCA entry.
-;
-;                      Note that we should NEVER be called on a block or special mapping.
-;                      We could do many bad things.
-;
-
-                       .align  5
-
-mapInvPte32:
-                       lwz             r0,mpPte(r31)                           ; Grab the PTE offset
-                       mfsdr1  r7                                                      ; Get the pointer to the hash table
-                       lwz             r5,mpVAddr+4(r31)                       ; Grab the virtual address
-                       rlwinm  r10,r7,0,0,15                           ; Clean up the hash table base
-                       andi.   r3,r0,mpHValid                          ; Is there a possible PTE?
-                       srwi    r7,r0,4                                         ; Convert to PCA units
-                       rlwinm  r7,r7,0,0,29                            ; Clean up PCA offset
-                       mflr    r2                                                      ; Save the return
-                       subfic  r7,r7,-4                                        ; Convert to -4 based negative index
-                       add             r7,r10,r7                                       ; Point to the PCA directly
-                       beqlr--                                                         ; There was no PTE to start with...
-                       
-                       bl              mapLockPteg                                     ; Lock the PTEG
-
-                       lwz             r0,mpPte(r31)                           ; Grab the PTE offset
-                       mtlr    r2                                                      ; Restore the LR
-                       andi.   r3,r0,mpHValid                          ; Is there a possible PTE?
-                       beq-    mIPUnlock                                       ; There is no PTE, someone took it so just unlock and leave...
-
-                       rlwinm  r3,r0,0,0,30                            ; Clear the valid bit
-                       add             r3,r3,r10                                       ; Point to actual PTE
-                       lwz             r4,0(r3)                                        ; Get the top of the PTE
-                       
-                       li              r8,tlbieLock                            ; Get the TLBIE lock
-                       rlwinm  r0,r4,0,1,31                            ; Clear the valid bit
-                       stw             r0,0(r3)                                        ; Invalidate the PTE
-
-                       sync                                                            ; Make sure everyone sees the invalidate
-                       
-mITLBIE32:     lwarx   r0,0,r8                                         ; Get the TLBIE lock 
-                       mfsprg  r2,2                                            ; Get feature flags 
-                       mr.             r0,r0                                           ; Is it locked? 
-                       li              r0,1                                            ; Get our lock word 
-                       bne-    mITLBIE32                                       ; It is locked, go wait...
-                       
-                       stwcx.  r0,0,r8                                         ; Try to get it
-                       bne-    mITLBIE32                                       ; We was beat...
-                       
-                       rlwinm. r0,r2,0,pfSMPcapb,pfSMPcapb     ; Can this be an MP box?
-                       li              r0,0                                            ; Lock clear value 
-
-                       tlbie   r5                                                      ; Invalidate it everywhere 
-
-                       stw             r0,tlbieLock(0)                         ; Clear the tlbie lock
-                       
-                       beq-    mINoTS32                                        ; Can not have MP on this machine...
-                       
-                       eieio                                                           ; Make sure that the tlbie happens first 
-                       tlbsync                                                         ; Wait for everyone to catch up 
-                       sync                                                            ; Make sure of it all
-                       
-mINoTS32:      lwz             r5,4(r3)                                        ; Get the real part
-                       srwi    r10,r5,12                                       ; Change physical address to a ppnum
-
-mINmerge:      lbz             r11,mpFlags+1(r31)                      ; Get the offset to the physical entry table
-                       lwz             r0,mpVAddr+4(r31)                       ; Get the flags part of the field
-                       lis             r8,hi16(EXT(pmap_mem_regions))  ; Get the top of the region table
-                       ori             r8,r8,lo16(EXT(pmap_mem_regions))       ; Get the bottom of the region table
-                       rlwinm  r11,r11,2,0,29                          ; Change index into byte offset
-                       add             r11,r11,r8                                      ; Point to the bank table
-                       lwz             r2,mrPhysTab(r11)                       ; Get the physical table bank pointer
-                       lwz             r11,mrStart(r11)                        ; Get the start of bank
-                       rlwimi  r0,r5,0,mpRb-32,mpCb-32         ; Copy in the RC
-                       addi    r2,r2,4                                         ; Offset to last half of field
-                       stw             r0,mpVAddr+4(r31)                       ; Set the new RC into the field
-                       sub             r11,r10,r11                                     ; Get the index into the table
-                       rlwinm  r11,r11,3,0,28                          ; Get offset to the physent
-
-
-mImrgRC:       lwarx   r10,r11,r2                                      ; Get the master RC
-                       rlwinm  r0,r5,27,ppRb-32,ppCb-32        ; Position the new RC
-                       or              r0,r0,r10                                       ; Merge in the new RC
-                       stwcx.  r0,r11,r2                                       ; Try to stick it back
-                       bne--   mImrgRC                                         ; Try again if we collided...
-                       
-                       blr                                                                     ; Leave with the PCA still locked up...
-
-mIPUnlock:     eieio                                                           ; Make sure all updates come first
-                               
-                       stw             r6,0(r7)                                        ; Unlock
+hcpvret:       rlwinm  r3,r3,0,0,26                            ; Clean out any flags
                        blr
 
-;
-;                      64-bit version
-;
-                       .align  5
-
-mapInvPte64:
-                       lwz             r0,mpPte(r31)                           ; Grab the PTE offset
-                       ld              r5,mpVAddr(r31)                         ; Grab the virtual address
-                       mfsdr1  r7                                                      ; Get the pointer to the hash table
-                       rldicr  r10,r7,0,45                                     ; Clean up the hash table base
-                       andi.   r3,r0,mpHValid                          ; Is there a possible PTE?
-                       srdi    r7,r0,5                                         ; Convert to PCA units
-                       rldicr  r7,r7,0,61                                      ; Clean up PCA
-                       subfic  r7,r7,-4                                        ; Convert to -4 based negative index
-                       mflr    r2                                                      ; Save the return
-                       add             r7,r10,r7                                       ; Point to the PCA directly
-                       beqlr--                                                         ; There was no PTE to start with...
-                       
-                       bl              mapLockPteg                                     ; Lock the PTEG
-                       
-                       lwz             r0,mpPte(r31)                           ; Grab the PTE offset again
-                       mtlr    r2                                                      ; Restore the LR
-                       andi.   r3,r0,mpHValid                          ; Is there a possible PTE?
-                       beq--   mIPUnlock                                       ; There is no PTE, someone took it so just unlock and leave...
-
-                       rlwinm  r3,r0,0,0,30                            ; Clear the valid bit
-                       add             r3,r3,r10                                       ; Point to the actual PTE
-                       ld              r4,0(r3)                                        ; Get the top of the PTE
-
-                       li              r8,tlbieLock                            ; Get the TLBIE lock
-                       rldicr  r0,r4,0,62                                      ; Clear the valid bit
-                       std             r0,0(r3)                                        ; Invalidate the PTE
-                       
-                       rldicr  r2,r4,16,35                                     ; Shift the AVPN over to match VPN
-                       sync                                                            ; Make sure everyone sees the invalidate
-                       rldimi  r2,r5,0,36                                      ; Cram in the page portion of the EA
-                       
-mITLBIE64:     lwarx   r0,0,r8                                         ; Get the TLBIE lock 
-                       mr.             r0,r0                                           ; Is it locked? 
-                       li              r0,1                                            ; Get our lock word 
-                       bne--   mITLBIE64a                                      ; It is locked, toss reservation and wait...
-                       
-                       stwcx.  r0,0,r8                                         ; Try to get it
-                       bne--   mITLBIE64                                       ; We was beat...
 
-                       rldicl  r2,r2,0,16                                      ; Clear bits 0:15 because we are under orders
-                       
-                       li              r0,0                                            ; Lock clear value 
+/*                     struct mapping *hw_cvp(struct mapping *mp) - Converts a virtual mapping CB address to physcial
+ *
+ *                     Translation must be on for this
+ *
+ */
 
-                       tlbie   r2                                                      ; Invalidate it everywhere 
+                       .align  5
+                       .globl  EXT(hw_cvp)
 
-                       stw             r0,tlbieLock(0)                         ; Clear the tlbie lock
-                       
-                       eieio                                                           ; Make sure that the tlbie happens first 
-                       tlbsync                                                         ; Wait for everyone to catch up 
-                       isync                                                           
-                       ptesync                                                         ; Wait for quiet again
+LEXT(hw_cvp)
                        
-mINoTS64:      sync                                                            ; Make sure of it all
-
-                       ld              r5,8(r3)                                        ; Get the real part
-                       srdi    r10,r5,12                                       ; Change physical address to a ppnum
-                       b               mINmerge                                        ; Join the common 32-64-bit code...
+                       rlwinm  r4,r3,0,0,19                            ; Round back to the mapping block allocation control block                      
+                       rlwinm  r3,r3,0,0,26                            ; Clean out any flags
+                       lwz             r4,mbvrswap(r4)                         ; Get the conversion value
+                       xor             r3,r3,r4                                        ; Convert to virtual
+                       blr
 
-mITLBIE64a:    li              r5,lgKillResv                           ; Killing field
-                       stwcx.  r5,0,r5                                         ; Kill reservation
-                       
-mITLBIE64b:    lwz             r0,0(r8)                                        ; Get the TLBIE lock
-                       mr.             r0,r0                                           ; Is it locked?
-                       beq++   mITLBIE64                                       ; Nope, try again...
-                       b               mITLBIE64b                                      ; Yup, wait for it...
 
-;
-;                      mapLockPteg - Locks a PTEG
-;                      R7 points to PCA entry
-;                      R6 contains PCA on return
-;
-;
+/*                     int mapalc(struct mappingblok *mb) - Finds, allocates, and checks a free mapping entry in a block
+ *
+ *                     Lock must already be held on mapping block list
+ *                     returns 0 if all slots filled.
+ *                     returns n if a slot is found and it is not the last
+ *                     returns -n if a slot os found and it is the last
+ *                     when n and -n are returned, the corresponding bit is cleared
+ *
+ */
 
                        .align  5
-                       
-mapLockPteg:
-                       lwarx   r6,0,r7                                         ; Pick up the PCA
-                       rlwinm. r0,r6,0,PCAlockb,PCAlockb       ; Is the PTEG locked?
-                       ori             r0,r6,PCAlock                           ; Set the lock bit
-                       bne--   mLSkill                                         ; It is locked...
-                       
-                       stwcx.  r0,0,r7                                         ; Try to lock the PTEG
-                       bne--   mapLockPteg                                     ; We collided...
-                       
-                       isync                                                           ; Nostradamus lied
-                       blr                                                                     ; Leave...
-                               
-mLSkill:       li              r6,lgKillResv                           ; Get killing field
-                       stwcx.  r6,0,r6                                         ; Kill it
+                       .globl  EXT(mapalc)
 
-mapLockPteh:
-                       lwz             r6,0(r7)                                        ; Pick up the PCA
-                       rlwinm. r0,r6,0,PCAlockb,PCAlockb       ; Is the PTEG locked?
-                       beq++   mapLockPteg                                     ; Nope, try again...
-                       b               mapLockPteh                                     ; Yes, wait for it...
+LEXT(mapalc)
                        
-
-;
-;                      The mapSelSlot function selects a PTEG slot to use. As input, it expects R6 
-;                      to contain the PCA.  When it returns, R3 contains 0 if an unoccupied slot was
-;                      selected, 1 if it stole a non-block PTE, or 2 if it stole a block mapped PTE.
-;                      R4 returns the slot index.
-;
-;                      CR7 also indicates that we have a block mapping
-;
-;                      The PTEG allocation controls are a bit map of the state of the PTEG. 
-;                      PCAfree indicates that the PTE slot is empty. 
-;                      PCAauto means that it comes from an autogen area.  These
-;                      guys do not keep track of reference and change and are actually "wired".
-;                      They are easy to maintain. PCAsteal
-;                      is a sliding position mask used to "randomize" PTE slot stealing.  All 4 of these
-;                      fields fit in a single word and are loaded and stored under control of the
-;                      PTEG control area lock (PCAlock).
-;
-;                      Note that PCAauto does not contribute to the steal calculations at all.  Originally
-;                      it did, autogens were second in priority.  This can result in a pathalogical
-;                      case where an instruction can not make forward progress, or one PTE slot
-;                      thrashes.
-;
-;                      Note that the PCA must be locked when we get here.
-;
-;                      Physically, the fields are arranged:
-;                              0: PCAfree
-;                              1: PCAsteal
-;                              2: PCAauto
-;                              3: PCAmisc
-;                              
-;
-;                      At entry, R6 contains new unlocked PCA image (real PCA is locked and untouched)
-;
-;                      At exit:
-;
-;                      R3 = 0 - no steal
-;                      R3 = 1 - steal regular
-;                      R3 = 2 - steal autogen
-;                      R4 contains slot number
-;                      R6 contains updated PCA image
-;
-
-                       .align  5
+                       lwz             r4,mbfree(r3)                           ; Get the first mask 
+                       lis             r0,0x8000                                       ; Get the mask to clear the first free bit
+                       lwz             r5,mbfree+4(r3)                         ; Get the second mask 
+                       mr              r12,r3                                          ; Save the return
+                       cntlzw  r8,r4                                           ; Get first free field
+                       lwz             r6,mbfree+8(r3)                         ; Get the third mask 
+                       srw.    r9,r0,r8                                        ; Get bit corresponding to first free one
+                       lwz             r7,mbfree+12(r3)                        ; Get the fourth mask 
+                       cntlzw  r10,r5                                          ; Get first free field in second word
+                       andc    r4,r4,r9                                        ; Turn it off
+                       bne             malcfnd0                                        ; Found one...
                        
-mapSelSlot:    lis             r10,0                                           ; Clear autogen mask
-                       li              r9,0                                            ; Start a mask
-                       beq             cr7,mSSnotblk                           ; Skip if this is not a block mapping
-                       ori             r10,r10,lo16(0xFFFF)            ; Make sure we mark a block mapping (autogen)
-
-mSSnotblk:     rlwinm  r11,r6,16,24,31                         ; Isolate just the steal mask
-                       oris    r9,r9,0x8000                            ; Get a mask
-                       cntlzw  r4,r6                                           ; Find a slot or steal one
-                       ori             r9,r9,lo16(0x8000)                      ; Insure that we have 0x80008000
-                       rlwinm  r4,r4,0,29,31                           ; Isolate bit position
-                       rlwimi  r11,r11,8,16,23                         ; Get set to march a 1 back into top of 8 bit rotate
-                       srw             r2,r9,r4                                        ; Get mask to isolate selected inuse and autogen flags
-                       srwi    r11,r11,1                                       ; Slide steal mask right
-                       and             r8,r6,r2                                        ; Isolate the old in use and autogen bits
-                       andc    r6,r6,r2                                        ; Allocate the slot and also clear autogen flag
-                       addi    r0,r8,0x7F00                            ; Push autogen flag to bit 16
-                       and             r2,r2,r10                                       ; Keep the autogen part if autogen
-                       addis   r8,r8,0xFF00                            ; Push in use to bit 0 and invert
-                       or              r6,r6,r2                                        ; Add in the new autogen bit 
-                       rlwinm  r0,r0,17,31,31                          ; Get a 1 if the old was autogenned (always 0 if not in use)
-                       rlwinm  r8,r8,1,31,31                           ; Isolate old in use
-                       rlwimi  r6,r11,16,8,15                          ; Stick the new steal slot in
-
-                       add             r3,r0,r8                                        ; Get 0 if no steal, 1 if steal normal, 2 if steal autogen                      
-                       blr                                                                     ; Leave...
+                       srw.    r9,r0,r10                                       ; Get bit corresponding to first free one in second word
+                       cntlzw  r11,r6                                          ; Get first free field in third word
+                       andc    r5,r5,r9                                        ; Turn it off
+                       bne             malcfnd1                                        ; Found one...
                        
-;
-;                      Shared/Exclusive locks
-;
-;                      A shared/exclusive lock allows multiple shares of a lock to be taken
-;                      but only one exclusive.  A shared lock can be "promoted" to exclusive
-;                      when it is the only share.  If there are multiple sharers, the lock
-;                      must be "converted".  A promotion drops the share and gains exclusive as
-;                      an atomic operation.  If anyone else has a share, the operation fails.
-;                      A conversion first drops the share and then takes an exclusive lock.
-;
-;                      We will want to add a timeout to this eventually.
-;
-;                      R3 is set to 0 for success, non-zero for failure
-;
-
-;
-;                      Convert a share into an exclusive
-;
-
-                       .align  5
+                       srw.    r9,r0,r11                                       ; Get bit corresponding to first free one in third word
+                       cntlzw  r10,r7                                          ; Get first free field in fourth word
+                       andc    r6,r6,r9                                        ; Turn it off
+                       bne             malcfnd2                                        ; Found one...
                        
-sxlkConvert:
-
-                       lis             r0,0x8000                                       ; Get the locked lock image
-#if 0
-                       mflr    r0                                                      ; (TEST/DEBUG)
-                       oris    r0,r0,0x8000                            ; (TEST/DEBUG)
-#endif
-               
-sxlkCTry:      lwarx   r2,0,r3                                         ; Get the lock word
-                       cmplwi  r2,1                                            ; Does it just have our share?
-                       subi    r2,r2,1                                         ; Drop our share in case we do not get it
-                       bne--   sxlkCnotfree                            ; No, we need to unlock...
-                       stwcx.  r0,0,r3                                         ; Try to take it exclusively
-                       bne--   sxlkCTry                                        ; Collision, try again...
+                       srw.    r9,r0,r10                                       ; Get bit corresponding to first free one in second word
+                       li              r3,0                                            ; Assume abject failure
+                       andc    r7,r7,r9                                        ; Turn it off
+                       beqlr                                                           ; There are none any left...
                        
-                       isync
-                       li              r3,0                                            ; Set RC
-                       blr                                                                     ; Leave...
-
-sxlkCnotfree:
-                       stwcx.  r2,0,r3                                         ; Try to drop our share...      
-                       bne--   sxlkCTry                                        ; Try again if we collided...
-                       b               sxlkExclusive                           ; Go take it exclusively...
-
-;
-;                      Promote shared to exclusive
-;
-
-                       .align  5
+                       addi    r3,r10,96                                       ; Set the correct bit number
+                       stw             r7,mbfree+12(r12)                       ; Actually allocate the slot
                        
-sxlkPromote:
-                       lis             r0,0x8000                                       ; Get the locked lock image
-#if 0
-                       mflr    r0                                                      ; (TEST/DEBUG)
-                       oris    r0,r0,0x8000                            ; (TEST/DEBUG)
-#endif
-               
-sxlkPTry:      lwarx   r2,0,r3                                         ; Get the lock word
-                       cmplwi  r2,1                                            ; Does it just have our share?
-                       bne--   sxlkPkill                                       ; No, just fail (R3 is non-zero)...
-                       stwcx.  r0,0,r3                                         ; Try to take it exclusively
-                       bne--   sxlkPTry                                        ; Collision, try again...
+mapafin:       or              r4,r4,r5                                        ; Merge the first two allocation maps
+                       or              r6,r6,r7                                        ; Then the last two
+                       or.             r4,r4,r6                                        ; Merge both halves
+                       bnelr+                                                          ; Return if some left for next time...
                        
-                       isync
-                       li              r3,0                                            ; Set RC
+                       neg             r3,r3                                           ; Indicate we just allocated the last one
                        blr                                                                     ; Leave...
-
-sxlkPkill:     li              r2,lgKillResv                           ; Point to killing field
-                       stwcx.  r2,0,r2                                         ; Kill reservation
-                       blr                                                                     ; Leave
-
-
-
-;
-;                      Take lock exclusivily
-;
-
-                       .align  5
                        
-sxlkExclusive:
-                       lis             r0,0x8000                                       ; Get the locked lock image
-#if 0
-                       mflr    r0                                                      ; (TEST/DEBUG)
-                       oris    r0,r0,0x8000                            ; (TEST/DEBUG)
-#endif
-               
-sxlkXTry:      lwarx   r2,0,r3                                         ; Get the lock word
-                       mr.             r2,r2                                           ; Is it locked?
-                       bne--   sxlkXWait                                       ; Yes...
-                       stwcx.  r0,0,r3                                         ; Try to take it
-                       bne--   sxlkXTry                                        ; Collision, try again...
+malcfnd0:      stw             r4,mbfree(r12)                          ; Actually allocate the slot
+                       mr              r3,r8                                           ; Set the correct bit number
+                       b               mapafin                                         ; Exit now...
                        
-                       isync                                                           ; Toss anything younger than us
-                       li              r3,0                                            ; Set RC
-                       blr                                                                     ; Leave...
+malcfnd1:      stw             r5,mbfree+4(r12)                        ; Actually allocate the slot
+                       addi    r3,r10,32                                       ; Set the correct bit number
+                       b               mapafin                                         ; Exit now...
                        
-                       .align  5
-
-sxlkXWait:     li              r2,lgKillResv                           ; Point to killing field
-                       stwcx.  r2,0,r2                                         ; Kill reservation
+malcfnd2:      stw             r6,mbfree+8(r12)                        ; Actually allocate the slot
+                       addi    r3,r11,64                                       ; Set the correct bit number
+                       b               mapafin                                         ; Exit now...
                        
-sxlkXWaiu:     lwz             r2,0(r3)                                        ; Get the lock again
-                       mr.             r2,r2                                           ; Is it free yet?
-                       beq++   sxlkXTry                                        ; Yup...
-                       b               sxlkXWaiu                                       ; Hang around a bit more...
 
-;
-;                      Take a share of the lock
-;
+/*
+ * Log out all memory usage
+ */
 
                        .align  5
-                       
-sxlkShared:    lwarx   r2,0,r3                                         ; Get the lock word
-                       rlwinm. r0,r2,0,0,0                                     ; Is it locked exclusively?
-                       addi    r2,r2,1                                         ; Up the share count
-                       bne--   sxlkSWait                                       ; Yes...
-                       stwcx.  r2,0,r3                                         ; Try to take it
-                       bne--   sxlkShared                                      ; Collision, try again...
-                       
-                       isync                                                           ; Toss anything younger than us
-                       li              r3,0                                            ; Set RC
-                       blr                                                                     ; Leave...
-                       
-                       .align  5
-
-sxlkSWait:     li              r2,lgKillResv                           ; Point to killing field
-                       stwcx.  r2,0,r2                                         ; Kill reservation
-
-sxlkSWaiu:     lwz             r2,0(r3)                                        ; Get the lock again
-                       rlwinm. r0,r2,0,0,0                                     ; Is it locked exclusively?
-                       beq++   sxlkShared                                      ; Nope...
-                       b               sxlkSWaiu                                       ; Hang around a bit more...
-
-;
-;                      Unlock either exclusive or shared.
-;
+                       .globl  EXT(logmem)
 
-                       .align  5
-                       
-sxlkUnlock:    eieio                                                           ; Make sure we order our stores out
-               
-sxlkUnTry:     lwarx   r2,0,r3                                         ; Get the lock
-                       rlwinm. r0,r2,0,0,0                                     ; Do we hold it exclusively?
-                       subi    r2,r2,1                                         ; Remove our share if we have one
-                       li              r0,0                                            ; Clear this
-                       bne--   sxlkUExclu                                      ; We hold exclusive...
-                       
-                       stwcx.  r2,0,r3                                         ; Try to lose our share
-                       bne--   sxlkUnTry                                       ; Collision...
-                       blr                                                                     ; Leave...
-                       
-sxlkUExclu:    stwcx.  r0,0,r3                                         ; Unlock and release reservation
-                       beqlr++                                                         ; Leave if ok...
-                       b               sxlkUnTry                                       ; Could not store, try over...  
-                       
+LEXT(logmem)
 
-                       .align  5
-                       .globl  EXT(fillPage)
-
-LEXT(fillPage)
-
-                       mfsprg  r0,2                                            ; Get feature flags 
-                       mtcrf   0x02,r0                                         ; move pf64Bit to cr
-
-                       rlwinm  r4,r4,0,1,0                                     ; Copy fill to top of 64-bit register
-                       lis             r2,0x0200                                       ; Get vec
-                       mr              r6,r4                                           ; Copy
-                       ori             r2,r2,0x2000                            ; Get FP
-                       mr              r7,r4                                           ; Copy
-                       mfmsr   r5                                                      ; Get MSR
-                       mr              r8,r4                                           ; Copy
-                       andc    r5,r5,r2                                        ; Clear out permanent turn-offs
-                       mr              r9,r4                                           ; Copy
-                       ori             r2,r2,0x8030                            ; Clear IR, DR and EE
-                       mr              r10,r4                                          ; Copy
-                       andc    r0,r5,r2                                        ; Kill them
-                       mr              r11,r4                                          ; Copy
-                       mr              r12,r4                                          ; Copy
-                       bt++    pf64Bitb,fpSF1                          ; skip if 64-bit (only they take the hint)
-                       
-                       slwi    r3,r3,12                                        ; Make into a physical address
-                       mtmsr   r2                                                      ; Interrupts and translation off
-                       isync
-                       
-                       li              r2,4096/32                                      ; Get number of cache lines
-                       
-fp32again:     dcbz    0,r3                                            ; Clear
-                       addic.  r2,r2,-1                                        ; Count down
-                       stw             r4,0(r3)                                        ; Fill
-                       stw             r6,4(r3)                                        ; Fill
-                       stw             r7,8(r3)                                        ; Fill
-                       stw             r8,12(r3)                                       ; Fill
-                       stw             r9,16(r3)                                       ; Fill
-                       stw             r10,20(r3)                                      ; Fill
-                       stw             r11,24(r3)                                      ; Fill
-                       stw             r12,28(r3)                                      ; Fill
-                       addi    r3,r3,32                                        ; Point next
-                       bgt+    fp32again                                       ; Keep going
-
-                       mtmsr   r5                                                      ; Restore all
+                       mfmsr   r2                                                      ; Get the MSR   
+                       lis             r10,hi16(EXT(DebugWork))                ; High part of area
+                       rlwinm  r2,r2,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       lis             r12,hi16(EXT(mem_actual))       ; High part of actual
+                       rlwinm  r2,r2,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       andi.   r0,r2,0x7FCF                            ; Interrupts and translation off
+                       ori             r10,r10,lo16(EXT(DebugWork))    ; Get the entry
+                       mtmsr   r0                                                      ; Turn stuff off
+                       ori             r12,r12,lo16(EXT(mem_actual))   ; Get the actual
+                       li              r0,1                                            ; Get a one
+       
                        isync
-                       blr                                                                     ; Return...
-                       
-                       .align  5
-                       
-fpSF1:         li              r2,1
-                       sldi    r2,r2,63                                        ; Get 64-bit bit
-                       or              r0,r0,r2                                        ; Turn on 64-bit
-                       sldi    r3,r3,12                                        ; Make into a physical address
 
-                       mtmsrd  r0                                                      ; Interrupts and translation off
+                       stw             r0,4(r10)                                       ; Force logging off
+                       lwz             r0,0(r12)                                       ; Get the end of memory
+                       
+                       lis             r12,hi16(EXT(mem_size))         ; High part of defined memory
+                       ori             r12,r12,lo16(EXT(mem_size))     ; Low part of defined memory
+                       lwz             r12,0(r12)                                      ; Make it end of defined
+                       
+                       cmplw   r0,r12                                          ; Is there room for the data?
+                       ble-    logmemexit                                      ; No, do not even try...
+
+                       stw             r12,0(r12)                                      ; Set defined memory size
+                       stw             r0,4(r12)                                       ; Set the actual amount of memory
+                       
+                       lis             r3,hi16(EXT(hash_table_base))   ; Hash table address
+                       lis             r4,hi16(EXT(hash_table_size))   ; Hash table size
+                       lis             r5,hi16(EXT(pmap_mem_regions))  ; Memory regions
+                       lis             r6,hi16(EXT(mapCtl))            ; Mappings
+                       ori             r3,r3,lo16(EXT(hash_table_base))        
+                       ori             r4,r4,lo16(EXT(hash_table_size))        
+                       ori             r5,r5,lo16(EXT(pmap_mem_regions))       
+                       ori             r6,r6,lo16(EXT(mapCtl)) 
+                       lwz             r3,0(r3)
+                       lwz             r4,0(r4)
+                       lwz             r5,4(r5)                                        ; Get the pointer to the phys_ent table
+                       lwz             r6,0(r6)                                        ; Get the pointer to the current mapping block
+                       stw             r3,8(r12)                                       ; Save the hash table address
+                       stw             r4,12(r12)                                      ; Save the hash table size
+                       stw             r5,16(r12)                                      ; Save the physent pointer
+                       stw             r6,20(r12)                                      ; Save the mappings
+                       
+                       addi    r11,r12,0x1000                          ; Point to area to move hash table and PCA
+                       
+                       add             r4,r4,r4                                        ; Double size for both
+                       
+copyhash:      lwz             r7,0(r3)                                        ; Copy both of them
+                       lwz             r8,4(r3)
+                       lwz             r9,8(r3)
+                       lwz             r10,12(r3)
+                       subic.  r4,r4,0x10
+                       addi    r3,r3,0x10
+                       stw             r7,0(r11)
+                       stw             r8,4(r11)
+                       stw             r9,8(r11)
+                       stw             r10,12(r11)
+                       addi    r11,r11,0x10
+                       bgt+    copyhash
+                       
+                       rlwinm  r4,r12,20,12,31                         ; Get number of phys_ents
+
+copyphys:      lwz             r7,0(r5)                                        ; Copy physents
+                       lwz             r8,4(r5)
+                       subic.  r4,r4,1
+                       addi    r5,r5,8
+                       stw             r7,0(r11)
+                       stw             r8,4(r11)
+                       addi    r11,r11,8
+                       bgt+    copyphys
+                       
+                       addi    r11,r11,4095                            ; Round up to next page
+                       rlwinm  r11,r11,0,0,19
+
+                       lwz             r4,4(r6)                                        ; Get the size of the mapping area
+                       
+copymaps:      lwz             r7,0(r6)                                        ; Copy the mappings
+                       lwz             r8,4(r6)
+                       lwz             r9,8(r6)
+                       lwz             r10,12(r6)
+                       subic.  r4,r4,0x10
+                       addi    r6,r6,0x10
+                       stw             r7,0(r11)
+                       stw             r8,4(r11)
+                       stw             r9,8(r11)
+                       stw             r10,12(r11)
+                       addi    r11,r11,0x10
+                       bgt+    copymaps
+
+                       sub             r11,r11,r12                                     ; Get the total length we saved
+                       stw             r11,24(r12)                                     ; Save the size
+                       
+logmemexit:    mtmsr   r2                                                      ; Back to normal
+                       li              r3,0
                        isync
-                       
-                       li              r2,4096/128                                     ; Get number of cache lines
-                                               
-fp64again:     dcbz128 0,r3                                            ; Clear
-                       addic.  r2,r2,-1                                        ; Count down
-                       std             r4,0(r3)                                        ; Fill
-                       std             r6,8(r3)                                        ; Fill
-                       std             r7,16(r3)                                       ; Fill
-                       std             r8,24(r3)                                       ; Fill
-                       std             r9,32(r3)                                       ; Fill
-                       std             r10,40(r3)                                      ; Fill
-                       std             r11,48(r3)                                      ; Fill
-                       std             r12,56(r3)                                      ; Fill
-                       std             r4,64+0(r3)                                     ; Fill
-                       std             r6,64+8(r3)                                     ; Fill
-                       std             r7,64+16(r3)                            ; Fill
-                       std             r8,64+24(r3)                            ; Fill
-                       std             r9,64+32(r3)                            ; Fill
-                       std             r10,64+40(r3)                           ; Fill
-                       std             r11,64+48(r3)                           ; Fill
-                       std             r12,64+56(r3)                           ; Fill
-                       addi    r3,r3,128                                       ; Point next
-                       bgt+    fp64again                                       ; Keep going
-
-                       mtmsrd  r5                                                      ; Restore all
-                       isync
-                       blr                                                                     ; Return...
-                       
-                       .align  5
-                       .globl  EXT(mapLog)
-
-LEXT(mapLog)
-
-                       mfmsr   r12
-                       lis             r11,hi16(EXT(mapdebug))
-                       ori             r11,r11,lo16(EXT(mapdebug))
-                       lwz             r10,0(r11)
-                       mr.             r10,r10
-                       bne++   mLxx
-                       mr              r10,r3
-mLxx:          rlwinm  r0,r12,0,MSR_DR_BIT+1,MSR_DR_BIT-1
-                       mtmsr   r0
-                       isync
-                       stw             r4,0(r10)
-                       stw             r4,4(r10)
-                       stw             r5,8(r10)
-                       stw             r6,12(r10)
-                       mtmsr   r12
-                       isync
-                       addi    r10,r10,16
-                       stw             r10,0(r11)
                        blr
-                       
-#if 1
-                       .align  5
-                       .globl  EXT(checkBogus)
-
-LEXT(checkBogus)
-
-                       BREAKPOINT_TRAP
-                       blr                                                                     ; No-op normally
-                       
-#endif                                         
-
-
 
 
diff --git a/osfmk/ppc/instrumentation.h b/osfmk/ppc/instrumentation.h
deleted file mode 100644 (file)
index 1800a84..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-/*
- * @APPLE_FREE_COPYRIGHT@
- */
-
-/*
- * Here be the instrumentaion page layout
- * Lovingly crafted by Bill Angell using traditional methods
-*/
-
-#ifndef _INSTRUMENTATION_H_
-#define _INSTRUMENTATION_H_
-
-#define INTRUMENTATION 1
-
-
-#define inBase 0x6000
-
-#define inEntry 0
-#define inAtGetTb 1
-#define inBeforeTrace 2
-#define inAfterSAAlloc 3
-#define inBeforeFilter 4
-#define inEatRuptQfret 5
-#define inEatRuptSAfree 6
-#define inPassupSwtchSeg 7
-#define inExceptionExit 8
-#define inMiddleOfSC 9
-#define inEatRuptSwtchSeg 10
-#define inPassup 11
-#define inCopyout 12
-#define inMUASbefore 13
-#define inMUAS
-
-#endif /* _INSTRUMENTATION_H_ */
index 2074435fc93ba562d70c0b0e8b8d41980ee7fcb6..47e447e8179303e7576100e52943757ea3158fd0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #include <kern/thread.h>
 #include <kern/counters.h>
 #include <ppc/misc_protos.h>
-#include <ppc/trap.h>
 #include <ppc/proc_reg.h>
 #include <ppc/exception.h>
 #include <ppc/savearea.h>
 #include <pexpert/pexpert.h>
+#if    NCPUS > 1
+#include <ppc/POWERMAC/mp/MPPlugIn.h>
+#endif /* NCPUS > 1 */
 #include <sys/kdebug.h>
 
-perfTrap perfIntHook = 0;                                              /* Pointer to performance trap hook routine */
-
 struct savearea * interrupt(
         int type,
         struct savearea *ssp,
@@ -54,10 +51,6 @@ struct savearea * interrupt(
        thread_act_t    act;
 
        disable_preemption();
-
-       if(perfIntHook) {                                                       /* Is there a hook? */
-               if(perfIntHook(type, ssp, dsisr, dar) == KERN_SUCCESS) return ssp;      /* If it succeeds, we are done... */
-       }
        
 #if 0
        {
@@ -115,7 +108,7 @@ struct savearea * interrupt(
                        
                case T_DECREMENTER:
                        KERNEL_DEBUG_CONSTANT(MACHDBG_CODE(DBG_MACH_EXCP_DECI, 0) | DBG_FUNC_NONE,
-                                 isync_mfdec(), (unsigned int)ssp->save_srr0, 0, 0, 0);
+                                 isync_mfdec(), ssp->save_srr0, 0, 0, 0);
        
 #if 0
                        if (pcsample_enable) {
@@ -143,7 +136,7 @@ struct savearea * interrupt(
                        counter_always(c_incoming_interrupts++);
        
                        KERNEL_DEBUG_CONSTANT(MACHDBG_CODE(DBG_MACH_EXCP_INTR, 0) | DBG_FUNC_START,
-                          current_cpu, (unsigned int)ssp->save_srr0, 0, 0, 0);
+                          current_cpu, ssp->save_srr0, 0, 0, 0);
        
                        per_proc_info[current_cpu].interrupt_handler(
                                per_proc_info[current_cpu].interrupt_target, 
index 4a1824f327fda98bf451229a1d36d7acc1981e45..5ce5ab5e8ea1e485db1a7f3ed0065069537aab54 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -45,8 +42,6 @@ extern vm_offset_t    virtual_avail;
  * outside the usual physical memory. If phys_addr is NULL then
  * steal the appropriate number of physical pages from the vm
  * system and map them.
- *
- * Note, this will onl
  */
 vm_offset_t
 io_map(phys_addr, size)
@@ -63,68 +58,38 @@ io_map(phys_addr, size)
        assert (kernel_map != VM_MAP_NULL);                     /* VM must be initialised */
 #endif
 
-       if (phys_addr != 0) {                                           /* If they supplied a physical address, use it */
+       if (phys_addr != 0) {
+               /* make sure we map full contents of all the pages concerned */
+               size = round_page(size + (phys_addr & PAGE_MASK));
 
-               size = round_page_32(size + (phys_addr & PAGE_MASK));   /* Make sure we map all of it */
+               /* Steal some free virtual addresses */
 
-               (void) kmem_alloc_pageable(kernel_map, &start, size);   /* Get some virtual addresses to use */
+               (void) kmem_alloc_pageable(kernel_map, &start, size);
                
-               (void)mapping_make(kernel_pmap, (addr64_t)start, (ppnum_t)(phys_addr >> 12), 
-                       (mmFlgBlock | mmFlgUseAttr | mmFlgCInhib | mmFlgGuarded),       /* Map as I/O page */
-                       size >> 12, VM_PROT_READ|VM_PROT_WRITE);
+               pmap_map_block(kernel_pmap, start, phys_addr, size, 
+                  VM_PROT_READ|VM_PROT_WRITE, PTE_WIMG_IO, 0); /* Set up a block mapped area */
 
-               return (start + (phys_addr & PAGE_MASK));       /* Pass back the physical address */
+               return (start + (phys_addr & PAGE_MASK));
        
        } else {
        
-               (void) kmem_alloc_pageable(kernel_map, &start, size);   /* Get some virtual addresses */
+               /* Steal some free virtual addresses */
+               (void) kmem_alloc_pageable(kernel_map, &start, size);
 
                mapping_prealloc(size);                                 /* Make sure there are enough free mappings */
-
+               /* Steal some physical pages and map them one by one */
                for (i = 0; i < size ; i += PAGE_SIZE) {
                        m = VM_PAGE_NULL;
-                       while ((m = vm_page_grab()) == VM_PAGE_NULL) {  /* Get a physical page */
-                               VM_PAGE_WAIT();                                 /* Wait if we didn't have one */
-                       }
+                       while ((m = vm_page_grab()) == VM_PAGE_NULL)
+                               VM_PAGE_WAIT();
                        vm_page_gobble(m);
-                       
-                       (void)mapping_make(kernel_pmap, 
-                               (addr64_t)(start + i), m->phys_page, 
-                               (mmFlgBlock | mmFlgUseAttr | mmFlgCInhib | mmFlgGuarded),       /* Map as I/O page */
-                               1, VM_PROT_READ|VM_PROT_WRITE); 
-                       
+                       (void) pmap_map_bd(start + i,
+                                          m->phys_addr,
+                                          m->phys_addr + PAGE_SIZE,
+                                          VM_PROT_READ|VM_PROT_WRITE);
                }
 
                mapping_relpre();                                               /* Allow mapping release */
                return start;
        }
 }
-
-
-/*
- * Allocate and map memory for devices before the VM system comes alive.
- */
-
-vm_offset_t io_map_spec(vm_offset_t phys_addr, vm_size_t size)
-{
-       vm_offset_t     start;
-       int             i;
-       unsigned int j;
-       vm_page_t       m;
-
-
-       if(kernel_map != VM_MAP_NULL) {                         /* If VM system is up, redirect to normal routine */
-               
-               return io_map(phys_addr, size);                 /* Map the address */
-       
-       }
-       
-       size = round_page_32(size + (phys_addr - (phys_addr & -PAGE_SIZE)));    /* Extend the length to include it all */
-       start = pmap_boot_map(size);                            /* Get me some virtual address */
-
-       (void)mapping_make(kernel_pmap, (addr64_t)start, (ppnum_t)(phys_addr >> 12), 
-               (mmFlgBlock | mmFlgUseAttr | mmFlgCInhib | mmFlgGuarded),       /* Map as I/O page */
-               size >> 12, VM_PROT_READ|VM_PROT_WRITE);
-
-       return (start + (phys_addr & PAGE_MASK));
-}
index 2082bdf2ef8f84c20cd23e3670a13e87e067138e..e7a329dc38e161f52e04779ec8eb0edff9795dd9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -33,6 +30,5 @@
 extern vm_offset_t     io_map(
                                vm_offset_t             phys_addr,
                                vm_size_t               size);
-extern vm_offset_t io_map_spec(vm_offset_t phys_addr, vm_size_t size);
 
 #endif /* _PPC_IO_MAP_ENTRIES_H_ */
index 26a96c40396f4a80228708ded53d537a26524cd7..25ac9734fe5ac34d031a1f4ebcc24ff12222b92a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cb7e07aed39448e22b450ad2a08996df36364ea7..e5ba906b849c7e31f10e98023762aacf5a696d47 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -65,8 +62,6 @@
 
 #include <kern/macro_help.h>
 #include <kern/assert.h>
-#include <mach/etap_events.h>
-#include <mach/etap.h>
 
 extern unsigned int LockTimeOut;                       /* Number of hardware ticks of a lock timeout */
 
@@ -78,27 +73,20 @@ extern unsigned int LockTimeOut;                    /* Number of hardware ticks of a lock timeout
 
 #include <ppc/hw_lock_types.h>
 
+#define simple_lock_init(l,t)   hw_lock_init(l)
 #define __slock_held_func__(l)  hw_lock_held(l)
 
-extern void                     ppc_usimple_lock_init(simple_lock_t,etap_event_t);
-extern void                     ppc_usimple_lock(simple_lock_t);
-extern void                     ppc_usimple_unlock_rwmb(simple_lock_t);
-extern void                     ppc_usimple_unlock_rwcmb(simple_lock_t);
-extern unsigned int             ppc_usimple_lock_try(simple_lock_t);
-
-#define        MACHINE_SIMPLE_LOCK
+extern void                     fast_usimple_lock(simple_lock_t);
+extern void                     fast_usimple_unlock(simple_lock_t);
+extern unsigned int             fast_usimple_lock_try(simple_lock_t);
 
-#define simple_lock_init(l,t)  ppc_usimple_lock_init(l,t)
-#define simple_lock(l)                 ppc_usimple_lock(l)
-#define simple_unlock(l)               ppc_usimple_unlock_rwcmb(l)
-#define simple_unlock_rwmb(l)          ppc_usimple_unlock_rwmb(l)
-#define simple_lock_try(l)             ppc_usimple_lock_try(l)  
-#define simple_lock_addr(l)            (&(l))
+#define simple_lock(l)          fast_usimple_lock(l)
+#define simple_unlock(l)        fast_usimple_unlock(l)
+#define simple_lock_try(l)      fast_usimple_lock_try(l)  
+#define simple_lock_addr(l)     (&(l))
 #define thread_sleep_simple_lock(l, e, i) \
                                thread_sleep_fast_usimple_lock((l), (e), (i))
 
-#define mutex_unlock(l)                mutex_unlock_rwcmb(l)
-
 #endif /* !(NCPUS == 1 || ETAP_LOCK_TRACE || USLOCK_DEBUG) */
 
 #endif /* MACH_KERNEL_PRIVATE */
index 389852db9b3332ea580cabd72c6758c953f85dfe..30bbf3f98e5e0f42cea49723763926c9fd70582e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -39,7 +36,6 @@
 #ifndef _LOW_TRACE_H_
 #define _LOW_TRACE_H_
 
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
 typedef struct LowTraceRecord {
 
        unsigned short  LTR_cpu;                        /* 0000 - CPU address */
@@ -47,29 +43,22 @@ typedef struct LowTraceRecord {
        unsigned int    LTR_timeHi;                     /* 0004 - High order time */
        unsigned int    LTR_timeLo;                     /* 0008 - Low order time */
        unsigned int    LTR_cr;                         /* 000C - CR */
-       unsigned int    LTR_dsisr;                      /* 0010 - DSISR */
-       unsigned int    LTR_rsvd0;                      /* 0014 - reserved */
-       uint64_t                LTR_srr0;                       /* 0018 - SRR0 */
-
-       uint64_t                LTR_srr1;                       /* 0020 - SRR1 */
-       uint64_t                LTR_dar;                        /* 0028 - DAR */
-       uint64_t                LTR_save;                       /* 0030 - savearea */
-       uint64_t                LTR_lr;                         /* 0038 - LR */
-
-       uint64_t                LTR_ctr;                        /* 0040 - CTR */
-       uint64_t                LTR_r0;                         /* 0048 - R0 */
-       uint64_t                LTR_r1;                         /* 0050 - R1 */
-       uint64_t                LTR_r2;                         /* 0058 - R2 */
-
-       uint64_t                LTR_r3;                         /* 0060 - R3 */
-       uint64_t                LTR_r4;                         /* 0068 - R4 */
-       uint64_t                LTR_r5;                         /* 0070 - R5 */
-       uint64_t                LTR_r6;                         /* 0078 - R6 */
+       unsigned int    LTR_srr0;                       /* 0010 - SRR0 */
+       unsigned int    LTR_srr1;                       /* 0014 - SRR1 */
+       unsigned int    LTR_dar;                        /* 0018 - DAR */
+       unsigned int    LTR_save;                       /* 001C - savearea */
+       
+       unsigned int    LTR_lr;                         /* 0020 - LR */
+       unsigned int    LTR_ctr;                        /* 0024 - CTR */
+       unsigned int    LTR_r0;                         /* 0028 - R0 */
+       unsigned int    LTR_r1;                         /* 002C - R1 */
+       unsigned int    LTR_r2;                         /* 0030 - R2 */
+       unsigned int    LTR_r3;                         /* 0034 - R3 */
+       unsigned int    LTR_r4;                         /* 0038 - R4 */
+       unsigned int    LTR_r5;                         /* 003C - R5 */
 
 } LowTraceRecord;              
-#pragma pack()
 
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
 typedef struct traceWork {
 
        unsigned int traceCurr;                         /* Address of next slot */
@@ -77,10 +66,8 @@ typedef struct traceWork {
        unsigned int traceStart;                        /* Start of trace table */
        unsigned int traceEnd;                          /* End of trace table */
        unsigned int traceMsnd;                         /* Saved trace mask */
-       unsigned int traceSize;                         /* Size of trace table. Min 1 page */
-       unsigned int traceGas[2];
+       unsigned int traceGas[3];
 } traceWork;
-#pragma pack()
 
 extern traceWork trcWork;
 extern unsigned int lastTrace;                 /* Value of low-level exception trace controls */
diff --git a/osfmk/ppc/lowglobals.h b/osfmk/ppc/lowglobals.h
deleted file mode 100644 (file)
index f6d3f36..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-/*
- *             Header files for the Low Memory Globals (lg) 
- */
-#ifndef        _LOW_MEMORY_GLOBALS_H_
-#define        _LOW_MEMORY_GLOBALS_H_
-
-#include <cpus.h>
-
-#include <mach/mach_types.h>
-#include <mach/vm_types.h>
-#include <mach/machine/vm_types.h>
-#include <mach/vm_prot.h>
-#include <ppc/proc_reg.h>
-#include <ppc/savearea.h>
-#include <ppc/low_trace.h>
-#include <ppc/Diagnostics.h>
-
-/*
- * Don't change these structures unless you change the corresponding assembly code
- * which is in lowmem_vectors.s
- */
-/* 
- *     This is where we put constants, pointers, and data areas that must be accessed
- *     quickly through assembler.  They are designed to be accessed directly with 
- *     absolute addresses, not via a base register.  This is a global area, and not
- *     per processor.
- */
-#pragma pack(4)                                                                /* Make sure the structure stays as we defined it */
-typedef struct lowglo {
-
-       unsigned long   lgForceAddr[5*1024];    /* 0000 Force to page 5 */
-       unsigned char   lgVerCode[8];                   /* 5000 System verification code */
-       unsigned long long lgZero;                              /* 5008 Double constant 0 */
-       unsigned int    lgPPStart;                              /* 5010 Start of per_proc blocks */
-       unsigned int    lgRsv014[27];                   /* 5014 reserved */
-       traceWork               lgTrcWork;                              /* 5080 Tracing control block - trcWork */
-       unsigned int    lgRsv0A0[24];                   /* 50A0 reserved */
-       struct Saveanchor       lgSaveanchor;           /* 5100 Savearea anchor - saveanchor */
-       unsigned int    lgRsv140[16];                   /* 5140 reserved */
-       unsigned int    lgTlbieLck;                             /* 5180 TLBIE lock */
-       unsigned int    lgRsv184[31];                   /* 5184 reserved - push to next line */
-       struct diagWork lgdgWork;                               /* 5200 Start of diagnostic work area */
-       unsigned int    lgRsv220[24];                   /* 5220 reserved */
-       unsigned int    lgRst280[32];                   /* 5280 reserved */
-       unsigned int    lgKillResv;                             /* 5300 line used to kill reservations */
-       unsigned int    lgKillResvpad[31];              /* 5304 pad reservation kill line */
-       unsigned int    lgRsv380[768];                  /* 5380 reserved - push to 1 page */
-
-} lowglo;
-
-extern lowglo lowGlo;
-
-#endif /* _LOW_MEMORY_GLOBALS_H_ */
index 918a92d618d618612d7fae58cb88a19aceb01787..eaf113fe73afe6a9386aaff62619ebae5441ba45 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
  * @OSF_COPYRIGHT@
  */
 
+/*
+ * Low-memory exception vector code for PowerPC MACH
+ *
+ * These are the only routines that are ever run with
+ * VM instruction translation switched off.
+ *
+ * The PowerPC is quite strange in that rather than having a set
+ * of exception vectors, the exception handlers are installed
+ * in well-known addresses in low memory. This code must be loaded
+ * at ZERO in physical memory. The simplest way of doing this is
+ * to load the kernel at zero, and specify this as the first file
+ * on the linker command line.
+ *
+ * When this code is loaded into place, it is loaded at virtual
+ * address KERNELBASE, which is mapped to zero (physical).
+ *
+ * This code handles all powerpc exceptions and is always entered
+ * in supervisor mode with translation off. It saves the minimum
+ * processor state before switching back on translation and
+ * jumping to the approprate routine.
+ *
+ * Vectors from 0x100 to 0x3fff occupy 0x100 bytes each (64 instructions)
+ *
+ * We use some of this space to decide which stack to use, and where to
+ * save the context etc, before        jumping to a generic handler.
+ */
+
 #include <assym.s>
 #include <debug.h>
 #include <cpus.h>
 #include <db_machine_commands.h>
+#include <mach_rt.h>
        
 #include <mach_debug.h>
 #include <ppc/asm.h>
 #include <ppc/savearea.h>
 #include <mach/ppc/vm_param.h>
 
+#define TRCSAVE 0
+#define CHECKSAVE 0
+#define PERFTIMES 0
 #define ESPDEBUG 0
-#define INSTRUMENT 0
 
-#define featAltivec 29
-#define wasNapping 30
+#if TRCSAVE
+#error The TRCSAVE option is broken.... Fix it
+#endif
+
+#define featL1ena 24
+#define featSMP 25
+#define featAltivec 26
+#define wasNapping 27
+#define featFP 28
+#define specAccess 29
 
 #define        VECTOR_SEGMENT  .section __VECTORS, __interrupts
 
 EXT(ExceptionVectorsStart):                                                    /* Used if relocating the exception vectors */
 baseR:                                                                                         /* Used so we have more readable code */
 
-;
-;                      Handle system reset.
-;                      We do not ever expect a hard reset so we do not actually check.
-;                      When we come here, we check for a RESET_HANDLER_START (which means we are
-;                      waking up from sleep), a RESET_HANDLER_BUPOR (which is using for bring up
-;                      when starting directly from a POR), and RESET_HANDLER_IGNORE (which means
-;                      ignore the interrupt).
-;
-;                      Some machines (so far, 32-bit guys) will always ignore a non-START interrupt.
-;                      The ones who do take it, check if the interrupt is too be ignored.  This is 
-;                      always the case until the previous reset is handled (i.e., we have exited
-;                      from the debugger).
-;
+/* 
+ * System reset - call debugger
+ */
                        . = 0xf0
                        .globl  EXT(ResetHandler)
 EXT(ResetHandler):
@@ -92,46 +117,8 @@ EXT(ResetHandler):
                        mtlr    r4
                        blr
 
-resetexc:      cmplwi  r13,RESET_HANDLER_BUPOR                         ; Special bring up POR sequence?
-                       bne             resetexc2                                               ; No...
-                       lis             r4,hi16(EXT(resetPOR))                  ; Get POR code
-                       ori             r4,r4,lo16(EXT(resetPOR))               ; The rest
-                       mtlr    r4                                                              ; Set it
-                       blr                                                                             ; Jump to it....
-
-resetexc2:     cmplwi  cr1,r13,RESET_HANDLER_IGNORE    ; Are we ignoring these? (Software debounce)
-
-                       mfsprg  r13,0                                                   ; Get per_proc
-                       lwz             r13,pfAvailable(r13)                    ; Get the features
-                       rlwinm. r13,r13,0,pf64Bitb,pf64Bitb             ; Is this a 64-bit machine?
-                       cror    cr1_eq,cr0_eq,cr1_eq                    ; See if we want to take this
-                       bne--   cr1,rxCont                                              ; Yes, continue...
-                       bne--   rxIg64                                                  ; 64-bit path...
-
-                       mtcr    r11                                                             ; Restore the CR
-                       mfsprg  r13,2                                                   ; Restore R13
-                       mfsprg  r11,0                                                   ; Get per_proc
-                       lwz             r11,pfAvailable(r11)                    ; Get the features
-                       mtsprg  2,r11                                                   ; Restore sprg2
-                       mfsprg  r11,3                                                   ; Restore R11
-                       rfi                                                                             ; Return and ignore the reset
-
-rxIg64:                mtcr    r11                                                             ; Restore the CR
-                       mfsprg  r11,0                                                   ; Get per_proc
-                       mtspr   hsprg0,r14                                              ; Save a register
-                       lwz             r14,UAW(r11)                                    ; Get the User Assist Word
-                       mfsprg  r13,2                                                   ; Restore R13
-                       lwz             r11,pfAvailable(r11)                    ; Get the features
-                       mtsprg  2,r11                                                   ; Restore sprg2
-                       mfsprg  r11,3                                                   ; Restore R11
-                       mtsprg  3,r14                                                   ; Set the UAW in sprg3
-                       mfspr   r14,hsprg0                                              ; Restore R14
-                       rfid                                                                    ; Return and ignore the reset
-
-rxCont:                mtcr    r11
-                       li              r11,RESET_HANDLER_IGNORE                ; Get set to ignore
-                       stw             r11,lo16(EXT(ResetHandler)-EXT(ExceptionVectorsStart)+RESETHANDLER_TYPE)(br0)   ; Start ignoring these
-                       mfsprg  r13,1                                                   /* Get the exception save area */
+resetexc:
+                       mtcr    r11
                        li              r11,T_RESET                                             /* Set 'rupt code */
                        b               .L_exception_entry                              /* Join common... */
 
@@ -141,81 +128,10 @@ rxCont:           mtcr    r11
 
                        . = 0x200
 .L_handler200:
-                       mtsprg  2,r13                                                   ; Save R13 
-                       mtsprg  3,r11                                                   ; Save R11
-
-                       .globl  EXT(extPatchMCK)
-LEXT(extPatchMCK)                                                                      ; This is patched to a nop for 64-bit 
-                       b               h200aaa                                                 ; Skip 64-bit code... 
-
-;
-;                      Fall through here for 970 MCKs.
-;
-
-                       li              r11,1                                                   ; ?
-                       sldi    r11,r11,32+3                                    ; ?
-                       mfspr   r13,hid4                                                ; ?
-                       or              r11,r11,r13                                             ; ?
-                       sync
-                       mtspr   hid4,r11                                                ; ?
-                       isync
-                       li              r11,1                                                   ; ?
-                       sldi    r11,r11,32+8                                    ; ?
-                       andc    r13,r13,r11                                             ; ?
-                       lis             r11,0xE000                                              ; Get the unlikeliest ESID possible
-                       sync
-                       mtspr   hid4,r13                                                ; ?
-                       isync                                                                   ; ?
-                       
-                       srdi    r11,r11,1                                               ; ?
-                       slbie   r11                                                             ; ?
-                       sync
-                       isync
-               
-                       li              r11,T_MACHINE_CHECK                             ; Set rupt code
-                       b               .L_exception_entry                              ; Join common...
-
-;
-;                      Preliminary checking of other MCKs
-;
-
-h200aaa:       mfsrr1  r11                                                             ; Get the SRR1
-                       mfcr    r13                                                             ; Save the CR
-                       
-                       rlwinm. r11,r11,0,dcmck,dcmck                   ; ?
-                       beq+    notDCache                                               ; ?
-                       
-                       sync
-                       mfspr   r11,msscr0                                              ; ?
-                       dssall                                                                  ; ?
-                       sync
-                       isync
-
-                       oris    r11,r11,hi16(dl1hwfm)                   ; ?
-                       mtspr   msscr0,r11                                              ; ?
-                       
-rstbsy:                mfspr   r11,msscr0                                              ; ?
-                       
-                       rlwinm. r11,r11,0,dl1hwf,dl1hwf                 ; ?
-                       bne             rstbsy                                                  ; ?
-                       
-                       sync                                                                    ; ?
-
-                       mfsprg  r11,0                                                   ; Get the per_proc
-                       mtcrf   255,r13                                                 ; Restore CRs
-                       lwz             r13,hwMachineChecks(r11)                ; Get old count
-                       addi    r13,r13,1                                               ; Count this one
-                       stw             r13,hwMachineChecks(r11)                ; Set new count
-                       lwz             r11,pfAvailable(r11)                    ; Get the feature flags
-                       mfsprg  r13,2                                                   ; Restore R13
-                       mtsprg  2,r11                                                   ; Set the feature flags
-                       mfsprg  r11,3                                                   ; Restore R11
-                       rfi                                                                             ; Return
-
-notDCache:     mtcrf   255,r13                                                 ; Restore CRs
-                       li              r11,T_MACHINE_CHECK                             ; Set rupt code
-                       b               .L_exception_entry                              ; Join common...
-
+                       mtsprg  2,r13                                                   /* Save R13 */
+                       mtsprg  3,r11                                                   /* Save R11 */
+                       li              r11,T_MACHINE_CHECK                             /* Set 'rupt code */
+                       b               .L_exception_entry                              /* Join common... */
 
 /*
  *                     Data access - page fault, invalid memory rights for operation
@@ -228,39 +144,16 @@ notDCache:        mtcrf   255,r13                                                 ; Restore CRs
                        li              r11,T_DATA_ACCESS                               /* Set 'rupt code */
                        b               .L_exception_entry                              /* Join common... */
 
-
-/*
- *                     Data segment
- */
-
-                       . = 0x380
-.L_handler380:
-                       mtsprg  2,r13                                                   ; Save R13
-                       mtsprg  3,r11                                                   ; Save R11
-                       li              r11,T_DATA_SEGMENT                              ; Set rupt code
-                       b               .L_exception_entry                              ; Join common...
-
 /*
  *                     Instruction access - as for data access
  */
 
                        . = 0x400
 .L_handler400:
-                       mtsprg  2,r13                                                   ; Save R13
-                       mtsprg  3,r11                                                   ; Save R11
-                       li              r11,T_INSTRUCTION_ACCESS                ; Set rupt code
-                       b               .L_exception_entry                              ; Join common...
-
-/*
- *                     Instruction segment
- */
-
-                       . = 0x480
-.L_handler480:
-                       mtsprg  2,r13                                                   ; Save R13 
-                       mtsprg  3,r11                                                   ; Save R11 
-                       li              r11,T_INSTRUCTION_SEGMENT               ; Set rupt code
-                       b               .L_exception_entry                              ; Join common... 
+                       mtsprg  2,r13                                                   /* Save R13 */
+                       mtsprg  3,r11                                                   /* Save R11 */
+                       li              r11,T_INSTRUCTION_ACCESS                /* Set 'rupt code */
+                       b               .L_exception_entry                              /* Join common... */
 
 /*
  *                     External interrupt
@@ -268,10 +161,10 @@ notDCache:        mtcrf   255,r13                                                 ; Restore CRs
 
                        . = 0x500
 .L_handler500:
-                       mtsprg  2,r13                                                   ; Save R13 
-                       mtsprg  3,r11                                                   ; Save R11
-                       li              r11,T_INTERRUPT                                 ; Set rupt code
-                       b               .L_exception_entry                              ; Join common...
+                       mtsprg  2,r13                                                   /* Save R13 */
+                       mtsprg  3,r11                                                   /* Save R11 */
+                       li              r11,T_INTERRUPT                                 /* Set 'rupt code */
+                       b               .L_exception_entry                              /* Join common... */
 
 /*
  *                     Alignment - many reasons
@@ -292,19 +185,6 @@ notDCache: mtcrf   255,r13                                                 ; Restore CRs
 .L_handler700:
                        mtsprg  2,r13                                                   /* Save R13 */
                        mtsprg  3,r11                                                   /* Save R11 */
-                       
-#if 0
-                       mfsrr1  r13                                                             ; (BRINGUP)
-                       mfcr    r11                                                             ; (BRINGUP)
-                       rlwinm. r13,r13,0,12,12                                 ; (BRINGUP)     
-                       crmove  cr1_eq,cr0_eq                                   ; (BRINGUP)
-                       mfsrr1  r13                                                             ; (BRINGUP)
-                       rlwinm. r13,r13,0,MSR_PR_BIT,MSR_PR_BIT ; (BRINGUP)     
-                       crorc   cr0_eq,cr1_eq,cr0_eq                    ; (BRINGUP)
-                       bf--    cr0_eq,.                                                ; (BRINGUP)
-                       mtcrf   255,r11                                                 ; (BRINGUP)
-#endif
-               
                        li              r11,T_PROGRAM|T_FAM                             /* Set 'rupt code */
                        b               .L_exception_entry                              /* Join common... */
 
@@ -353,6 +233,29 @@ notDCache: mtcrf   255,r13                                                 ; Restore CRs
                        li              r11,T_RESERVED                                  /* Set 'rupt code */
                        b               .L_exception_entry                              /* Join common... */
 
+#if 0
+hackxxxx1:
+                       stmw    r29,4(br0)
+                       lwz             r29,0(br0)
+                       mr.             r29,r29
+                       bne+    xxxx1
+                       lis             r29,0x4000
+
+xxxx1:                 
+                       stw             r0,0(r29)
+                       mfsrr0  r30
+                       stw             r30,4(r29)
+                       mtlr    r30
+                       stw             r30,8(r29)
+
+                       addi    r29,r29,12
+                       stw             r29,0(br0)
+
+                       lmw             r29,4(br0)
+                       b               hackxxxx2
+#endif                 
+
+
 ;
 ;                      System call - generated by the sc instruction
 ;
@@ -362,7 +265,7 @@ notDCache:  mtcrf   255,r13                                                 ; Restore CRs
 ;                              0xFFFFFFFE - BlueBox only - kcNKIsPreemptiveTaskEnv
 ;                              0x00007FF2 - User state only - thread info
 ;                              0x00007FF3 - User state only - floating point / vector facility status
-;                              0x00007FF4 - Kernel only - loadMSR - not used on 64-bit machines
+;                              0x00007FF4 - Kernel only - loadMSR
 ;
 ;                      Note: none handled if virtual machine is running
 ;                                Also, it we treat SCs as kernel SCs if the RI bit is set
@@ -370,108 +273,80 @@ notDCache:       mtcrf   255,r13                                                 ; Restore CRs
 
                        . = 0xC00
 .L_handlerC00:
-                       mtsprg  3,r11                                                   ; Save R11
-                       mfsprg  r11,2                                                   ; Get the feature flags
-
                        mtsprg  2,r13                                                   ; Save R13
-                       rlwinm  r11,r11,pf64Bitb-4,4,4                  ; Get the 64-bit flag
                        mfsrr1  r13                                                             ; Get SRR1 for loadMSR
-                       rlwimi  r11,r13,MSR_PR_BIT-5,5,5                ; Move the PR bit to bit 1
-                       mfcr    r13                                                             ; Save the CR
+                       mtsprg  3,r11                                                   ; Save R11
+                       rlwimi  r13,r13,MSR_PR_BIT,0,0                  ; Move PR bit to non-volatile CR0 bit 0
+                       mfcr    r11                                                             ; Save the CR
+                       mtcrf   0x81,r13                                                ; Get the moved PR and the RI for testing
+                       crnot   0,0                                                             ; Get !PR
+                       cror    0,0,MSR_RI_BIT                                  ; See if we have !PR or RI
+                       mfsprg  r13,0                                                   ; Get the per_proc_area
+                       bt-             0,uftInKern                                             ; We are in the kernel...
+                       
+                       lwz             r13,spcFlags(r13)                               ; Get the special flags
+                       rlwimi  r13,r13,runningVMbit+1,31,31    ; Move VM flag after the 3 blue box flags
+                       mtcrf   1,r13                                                   ; Set BB and VMM flags in CR7
+                       bt-             31,ufpVM                                                ; fast paths running VM ...
+                       cmplwi  cr5,r0,0x7FF2                                   ; Ultra fast path cthread info call?
+                       cmpwi   cr6,r0,0x7FF3                                   ; Ultra fast path facility status?
+                       cror    cr1_eq,cr5_lt,cr6_gt                    ; Set true if not 0x7FF2 and not 0x7FF3 and not negative
+                       bt-             cr1_eq,notufp                                   ; Exit if we can not be ultra fast...
+                       
+                       not.    r0,r0                                                   ; Flip bits and kind of subtract 1                      
+
+                       cmplwi  cr1,r0,1                                                ; Is this a bb fast path?
+                       not             r0,r0                                                   ; Restore to entry state                        
+                       bf-             bbNoMachSCbit,ufpUSuft                  ; We are not running BlueBox...
+                       bgt             cr1,notufp                                              ; This can not be a bb ufp...
+#if 0
+                       b               hackxxxx1
+hackxxxx2:
+#endif                 
                        
-                       mtcrf   0x40,r11                                                ; Get the top 3 CR bits to 64-bit, PR, sign
+                       rlwimi  r11,r13,bbPreemptivebit-cr0_eq,cr0_eq,cr0_eq    ; Copy preemptive task flag into user cr0_eq
+                       mfsprg  r13,0                                                   ; Get back pre_proc
                        
-                       cmpwi   r0,lo16(-3)                                             ; Eliminate all negatives but -1 and -2
-                       mfsprg  r11,0                                                   ; Get the per_proc
-                       bf--    5,uftInKern                                             ; We came from the kernel...            
-                       ble--   notufp                                                  ; This is a mach call                   
-
-                       lwz             r11,spcFlags(r11)                               ; Pick up the special flags
-
-                       cmpwi   cr7,r0,lo16(-1)                                 ; Is this a BlueBox call?
-                       cmplwi  cr2,r0,0x7FF2                                   ; Ultra fast path cthread info call?
-                       cmplwi  cr3,r0,0x7FF3                                   ; Ultra fast path facility status?
-                       cror    cr4_eq,cr2_eq,cr3_eq                    ; Is this one of the two ufts we handle here?
                        
-                       ble--   cr7,uftBBCall                                   ; We think this is blue box call...
-
-                       rlwinm  r11,r11,16,16,31                                ; Extract spcFlags upper bits
-                       andi.   r11,r11,hi16(runningVM|FamVMena|FamVMmode)
-                       cmpwi   cr0,r11,hi16(runningVM|FamVMena|FamVMmode)      ; Test in VM FAM
-                       beq--   cr0,ufpVM                                               ; fast paths running VM ...
+                       bne             cr1,ufpIsBBpre                                  ; This is the "isPreemptiveTask" call...
                        
-                       bne--   cr4_eq,notufp                                   ; Bail ifthis is not a uft...
+                       lwz             r0,ppbbTaskEnv(r13)                             ; Get the shadowed taskEnv from per_proc_area
 
+ufpIsBBpre:    
+                       mtcrf   0xFF,r11                                                ; Restore CR
+                       mfsprg  r11,3                                                   ; Restore R11
+                       mfsprg  r13,2                                                   ; Restore R13
+                       rfi                                                                             ; All done, go back...
+                       
 ;
-;                      Handle normal user ultra-fast trap
+;                      Normal fast path...
 ;
-
-                       li              r3,spcFlags                                             ; Assume facility status - 0x7FF3
-
-                       beq--   cr3,uftFacStat                                  ; This is a facilities status call...
        
-                       li              r3,UAW                                                  ; This is really a thread info call - 0x7FF2            
-                       
-uftFacStat:    mfsprg  r11,0                                                   ; Get the per_proc
-                       lwzx    r3,r11,r3                                               ; Get the UAW or spcFlags field
-                       
-uftExit:       bt++    4,uftX64                                                ; Go do the 64-bit exit...
-                       
-                       lwz             r11,pfAvailable(r11)                    ; Get the feature flags
-                       mtcrf   255,r13                                                 ; Restore the CRs
-                       mfsprg  r13,2                                                   ; Restore R13
-                       mtsprg  2,r11                                                   ; Set the feature flags
+ufpUSuft:      bge+    notufp                                                  ; Bail if negative...  (ARRRGGG -- BRANCH TO A BRANCH!!!!!)
                        mfsprg  r11,3                                                   ; Restore R11
-
-                       rfi                                                                             ; Back to our guy...
-                       
-uftX64:                mtspr   hsprg0,r14                                              ; Save a register
-                       
-                       lwz             r14,UAW(r11)                                    ; Get the User Assist Word
-                       lwz             r11,pfAvailable(r11)                    ; Get the feature flags
-                       
-                       mtcrf   255,r13                                                 ; Restore the CRs
-                       
+                       mfsprg  r3,0                                                    ; Get the per_proc_area
                        mfsprg  r13,2                                                   ; Restore R13
-                       mtsprg  2,r11                                                   ; Set the feature flags
-                       mfsprg  r11,3                                                   ; Restore R11
-                       mtsprg  3,r14                                                   ; Set the UAW in sprg3
-                       mfspr   r14,hsprg0                                              ; Restore R14
-
-                       rfid                                                                    ; Back to our guy...
-                       
+                       bne-    cr5,isvecfp                                             ; This is the facility stat call
+                       lwz             r3,UAW(r3)                                              ; Get the assist word
+                       rfi                                                                             ; All done, scream back... (no need to restore CR or R11, they are volatile)
 ;
-;                      Handle BlueBox ultra-fast trap
-;                      
-
-uftBBCall:     andi.   r11,r11,bbNoMachSC|bbPreemptive ; Clear what we do not need
-                       cmplwi  r11,bbNoMachSC                                  ; See if we are trapping syscalls
-                       blt--   notufp                                                  ; No...
-                       
-                       rlwimi  r13,r11,bbPreemptivebit-cr0_eq,cr0_eq,cr0_eq    ; Copy preemptive task flag into user cr0_eq
-
-                       mfsprg  r11,0                                                   ; Get the per proc
+isvecfp:       lwz             r3,spcFlags(r3)                                 ; Get the facility status
+                       rfi                                                                             ; Bail back...
+;
+notufp:                mtcrf   0xFF,r11                                                ; Restore the used CRs
+                       li              r11,T_SYSTEM_CALL|T_FAM                 ; Set interrupt code
+                       b               .L_exception_entry                              ; Join common...
                        
-                       beq++   cr7,uftExit                                             ; For MKIsPreemptiveTask we are done...
-
-                       lwz             r0,ppbbTaskEnv(r11)                             ; Get the shadowed taskEnv from per_proc_area
-                       b               uftExit                                                 ; We are really all done now...
-
-;                      Kernel ultra-fast trap
-
 uftInKern:     cmplwi  r0,0x7FF4                                               ; Ultra fast path loadMSR?
                        bne-    notufp                                                  ; Someone is trying to cheat...
-
-                       mtsrr1  r3                                                              ; Set new MSR
-                       
-                       b               uftExit                                                 ; Go load the new MSR...
-                       
-notufp:                mtcrf   0xFF,r13                                                ; Restore the used CRs
-                       li              r11,T_SYSTEM_CALL|T_FAM                 ; Set interrupt code
-                       b               .L_exception_entry                              ; Join common...
-
-
                        
+                       mtcrf   0xFF,r11                                                ; Restore CR
+                       lwz             r11,pfAvailable(r13)                    ; Pick up the feature flags
+                       mtsrr1  r3                                                              ; Set new MSR
+                       mfsprg  r13,2                                                   ; Restore R13
+                       mtsprg  2,r11                                                   ; Set the feature flags into sprg2
+                       mfsprg  r11,3                                                   ; Restore R11
+                       rfi                                                                             ; Blast back
                        
 
 /*
@@ -492,73 +367,55 @@ notufp:           mtcrf   0xFF,r13                                                ; Restore the used CRs
 
                        . = 0xD00
 .L_handlerD00:
-                       mtsprg  3,r11                                                   ; Save R11
-                       mfsprg  r11,2                                                   ; Get the feature flags
                        mtsprg  2,r13                                                   ; Save R13
-                       rlwinm  r11,r11,pf64Bitb-4,4,4                  ; Get the 64-bit flag
-                       mfcr    r13                                                             ; Get the CR
-                       mtcrf   0x40,r11                                                ; Set the CR
-                       mfsrr1  r11                                                             ; Get the old MSR
-                       rlwinm. r11,r11,0,MSR_PR_BIT,MSR_PR_BIT ; Are we in supervisor state?
-                       
-                       mfsprg  r11,0                                                   ; Get the per_proc
-                       lhz             r11,PP_CPU_FLAGS(r11)                   ; Get the flags
-                       crmove  cr1_eq,cr0_eq                                   ; Remember if we are in supervisor state
-                       rlwinm. r11,r11,0,traceBEb+16,traceBEb+16       ; Special trace enabled?
-                       cror    cr0_eq,cr0_eq,cr1_eq                    ; Is trace off or supervisor state?
-                       bf--    cr0_eq,specbrtr                                 ; No, we need to trace...
-
-notspectr:     mtcr    r13                                                             ; Restore CR
+                       mtsprg  3,r11                                                   ; Save R11
+                       mfsrr1  r13                                                             ; Get the old MSR
+                       mfcr    r11                                                             ; Get the CR
+                       rlwinm. r13,r13,0,MSR_PR_BIT,MSR_PR_BIT ; Are we in supervisor state?
+                       beq-    notspectr                                               ; Yes, not special trace...
+                       mfsprg  r13,0                                                   ; Get the per_proc area
+                       lhz             r13,PP_CPU_FLAGS(r13)                   ; Get the flags
+                       rlwinm. r13,r13,0,traceBEb+16,traceBEb+16       ; Special trace enabled?
+                       bne+    specbrtr                                                ; Yeah...
+
+notspectr:     mtcr    r11                                                             ; Restore CR
                        li              r11,T_TRACE|T_FAM                               ; Set interrupt code
                        b               .L_exception_entry                              ; Join common...
 
-                       .align  5
-
 ;
 ;                      We are doing the special branch trace
 ;
 
-specbrtr:      mfsprg  r11,0                                                   ; Get the per_proc area
-                       bt++    4,sbxx64a                                               ; Jump if 64-bit...
-                       
-                       stw             r1,tempr0+4(r11)                                ; Save in a scratch area
-                       stw             r2,tempr1+4(r11)                                ; Save in a scratch area
-                       stw             r3,tempr2+4(r11)                                ; Save in a scratch area
-                       b               sbxx64b                                                 ; Skip...
-                       
-sbxx64a:       std             r1,tempr0(r11)                                  ; Save in a scratch area
-                       std             r2,tempr1(r11)                                  ; Save in a scratch area
-                       std             r3,tempr2(r11)                                  ; Save in a scratch area
-                       
-sbxx64b:       lis             r2,hi16(EXT(pc_trace_buf))              ; Get the top of the buffer
-                       lwz             r3,spcTRp(r11)                                  ; Pick up buffer position                       
+specbrtr:      mfsprg  r13,0                                                   ; Get the per_proc area
+                       stw             r1,emfp0(r13)                                   ; Save in a scratch area
+                       stw             r2,emfp0+4(r13)                                 ; Save in a scratch area
+                       stw             r3,emfp0+8(r13)                                 ; Save in a scratch area
+
+                       lis             r2,hi16(EXT(pc_trace_buf))              ; Get the top of the buffer
+                       lwz             r3,spcTRp(r13)                                  ; Pick up buffer position                       
+                       mr.             r1,r1                                                   ; Is it time to count?
                        ori             r2,r2,lo16(EXT(pc_trace_buf))   ; Get the bottom of the buffer
-                       cmplwi  cr2,r3,4092                                             ; Set cr1_eq if we should take exception                        
+                       cmplwi  cr1,r3,4092                                             ; Set cr1_eq if we should take exception                        
                        mfsrr0  r1                                                              ; Get the pc
                        stwx    r1,r2,r3                                                ; Save it in the buffer
                        addi    r3,r3,4                                                 ; Point to the next slot
                        rlwinm  r3,r3,0,20,31                                   ; Wrap the slot at one page
-                       stw             r3,spcTRp(r11)                                  ; Save the new slot
-
-                       bt++    4,sbxx64c                                               ; Jump if 64-bit...
-
-                       lwz             r1,tempr0+4(r11)                                ; Restore work register
-                       lwz             r2,tempr1+4(r11)                                ; Restore work register
-                       lwz             r3,tempr2+4(r11)                                ; Restore work register
-                       beq             cr2,notspectr                                   ; Buffer filled, make a rupt...
-                       b               uftExit                                                 ; Go restore and leave...
-
-sbxx64c:       ld              r1,tempr0(r11)                                  ; Restore work register
-                       ld              r2,tempr1(r11)                                  ; Restore work register
-                       ld              r3,tempr2(r11)                                  ; Restore work register
-                       beq             cr2,notspectr                                   ; Buffer filled, make a rupt...
-                       b               uftExit                                                 ; Go restore and leave...
+                       stw             r3,spcTRp(r13)                                  ; Save the new slot
+                       lwz             r1,emfp0(r13)                                   ; Restore work register
+                       lwz             r2,emfp0+4(r13)                                 ; Restore work register
+                       lwz             r3,emfp0+8(r13)                                 ; Restore work register
+                       beq             cr1,notspectr                                   ; Buffer filled, make a rupt...
+                       
+                       mtcr    r11                                                             ; Restore the CR
+                       mfsprg  r13,2                                                   ; Restore R13
+                       mfsprg  r11,3                                                   ; Restore R11
+                       rfi                                                                             ; Bail back...
 
 /*
  *                     Floating point assist
  */
 
-                       . = 0xE00
+                       . = 0xe00
 .L_handlerE00:
                        mtsprg  2,r13                                                   /* Save R13 */
                        mtsprg  3,r11                                                   /* Save R11 */
@@ -591,43 +448,329 @@ VMXhandler:
 
        
 
-;
-;                      Instruction translation miss exception - not supported
-;
+/*
+ * Instruction translation miss - we inline this code.
+ * Upon entry (done for us by the machine):
+ *     srr0 :   addr of instruction that missed
+ *     srr1 :   bits 0-3   = saved CR0
+ *                    4     = lru way bit
+ *                    16-31 = saved msr
+ *     msr[tgpr] = 1  (so gpr0-3 become our temporary variables)
+ *     imiss:   ea that missed
+ *     icmp :   the compare value for the va that missed
+ *     hash1:   pointer to first hash pteg
+ *     hash2:   pointer to 2nd hash pteg
+ *
+ * Register usage:
+ *     tmp0:    saved counter
+ *     tmp1:    junk
+ *     tmp2:    pointer to pteg
+ *     tmp3:    current compare value
+ *
+ * This code is taken from the 603e User's Manual with
+ * some bugfixes and minor improvements to save bytes and cycles
+ *
+ *     NOTE: Do not touch sprg2 in here
+ */
 
-                       . = 0x1000
+       . = 0x1000
 .L_handler1000:
-                       mtsprg  2,r13                                                   ; Save R13
-                       mtsprg  3,r11                                                   ; Save R11
-                       li              r11,T_INVALID_EXCP0                             ; Set rupt code
-                       b               .L_exception_entry                              ; Join common...
-
+       mfspr   tmp2,   hash1
+       mfctr   tmp0                            /* use tmp0 to save ctr */
+       mfspr   tmp3,   icmp
+
+.L_imiss_find_pte_in_pteg:
+       li      tmp1,   8                       /* count */
+       subi    tmp2,   tmp2,   8               /* offset for lwzu */
+       mtctr   tmp1                            /* count... */
        
+.L_imiss_pteg_loop:
+       lwz     tmp1,   8(tmp2)                 /* check pte0 for match... */
+       addi    tmp2,   tmp2,   8
+       cmpw    cr0,    tmp1,   tmp3
+#if 0  
+       bdnzf+  cr0,    .L_imiss_pteg_loop
+#else  
+       bc      0,2,    .L_imiss_pteg_loop
+#endif 
+       beq+    cr0,    .L_imiss_found_pte
+
+       /* Not found in PTEG, we must scan 2nd then give up */
+
+       andi.   tmp1,   tmp3,   MASK(PTE0_HASH_ID)
+       bne-    .L_imiss_do_no_hash_exception           /* give up */
+
+       mfspr   tmp2,   hash2
+       ori     tmp3,   tmp3,   MASK(PTE0_HASH_ID)
+       b       .L_imiss_find_pte_in_pteg
+
+.L_imiss_found_pte:
+
+       lwz     tmp1,   4(tmp2)                         /* get pte1_t */
+       andi.   tmp3,   tmp1,   MASK(PTE1_WIMG_GUARD)   /* Fault? */
+       bne-    .L_imiss_do_prot_exception              /* Guarded - illegal */
+
+       /* Ok, we've found what we need to, restore and rfi! */
+
+       mtctr   tmp0                                    /* restore ctr */
+       mfsrr1  tmp3
+       mfspr   tmp0,   imiss
+       mtcrf   0x80,   tmp3                            /* Restore CR0 */
+       mtspr   rpa,    tmp1                            /* set the pte */
+       ori     tmp1,   tmp1,   MASK(PTE1_REFERENCED)   /* set referenced */
+       tlbli   tmp0
+       sth     tmp1,   6(tmp2)
+       rfi
+       
+.L_imiss_do_prot_exception:
+       /* set up srr1 to indicate protection exception... */
+       mfsrr1  tmp3
+       andi.   tmp2,   tmp3,   0xffff
+       addis   tmp2,   tmp2,   MASK(SRR1_TRANS_PROT) >> 16
+       b       .L_imiss_do_exception
+       
+.L_imiss_do_no_hash_exception:
+       /* clean up registers for protection exception... */
+       mfsrr1  tmp3
+       andi.   tmp2,   tmp3,   0xffff
+       addis   tmp2,   tmp2,   MASK(SRR1_TRANS_HASH) >> 16
+       
+       /* And the entry into the usual instruction fault handler ... */
+.L_imiss_do_exception:
+
+       mtctr   tmp0                                    /* Restore ctr */
+       mtsrr1  tmp2                                    /* Set up srr1 */
+       mfmsr   tmp0                                    
+       xoris   tmp0,   tmp0,   MASK(MSR_TGPR)>>16      /* no TGPR */
+       mtcrf   0x80,   tmp3                            /* Restore CR0 */
+       mtmsr   tmp0                                    /* reset MSR[TGPR] */
+       b       .L_handler400                           /* Instr Access */
+       
+/*
+ * Data load translation miss
+ *
+ * Upon entry (done for us by the machine):
+ *     srr0 :   addr of instruction that missed
+ *     srr1 :   bits 0-3   = saved CR0
+ *                    4     = lru way bit
+ *                    5     = 1 if store
+ *                    16-31 = saved msr
+ *     msr[tgpr] = 1  (so gpr0-3 become our temporary variables)
+ *     dmiss:   ea that missed
+ *     dcmp :   the compare value for the va that missed
+ *     hash1:   pointer to first hash pteg
+ *     hash2:   pointer to 2nd hash pteg
+ *
+ * Register usage:
+ *     tmp0:    saved counter
+ *     tmp1:    junk
+ *     tmp2:    pointer to pteg
+ *     tmp3:    current compare value
+ *
+ * This code is taken from the 603e User's Manual with
+ * some bugfixes and minor improvements to save bytes and cycles
+ *
+ *     NOTE: Do not touch sprg2 in here
+ */
 
-;
-;                      Data load translation miss exception - not supported
-;
-
-                       . = 0x1100
+       . = 0x1100
 .L_handler1100:
-                       mtsprg  2,r13                                                   ; Save R13
-                       mtsprg  3,r11                                                   ; Save R11
-                       li              r11,T_INVALID_EXCP1                             ; Set rupt code
-                       b               .L_exception_entry                              ; Join common...
-
+       mfspr   tmp2,   hash1
+       mfctr   tmp0                            /* use tmp0 to save ctr */
+       mfspr   tmp3,   dcmp
+
+.L_dlmiss_find_pte_in_pteg:
+       li      tmp1,   8                       /* count */
+       subi    tmp2,   tmp2,   8               /* offset for lwzu */
+       mtctr   tmp1                            /* count... */
        
+.L_dlmiss_pteg_loop:
+       lwz     tmp1,   8(tmp2)                 /* check pte0 for match... */
+       addi    tmp2,   tmp2,   8
+       cmpw    cr0,    tmp1,   tmp3
+#if 0 /* How to write this correctly? */       
+       bdnzf+  cr0,    .L_dlmiss_pteg_loop
+#else  
+       bc      0,2,    .L_dlmiss_pteg_loop
+#endif 
+       beq+    cr0,    .L_dmiss_found_pte
+
+       /* Not found in PTEG, we must scan 2nd then give up */
+
+       andi.   tmp1,   tmp3,   MASK(PTE0_HASH_ID)      /* already at 2nd? */
+       bne-    .L_dmiss_do_no_hash_exception           /* give up */
+
+       mfspr   tmp2,   hash2
+       ori     tmp3,   tmp3,   MASK(PTE0_HASH_ID)
+       b       .L_dlmiss_find_pte_in_pteg
+
+.L_dmiss_found_pte:
+
+       lwz     tmp1,   4(tmp2)                         /* get pte1_t */
+
+       /* Ok, we've found what we need to, restore and rfi! */
+
+       mtctr   tmp0                                    /* restore ctr */
+       mfsrr1  tmp3
+       mfspr   tmp0,   dmiss
+       mtcrf   0x80,   tmp3                            /* Restore CR0 */
+       mtspr   rpa,    tmp1                            /* set the pte */
+       ori     tmp1,   tmp1,   MASK(PTE1_REFERENCED)   /* set referenced */
+       tlbld   tmp0                                    /* load up tlb */
+       sth     tmp1,   6(tmp2)                         /* sth is faster? */
+       rfi
+       
+       /* This code is shared with data store translation miss */
+       
+.L_dmiss_do_no_hash_exception:
+       /* clean up registers for protection exception... */
+       mfsrr1  tmp3
+       /* prepare to set DSISR_WRITE_BIT correctly from srr1 info */
+       rlwinm  tmp1,   tmp3,   9,      6,      6
+       addis   tmp1,   tmp1,   MASK(DSISR_HASH) >> 16
+
+       /* And the entry into the usual data fault handler ... */
+
+       mtctr   tmp0                                    /* Restore ctr */
+       andi.   tmp2,   tmp3,   0xffff                  /* Clean up srr1 */
+       mtsrr1  tmp2                                    /* Set srr1 */
+       mtdsisr tmp1
+       mfspr   tmp2,   dmiss
+       mtdar   tmp2
+       mfmsr   tmp0
+       xoris   tmp0,   tmp0,   MASK(MSR_TGPR)>>16      /* no TGPR */
+       mtcrf   0x80,   tmp3                            /* Restore CR0 */
+       sync                                            /* Needed on some */
+       mtmsr   tmp0                                    /* reset MSR[TGPR] */
+       b       .L_handler300                           /* Data Access */
+       
+/*
+ * Data store translation miss (similar to data load)
+ *
+ * Upon entry (done for us by the machine):
+ *     srr0 :   addr of instruction that missed
+ *     srr1 :   bits 0-3   = saved CR0
+ *                    4     = lru way bit
+ *                    5     = 1 if store
+ *                    16-31 = saved msr
+ *     msr[tgpr] = 1  (so gpr0-3 become our temporary variables)
+ *     dmiss:   ea that missed
+ *     dcmp :   the compare value for the va that missed
+ *     hash1:   pointer to first hash pteg
+ *     hash2:   pointer to 2nd hash pteg
+ *
+ * Register usage:
+ *     tmp0:    saved counter
+ *     tmp1:    junk
+ *     tmp2:    pointer to pteg
+ *     tmp3:    current compare value
+ *
+ * This code is taken from the 603e User's Manual with
+ * some bugfixes and minor improvements to save bytes and cycles
+ *
+ *     NOTE: Do not touch sprg2 in here
+ */
 
-;
-;                      Data store translation miss exception - not supported
-;
-
-                       . = 0x1200
+       . = 0x1200
 .L_handler1200:
-                       mtsprg  2,r13                                                   ; Save R13
-                       mtsprg  3,r11                                                   ; Save R11
-                       li              r11,T_INVALID_EXCP2                             ; Set rupt code
-                       b               .L_exception_entry                              ; Join common...
-
+       mfspr   tmp2,   hash1
+       mfctr   tmp0                            /* use tmp0 to save ctr */
+       mfspr   tmp3,   dcmp
+
+.L_dsmiss_find_pte_in_pteg:
+       li      tmp1,   8                       /* count */
+       subi    tmp2,   tmp2,   8               /* offset for lwzu */
+       mtctr   tmp1                            /* count... */
+       
+.L_dsmiss_pteg_loop:
+       lwz     tmp1,   8(tmp2)                 /* check pte0 for match... */
+       addi    tmp2,   tmp2,   8
+
+               cmpw    cr0,    tmp1,   tmp3
+#if 0 /* I don't know how to write this properly */    
+       bdnzf+  cr0,    .L_dsmiss_pteg_loop
+#else  
+       bc      0,2,    .L_dsmiss_pteg_loop
+#endif 
+       beq+    cr0,    .L_dsmiss_found_pte
+
+       /* Not found in PTEG, we must scan 2nd then give up */
+
+       andi.   tmp1,   tmp3,   MASK(PTE0_HASH_ID)      /* already at 2nd? */
+       bne-    .L_dmiss_do_no_hash_exception           /* give up */
+
+       mfspr   tmp2,   hash2
+       ori     tmp3,   tmp3,   MASK(PTE0_HASH_ID)
+       b       .L_dsmiss_find_pte_in_pteg
+
+.L_dsmiss_found_pte:
+
+       lwz     tmp1,   4(tmp2)                         /* get pte1_t */
+       andi.   tmp3,   tmp1,   MASK(PTE1_CHANGED)      /* unchanged, check? */
+       beq-    .L_dsmiss_check_prot                    /* yes, check prot */
+
+.L_dsmiss_resolved:
+       /* Ok, we've found what we need to, restore and rfi! */
+
+       mtctr   tmp0                                    /* restore ctr */
+       mfsrr1  tmp3
+       mfspr   tmp0,   dmiss
+       mtcrf   0x80,   tmp3                            /* Restore CR0 */
+       mtspr   rpa,    tmp1                            /* set the pte */
+       tlbld   tmp0                                    /* load up tlb */
+       rfi
+       
+.L_dsmiss_check_prot:
+       /* PTE is unchanged, we must check that we can write */
+       rlwinm. tmp3,   tmp1,   30,     0,      1       /* check PP[1] */
+       bge-    .L_dsmiss_check_prot_user_kern
+       andi.   tmp3,   tmp1,   1                       /* check PP[0] */
+       beq+    .L_dsmiss_check_prot_ok
+       
+.L_dmiss_do_prot_exception:
+       /* clean up registers for protection exception... */
+       mfsrr1  tmp3
+       /* prepare to set DSISR_WRITE_BIT correctly from srr1 info */
+       rlwinm  tmp1,   tmp3,   9,      6,      6
+       addis   tmp1,   tmp1,   MASK(DSISR_PROT) >> 16
+
+       /* And the entry into the usual data fault handler ... */
+
+       mtctr   tmp0                                    /* Restore ctr */
+       andi.   tmp2,   tmp3,   0xffff                  /* Clean up srr1 */
+       mtsrr1  tmp2                                    /* Set srr1 */
+       mtdsisr tmp1
+       mfspr   tmp2,   dmiss
+       mtdar   tmp2
+       mfmsr   tmp0
+       xoris   tmp0,   tmp0,   MASK(MSR_TGPR)>>16      /* no TGPR */
+       mtcrf   0x80,   tmp3                            /* Restore CR0 */
+       sync                                            /* Needed on some */
+       mtmsr   tmp0                                    /* reset MSR[TGPR] */
+       b       .L_handler300                           /* Data Access */
+       
+/* NB - if we knew we were on a 603e we could test just the MSR_KEY bit */
+.L_dsmiss_check_prot_user_kern:
+       mfsrr1  tmp3
+       andi.   tmp3,   tmp3,   MASK(MSR_PR)
+       beq+    .L_dsmiss_check_prot_kern
+       mfspr   tmp3,   dmiss                           /* check user privs */
+       mfsrin  tmp3,   tmp3                            /* get excepting SR */
+       andis.  tmp3,   tmp3,   0x2000                  /* Test SR ku bit */
+       beq+    .L_dsmiss_check_prot_ok
+       b       .L_dmiss_do_prot_exception
+
+.L_dsmiss_check_prot_kern:
+       mfspr   tmp3,   dmiss                           /* check kern privs */
+       mfsrin  tmp3,   tmp3
+       andis.  tmp3,   tmp3,   0x4000                  /* Test SR Ks bit */
+       bne-    .L_dmiss_do_prot_exception
+
+.L_dsmiss_check_prot_ok:
+       /* Ok, mark as referenced and changed before resolving the fault */
+       ori     tmp1,   tmp1,   (MASK(PTE1_REFERENCED)|MASK(PTE1_CHANGED))
+       sth     tmp1,   6(tmp2)
+       b       .L_dsmiss_resolved
        
 /*
  *                     Instruction address breakpoint
@@ -651,20 +794,8 @@ VMXhandler:
                        li              r11,T_SYSTEM_MANAGEMENT                 /* Set 'rupt code */
                        b               .L_exception_entry                              /* Join common... */
 
-
-/*
- *                     Soft Patch
- */
-
-                       . = 0x1500
-.L_handler1500:
-                       mtsprg  2,r13                                                   /* Save R13 */
-                       mtsprg  3,r11                                                   /* Save R11 */
-                       li              r11,T_SOFT_PATCH                                /* Set 'rupt code */
-                       b               .L_exception_entry                              /* Join common... */
-
 ;
-;                      Altivec Java Mode Assist interrupt or Maintenace interrupt
+;                      Altivec Java Mode Assist interrupt
 ;
 
                        . = 0x1600
@@ -675,7 +806,7 @@ VMXhandler:
                        b               .L_exception_entry                              /* Join common... */
 
 ;
-;                      Altivec Java Mode Assist interrupt or Thermal interruption 
+;                      Thermal interruption
 ;
 
                        . = 0x1700
@@ -685,44 +816,35 @@ VMXhandler:
                        li              r11,T_THERMAL                                   /* Set 'rupt code */
                        b               .L_exception_entry                              /* Join common... */
 
-;
-;                      Thermal interruption - 64-bit
-;
-
-                       . = 0x1800
-.L_handler1800:
-                       mtsprg  2,r13                                                   /* Save R13 */
-                       mtsprg  3,r11                                                   /* Save R11 */
-                       li              r11,T_ARCHDEP0                                  /* Set 'rupt code */
-                       b               .L_exception_entry                              /* Join common... */
-
 /*
  * There is now a large gap of reserved traps
  */
 
 /*
- *                     Instrumentation interruption
+ *                     Run mode/ trace exception - single stepping on 601 processors
  */
 
                        . = 0x2000
 .L_handler2000:
                        mtsprg  2,r13                                                   /* Save R13 */
                        mtsprg  3,r11                                                   /* Save R11 */
-                       li              r11,T_INSTRUMENTATION                   /* Set 'rupt code */
+                       li              r11,T_RUNMODE_TRACE                             /* Set 'rupt code */
                        b               .L_exception_entry                              /* Join common... */
 
-                       . = 0x2100
 
 /*
  *     Filter Ultra Fast Path syscalls for VMM
  */
 ufpVM:
-                       cmpwi   cr2,r0,0x6004                                   ; Is it vmm_dispatch
-                       bne             cr2,notufp                                              ; Exit If not
+                       cmpwi   cr6,r0,0x6004                                   ; Is it vmm_dispatch
+                       bne             cr6,notufp                                              ; Exit If not
                        cmpwi   cr5,r3,kvmmResumeGuest                  ; Compare r3 with kvmmResumeGuest
-                       cmpwi   cr2,r3,kvmmSetGuestRegister             ; Compare r3 with kvmmSetGuestRegister
-                       cror    cr1_eq,cr5_lt,cr2_gt                    ; Set true if out of VMM Fast syscall range
+                       cmpwi   cr6,r3,kvmmSetGuestRegister             ; Compare r3 with kvmmSetGuestRegister
+                       cror    cr1_eq,cr5_lt,cr6_gt                    ; Set true if out of VMM Fast syscall range
                        bt-             cr1_eq,notufp                                   ; Exit if out of range
+                       rlwinm  r13,r13,1+FamVMmodebit,30,31    ; Extract FamVMenabit and FamVMmodebit
+                       cmpwi   cr0,r13,3                                               ; Are FamVMena and FamVMmode set
+                       bne+    notufp                                                  ; Exit if not in FAM
                        b               EXT(vmm_ufp)                                    ; Ultra Fast Path syscall
 
 /*
@@ -759,28 +881,20 @@ EXT(exception_entry):
  *     Note that if we are attempting to sleep (as opposed to nap or doze) all interruptions
  *     are ignored.
  */
+                       mfsprg  r13,0                                                   /* Load per_proc */     
+                       lwz             r13,next_savearea(r13)                  /* Get the exception save area */
 
-
-                       .globl  EXT(extPatch32)                                         
-                       
-
-LEXT(extPatch32)
-                       b               extEntry64                                              ; Go do 64-bit (patched out for 32-bit)
-                       mfsprg  r13,0                                                   ; Load per_proc
-                       lwz             r13,next_savearea+4(r13)                ; Get the exception save area
-                       stw             r0,saver0+4(r13)                                ; Save register 0
-                       stw             r1,saver1+4(r13)                                ; Save register 1
-
+                       stw             r1,saver1(r13)                                  ; Save register 1
+                       stw             r0,saver0(r13)                                  ; Save register 0
+                       dcbtst  0,r13                                                   ; We will need this in a bit
                        mfspr   r1,hid0                                                 ; Get HID0
-                       mfcr    r0                                                              ; Save the whole CR
-                       
-                       mtcrf   0x20,r1                                                 ; Get set to test for sleep
-                       cror    doze,doze,nap                                   ; Remember if we are napping
+                       mfcr    r0                                                              ; Save the CR
+                       mtcrf   255,r1                                                  ; Get set to test for cache and sleep
                        bf              sleep,notsleep                                  ; Skip if we are not trying to sleep
                        
-                       mtcrf   0x20,r0                                                 ; Restore the CR
-                       lwz             r0,saver0+4(r13)                                ; Restore R0
-                       lwz             r1,saver1+4(r13)                                ; Restore R1
+                       mtcrf   255,r0                                                  ; Restore the CR
+                       lwz             r0,saver0(r13)                                  ; Restore R0
+                       lwz             r1,saver1(r13)                                  ; Restore R1
                        mfsprg  r13,0                                                   ; Get the per_proc 
                        lwz             r11,pfAvailable(r13)                    ; Get back the feature flags
                        mfsprg  r13,2                                                   ; Restore R13
@@ -796,42 +910,26 @@ LEXT(extPatch32)
                        .long   0
                        .long   0
                        
-
-;
-;                      This is the 32-bit context saving stuff
-;
-
                        .align  5
                                                
-notsleep:      stw             r2,saver2+4(r13)                                ; Save this one
-                       bf              doze,notspdo                                    ; Skip the next if we are not napping/dozing...
+notsleep:      stw             r2,saver2(r13)                                  ; Save this one
+                       crmove  featL1ena,dce                                   ; Copy the cache enable bit
                        rlwinm  r2,r1,0,nap+1,doze-1                    ; Clear any possible nap and doze bits
                        mtspr   hid0,r2                                                 ; Clear the nap/doze bits
-notspdo:
-
-#if INSTRUMENT
-                       mfspr   r2,pmc1                                                 ; INSTRUMENT - saveinstr[0] - Take earliest possible stamp
-                       stw             r2,0x6100+(0x00*16)+0x0(0)              ; INSTRUMENT - Save it
-                       mfspr   r2,pmc2                                                 ; INSTRUMENT - Get stamp
-                       stw             r2,0x6100+(0x00*16)+0x4(0)              ; INSTRUMENT - Save it
-                       mfspr   r2,pmc3                                                 ; INSTRUMENT - Get stamp
-                       stw             r2,0x6100+(0x00*16)+0x8(0)              ; INSTRUMENT - Save it
-                       mfspr   r2,pmc4                                                 ; INSTRUMENT - Get stamp
-                       stw             r2,0x6100+(0x00*16)+0xC(0)              ; INSTRUMENT - Save it
-#endif                 
-
-                       la              r1,saver4(r13)                                  ; Point to the next line in case we need it
-                       crmove  wasNapping,doze                                 ; Remember if we were napping
+                       cmplw   r2,r1                                                   ; See if we were napping
+                       la              r1,saver8(r13)                                  ; Point to the next line in case we need it
+                       crnot   wasNapping,cr0_eq                               ; Remember if we were napping
                        mfsprg  r2,0                                                    ; Get the per_proc area
-                       dcbz    0,r1                                                    ; allocate r4-r7 32-byte line in cache
+                       bf-             featL1ena,skipz1                                ; L1 cache is disabled...
+                       dcbz    0,r1                                                    ; Reserve our line in cache
                        
 ;
 ;                      Remember, we are setting up CR6 with feature flags
 ;
-                       andi.   r1,r11,T_FAM                                    ; Check FAM bit
-       
-                       stw             r3,saver3+4(r13)                                        ; Save this one
-                       stw             r4,saver4+4(r13)                                        ; Save this one
+skipz1:                
+                       andi.   r1,r11,T_FAM                                    ; Check FAM bit 
+                       stw             r3,saver3(r13)                                  ; Save this one
+                       stw             r4,saver4(r13)                                  ; Save this one
                        andc    r11,r11,r1                                              ; Clear FAM bit
                        beq+    noFAM                                                   ; Is it FAM intercept
                        mfsrr1  r3                                                              ; Load srr1
@@ -847,42 +945,37 @@ notspdo:
                        srw             r1,r3,r1                                                ; Set bit for current exception
                        and.    r1,r1,r4                                                ; And current exception with the intercept mask
                        beq+    noFAM                                                   ; Is it FAM intercept
-                       b               EXT(vmm_fam_exc)
+                       b               EXT(vmm_fam_handler)
 noFAM:
                        lwz             r1,pfAvailable(r2)                              ; Get the CPU features flags                    
-                       la              r3,saver8(r13)                                  ; Point to line with r8-r11
-                       mtcrf   0xE2,r1                                                 ; Put the features flags (that we care about) in the CR
-                       dcbz    0,r3                                                    ; allocate r8-r11 32-byte line in cache
-            la         r3,saver12(r13)                                 ; point to r12-r15 line
-                       lis             r4,hi16(MASK(MSR_VEC)|MASK(MSR_FP)|MASK(MSR_ME))        ; Set up the MSR we will use throughout. Note that ME come on here if MCK
-                       stw             r6,saver6+4(r13)                                ; Save this one
-                       ori             r4,r4,lo16(MASK(MSR_VEC)|MASK(MSR_FP)|MASK(MSR_ME))     ; Rest of MSR
-                       stw             r8,saver8+4(r13)                                ; Save this one
+                       la              r3,savesrr0(r13)                                ; Point to the last line
+                       mtcrf   0xE0,r1                                                 ; Put the features flags (that we care about) in the CR
+                       stw             r6,saver6(r13)                                  ; Save this one
+                       crmove  featSMP,pfSMPcapb                               ; See if we have a PIR
+                       stw             r8,saver8(r13)                                  ; Save this one
                        crmove  featAltivec,pfAltivecb                  ; Set the Altivec flag
-                       mtmsr   r4                                                              ; Set MSR
-                       isync
                        mfsrr0  r6                                                              ; Get the interruption SRR0 
-            la         r8,savesrr0(r13)                                ; point to line with SRR0, SRR1, CR, XER, and LR
-                       dcbz    0,r3                                                    ; allocate r12-r15 32-byte line in cache
-            la         r3,saver16(r13)                                 ; point to next line
-                       dcbz    0,r8                                                    ; allocate 32-byte line with SRR0, SRR1, CR, XER, and LR
-                       stw             r7,saver7+4(r13)                                ; Save this one
+                       stw             r8,saver8(r13)                                  ; Save this one
+                       bf-             featL1ena,skipz1a                               ; L1 cache is disabled...
+                       dcbz    0,r3                                                    ; Reserve our line in cache
+skipz1a:       crmove  featFP,pfFloatb                                 ; Remember that we have floating point
+                       stw             r7,saver7(r13)                                  ; Save this one
                        lhz             r8,PP_CPU_FLAGS(r2)                             ; Get the flags
                        mfsrr1  r7                                                              ; Get the interrupt SRR1
                        rlwinm  r8,r8,(((31-MSR_BE_BIT)+(traceBEb+16+1))&31),MSR_BE_BIT,MSR_BE_BIT      ; Set BE bit if special trace is on
-                       stw             r6,savesrr0+4(r13)                              ; Save the SRR0 
+                       stw             r6,savesrr0(r13)                                ; Save the SRR0 
                        rlwinm  r6,r7,(((31-MSR_BE_BIT)+(MSR_PR_BIT+1))&31),MSR_BE_BIT,MSR_BE_BIT       ; Move PR bit to BE bit
-                       stw             r5,saver5+4(r13)                                ; Save this one 
+                       stw             r5,saver5(r13)                                  ; Save this one 
                        and             r8,r6,r8                                                ; Remove BE bit only if problem state and special tracing on
                        mfsprg  r6,2                                                    ; Get interrupt time R13
                        mtsprg  2,r1                                                    ; Set the feature flags
                        andc    r7,r7,r8                                                ; Clear BE bit if special trace is on and PR is set
                        mfsprg  r8,3                                                    ; Get rupt time R11
-                       stw             r7,savesrr1+4(r13)                              ; Save SRR1 
-                       stw             r8,saver11+4(r13)                               ; Save rupt time R11
-                       stw             r6,saver13+4(r13)                               ; Save rupt R13
-                       dcbz    0,r3                                                    ; allocate 32-byte line with r16-r19
-            la         r3,saver20(r13)                                 ; point to next line
+                       stw             r7,savesrr1(r13)                                ; Save SRR1 
+                       rlwinm. r7,r7,MSR_RI_BIT,MSR_RI_BIT             ; Is this a special case access fault?
+                       stw             r6,saver13(r13)                                 ; Save rupt R1
+                       crnot   specAccess,cr0_eq                               ; Set that we are doing a special access if RI is set
+                       stw             r8,saver11(r13)                                 ; Save rupt time R11
 
 getTB:         mftbu   r6                                                              ; Get the upper timebase
                        mftb    r7                                                              ; Get the lower timebase
@@ -890,26 +983,18 @@ getTB:            mftbu   r6                                                              ; Get the upper timebase
                        cmplw   r6,r8                                                   ; Did the top tick?
                        bne-    getTB                                                   ; Yeah, need to get it again...
 
-#if INSTRUMENT
-                       mfspr   r6,pmc1                                                 ; INSTRUMENT - saveinstr[1] - Save halfway context save stamp
-                       stw             r6,0x6100+(0x01*16)+0x0(0)              ; INSTRUMENT - Save it
-                       mfspr   r6,pmc2                                                 ; INSTRUMENT - Get stamp
-                       stw             r6,0x6100+(0x01*16)+0x4(0)              ; INSTRUMENT - Save it
-                       mfspr   r6,pmc3                                                 ; INSTRUMENT - Get stamp
-                       stw             r6,0x6100+(0x01*16)+0x8(0)              ; INSTRUMENT - Save it
-                       mfspr   r6,pmc4                                                 ; INSTRUMENT - Get stamp
-                       stw             r6,0x6100+(0x01*16)+0xC(0)              ; INSTRUMENT - Save it
-#endif                 
-
                        stw             r8,ruptStamp(r2)                                ; Save the top of time stamp
                        stw             r8,SAVtime(r13)                                 ; Save the top of time stamp
+                       la              r6,saver16(r13)                                 ; Point to the next cache line
                        stw             r7,ruptStamp+4(r2)                              ; Save the bottom of time stamp
                        stw             r7,SAVtime+4(r13)                               ; Save the bottom of time stamp
 
-                       dcbz    0,r3                                                    ; allocate 32-byte line with r20-r23
-                       stw             r9,saver9+4(r13)                                ; Save this one
+                       bf-             featL1ena,skipz2                                ; L1 cache is disabled...
+                       dcbz    0,r6                                                    ; Allocate in cache 
+skipz2:                        
+                       stw             r9,saver9(r13)                                  ; Save this one
 
-                       stw             r10,saver10+4(r13)                              ; Save this one
+                       stw             r10,saver10(r13)                                ; Save this one
                        mflr    r4                                                              ; Get the LR
                        mfxer   r10                                                             ; Get the XER
                        
@@ -927,492 +1012,175 @@ getTB:         mftbu   r6                                                              ; Get the upper timebase
                        adde    r8,r8,r5                                                ; Add high and carry to total
                        stw             r6,napTotal+4(r2)                               ; Save the low total
                        stw             r8,napTotal(r2)                                 ; Save the high total
-                       stw             r3,savesrr0+4(r13)                              ; Modify to return to nap/doze exit
+                       stw             r3,savesrr0(r13)                                ; Modify to return to nap/doze exit
                        
-                       rlwinm. r3,r1,0,pfSlowNapb,pfSlowNapb   ; Should HID1 be restored?
+                       rlwinm.         r3,r1,0,pfSlowNapb,pfSlowNapb                   ; Should HID1 be restored?
                        beq             notInSlowNap
 
                        lwz             r3,pfHID1(r2)                                   ; Get saved HID1 value
-                       mtspr   hid1,r3                                                 ; Restore HID1
+                       mtspr           hid1, r3                                        ; Restore HID1
 
 notInSlowNap:
-                       rlwinm. r3,r1,0,pfNoL2PFNapb,pfNoL2PFNapb       ; Should MSSCR0 be restored?
+                       rlwinm.         r3,r1,0,pfNoL2PFNapb,pfNoL2PFNapb               ; Should MSSCR0 be restored?
                        beq             notNapping
 
                        lwz             r3,pfMSSCR0(r2)                                 ; Get saved MSSCR0 value
-                       mtspr   msscr0,r3                                               ; Restore MSSCR0
+                       mtspr           msscr0, r3                                      ; Restore MSSCR0
                        sync
                        isync
 
-notNapping:    stw             r12,saver12+4(r13)                              ; Save this one
+notNapping:    stw             r12,saver12(r13)                                ; Save this one
                                                
-                       stw             r14,saver14+4(r13)                              ; Save this one
-                       stw             r15,saver15+4(r13)                              ; Save this one 
+                       stw             r14,saver14(r13)                                ; Save this one
+                       stw             r15,saver15(r13)                                ; Save this one 
                        la              r14,saver24(r13)                                ; Point to the next block to save into
+                       stw             r0,savecr(r13)                                  ; Save rupt CR
                        mfctr   r6                                                              ; Get the CTR 
-                       stw             r16,saver16+4(r13)                              ; Save this one
-            la         r15,savectr(r13)                                ; point to line with CTR, DAR, DSISR, Exception code, and VRSAVE
-                       stw             r4,savelr+4(r13)                                ; Save rupt LR
+                       stw             r16,saver16(r13)                                ; Save this one
+                       stw             r4,savelr(r13)                                  ; Save rupt LR
                
-                       dcbz    0,r14                                                   ; allocate 32-byte line with r24-r27
-            la         r16,saver28(r13)                                ; point to line with r28-r31
-                       dcbz    0,r15                                                   ; allocate line with CTR, DAR, DSISR, Exception code, and VRSAVE
-                       stw             r17,saver17+4(r13)                              ; Save this one
-                       stw             r18,saver18+4(r13)                              ; Save this one 
-                       stw             r6,savectr+4(r13)                               ; Save rupt CTR
-                       stw             r0,savecr(r13)                                  ; Save rupt CR
-                       stw             r19,saver19+4(r13)                              ; Save this one
+                       bf-             featL1ena,skipz4                                ; L1 cache is disabled...
+                       dcbz    0,r14                                                   ; Allocate next save area line
+skipz4:                        
+                       stw             r17,saver17(r13)                                ; Save this one
+                       stw             r18,saver18(r13)                                ; Save this one 
+                       stw             r6,savectr(r13)                                 ; Save rupt CTR
+                       stw             r19,saver19(r13)                                ; Save this one
+                       lis             r12,hi16(KERNEL_SEG_REG0_VALUE) ; Get the high half of the kernel SR0 value
                        mfdar   r6                                                              ; Get the rupt DAR
-                       stw             r20,saver20+4(r13)                              ; Save this one 
-                       dcbz    0,r16                                                   ; allocate 32-byte line with r28-r31
-
-                       stw             r21,saver21+4(r13)                              ; Save this one
-                       lwz             r21,spcFlags(r2)                                ; Get the special flags from per_proc
-                       stw             r10,savexer+4(r13)                              ; Save the rupt XER
-                       stw             r30,saver30+4(r13)                              ; Save this one 
-                       lhz             r30,pfrptdProc(r2)                              ; Get the reported processor type
-                       stw             r31,saver31+4(r13)                              ; Save this one 
-                       stw             r22,saver22+4(r13)                              ; Save this one 
-                       stw             r23,saver23+4(r13)                              ; Save this one 
-                       stw             r24,saver24+4(r13)                              ; Save this one 
-                       stw             r25,saver25+4(r13)                              ; Save this one 
+                       stw             r20,saver20(r13)                                ; Save this one 
+                       
+                       bf+             specAccess,noSRsave                             ; Do not save SRs if this is not a special access...
+                       mfsr    r14,sr0                                                 ; Get SR0
+                       stw             r14,savesr0(r13)                                ; and save
+                       mfsr    r14,sr1                                                 ; Get SR1
+                       stw             r14,savesr1(r13)                                ; and save
+                       mfsr    r14,sr2                                                 ; get SR2
+                       stw             r14,savesr2(r13)                                ; and save
+                       mfsr    r14,sr3                                                 ; get SR3
+                       stw             r14,savesr3(r13)                                ; and save
+
+noSRsave:      mtsr    sr0,r12                                                 ; Set the kernel SR0 
+                       stw             r21,saver21(r13)                                ; Save this one
+                       addis   r12,r12,0x0010                                  ; Point to the second segment of kernel
+                       stw             r10,savexer(r13)                                ; Save the rupt XER
+                       mtsr    sr1,r12                                                 ; Set the kernel SR1 
+                       stw             r30,saver30(r13)                                ; Save this one 
+                       addis   r12,r12,0x0010                                  ; Point to the third segment of kernel
+                       stw             r31,saver31(r13)                                ; Save this one 
+                       mtsr    sr2,r12                                                 ; Set the kernel SR2 
+                       stw             r22,saver22(r13)                                ; Save this one 
+                       addis   r12,r12,0x0010                                  ; Point to the third segment of kernel
+                       stw             r23,saver23(r13)                                ; Save this one 
+                       mtsr    sr3,r12                                                 ; Set the kernel SR3 
+                       stw             r24,saver24(r13)                                ; Save this one 
+                       stw             r25,saver25(r13)                                ; Save this one 
                        mfdsisr r7                                                              ; Get the rupt DSISR 
-                       stw             r26,saver26+4(r13)                              ; Save this one         
-                       stw             r27,saver27+4(r13)                              ; Save this one 
-                       andis.  r21,r21,hi16(perfMonitor)               ; Is the performance monitor enabled?
-                       stw             r28,saver28+4(r13)                              ; Save this one
-                       cmpwi   cr1, r30,CPU_SUBTYPE_POWERPC_750        ; G3?
-            la         r27,savevscr(r13)                               ; point to 32-byte line with VSCR and FPSCR
-                       cmpwi   cr2,r30,CPU_SUBTYPE_POWERPC_7400        ; This guy?
-                       stw             r29,saver29+4(r13)                              ; Save R29
-                       stw             r6,savedar+4(r13)                               ; Save the rupt DAR 
-                       li              r10,savepmc                                             ; Point to pmc savearea
-
-                       beq+    noPerfMonSave32                                 ; No perfmon on here...
-
-                       dcbz    r10,r13                                                 ; Clear first part of pmc area
-                       li              r10,savepmc+0x20                                ; Point to pmc savearea second part
-                       li              r22,0                                                   ; r22:  zero
-                       dcbz    r10,r13                                                 ; Clear second part of pmc area
-               
-                       beq             cr1,perfMonSave32_750                   ; This is a G3...
-
-                       beq             cr2,perfMonSave32_7400                  ; Regular olde G4...
-
-                       mfspr   r24,pmc5                                                ; Here for a 7450
-                       mfspr   r25,pmc6
-                       stw             r24,savepmc+16(r13)                             ; Save PMC5
-                       stw             r25,savepmc+20(r13)                             ; Save PMC6
-                       mtspr   pmc5,r22                                                ; Leave PMC5 clear
-                       mtspr   pmc6,r22                                                ; Leave PMC6 clear
-
-perfMonSave32_7400:            
-                       mfspr   r25,mmcr2
-                       stw             r25,savemmcr2+4(r13)                    ; Save MMCR2
-                       mtspr   mmcr2,r22                                               ; Leave MMCR2 clear
-
-perfMonSave32_750:             
-                       mfspr   r23,mmcr0
-                       mfspr   r24,mmcr1
-                       stw             r23,savemmcr0+4(r13)                    ; Save MMCR0
-                       stw             r24,savemmcr1+4(r13)                    ; Save MMCR1 
-                       mtspr   mmcr0,r22                                               ; Leave MMCR0 clear
-                       mtspr   mmcr1,r22                                               ; Leave MMCR1 clear
-                       mfspr   r23,pmc1
-                       mfspr   r24,pmc2
-                       mfspr   r25,pmc3
-                       mfspr   r26,pmc4
-                       stw             r23,savepmc+0(r13)                              ; Save PMC1
-                       stw             r24,savepmc+4(r13)                              ; Save PMC2
-                       stw             r25,savepmc+8(r13)                              ; Save PMC3
-                       stw             r26,savepmc+12(r13)                             ; Save PMC4
-                       mtspr   pmc1,r22                                                ; Leave PMC1 clear 
-                       mtspr   pmc2,r22                                                ; Leave PMC2 clear
-                       mtspr   pmc3,r22                                                ; Leave PMC3 clear              
-                       mtspr   pmc4,r22                                                ; Leave PMC4 clear
-
-noPerfMonSave32:               
-                       dcbz    0,r27                                                   ; allocate line with VSCR and FPSCR 
-                       
-                       stw             r7,savedsisr(r13)                               ; Save the rupt code DSISR
+                       stw             r26,saver26(r13)                                ; Save this one         
+                       stw             r27,saver27(r13)                                ; Save this one 
+                       li              r10,emfp0                                               ; Point to floating point save
+                       stw             r28,saver28(r13)                                ; Save this one
+                       stw             r29,saver29(r13)                                ; Save this one 
+                       mfsr    r14,sr14                                                ; Get the copyin/out segment register
+                       stw             r6,savedar(r13)                                 ; Save the rupt DAR 
+                       bf-             featL1ena,skipz5a                               ; Do not do this if no L1...
+                       dcbz    r10,r2                                                  ; Clear and allocate an L1 slot
+                       
+skipz5a:       stw             r7,savedsisr(r13)                               ; Save the rupt code DSISR
                        stw             r11,saveexception(r13)                  ; Save the exception code 
+                       stw             r14,savesr14(r13)                               ; Save copyin/copyout
 
 
 ;
-;                      Everything is saved at this point, except for FPRs, and VMX registers.
-;                      Time for us to get a new savearea and then trace interrupt if it is enabled.
+;                      Here we will save some floating point and vector status
+;                      and we also set a clean default status for a new interrupt level.
+;                      Note that we assume that emfp0 is on an altivec boundary
+;                      and that R10 points to it (as a displacemnt from R2).
 ;
 
-                       lwz             r25,traceMask(0)                                ; Get the trace mask
-                       li              r0,SAVgeneral                                   ; Get the savearea type value
-                       lhz             r19,PP_CPU_NUMBER(r2)                   ; Get the logical processor number                                                                                      
-                       rlwinm  r22,r11,30,0,31                                 ; Divide interrupt code by 2
-                       stb             r0,SAVflags+2(r13)                              ; Mark valid context
-                       addi    r22,r22,10                                              ; Adjust code so we shift into CR5
-                       li              r23,trcWork                                             ; Get the trace work area address
-                       rlwnm   r7,r25,r22,22,22                                ; Set CR5_EQ bit position to 0 if tracing allowed 
-                       li              r26,0x8                                                 ; Get start of cpu mask
-                       srw             r26,r26,r19                                             ; Get bit position of cpu number
-                       mtcrf   0x04,r7                                                 ; Set CR5 to show trace or not
-                       and.    r26,r26,r25                                             ; See if we trace this cpu
-                       crandc  cr5_eq,cr5_eq,cr0_eq                    ; Turn off tracing if cpu is disabled
-;
-;                      At this point, we can take another exception and lose nothing.
-;
-
-#if INSTRUMENT
-                       mfspr   r26,pmc1                                                ; INSTRUMENT - saveinstr[2] - Take stamp after save is done
-                       stw             r26,0x6100+(0x02*16)+0x0(0)             ; INSTRUMENT - Save it
-                       mfspr   r26,pmc2                                                ; INSTRUMENT - Get stamp
-                       stw             r26,0x6100+(0x02*16)+0x4(0)             ; INSTRUMENT - Save it
-                       mfspr   r26,pmc3                                                ; INSTRUMENT - Get stamp
-                       stw             r26,0x6100+(0x02*16)+0x8(0)             ; INSTRUMENT - Save it
-                       mfspr   r26,pmc4                                                ; INSTRUMENT - Get stamp
-                       stw             r26,0x6100+(0x02*16)+0xC(0)             ; INSTRUMENT - Save it
-#endif                 
-
-                       bne+    cr5,xcp32xit                                    ; Skip all of this if no tracing here...
-
-;
-;                      We select a trace entry using a compare and swap on the next entry field.
-;                      Since we do not lock the actual trace buffer, there is a potential that
-;                      another processor could wrap an trash our entry.  Who cares?
-;
-
-                       lwz             r25,traceStart(0)                               ; Get the start of trace table
-                       lwz             r26,traceEnd(0)                                 ; Get end of trace table
-       
-trcsel:                lwarx   r20,0,r23                                               ; Get and reserve the next slot to allocate
-                       
-                       addi    r22,r20,LTR_size                                ; Point to the next trace entry
-                       cmplw   r22,r26                                                 ; Do we need to wrap the trace table?
-                       bne+    gotTrcEnt                                               ; No wrap, we got us a trace entry...
-                       
-                       mr              r22,r25                                                 ; Wrap back to start
-
-gotTrcEnt:     stwcx.  r22,0,r23                                               ; Try to update the current pointer
-                       bne-    trcsel                                                  ; Collision, try again...
-                       
-#if ESPDEBUG
-                       dcbf    0,r23                                                   ; Force to memory
-                       sync
-#endif
-                       
-                       dcbz    0,r20                                                   ; Clear and allocate first trace line
-
-;
-;                      Let us cut that trace entry now.
-;
-
-                       lwz             r16,ruptStamp(r2)                               ; Get top of time base
-                       lwz             r17,ruptStamp+4(r2)                             ; Get the bottom of time stamp
-
-                       li              r14,32                                                  ; Offset to second line
-
-                       lwz             r0,saver0+4(r13)                                ; Get back interrupt time R0
-                       lwz             r1,saver1+4(r13)                                ; Get back interrupt time R1
-                       lwz             r8,savecr(r13)                                  ; Get the CR value
-                       
-                       dcbz    r14,r20                                                 ; Zap the second line
-                       
-                       sth             r19,LTR_cpu(r20)                                ; Stash the cpu number
-                       li              r14,64                                                  ; Offset to third line
-                       sth             r11,LTR_excpt(r20)                              ; Save the exception type 
-                       lwz             r7,saver2+4(r13)                                ; Get back interrupt time R2
-                       lwz             r3,saver3+4(r13)                                ; Restore this one
-               
-                       dcbz    r14,r20                                                 ; Zap the third half
-                       
-                       mfdsisr r9                                                              ; Get the DSISR
-                       li              r14,96                                                  ; Offset to forth line
-                       stw             r16,LTR_timeHi(r20)                             ; Set the upper part of TB 
-                       stw             r17,LTR_timeLo(r20)                             ; Set the lower part of TB
-                       lwz             r10,savelr+4(r13)                               ; Get the LR
-                       mfsrr0  r17                                                             ; Get SRR0 back, it is still good
+                       lis             r8,hi16(MASK(MSR_VEC))                  ; Get the vector enable bit
+                       mfmsr   r6                                                              ; Get the current MSR value
+                       ori             r8,r8,lo16(MASK(MSR_FP))                ; Add in the float enable
+                       li              r19,0                                                   ; Assume no Altivec
+                       or              r7,r6,r8                                                ; Enable floating point
+                       li              r9,0                                                    ; Get set to clear VRSAVE
+                       mtmsr   r7                                                              ; Do it
+                       isync
                        
-                       dcbz    r14,r20                                                 ; Zap the forth half
-                       lwz             r4,saver4+4(r13)                                ; Restore this one
-                       lwz             r5,saver5+4(r13)                                ; Restore this one
-                       mfsrr1  r18                                                             ; SRR1 is still good in here
+                       bf              featAltivec,noavec                              ; No Altivec on this CPU...
+                       addi    r14,r10,16                                              ; Displacement to second vector register
+                       stvxl   v0,r10,r2                                               ; Save a register
+                       stvxl   v1,r14,r2                                               ; Save a second register
+                       mfvscr  v0                                                              ; Get the vector status register
+                       la              r28,savevscr(r13)                               ; Point to the status area
+                       vspltish v1,1                                                   ; Turn on the non-Java bit and saturate
+                       stvxl   v0,0,r28                                                ; Save the vector status
+                       vspltisw v0,1                                                   ; Turn on the saturate bit
+                       mfspr   r19,vrsave                                              ; Get the VRSAVE register
+                       vxor    v1,v1,v0                                                ; Turn off saturate     
+                       mtspr   vrsave,r9                                               ; Clear VRSAVE for each interrupt level
+                       mtvscr  v1                                                              ; Set the non-java, no saturate status for new level
 
-                       stw             r8,LTR_cr(r20)                                  ; Save the CR
-                       lwz             r6,saver6+4(r13)                                ; Get R6
-                       mfdar   r16                                                             ; Get this back
-                       stw             r9,LTR_dsisr(r20)                               ; Save the DSISR
-                       stw             r17,LTR_srr0+4(r20)                             ; Save the SSR0 
-                       
-                       stw             r18,LTR_srr1+4(r20)                             ; Save the SRR1 
-                       stw             r16,LTR_dar+4(r20)                              ; Save the DAR
-                       mfctr   r17                                                             ; Get the CTR (still good in register)
-                       stw             r13,LTR_save+4(r20)                             ; Save the savearea 
-                       stw             r10,LTR_lr+4(r20)                               ; Save the LR
-                       
-                       stw             r17,LTR_ctr+4(r20)                              ; Save off the CTR
-                       stw             r0,LTR_r0+4(r20)                                ; Save off register 0                   
-                       stw             r1,LTR_r1+4(r20)                                ; Save off register 1                   
-                       stw             r7,LTR_r2+4(r20)                                ; Save off register 2   
-                                       
-               
-                       stw             r3,LTR_r3+4(r20)                                ; Save off register 3
-                       stw             r4,LTR_r4+4(r20)                                ; Save off register 4 
-                       stw             r5,LTR_r5+4(r20)                                ; Save off register 5   
-                       stw             r6,LTR_r6+4(r20)                                ; Save off register 6   
+                       lvxl    v0,r10,r2                                               ; Restore first work register
+                       lvxl    v1,r14,r2                                               ; Restore second work register
 
-#if ESPDEBUG
-                       addi    r17,r20,32                                              ; Second line
-                       addi    r16,r20,64                                              ; Third line
-                       dcbst   br0,r20                                                 ; Force to memory
-                       dcbst   br0,r17                                                 ; Force to memory
-                       addi    r17,r17,32                                              ; Fourth line
-                       dcbst   br0,r16                                                 ; Force to memory
-                       dcbst   br0,r17                                                 ; Force to memory
-                       
-                       sync                                                                    ; Make sure it all goes
-#endif
-xcp32xit:      mr              r14,r11                                                 ; Save the interrupt code across the call
-                       bl              EXT(save_get_phys_32)                   ; Grab a savearea
-                       mfsprg  r2,0                                                    ; Get the per_proc info
-                       li              r10,emfp0                                               ; Point to floating point save
-                       mr              r11,r14                                                 ; Get the exception code back
-                       dcbz    r10,r2                                                  ; Clear for speed
-                       stw             r3,next_savearea+4(r2)                  ; Store the savearea for the next rupt
-
-#if INSTRUMENT
-                       mfspr   r4,pmc1                                                 ; INSTRUMENT - saveinstr[3] - Take stamp after next savearea
-                       stw             r4,0x6100+(0x03*16)+0x0(0)              ; INSTRUMENT - Save it
-                       mfspr   r4,pmc2                                                 ; INSTRUMENT - Get stamp
-                       stw             r4,0x6100+(0x03*16)+0x4(0)              ; INSTRUMENT - Save it
-                       mfspr   r4,pmc3                                                 ; INSTRUMENT - Get stamp
-                       stw             r4,0x6100+(0x03*16)+0x8(0)              ; INSTRUMENT - Save it
-                       mfspr   r4,pmc4                                                 ; INSTRUMENT - Get stamp
-                       stw             r4,0x6100+(0x03*16)+0xC(0)              ; INSTRUMENT - Save it
-#endif                 
-                       b               xcpCommon                                               ; Go join the common interrupt processing...
+noavec:                stw             r19,savevrsave(r13)                             ; Save the vector register usage flags
 
 ;
-;
-;                      This is the 64-bit context saving stuff
+;                      We need to save the FPSCR as if it is normal context.
+;                      This is because pending exceptions will cause an exception even if
+;                      FP is disabled. We need to clear the FPSCR when we first start running in the
+;                      kernel.
 ;
 
-                       .align  5
-                                               
-extEntry64:    mfsprg  r13,0                                                   ; Load per_proc
-                       ld              r13,next_savearea(r13)                  ; Get the exception save area
-                       std             r0,saver0(r13)                                  ; Save register 0
-                       lis             r0,hi16(MASK(MSR_VEC)|MASK(MSR_FP)|MASK(MSR_ME))        ; Set up the MSR we will use throughout. Note that ME come on here if MCK
-                       std             r1,saver1(r13)                                  ; Save register 1
-                       ori             r1,r0,lo16(MASK(MSR_VEC)|MASK(MSR_FP)|MASK(MSR_ME))     ; Rest of MSR
-                       lis             r0,0x0010                                               ; Get rupt code transform validity mask
-                       mtmsr   r1                                                              ; Set MSR
-                       isync
-               
-                       ori             r0,r0,0x0200                                    ; Get rupt code transform validity mask
-                       std             r2,saver2(r13)                                  ; Save this one
-                       lis             r1,0x00F0                                               ; Top half of xform XOR
-                       rlwinm  r2,r11,29,27,31                                 ; Get high 5 bits of rupt code
-                       std             r3,saver3(r13)                                  ; Save this one
-                       slw             r0,r0,r2                                                ; Move transform validity bit to bit 0
-                       std             r4,saver4(r13)                                  ; Save this one
-                       std             r5,saver5(r13)                                  ; Save this one 
-                       ori             r1,r1,0x04EC                                    ; Bottom half of xform XOR
-                       mfxer   r5                                                              ; Save the XER because we are about to muck with it
-                       rlwinm  r4,r11,1,27,28                                  ; Get bottom of interrupt code * 8
-                       lis             r3,hi16(dozem|napm)                             ; Get the nap and doze bits
-                       srawi   r0,r0,31                                                ; Get 0xFFFFFFFF of xform valid, 0 otherwise
-                       rlwnm   r4,r1,r4,24,31                                  ; Extract the xform XOR
-                       li              r1,saver16                                              ; Point to the next line
-                       and             r4,r4,r0                                                ; Only keep transform if we are to use it
-                       li              r2,lgKillResv                                   ; Point to the killing field
-                       mfcr    r0                                                              ; Save the CR
-                       stwcx.  r2,0,r2                                                 ; Kill any pending reservation
-                       dcbz128 r1,r13                                                  ; Blow away the line
-                       sldi    r3,r3,32                                                ; Position it
-                       mfspr   r1,hid0                                                 ; Get HID0
-                       andc    r3,r1,r3                                                ; Clear nap and doze
-                       xor             r11,r11,r4                                              ; Transform 970 rupt code to standard keeping FAM bit
-                       cmpld   r3,r1                                                   ; See if nap and/or doze was on
-                       std             r6,saver6(r13)                                  ; Save this one
-                       mfsprg  r2,0                                                    ; Get the per_proc area
-                       la              r6,savesrr0(r13)                                ; point to line with SRR0, SRR1, CR, XER, and LR
-                       beq++   eE64NoNap                                               ; No nap here,  skip all this...
-               
-                       sync                                                                    ; Make sure we are clean
-                       mtspr   hid0,r3                                                 ; Set the updated hid0
-                       mfspr   r1,hid0                                                 ; Yes, this is silly, keep it here
-                       mfspr   r1,hid0                                                 ; Yes, this is a duplicate, keep it here
-                       mfspr   r1,hid0                                                 ; Yes, this is a duplicate, keep it here
-                       mfspr   r1,hid0                                                 ; Yes, this is a duplicate, keep it here
-                       mfspr   r1,hid0                                                 ; Yes, this is a duplicate, keep it here
-                       mfspr   r1,hid0                                                 ; Yes, this is a duplicate, keep it here
-                       
-eE64NoNap:     crnot   wasNapping,cr0_eq                               ; Remember if we were napping
-                       andi.   r1,r11,T_FAM                                    ; Check FAM bit
-                       beq++   eEnoFAM                                                 ; Is it FAM intercept
-                       mfsrr1  r3                                                              ; Load srr1
-                       andc    r11,r11,r1                                              ; Clear FAM bit
-                       rlwinm. r3,r3,0,MSR_PR_BIT,MSR_PR_BIT   ; Are we trapping from supervisor state?
-                       beq+    eEnoFAM                                                 ; From supervisor state
-                       lwz             r1,spcFlags(r2)                                 ; Load spcFlags 
-                       rlwinm  r1,r1,1+FamVMmodebit,30,31              ; Extract FamVMenabit and FamVMmodebit
-                       cmpwi   cr0,r1,2                                                ; Check FamVMena set without FamVMmode
-                       bne++   eEnoFAM                                                 ; Can this context be FAM intercept
-                       lwz             r4,FAMintercept(r2)                             ; Load exceptions mask to intercept
-                       li              r3,0                                                    ; Clear
-                       srwi    r1,r11,2                                                ; divide r11 by 4
-                       oris    r3,r3,0x8000                                    ; Set r3 to 0x80000000
-                       srw             r1,r3,r1                                                ; Set bit for current exception
-                       and.    r1,r1,r4                                                ; And current exception with the intercept mask
-                       beq++   eEnoFAM                                                 ; Is it FAM intercept
-                       b               EXT(vmm_fam_exc)
-
-                       .align  5
-
-eEnoFAM:       lwz             r1,pfAvailable(r2)                              ; Get the CPU features flags    
-                       dcbz128 0,r6                                                    ; allocate 128-byte line with SRR0, SRR1, CR, XER, and LR
+                       bf-             featFP,nofpexe                                  ; No possible floating point exceptions...
                        
-;
-;                      Remember, we are setting up CR6 with feature flags
-;
-                       std             r7,saver7(r13)                                  ; Save this one
-                       mtcrf   0x80,r1                                                 ; Put the features flags (that we care about) in the CR
-                       std             r8,saver8(r13)                                  ; Save this one
-                       mtcrf   0x40,r1                                                 ; Put the features flags (that we care about) in the CR
-                       mfsrr0  r6                                                              ; Get the interruption SRR0 
-                       lhz             r8,PP_CPU_FLAGS(r2)                             ; Get the flags
-                       mtcrf   0x20,r1                                                 ; Put the features flags (that we care about) in the CR
-                       mfsrr1  r7                                                              ; Get the interrupt SRR1
-                       rlwinm  r8,r8,(((31-MSR_BE_BIT)+(traceBEb+16+1))&31),MSR_BE_BIT,MSR_BE_BIT      ; Set BE bit if special trace is on
-                       std             r6,savesrr0(r13)                                ; Save the SRR0 
-                       mtcrf   0x02,r1                                                 ; Put the features flags (that we care about) in the CR
-                       rlwinm  r6,r7,(((31-MSR_BE_BIT)+(MSR_PR_BIT+1))&31),MSR_BE_BIT,MSR_BE_BIT       ; Move PR bit to BE bit
-                       and             r8,r6,r8                                                ; Remove BE bit only if problem state and special tracing on
-                       std             r9,saver9(r13)                                  ; Save this one
-                       andc    r7,r7,r8                                                ; Clear BE bit if special trace is on and PR is set
-                       crmove  featAltivec,pfAltivecb                  ; Set the Altivec flag
-                       std             r7,savesrr1(r13)                                ; Save SRR1 
-                       mfsprg  r9,3                                                    ; Get rupt time R11
-                       std             r10,saver10(r13)                                ; Save this one
-                       mfsprg  r6,2                                                    ; Get interrupt time R13
-                       std             r9,saver11(r13)                                 ; Save rupt time R11
-                       mtsprg  2,r1                                                    ; Set the feature flags
-                       std             r12,saver12(r13)                                ; Save this one
-                       mflr    r4                                                              ; Get the LR
-                       mftb    r7                                                              ; Get the timebase
-                       std             r6,saver13(r13)                                 ; Save rupt R13
-                       std             r7,ruptStamp(r2)                                ; Save the time stamp
-                       std             r7,SAVtime(r13)                                 ; Save the time stamp
-                       
-                       bf++    wasNapping,notNappingSF                 ; Skip if not waking up from nap...
+                       stfd    f0,emfp0(r2)                                    ; Save FPR0     
+                       stfd    f1,emfp1(r2)                                    ; Save FPR1     
+                       mffs    f0                                                              ; Get the FPSCR
+                       fsub    f1,f1,f1                                                ; Make a 0                      
+                       stfd    f0,savefpscrpad(r13)                    ; Save the FPSCR
+                       mtfsf   0xFF,f1                                                 ; Clear it
+                       lfd             f0,emfp0(r2)                                    ; Restore FPR0  
+                       lfd             f1,emfp1(r2)                                    ; Restore FPR1  
 
-                       ld              r6,napStamp(r2)                                 ; Pick up nap stamp
-                       lis             r3,hi16(EXT(machine_idle_ret))  ; Get high part of nap/doze return
-                       sub             r7,r7,r6                                                ; Subtract stamp from now
-                       ld              r6,napTotal(r2)                                 ; Pick up total
-                       add             r6,r6,r7                                                ; Add low to total
-                       ori             r3,r3,lo16(EXT(machine_idle_ret))       ; Get low part of nap/doze return
-                       std             r6,napTotal(r2)                                 ; Save the high total
-                       std             r3,savesrr0(r13)                                ; Modify to return to nap/doze exit
+nofpexe:       mtmsr   r6                                                              ; Turn off FP and vector
+                       isync
                        
-notNappingSF:  
-                       std             r14,saver14(r13)                                ; Save this one
-                       std             r15,saver15(r13)                                ; Save this one 
-                       stw             r0,savecr(r13)                                  ; Save rupt CR
-                       mfctr   r6                                                              ; Get the CTR 
-                       std             r16,saver16(r13)                                ; Save this one
-                       std             r4,savelr(r13)                                  ; Save rupt LR
-               
-                       std             r17,saver17(r13)                                ; Save this one
-                       li              r7,savepmc                                              ; Point to pmc area
-                       std             r18,saver18(r13)                                ; Save this one 
-                       lwz             r17,spcFlags(r2)                                ; Get the special flags from per_proc
-                       std             r6,savectr(r13)                                 ; Save rupt CTR
-                       std             r19,saver19(r13)                                ; Save this one
-                       mfdar   r6                                                              ; Get the rupt DAR
-                       std             r20,saver20(r13)                                ; Save this one 
-
-                       dcbz128 r7,r13                                                  ; Clear out the pmc spot
-                                       
-                       std             r21,saver21(r13)                                ; Save this one
-                       std             r5,savexer(r13)                                 ; Save the rupt XER
-                       std             r22,saver22(r13)                                ; Save this one 
-                       std             r23,saver23(r13)                                ; Save this one 
-                       std             r24,saver24(r13)                                ; Save this one 
-                       std             r25,saver25(r13)                                ; Save this one 
-                       mfdsisr r7                                                              ; Get the rupt DSISR 
-                       std             r26,saver26(r13)                                ; Save this one         
-                       andis.  r17,r17,hi16(perfMonitor)               ; Is the performance monitor enabled?
-                       std             r27,saver27(r13)                                ; Save this one 
-                       li              r10,emfp0                                               ; Point to floating point save
-                       std             r28,saver28(r13)                                ; Save this one
-            la         r27,savevscr(r13)                               ; point to 32-byte line with VSCR and FPSCR
-                       std             r29,saver29(r13)                                ; Save R29
-                       std             r30,saver30(r13)                                ; Save this one 
-                       std             r31,saver31(r13)                                ; Save this one 
-                       std             r6,savedar(r13)                                 ; Save the rupt DAR 
-                       stw             r7,savedsisr(r13)                               ; Save the rupt code DSISR
-                       stw             r11,saveexception(r13)                  ; Save the exception code 
-
-                       beq++   noPerfMonSave64                                 ; Performance monitor not on...
-
-                       li              r22,0                                                   ; r22:  zero
-               
-                       mfspr   r23,mmcr0_gp
-                       mfspr   r24,mmcr1_gp
-                       mfspr   r25,mmcra_gp
-                       std             r23,savemmcr0(r13)                              ; Save MMCR0
-                       std             r24,savemmcr1(r13)                              ; Save MMCR1 
-                       std             r25,savemmcr2(r13)                              ; Save MMCRA
-                       mtspr   mmcr0_gp,r22                                    ; Leave MMCR0 clear
-                       mtspr   mmcr1_gp,r22                                    ; Leave MMCR1 clear
-                       mtspr   mmcra_gp,r22                                    ; Leave MMCRA clear 
-                       mfspr   r23,pmc1_gp
-                       mfspr   r24,pmc2_gp
-                       mfspr   r25,pmc3_gp
-                       mfspr   r26,pmc4_gp
-                       stw             r23,savepmc+0(r13)                              ; Save PMC1
-                       stw             r24,savepmc+4(r13)                              ; Save PMC2
-                       stw             r25,savepmc+8(r13)                              ; Save PMC3
-                       stw             r26,savepmc+12(r13)                             ; Save PMC4
-                       mfspr   r23,pmc5_gp
-                       mfspr   r24,pmc6_gp
-                       mfspr   r25,pmc7_gp
-                       mfspr   r26,pmc8_gp
-                       stw             r23,savepmc+16(r13)                             ; Save PMC5
-                       stw             r24,savepmc+20(r13)                             ; Save PMC6
-                       stw             r25,savepmc+24(r13)                             ; Save PMC7
-                       stw             r26,savepmc+28(r13)                             ; Save PMC8
-                       mtspr   pmc1_gp,r22                                             ; Leave PMC1 clear 
-                       mtspr   pmc2_gp,r22                                             ; Leave PMC2 clear
-                       mtspr   pmc3_gp,r22                                             ; Leave PMC3 clear              
-                       mtspr   pmc4_gp,r22                                             ; Leave PMC4 clear 
-                       mtspr   pmc5_gp,r22                                             ; Leave PMC5 clear 
-                       mtspr   pmc6_gp,r22                                             ; Leave PMC6 clear
-                       mtspr   pmc7_gp,r22                                             ; Leave PMC7 clear              
-                       mtspr   pmc8_gp,r22                                             ; Leave PMC8 clear 
-
-noPerfMonSave64:               
 
 ;
 ;                      Everything is saved at this point, except for FPRs, and VMX registers.
 ;                      Time for us to get a new savearea and then trace interrupt if it is enabled.
 ;
 
-                       lwz             r25,traceMask(0)                                ; Get the trace mask
                        li              r0,SAVgeneral                                   ; Get the savearea type value
-                       lhz             r19,PP_CPU_NUMBER(r2)                   ; Get the logical processor number                                                                                      
+                       lis             r23,hi16(EXT(trcWork))                  ; Get the trace work area address
+                       mr              r14,r11                                                 ; Save the interrupt code across the call
                        stb             r0,SAVflags+2(r13)                              ; Mark valid context
                        ori             r23,r23,lo16(EXT(trcWork))              ; Get the rest
                        rlwinm  r22,r11,30,0,31                                 ; Divide interrupt code by 2
-                       li              r23,trcWork                                             ; Get the trace work area address
+                       lwz             r25,traceMask(r23)                              ; Get the trace mask
                        addi    r22,r22,10                                              ; Adjust code so we shift into CR5
-                       li              r26,0x8                                                 ; Get start of cpu mask
+
+                       bl              EXT(save_get_phys)                              ; Grab a savearea
+                       
+                       mfsprg  r2,0                                                    ; Get back the per_proc block
                        rlwnm   r7,r25,r22,22,22                                ; Set CR5_EQ bit position to 0 if tracing allowed 
+                       lhz             r19,PP_CPU_NUMBER(r2)                   ; Get the logical processor number                                                                                      
+                       li              r26,0x8                                                 ; Get start of cpu mask
+                       mr              r11,r14                                                 ; Get the exception code back
                        srw             r26,r26,r19                                             ; Get bit position of cpu number
                        mtcrf   0x04,r7                                                 ; Set CR5 to show trace or not
                        and.    r26,r26,r25                                             ; See if we trace this cpu
+                       stw             r3,next_savearea(r2)                    ; Remember the savearea we just got for the next rupt
                        crandc  cr5_eq,cr5_eq,cr0_eq                    ; Turn off tracing if cpu is disabled
+;
+;                      At this point, we can take another exception and lose nothing.
+;
+                       
+                       lwz             r0,saver0(r13)                                  ; Get back interrupt time R0 (we need this whether we trace or not)
 
-                       bne++   cr5,xcp64xit                                    ; Skip all of this if no tracing here...
+                       bne+    cr5,skipTrace                                   ; Skip all of this if no tracing here...
 
 ;
 ;                      We select a trace entry using a compare and swap on the next entry field.
@@ -1420,484 +1188,220 @@ noPerfMonSave64:
 ;                      another processor could wrap an trash our entry.  Who cares?
 ;
 
-                       lwz             r25,traceStart(0)                               ; Get the start of trace table
-                       lwz             r26,traceEnd(0)                                 ; Get end of trace table
-
-trcselSF:      lwarx   r20,0,r23                                               ; Get and reserve the next slot to allocate
+                       lwz             r25,traceStart(r23)                             ; Get the start of trace table
+                       lwz             r26,traceEnd(r23)                               ; Get end of trace table
+       
+trcsel:                lwarx   r20,0,r23                                               ; Get and reserve the next slot to allocate
                        
                        addi    r22,r20,LTR_size                                ; Point to the next trace entry
                        cmplw   r22,r26                                                 ; Do we need to wrap the trace table?
-                       bne+    gotTrcEntSF                                             ; No wrap, we got us a trace entry...
+                       bne+    gotTrcEnt                                               ; No wrap, we got us a trace entry...
                        
                        mr              r22,r25                                                 ; Wrap back to start
 
-gotTrcEntSF:   
-                       stwcx.  r22,0,r23                                               ; Try to update the current pointer
-                       bne-    trcselSF                                                ; Collision, try again...
+gotTrcEnt:     stwcx.  r22,0,r23                                               ; Try to update the current pointer
+                       bne-    trcsel                                                  ; Collision, try again...
                        
 #if ESPDEBUG
                        dcbf    0,r23                                                   ; Force to memory
                        sync
 #endif
+                       
+                       bf-             featL1ena,skipz6                                ; L1 cache is disabled...
+                       dcbz    0,r20                                                   ; Clear and allocate first trace line
+skipz6:
 
 ;
 ;                      Let us cut that trace entry now.
 ;
 
-                       dcbz128 0,r20                                                   ; Zap the trace entry
 
-                       ld              r16,ruptStamp(r2)                               ; Get top of time base
-                       ld              r0,saver0(r13)                                  ; Get back interrupt time R0 (we need this whether we trace or not)
-                       std             r16,LTR_timeHi(r20)                             ; Set the upper part of TB 
-                       ld              r1,saver1(r13)                                  ; Get back interrupt time R1
-                       ld              r18,saver2(r13)                                 ; Get back interrupt time R2
-                       std             r0,LTR_r0(r20)                                  ; Save off register 0                   
-                       ld              r3,saver3(r13)                                  ; Restore this one
+                       li              r14,32                                                  ; Offset to second line
+
+                       lwz             r16,ruptStamp(r2)                               ; Get top of time base
+                       lwz             r17,ruptStamp+4(r2)                             ; Get the bottom of time stamp
+               
+                       bf-             featL1ena,skipz7                                ; L1 cache is disabled...
+                       dcbz    r14,r20                                                 ; Zap the second half
+
+skipz7:                stw             r16,LTR_timeHi(r20)                             ; Set the upper part of TB 
+                       lwz             r1,saver1(r13)                                  ; Get back interrupt time R1
+                       stw             r17,LTR_timeLo(r20)                             ; Set the lower part of TB
+                       lwz             r18,saver2(r13)                                 ; Get back interrupt time R2
+                       stw             r0,LTR_r0(r20)                                  ; Save off register 0                   
+                       lwz             r3,saver3(r13)                                  ; Restore this one
                        sth             r19,LTR_cpu(r20)                                ; Stash the cpu number
-                       std             r1,LTR_r1(r20)                                  ; Save off register 1                   
-                       ld              r4,saver4(r13)                                  ; Restore this one
-                       std             r18,LTR_r2(r20)                                 ; Save off register 2                   
-                       ld              r5,saver5(r13)                                  ; Restore this one
-                       ld              r6,saver6(r13)                                  ; Get R6
-                       std             r3,LTR_r3(r20)                                  ; Save off register 3
+                       stw             r1,LTR_r1(r20)                                  ; Save off register 1                   
+                       lwz             r4,saver4(r13)                                  ; Restore this one
+                       stw             r18,LTR_r2(r20)                                 ; Save off register 2                   
+                       lwz             r5,saver5(r13)                                  ; Restore this one
+                       stw             r3,LTR_r3(r20)                                  ; Save off register 3
                        lwz             r16,savecr(r13)                                 ; Get the CR value
-                       std             r4,LTR_r4(r20)                                  ; Save off register 4 
+                       stw             r4,LTR_r4(r20)                                  ; Save off register 4 
                        mfsrr0  r17                                                             ; Get SRR0 back, it is still good
-                       std             r5,LTR_r5(r20)                                  ; Save off register 5   
-                       std             r6,LTR_r6(r20)                                  ; Save off register 6   
+                       stw             r5,LTR_r5(r20)                                  ; Save off register 5   
                        mfsrr1  r18                                                             ; SRR1 is still good in here
                        stw             r16,LTR_cr(r20)                                 ; Save the CR
-                       std             r17,LTR_srr0(r20)                               ; Save the SSR0 
-                       std             r18,LTR_srr1(r20)                               ; Save the SRR1 
-                                               
+                       stw             r17,LTR_srr0(r20)                               ; Save the SSR0 
+                       stw             r18,LTR_srr1(r20)                               ; Save the SRR1 
                        mfdar   r17                                                             ; Get this back
-                       l             r16,savelr(r13)                                 ; Get the LR
-                       std             r17,LTR_dar(r20)                                ; Save the DAR
+                       lwz             r16,savelr(r13)                                 ; Get the LR
+                       stw             r17,LTR_dar(r20)                                ; Save the DAR
                        mfctr   r17                                                             ; Get the CTR (still good in register)
-                       std             r16,LTR_lr(r20)                                 ; Save the LR
-                       std             r17,LTR_ctr(r20)                                ; Save off the CTR
-                       mfdsisr r17                                                             ; Get the DSISR
-                       std             r13,LTR_save(r20)                               ; Save the savearea 
-                       stw             r17,LTR_dsisr(r20)                              ; Save the DSISR
+                       stw             r16,LTR_lr(r20)                                 ; Save the LR
+#if 0
+                       lwz             r17,emfp1(r2)                                   ; (TEST/DEBUG)
+#endif
+                       stw             r17,LTR_ctr(r20)                                ; Save off the CTR
+                       stw             r13,LTR_save(r20)                               ; Save the savearea 
                        sth             r11,LTR_excpt(r20)                              ; Save the exception type 
-
 #if ESPDEBUG
-                       dcbf    0,r20                                                   ; Force to memory                       
-                       sync                                                                    ; Make sure it all goes
+                       addi    r17,r20,32                                              ; (TEST/DEBUG)
+                       dcbst   br0,r20                                                 ; (TEST/DEBUG)
+                       dcbst   br0,r17                                                 ; (TEST/DEBUG)
+                       sync                                                                    ; (TEST/DEBUG)
 #endif
-xcp64xit:      mr              r14,r11                                                 ; Save the interrupt code across the call
-                       bl              EXT(save_get_phys_64)                   ; Grab a savearea
-                       mfsprg  r2,0                                                    ; Get the per_proc info
-                       li              r10,emfp0                                               ; Point to floating point save
-                       mr              r11,r14                                                 ; Get the exception code back
-                       dcbz128 r10,r2                                                  ; Clear for speed
-                       std             r3,next_savearea(r2)                    ; Store the savearea for the next rupt
-                       b               xcpCommon                                               ; Go join the common interrupt processing...
-
-;
-;                      All of the context is saved. Now we will get a
-;                      fresh savearea.  After this we can take an interrupt.
-;
-
-                       .align  5
-
-xcpCommon:
-
-;
-;                      Here we will save some floating point and vector status
-;                      and we also set a clean default status for a new interrupt level.
-;                      Note that we assume that emfp0 is on an altivec boundary
-;                      and that R10 points to it (as a displacemnt from R2).
-;
-;                      We need to save the FPSCR as if it is normal context.
-;                      This is because pending exceptions will cause an exception even if
-;                      FP is disabled. We need to clear the FPSCR when we first start running in the
-;                      kernel.
-;
-
-                       stfd    f0,emfp0(r2)                                    ; Save FPR0     
-                       stfd    f1,emfp1(r2)                                    ; Save FPR1     
-                       li              r19,0                                                   ; Assume no Altivec
-                       mffs    f0                                                              ; Get the FPSCR
-                       lfd             f1,Zero(0)                                              ; Make a 0                      
-                       stfd    f0,savefpscrpad(r13)                    ; Save the FPSCR
-                       li              r9,0                                                    ; Get set to clear VRSAVE
-                       mtfsf   0xFF,f1                                                 ; Clear it
-                       addi    r14,r10,16                                              ; Displacement to second vector register
-                       lfd             f0,emfp0(r2)                                    ; Restore FPR0  
-                       la              r28,savevscr(r13)                               ; Point to the status area
-                       lfd             f1,emfp1(r2)                                    ; Restore FPR1  
-
-                       bf              featAltivec,noavec                              ; No Altivec on this CPU...
-                       
-                       stvxl   v0,r10,r2                                               ; Save a register
-                       stvxl   v1,r14,r2                                               ; Save a second register
-                       mfspr   r19,vrsave                                              ; Get the VRSAVE register
-                       mfvscr  v0                                                              ; Get the vector status register
-                       vspltish v1,1                                                   ; Turn on the non-Java bit and saturate
-                       stvxl   v0,0,r28                                                ; Save the vector status
-                       vspltisw v0,1                                                   ; Turn on the saturate bit
-                       vxor    v1,v1,v0                                                ; Turn off saturate     
-                       mtvscr  v1                                                              ; Set the non-java, no saturate status for new level
-                       mtspr   vrsave,r9                                               ; Clear VRSAVE for each interrupt level
-
-                       lvxl    v0,r10,r2                                               ; Restore first work register
-                       lvxl    v1,r14,r2                                               ; Restore second work register
 
-noavec:                stw             r19,savevrsave(r13)                             ; Save the vector register usage flags
-                       
 ;
-;                      We are now done saving all of the context.  Start filtering the interrupts.
-;                      Note that a Redrive will count as an actual interrupt.
-;                      Note also that we take a lot of system calls so we will start decode here.
+;                      We are done with the trace, except for maybe modifying the exception
+;                      code later on. So, that means that we need to save R20 and CR5.
+;                      
+;                      So, finish setting up the kernel registers now.
 ;
 
-Redrive:       
-
-
-#if INSTRUMENT
-                       mfspr   r20,pmc1                                                ; INSTRUMENT - saveinstr[4] - Take stamp before exception filter
-                       stw             r20,0x6100+(0x04*16)+0x0(0)             ; INSTRUMENT - Save it
-                       mfspr   r20,pmc2                                                ; INSTRUMENT - Get stamp
-                       stw             r20,0x6100+(0x04*16)+0x4(0)             ; INSTRUMENT - Save it
-                       mfspr   r20,pmc3                                                ; INSTRUMENT - Get stamp
-                       stw             r20,0x6100+(0x04*16)+0x8(0)             ; INSTRUMENT - Save it
-                       mfspr   r20,pmc4                                                ; INSTRUMENT - Get stamp
-                       stw             r20,0x6100+(0x04*16)+0xC(0)             ; INSTRUMENT - Save it
-#endif                 
-                       lwz             r22,SAVflags(r13)                               ; Pick up the flags
-                       lwz             r0,saver0+4(r13)                                ; Get back interrupt time syscall number
-                       mfsprg  r2,0                                                    ; Restore per_proc
-               
-                       li              r20,lo16(xcpTable)                              ; Point to the vector table (note: this must be in 1st 64k of physical memory)
-                       la              r12,hwCounts(r2)                                ; Point to the exception count area
-                       rlwinm  r22,r22,SAVredriveb+1,31,31             ; Get a 1 if we are redriving
-                       add             r12,r12,r11                                             ; Point to the count
-                       lwzx    r20,r20,r11                                             ; Get the interrupt handler
-                       lwz             r25,0(r12)                                              ; Get the old value
-                       lwz             r23,hwRedrives(r2)                              ; Get the redrive count
-                       xori    r24,r22,1                                               ; Get the NOT of the redrive
-                       mtctr   r20                                                             ; Point to the interrupt handler
+skipTrace:     lhz             r21,PP_CPU_NUMBER(r2)                   ; Get the logical processor number
+                       lis             r12,hi16(EXT(hw_counts))                ; Get the high part of the interrupt counters
+                       lwz             r7,savesrr1(r13)                                ; Get the entering MSR
+                       ori             r12,r12,lo16(EXT(hw_counts))    ; Get the low part of the interrupt counters
+                       rlwinm  r21,r21,8,20,23                                 ; Get index to processor counts
                        mtcrf   0x80,r0                                                 ; Set our CR0 to the high nybble of possible syscall code
-                       add             r25,r25,r24                                             ; Count this one if not a redrive
-                       add             r23,r23,r24                                             ; Count this one if if is a redrive
-                       crandc  cr0_lt,cr0_lt,cr0_gt                    ; See if we have R0 equal to 0b10xx...x 
-                       stw             r25,0(r12)                                              ; Store it back
-                       stw             r23,hwRedrives(r2)                              ; Save the redrive count
-                       bctr                                                                    ; Go process the exception...
-       
-
-;
-;                      Exception vector filter table
-;
-
-                       .align  7
-                       
-xcpTable:
-                       .long   EatRupt                                                 ; T_IN_VAIN                     
-                       .long   PassUpTrap                                              ; T_RESET                               
-                       .long   MachineCheck                                    ; T_MACHINE_CHECK               
-                       .long   EXT(handlePF)                                   ; T_DATA_ACCESS         
-                       .long   EXT(handlePF)                                   ; T_INSTRUCTION_ACCESS
-                       .long   PassUpRupt                                              ; T_INTERRUPT           
-                       .long   EXT(AlignAssist)                                ; T_ALIGNMENT                   
-                       .long   EXT(Emulate)                                    ; T_PROGRAM                     
-                       .long   PassUpFPU                                               ; T_FP_UNAVAILABLE              
-                       .long   PassUpRupt                                              ; T_DECREMENTER         
-                       .long   PassUpTrap                                              ; T_IO_ERROR                    
-                       .long   PassUpTrap                                              ; T_RESERVED                    
-                       .long   xcpSyscall                                              ; T_SYSTEM_CALL                 
-                       .long   PassUpTrap                                              ; T_TRACE                               
-                       .long   PassUpTrap                                              ; T_FP_ASSIST                   
-                       .long   PassUpTrap                                              ; T_PERF_MON                            
-                       .long   PassUpVMX                                               ; T_VMX                                 
-                       .long   PassUpTrap                                              ; T_INVALID_EXCP0               
-                       .long   PassUpTrap                                              ; T_INVALID_EXCP1                       
-                       .long   PassUpTrap                                              ; T_INVALID_EXCP2               
-                       .long   PassUpTrap                                              ; T_INSTRUCTION_BKPT            
-                       .long   PassUpRupt                                              ; T_SYSTEM_MANAGEMENT           
-                       .long   EXT(AltivecAssist)                              ; T_ALTIVEC_ASSIST              
-                       .long   PassUpRupt                                              ; T_THERMAL                             
-                       .long   PassUpTrap                                              ; T_INVALID_EXCP5               
-                       .long   PassUpTrap                                              ; T_INVALID_EXCP6                       
-                       .long   PassUpTrap                                              ; T_INVALID_EXCP7                       
-                       .long   PassUpTrap                                              ; T_INVALID_EXCP8                       
-                       .long   PassUpTrap                                              ; T_INVALID_EXCP9                       
-                       .long   PassUpTrap                                              ; T_INVALID_EXCP10              
-                       .long   PassUpTrap                                              ; T_INVALID_EXCP11              
-                       .long   PassUpTrap                                              ; T_INVALID_EXCP12      
-                       .long   PassUpTrap                                              ; T_INVALID_EXCP13              
-
-                       .long   PassUpTrap                                              ; T_RUNMODE_TRACE                       
-
-                       .long   PassUpRupt                                              ; T_SIGP                                        
-                       .long   PassUpTrap                                              ; T_PREEMPT                             
-                       .long   conswtch                                                ; T_CSWITCH                             
-                       .long   PassUpRupt                                              ; T_SHUTDOWN                            
-                       .long   PassUpAbend                                             ; T_CHOKE                                       
-
-                       .long   EXT(handleDSeg)                                 ; T_DATA_SEGMENT                        
-                       .long   EXT(handleISeg)                                 ; T_INSTRUCTION_SEGMENT 
-
-                       .long   WhoaBaby                                                ; T_SOFT_PATCH                  
-                       .long   WhoaBaby                                                ; T_MAINTENANCE                 
-                       .long   WhoaBaby                                                ; T_INSTRUMENTATION             
-
-;
-;                      Just what the heck happened here????
-;
-
-                       .align  5
-                       
-WhoaBaby:      b               .                                                               ; Open the hood and wait for help
-
-                                                                                                       
-;
-;                      System call
-;
-               
-                       .align  5
-
-xcpSyscall:    lis             r20,hi16(EXT(shandler))                 ; Assume this is a normal one, get handler address
                        rlwinm  r6,r0,1,0,31                                    ; Move sign bit to the end 
-                       ori             r20,r20,lo16(EXT(shandler))             ; Assume this is a normal one, get handler address
-                       bnl++   cr0,PassUp                                              ; R0 not 0b10xxx...x, can not be any kind of magical system call, just pass it up...
-                       lwz             r7,savesrr1+4(r13)                              ; Get the entering MSR (low half)
-                       lwz             r1,dgFlags(0)                                   ; Get the flags
+                       cmplwi  cr1,r11,T_SYSTEM_CALL                   ; Did we get a system call?
+                       add             r12,r12,r21                                             ; Point to the processor count area
+                       crandc  cr0_lt,cr0_lt,cr0_gt                    ; See if we have R0 equal to 0b10xx...x 
+                       lwzx    r22,r12,r11                                             ; Get the old value
+                       cmplwi  cr3,r11,T_IN_VAIN                               ; Was this all in vain? All for nothing? 
+                       addi    r22,r22,1                                               ; Count this one
                        cmplwi  cr2,r6,1                                                ; See if original R0 had the CutTrace request code in it 
+                       stwx    r22,r12,r11                                             ; Store it back
                        
+                       beq-    cr3,EatRupt                                             ; Interrupt was all for nothing... 
+                       cmplwi  cr3,r11,T_MACHINE_CHECK                 ; Did we get a machine check?
+                       bne+    cr1,noCutT                                              ; Not a system call...
+                       bnl+    cr0,noCutT                                              ; R0 not 0b10xxx...x, can not be any kind of magical system call...
                        rlwinm. r7,r7,0,MSR_PR_BIT,MSR_PR_BIT   ; Did we come from user state?
-                       beq++   FCisok                                                  ; From supervisor state...
+                       lis             r1,hi16(EXT(dgWork))                    ; Get the diagnostics flags
+                       beq+    FCisok                                                  ; From supervisor state...
 
+                       ori             r1,r1,lo16(EXT(dgWork))                 ; Again
+                       lwz             r1,dgFlags(r1)                                  ; Get the flags
                        rlwinm. r1,r1,0,enaUsrFCallb,enaUsrFCallb       ; Are they valid?
-                       beq++   PassUp                                                  ; No, treat as a normal one...
+                       beq-    noCutT                                                  ; No...
 
-FCisok:                beq++   cr2,EatRupt                                             ; This is a CutTrace system call, we are done with it...
+FCisok:                beq-    cr2,isCutTrace                                  ; This is a CutTrace system call...
                        
 ;
 ;                      Here is where we call the firmware.  If it returns T_IN_VAIN, that means
 ;                      that it has handled the interruption.  Remember: thou shalt not trash R13
-;                      while you are away.  Anything else is ok.
+;                      or R20 while you are away.  Anything else is ok.
 ;                      
 
-                       lwz             r3,saver3+4(r13)                                ; Restore the first parameter
-                       b               EXT(FirmwareCall)                               ; Go handle the firmware call....
-
-;
-;                      Here is where we return from the firmware call
-;
-
-                       .align  5
-                       .globl  EXT(FCReturn)
+                       lwz             r3,saver3(r13)                                  ; Restore the first parameter
+                       bl              EXT(FirmwareCall)                               ; Go handle the firmware call....
 
-LEXT(FCReturn)
                        cmplwi  r3,T_IN_VAIN                                    ; Was it handled? 
+                       mfsprg  r2,0                                                    ; Restore the per_proc
                        beq+    EatRupt                                                 ; Interrupt was handled...
                        mr              r11,r3                                                  ; Put the rupt code into the right register
-                       b               Redrive                                                 ; Go through the filter again...
+                       b               filter                                                  ; Go to the normal system call handler...
                
+                       .align  5
+                       
+isCutTrace:                            
+                       li              r7,-32768                                               ; Get a 0x8000 for the exception code
+                       bne-    cr5,EatRupt                                             ; Tracing is disabled...
+                       sth             r7,LTR_excpt(r20)                               ; Modify the exception type to a CutTrace
+                       b               EatRupt                                                 ; Time to go home... 
+
+;                      We are here because we did not have a CutTrace system call
+
+                       .align  5
+
+noCutT:                beq-    cr3,MachineCheck                                ; Whoa... Machine check...
 
 ;
-;                      Here is where we return from the PTE miss and segment exception handler
+;                      The following interrupts are the only ones that can be redriven
+;                      by the higher level code or emulation routines.
 ;
 
-                       .align  5
-                       .globl  EXT(PFSExit)
+Redrive:       cmplwi  cr0,r11,T_IN_VAIN                               ; Did the signal handler eat the signal?
+                       mfsprg  r2,0                                                    ; Get the per_proc block 
+                       beq+    cr0,EatRupt                                             ; Bail now if we ate the rupt...
 
-LEXT(PFSExit)
 
-#if 0
-                       mfsprg  r2,0                                                    ; (BRINGUP)
-                       lwz             r0,savedsisr(r13)                               ; (BRINGUP)
-                       andis.  r0,r0,hi16(dsiAC)                               ; (BRINGUP)
-                       beq++   didnthit                                                ; (BRINGUP)
-                       lwz             r0,20(0)                                                ; (BRINGUP)
-                       mr.             r0,r0                                                   ; (BRINGUP)
-                       bne--   didnthit                                                ; (BRINGUP)
-#if 0
-                       li              r0,1                                                    ; (BRINGUP)
-                       stw             r0,20(0)                                                ; (BRINGUP)
-                       lis             r0,hi16(Choke)                                  ; (BRINGUP)
-                       ori             r0,r0,lo16(Choke)                               ; (BRINGUP)
-                       sc                                                                              ; (BRINGUP)
-#endif
-                       
-                       lwz             r4,savesrr0+4(r13)                              ; (BRINGUP)
-                       lwz             r8,savesrr1+4(r13)                              ; (BRINGUP)
-                       lwz             r6,savedar+4(r13)                               ; (BRINGUP)
-                       rlwinm. r0,r8,0,MSR_IR_BIT,MSR_IR_BIT   ; (BRINGUP)
-                       mfmsr   r9                                                              ; (BRINGUP)
-                       ori             r0,r9,lo16(MASK(MSR_DR))                ; (BRINGUP)
-                       beq--   hghg                                                    ; (BRINGUP)
-                       mtmsr   r0                                                              ; (BRINGUP)
-                       isync                                                                   ; (BRINGUP)
-
-hghg:          lwz             r5,0(r4)                                                ; (BRINGUP)
-                       beq--   hghg1                                                   ; (BRINGUP)
-                       mtmsr   r9                                                              ; (BRINGUP)
-                       isync                                                                   ; (BRINGUP)
-
-hghg1:         rlwinm  r7,r5,6,26,31                                   ; (BRINGUP)
-                       rlwinm  r27,r5,14,24,28                                 ; (BRINGUP)
-                       addi    r3,r13,saver0+4                                 ; (BRINGUP)
-                       lwzx    r3,r3,r27                                               ; (BRINGUP)
-                       
-#if 0
-                       lwz             r27,patcharea+4(r2)                             ; (BRINGUP)
-                       mr.             r3,r3                                                   ; (BRINGUP)
-                       bne++   nbnbnb                                                  ; (BRINGUP)
-                       addi    r27,r27,1                                               ; (BRINGUP)
-                       stw             r27,patcharea+4(r2)                             ; (BRINGUP)
-nbnbnb:                                        
-#endif                 
-                       
-                       rlwinm. r28,r8,0,MSR_DR_BIT,MSR_DR_BIT  ; (BRINGUP)
-                       rlwinm  r27,r6,0,0,29                                   ; (BRINGUP)
-                       ori             r28,r9,lo16(MASK(MSR_DR))               ; (BRINGUP)
-                       mfspr   r10,dabr                                                ; (BRINGUP)
-                       li              r0,0                                                    ; (BRINGUP)
-                       mtspr   dabr,r0                                                 ; (BRINGUP)
-                       cmplwi  cr1,r7,31                                               ; (BRINGUP) 
-                       beq--   qqq0                                                    ; (BRINGUP)
-                       mtmsr   r28                                                             ; (BRINGUP)
-qqq0:
-                       isync                                                                   ; (BRINGUP)
-                       
-                       lwz             r27,0(r27)                                              ; (BRINGUP) - Get original value
-                       
-                       bne             cr1,qqq1                                                ; (BRINGUP)
-                       
-                       rlwinm  r5,r5,31,22,31                                  ; (BRINGUP)
-                       cmplwi  cr1,r5,151                                              ; (BRINGUP)                     
-                       beq             cr1,qqq3                                                ; (BRINGUP)
-                       cmplwi  cr1,r5,407                                              ; (BRINGUP)                     
-                       beq             cr1,qqq2                                                ; (BRINGUP)
-                       cmplwi  cr1,r5,215                                              ; (BRINGUP)                     
-                       beq             cr1,qqq0q                                               ; (BRINGUP)
-                       cmplwi  cr1,r5,1014                                             ; (BRINGUP)
-                       beq             cr1,qqqm1                                               ; (BRINGUP)
-
-                       lis             r0,hi16(Choke)                                  ; (BRINGUP)
-                       ori             r0,r0,lo16(Choke)                               ; (BRINGUP)
-                       sc                                                                              ; (BRINGUP)
-                       
-qqqm1:         rlwinm  r7,r6,0,0,26                                    ; (BRINGUP)
-                       stw             r0,0(r7)                                                ; (BRINGUP)
-                       stw             r0,4(r7)                                                ; (BRINGUP)
-                       stw             r0,8(r7)                                                ; (BRINGUP)
-                       stw             r0,12(r7)                                               ; (BRINGUP)
-                       stw             r0,16(r7)                                               ; (BRINGUP)
-                       stw             r0,20(r7)                                               ; (BRINGUP)
-                       stw             r0,24(r7)                                               ; (BRINGUP)
-                       stw             r0,28(r7)                                               ; (BRINGUP)
-                       b               qqq9
-               
-qqq1:          cmplwi  r7,38                                                   ; (BRINGUP)
-                       bgt             qqq2                                                    ; (BRINGUP)
-                       blt             qqq3                                                    ; (BRINGUP)
+;
+;                      Here ss where we check for the other fast-path exceptions: translation exceptions,
+;                      emulated instructions, etc.
+;
 
-qqq0q:         stb             r3,0(r6)                                                ; (BRINGUP)
-                       b               qqq9                                                    ; (BRINGUP)
-                       
-qqq2:          sth             r3,0(r6)                                                ; (BRINGUP)
-                       b               qqq9                                                    ; (BRINGUP)
-                       
-qqq3:          stw             r3,0(r6)                                                ; (BRINGUP)
-                       
-qqq9:          
-#if 0
-                       rlwinm  r7,r6,0,0,29                                    ; (BRINGUP)
-                       lwz             r0,0(r7)                                                ; (BRINGUP) - Get newest value
-#else
-                       lis             r7,hi16(0x000792B8)                             ; (BRINGUP)
-                       ori             r7,r7,lo16(0x000792B8)                  ; (BRINGUP)
-                       lwz             r0,0(r7)                                                ; (BRINGUP) - Get newest value
-#endif
-                       mtmsr   r9                                                              ; (BRINGUP)
-                       mtspr   dabr,r10                                                ; (BRINGUP)
-                       isync                                                                   ; (BRINGUP)
+filter:                cmplwi  cr3,r11,T_ALTIVEC_ASSIST                ; Check for an Altivec denorm assist
+                       cmplwi  cr4,r11,T_ALIGNMENT                             ; See if we got an alignment exception
+                       cmplwi  cr1,r11,T_PROGRAM                               ; See if we got a program exception
+                       cmplwi  cr2,r11,T_INSTRUCTION_ACCESS    ; Check on an ISI 
+                       bne+    cr3,noAltivecAssist                             ; It is not an assist...
+                       b               EXT(AltivecAssist)                              ; It is an assist...
+       
+                       .align  5
 
-#if 0
-                       lwz             r28,patcharea+12(r2)                    ; (BRINGUP)
-                       mr.             r28,r28                                                 ; (BRINGUP)
-                       bne++   qqq12                                                   ; (BRINGUP)
-                       lis             r28,0x4000                                              ; (BRINGUP)
-
-qqq12:         stw             r27,0(r28)                                              ; (BRINGUP)
-                       lwz             r6,savedar+4(r13)                               ; (BRINGUP)
-                       stw             r0,4(r28)                                               ; (BRINGUP)
-                       stw             r4,8(r28)                                               ; (BRINGUP)
-                       stw             r6,12(r28)                                              ; (BRINGUP)
-                       addi    r28,r28,16                                              ; (BRINGUP)
-                       mr.             r3,r3                                                   ; (BRINGUP)
-                       stw             r28,patcharea+12(r2)                    ; (BRINGUP)
-                       lwz             r10,patcharea+8(r2)                             ; (BRINGUP)
-                       lwz             r0,patcharea+4(r2)                              ; (BRINGUP)
-#endif
+noAltivecAssist:
+                       bne+    cr4,noAlignAssist                               ; No alignment here...
+                       b               EXT(AlignAssist)                                ; Go try to emulate...
 
-#if 1
-                       stw             r0,patcharea(r2)                                ; (BRINGUP)
-#endif
+                       .align  5
 
-#if 0
-                       xor             r28,r0,r27                                              ; (BRINGUP) - See how much it changed
-                       rlwinm  r28,r28,24,24,31                                ; (BRINGUP)
-                       cmplwi  r28,1                                                   ; (BRINGUP)
-
-                       ble++   qqq10                                                   ; (BRINGUP)
-
-                       mr              r7,r0                                                   ; (BRINGUP)
-                       li              r0,1                                                    ; (BRINGUP)
-                       stw             r0,20(0)                                                ; (BRINGUP)
-                       lis             r0,hi16(Choke)                                  ; (BRINGUP)
-                       ori             r0,r0,lo16(Choke)                               ; (BRINGUP)
-                       sc                                                                              ; (BRINGUP)
-#endif
+noAlignAssist:
+                       bne+    cr1,noEmulate                                   ; No emulation here...
+                       b               EXT(Emulate)                                    ; Go try to emulate...
 
+                       .align  5
 
-qqq10:         addi    r4,r4,4                                                 ; (BRINGUP)
-                       stw             r4,savesrr0+4(r13)                              ; (BRINGUP)
-                               
-                       li              r11,T_IN_VAIN                                   ; (BRINGUP)
-                       b               EatRupt                                                 ; (BRINGUP)
+noEmulate:     cmplwi  cr3,r11,T_CSWITCH                               ; Are we context switching 
+                       cmplwi  r11,T_DATA_ACCESS                               ; Check on a DSI 
+                       beq-    cr2,DSIorISI                                    ; It is a PTE fault...
+                       beq-    cr3,conswtch                                    ; It is a context switch... 
+                       bne+    PassUp                                                  ; It is not a PTE fault...
+
+;
+;                      This call will either handle the fault, in which case it will not
+;                      return, or return to pass the fault up the line.
+;
+
+DSIorISI:      mr              r3,r11                                                  ; Move the rupt code
                        
-didnthit:                                                                                      ; (BRINGUP)
-#endif
-#if 0
-                       lwz             r0,20(0)                                                ; (BRINGUP)
-                       mr.             r0,r0                                                   ; (BRINGUP)
-                       beq++   opopop                                                  ; (BRINGUP)
-                       li              r0,0                                                    ; (BRINGUP)
-                       stw             r0,20(0)                                                ; (BRINGUP)
-                       lis             r0,hi16(Choke)                                  ; (BRINGUP)
-                       ori             r0,r0,lo16(Choke)                               ; (BRINGUP)
-                       sc                                                                              ; (BRINGUP)
-opopop:
-#endif
-                       lwz             r0,savesrr1+4(r13)                              ; Get the MSR in use at exception time
-                       cmplwi  cr1,r11,T_IN_VAIN                               ; Was it handled?
+                       bl              EXT(handlePF)                                   ; See if we can handle this fault
+
+                       lwz             r0,savesrr1(r13)                                ; Get the MSR in use at exception time
+                       mfsprg  r2,0                                                    ; Get back per_proc 
+                       cmplwi  cr1,r3,T_IN_VAIN                                ; Was it handled?
                        rlwinm. r4,r0,0,MSR_PR_BIT,MSR_PR_BIT   ; Are we trapping from supervisor state?
-                       beq++   cr1,EatRupt                                             ; Yeah, just blast back to the user... 
-                       beq--   NoFamPf
-                       mfsprg  r2,0                                                    ; Get back per_proc
+                       mr              r11,r3                                                  ; Put interrupt code back into the right register
+                       beq+    cr1,EatRupt                                             ; Yeah, just blast back to the user... 
+                       beq-    NoFamPf
                        lwz             r1,spcFlags(r2)                                 ; Load spcFlags
             rlwinm     r1,r1,1+FamVMmodebit,30,31              ; Extract FamVMenabit and FamVMmodebit
             cmpi       cr0,r1,2                                                ; Check FamVMena set without FamVMmode
-                       bne--   cr0,NoFamPf
+                       bne-    cr0,NoFamPf
             lwz                r6,FAMintercept(r2)                             ; Load exceptions mask to intercept
-                       li              r5,0                                                    ; Clear
                        srwi    r1,r11,2                                                ; divide r11 by 4
-            oris       r5,r5,0x8000                                    ; Set r5 to 0x80000000
+            lis                r5,0x8000                                               ; Set r5 to 0x80000000
             srw                r1,r5,r1                                                ; Set bit for current exception
             and.       r1,r1,r6                                                ; And current exception with the intercept mask
-            beq++      NoFamPf                                                 ; Is it FAM intercept
-                       bl              EXT(vmm_fam_pf)
+            beq+       NoFamPf                                                 ; Is it FAM intercept
+                       bl              EXT(vmm_fam_pf_handler)
                        b               EatRupt
-
-NoFamPf:       andi.   r4,r0,lo16(MASK(MSR_RI))                ; See if the recover bit is on
-                       lis             r0,0x8000                                               ; Get 0xFFFFFFFF80000000
-                       add             r0,r0,r0                                                ; Get 0xFFFFFFFF00000000
-                       beq++   PassUpTrap                                              ; Not on, normal case...
+NoFamPf:
+                       andi.   r4,r0,lo16(MASK(MSR_RI))                ; See if the recover bit is on
+                       beq+    PassUp                                                  ; Not on, normal case...
 ;
 ;                      Here is where we handle the "recovery mode" stuff.
 ;                      This is set by an emulation routine to trap any faults when it is fetching data or
@@ -1906,49 +1410,35 @@ NoFamPf:        andi.   r4,r0,lo16(MASK(MSR_RI))                ; See if the recover bit is on
 ;                      If we get a fault, we turn off RI, set CR0_EQ to false, bump the PC, and set R0
 ;                      and R1 to the DAR and DSISR, respectively.
 ;
-                       lwz             r3,savesrr0(r13)                                ; Get the failing instruction address
-                       lwz             r4,savesrr0+4(r13)                              ; Get the failing instruction address
+                       lwz             r4,savesrr0(r13)                                ; Get the failing instruction address
                        lwz             r5,savecr(r13)                                  ; Get the condition register
-                       or              r4,r4,r0                                                ; Fill the high part with foxes
-                       lwz             r0,savedar(r13)                                 ; Get the DAR
-                       addic   r4,r4,4                                                 ; Skip failing instruction
-                       lwz             r6,savedar+4(r13)                               ; Get the DAR
-                       addze   r3,r3                                                   ; Propagate carry
+                       addi    r4,r4,4                                                 ; Skip failing instruction
+                       lwz             r6,savedar(r13)                                 ; Get the DAR
                        rlwinm  r5,r5,0,3,1                                             ; Clear CR0_EQ to let emulation code know we failed
                        lwz             r7,savedsisr(r13)                               ; Grab the DSISR
-                       stw             r3,savesrr0(r13)                                ; Save resume address
-                       stw             r4,savesrr0+4(r13)                              ; Save resume address
+                       stw             r0,savesrr1(r13)                                ; Save the result MSR
+                       stw             r4,savesrr0(r13)                                ; Save resume address
                        stw             r5,savecr(r13)                                  ; And the resume CR
-                       stw             r0,saver0(r13)                                  ; Pass back the DAR
-                       stw             r6,saver0+4(r13)                                ; Pass back the DAR
-                       stw             r7,saver1+4(r13)                                ; Pass back the DSISR
+                       stw             r6,saver0(r13)                                  ; Pass back the DAR
+                       stw             r7,saver1(r13)                                  ; Pass back the DSISR
                        b               EatRupt                                                 ; Resume emulated code
 
 ;
 ;                      Here is where we handle the context switch firmware call.  The old 
-;                      context has been saved. The new savearea is in kind of hokey, the high order
-;                      half is stored in saver7 and the low half is in saver3. We will just
+;                      context has been saved, and the new savearea in in saver3.  We will just
 ;                      muck around with the savearea pointers, and then join the exit routine 
 ;
 
                        .align  5
 
 conswtch:      
-                       li              r0,0xFFF                                                ; Get page boundary
                        mr              r29,r13                                                 ; Save the save
-                       andc    r30,r13,r0                                              ; Round down to page boundary (64-bit safe)
-                       lwz             r5,saver3+4(r13)                                ; Switch to the new savearea
-                       bf--    pf64Bitb,xcswNo64                               ; Not 64-bit...
-                       lwz             r6,saver7+4(r13)                                ; Get the high order half
-                       sldi    r6,r6,32                                                ; Position high half
-                       or              r5,r5,r6                                                ; Merge them
-
-xcswNo64:      lwz             r30,SACvrswap+4(r30)                    ; get real to virtual translation
+                       rlwinm  r30,r13,0,0,19                                  ; Get the start of the savearea block
+                       lwz             r5,saver3(r13)                                  ; Switch to the new savearea
+                       lwz             r30,SACvrswap(r30)                              ; get real to virtual translation
                        mr              r13,r5                                                  ; Switch saveareas
-                       li              r0,0                                                    ; Clear this
                        xor             r27,r29,r30                                             ; Flip to virtual
-                       stw             r0,saver3(r5)                                   ; Push the new virtual savearea to the switch to routine
-                       stw             r27,saver3+4(r5)                                ; Push the new virtual savearea to the switch to routine
+                       stw             r27,saver3(r5)                                  ; Push the new savearea to the switch to routine
                        b               EatRupt                                                 ; Start it up... 
 
 ;
@@ -1961,437 +1451,89 @@ xcswNo64:      lwz             r30,SACvrswap+4(r30)                    ; get real to virtual translation
 
 MachineCheck:
 
-                       bt++    pf64Bitb,mck64                                  ; ?
-                       
-                       lwz             r27,savesrr1+4(r13)                             ; Pick up srr1
-
-;
-;                      Check if the failure was in 
-;                      ml_probe_read.  If so, this is expected, so modify the PC to
-;                      ml_proble_read_mck and then eat the exception.
-;
-                       lwz             r30,savesrr0+4(r13)                             ; Get the failing PC
-                       lis             r28,hi16(EXT(ml_probe_read_mck))        ; High order part
-                       lis             r27,hi16(EXT(ml_probe_read))    ; High order part
-                       ori             r28,r28,lo16(EXT(ml_probe_read_mck))    ; Get the low part
-                       ori             r27,r27,lo16(EXT(ml_probe_read))        ; Get the low part
-                       cmplw   r30,r28                                                 ; Check highest possible
-                       cmplw   cr1,r30,r27                                             ; Check lowest
-                       bge-    PassUpTrap                                              ; Outside of range
-                       blt-    cr1,PassUpTrap                                  ; Outside of range
-;
-;                      We need to fix up the BATs here because the probe
-;                      routine messed them all up... As long as we are at it,
-;                      fix up to return directly to caller of probe.
-;
-               
-                       lis             r11,hi16(EXT(shadow_BAT)+shdDBAT)       ; Get shadow address
-                       ori             r11,r11,lo16(EXT(shadow_BAT)+shdDBAT)   ; Get shadow address
-                       
-                       lwz             r30,0(r11)                                              ; Pick up DBAT 0 high
-                       lwz             r28,4(r11)                                              ; Pick up DBAT 0 low
-                       lwz             r27,8(r11)                                              ; Pick up DBAT 1 high
-                       lwz             r18,16(r11)                                             ; Pick up DBAT 2 high
-                       lwz             r11,24(r11)                                             ; Pick up DBAT 3 high
-                       
-                       sync
-                       mtdbatu 0,r30                                                   ; Restore DBAT 0 high
-                       mtdbatl 0,r28                                                   ; Restore DBAT 0 low
-                       mtdbatu 1,r27                                                   ; Restore DBAT 1 high
-                       mtdbatu 2,r18                                                   ; Restore DBAT 2 high
-                       mtdbatu 3,r11                                                   ; Restore DBAT 3 high 
-                       sync
-
-                       lwz             r28,savelr+4(r13)                               ; Get return point
-                       lwz             r27,saver0+4(r13)                               ; Get the saved MSR
-                       li              r30,0                                                   ; Get a failure RC
-                       stw             r28,savesrr0+4(r13)                             ; Set the return point
-                       stw             r27,savesrr1+4(r13)                             ; Set the continued MSR
-                       stw             r30,saver3+4(r13)                               ; Set return code
-                       b               EatRupt                                                 ; Yum, yum, eat it all up...
-
-;
-;                      64-bit machine checks
-;
-
-mck64:         
-
-;
-;                      NOTE: WE NEED TO RETHINK RECOVERABILITY A BIT - radar 3167190
-;
-
-                       ld              r23,savesrr0(r13)                               ; Grab the SRR0 in case we need bad instruction
-                       ld              r20,savesrr1(r13)                               ; Grab the SRR1 so we can decode the thing
-                       lwz             r21,savedsisr(r13)                              ; We might need this in a bit
-                       ld              r22,savedar(r13)                                ; We might need this in a bit
-
-                       lis             r8,AsyMCKSrc                                    ; Get the Async MCK Source register address
-                       mfsprg  r19,2                                                   ; Get the feature flags
-                       ori             r8,r8,0x8000                                    ; Set to read data
-                       rlwinm. r0,r19,0,pfSCOMFixUpb,pfSCOMFixUpb      ; Do we need to fix the SCOM data?
-                       
-                       sync
-
-                       mtspr   scomc,r8                                                ; Request the MCK source
-                       mfspr   r24,scomd                                               ; Get the source
-                       mfspr   r8,scomc                                                ; Get back the status (we just ignore it)
-                       sync
-                       isync                                                   
-
-                       lis             r8,AsyMCKRSrc                                   ; Get the Async MCK Source AND mask address
-                       li              r9,0                                                    ; Get and AND mask of 0
-                       
-                       sync
-
-                       mtspr   scomd,r9                                                ; Set the AND mask to 0
-                       mtspr   scomc,r8                                                ; Write the AND mask and clear conditions
-                       mfspr   r8,scomc                                                ; Get back the status (we just ignore it)
-                       sync
-                       isync                                                   
-
-                       lis             r8,cFIR                                                 ; Get the Core FIR register address
-                       ori             r8,r8,0x8000                                    ; Set to read data
-                       
-                       sync
-
-                       mtspr   scomc,r8                                                ; Request the Core FIR
-                       mfspr   r25,scomd                                               ; Get the source
-                       mfspr   r8,scomc                                                ; Get back the status (we just ignore it)
-                       sync
-                       isync                                                   
-                       
-                       lis             r8,cFIRrst                                              ; Get the Core FIR AND mask address
-                       
-                       sync
-
-                       mtspr   scomd,r9                                                ; Set the AND mask to 0
-                       mtspr   scomc,r8                                                ; Write the AND mask and clear conditions
-                       mfspr   r8,scomc                                                ; Get back the status (we just ignore it)
-                       sync
-                       isync                                                   
-                       
-;                      Note: bug in early chips where scom reads are shifted right by 1. We fix that here.
-;                      Also note that we will lose bit 63
-
-                       beq++   mckNoFix                                                ; No fix up is needed
-                       sldi    r24,r24,1                                               ; Shift left 1
-                       sldi    r25,r25,1                                               ; Shift left 1
-                       
-mckNoFix:      std             r24,savemisc0(r13)                              ; Save the MCK source in case we pass the error
-                       std             r25,savemisc1(r13)                              ; Save the Core FIR in case we pass the error
-
-                       rlwinm. r0,r20,0,mckIFUE-32,mckIFUE-32  ; Is this some kind of uncorrectable?
-                       bne             mckUE                                                   ; Yeah...
-                       
-                       rlwinm. r0,r20,0,mckLDST-32,mckLDST-32  ; Some kind of load/store error?
-                       bne             mckHandleLDST                                   ; Yes...
-                       
-                       rldicl. r0,r20,46,62                                    ; Get the error cause code
-                       beq             mckNotSure                                              ; We need some more checks for this one...
-                       
-                       cmplwi  r0,2                                                    ; Check for TLB parity error
-                       blt             mckSLBparity                                    ; This is an SLB parity error...
-                       bgt             mckhIFUE                                                ; This is an IFetch tablewalk reload UE...
-                       
-;                      IFetch TLB parity error
-
-                       isync
-                       tlbiel  r23                                                             ; Locally invalidate TLB entry for iaddr
-                       sync                                                                    ; Wait for it
-                       b               EatRupt                                                 ; All recovered...
-                       
-;                      SLB parity error.  This could be software caused.  We get one if there is
-;                      more than 1 valid SLBE with a matching ESID. That one we do not want to
-;                      try to recover from.  Search for it and if we get it, panic. 
-
-mckSLBparity:
-                       crclr   cr0_eq                                                  ; Make sure we are not equal so we take correct exit
-
-                       la              r3,emvr0(r2)                                    ; Use this to keep track of valid ESIDs we find
-                       li              r5,0                                                    ; Start with index 0
-
-mckSLBck:      la              r4,emvr0(r2)                                    ; Use this to keep track of valid ESIDs we find
-                       slbmfee r6,r5                                                   ; Get the next SLBE
-                       andis.  r0,r6,0x0800                                    ; See if valid bit is on
-                       beq             mckSLBnx                                                ; Skip invalid and go to next
-                       
-mckSLBck2:     cmpld   r4,r3                                                   ; Have we reached the end of the table?
-                       beq             mckSLBne                                                ; Yes, go enter this one...
-                       ld              r7,0(r4)                                                ; Pick up the saved ESID
-                       cmpld   r6,r7                                                   ; Is this a match?
-                       beq             mckSLBrec                                               ; Whoops, I did bad, recover and pass up...
-                       addi    r4,r4,8                                                 ; Next table entry
-                       b               mckSLBck2                                               ; Check the next...
-
-mckSLBnx:      addi    r5,r5,1                                                 ; Point to next SLBE
-                       cmplwi  r5,64                                                   ; Have we checked all of them?
-                       bne++   mckSLBck                                                ; Not yet, check again...
-                       b               mckSLBrec                                               ; We looked at them all, go recover...
-                       
-mckSLBne:      std             r6,0(r3)                                                ; Save this ESID
-                       addi    r3,r3,8                                                 ; Point to the new slot
-                       b               mckSLBnx                                                ; Go do the next SLBE...
-                       
-;                      Recover an SLB error
-                       
-mckSLBrec:     li              r0,0                                                    ; Set an SLB slot index of 0
-                       slbia                                                                   ; Trash all SLB entries (except for entry 0 that is)
-                       slbmfee r7,r0                                                   ; Get the entry that is in SLB index 0
-                       rldicr  r7,r7,0,35                                              ; Clear the valid bit and the rest
-                       slbie   r7                                                              ; Invalidate it
-                       
-                       li              r3,0                                                    ; Set the first SLBE
-                       
-mckSLBclr:     slbmte  r0,r3                                                   ; Clear the whole entry to 0s
-                       addi    r3,r3,1                                                 ; Bump index
-                       cmplwi  cr1,r3,64                                               ; Have we done them all?
-                       bne++   cr1,mckSLBclr                                   ; Yup....
-                       
-                       sth             r3,ppInvSeg(r2)                                 ; Store non-zero to trigger SLB reload 
-                       bne++   EatRupt                                                 ; This was not a programming error, all recovered...
-                       b               PassUpTrap                                              ; Pass the software error up...
-
-;
-;                      Handle a load/store unit error.  We need to decode the DSISR
-;
-
-mckHandleLDST:
-                       rlwinm. r0,r21,0,mckL1DCPE,mckL1DCPE    ; An L1 data cache parity error?
-                       bne++   mckL1D                                                  ; Yeah, we dealt with this back in the vector...
-               
-                       rlwinm. r0,r21,0,mckL1DTPE,mckL1DTPE    ; An L1 tag error?
-                       bne++   mckL1T                                                  ; Yeah, we dealt with this back in the vector...
-               
-                       rlwinm. r0,r21,0,mckUEdfr,mckUEdfr              ; Is the a "deferred" UE?
-                       bne             mckDUE                                                  ; Yeah, go see if expected...
-               
-                       rlwinm. r0,r21,0,mckUETwDfr,mckUETwDfr  ; Is the a "deferred" tablewalk UE?
-                       bne             mckDTW                                                  ; Yeah, no recovery...
-                       
-                       rlwinm. r0,r21,0,mckSLBPE,mckSLBPE              ; SLB parity error?
-                       bne             mckSLBparity                                    ; Yeah, go attempt recovery....
+                       lwz             r27,savesrr1(r13)                               ; ?
+                       rlwinm. r11,r27,0,dcmck,dcmck                   ; ?
+                       beq+    notDCache                                               ; ?
                        
-;                      This is a recoverable D-ERAT or TLB error
-
-                       la              r9,hwMckERCPE(r2)                               ; Get DERAT parity error count
-
-mckInvDAR:     isync
-                       tlbiel  r22                                                             ; Locally invalidate the TLB entry
+                       mfspr   r11,msscr0                                              ; ?
+                       dssall                                                                  ; ?
                        sync
                        
-                       lwz             r21,0(r9)                                               ; Get count
-                       addi    r21,r21,1                                               ; Count this one
-                       stw             r21,0(r9)                                               ; Stick it back
-                       
-                       b               EatRupt                                                 ; All recovered...
-               
-;
-;                      When we come here, we are not quite sure what the error is.  We need to
-;                      dig a bit further.
-;
-;                      R24 is interrupt source
-;                      R25 is Core FIR
-;
-;                      Note that both have been cleared already.
-;
-
-mckNotSure:
-                       rldicl. r0,r24,AsyMCKfir+1,63                   ; Something in the FIR?
-                       bne--   mckFIR                                                  ; Yup, go check some more...
-                       
-                       rldicl. r0,r24,AsyMCKhri+1,63                   ; Hang recovery?
-                       bne--   mckHangRcvr                                             ; Yup...
-                       
-                       rldicl. r0,r24,AsyMCKext+1,63                   ; External signal?
-                       bne--   mckExtMck                                               ; Yup...
-
-;
-;                      We really do not know what this one is or what to do with it...
-;
-                       
-mckUnk:                lwz             r21,hwMckUnk(r2)                                ; Get unknown error count
-                       addi    r21,r21,1                                               ; Count it
-                       stw             r21,hwMckUnk(r2)                                ; Stuff it
-                       b               PassUpTrap                                              ; Go south, young man...
-
-;
-;                      Hang recovery.  This is just a notification so we only count.
-;
-                       
-mckHangRcrvr:
-                       lwz             r21,hwMckHang(r2)                               ; Get hang recovery count
-                       addi    r21,r21,1                                               ; Count this one
-                       stw             r21,hwMckHang(r2)                               ; Stick it back
-                       b               EatRupt                                                 ; All recovered...
-
-;
-;                      Externally signaled MCK.  No recovery for the moment, but we this may be
-;                      where we handle ml_probe_read problems eventually.
-;                      
-mckExtMck:
-                       lwz             r21,hwMckHang(r2)                               ; Get hang recovery count
-                       addi    r21,r21,1                                               ; Count this one
-                       stw             r21,hwMckHang(r2)                               ; Stick it back
-                       b               EatRupt                                                 ; All recovered...
-
-;
-;                      Machine check cause is in a FIR.  Suss it out here.
-;                      Core FIR is in R25 and has been cleared in HW.
-;                      
-
-mckFIR:                rldicl. r0,r25,cFIRICachePE+1,63                ; I-Cache parity error?
-                       la              r19,hwMckICachePE(r2)                   ; Point to counter
-                       bne             mckInvICache                                    ; Go invalidate I-Cache...
-
-                       rldicl. r0,r25,cFIRITagPE0+1,63                 ; I-Cache tag parity error?
-                       la              r19,hwMckITagPE(r2)                             ; Point to counter
-                       bne             mckInvICache                                    ; Go invalidate I-Cache...
-
-                       rldicl. r0,r25,cFIRITagPE1+1,63                 ; I-Cache tag parity error?
-                       la              r19,hwMckITagPE(r2)                             ; Point to counter
-                       bne             mckInvICache                                    ; Go invalidate I-Cache...
-
-                       rldicl. r0,r25,cFIRIEratPE+1,63                 ; IERAT parity error?
-                       la              r19,hwMckIEratPE(r2)                    ; Point to counter
-                       bne             mckInvERAT                                              ; Go invalidate ERATs...
-
-                       rldicl. r0,r25,cFIRIFUL2UE+1,63                 ; IFetch got L2 UE?
-                       bne             mckhIFUE                                                ; Go count and pass up...
-
-                       rldicl. r0,r25,cFIRDCachePE+1,63                ; D-Cache PE?
-                       bne             mckL1D                                                  ; Handled, just go count...
-
-                       rldicl. r0,r25,cFIRDTagPE+1,63                  ; D-Cache tag PE?
-                       bne             mckL1T                                                  ; Handled, just go count...
-
-                       rldicl. r0,r25,cFIRDEratPE+1,63                 ; DERAT PE?
-                       la              r19,hwMckDEratPE(r2)                    ; Point to counter
-                       bne             mckInvERAT                                              ; Go invalidate ERATs...
-
-                       rldicl. r0,r25,cFIRTLBPE+1,63                   ; TLB PE?
-                       la              r9,hwMckTLBPE(r2)                               ; Get TLB parity error count
-                       bne             mckInvDAR                                               ; Go recover...
-
-                       rldicl. r0,r25,cFIRSLBPE+1,63                   ; SLB PE?
-                       bne             mckSLBparity                                    ; Cope with it...
-                       
-                       b               mckUnk                                                  ; Have not a clue...
-
-;
-;                      General recovery for I-Cache errors.  Just flush it completely.
-;
-
-                       .align  7                                                               ; Force into cache line
-
-mckInvICache:
-                       lis             r0,0x0080                                               ; Get a 0x0080 (bit 9 >> 32)
-                       mfspr   r21,hid1                                                ; Get the current HID1
-                       sldi    r0,r0,32                                                ; Get the "forced ICBI match" bit
-                       or              r0,r0,r21                                               ; Set forced match
-                       
-                       isync
-                       mtspr   hid1,r0                                                 ; Stick it
-                       mtspr   hid1,r0                                                 ; Stick it again
-                       isync
-               
-                       li              r6,0                                                    ; Start at 0
-                       
-mckIcbi:       icbi    0,r6                                                    ; Kill I$
-                       addi    r6,r6,128                                               ; Next line
-                       andis.  r5,r6,1                                                 ; Have we done them all?
-                       beq++   mckIcbi                                                 ; Not yet...
-
-                       isync
-                       mtspr   hid1,r21                                                ; Restore original HID1
-                       mtspr   hid1,r21                                                ; Stick it again
-                       isync
-                       
-                       lwz             r5,0(r19)                                               ; Get the counter
-                       addi    r5,r5,1                                                 ; Count it
-                       stw             r5,0(r19)                                               ; Stuff it back
-                       b               EatRupt                                                 ; All recovered...
-                       
-               
-;                      General recovery for ERAT problems - handled in exception vector already
+                       lwz             r27,savesrr1(r13)                               ; ?
 
-mckInvERAT:    lwz             r21,0(r19)                                              ; Get the exception count spot
-                       addi    r21,r21,1                                               ; Count this one
-                       stw             r21,0(r19)                                              ; Save count
-                       b               EatRupt                                                 ; All recovered...
+hiccup:                cmplw   r27,r27                                                 ; ?
+                       bne-    hiccup                                                  ; ?
+                       isync                                                                   ; ?
+                       
+                       oris    r11,r11,hi16(dl1hwfm)                   ; ?
+                       mtspr   msscr0,r11                                              ; ?
+                       
+rstbsy:                mfspr   r11,msscr0                                              ; ?
                        
-;                      General hang recovery - this is a notification only, just count.        
+                       rlwinm. r11,r11,0,dl1hwf,dl1hwf                 ; ?
+                       bne             rstbsy                                                  ; ?
                        
-mckHangRcvr:                   
-                       lwz             r21,hwMckHang(r2)                               ; Get hang recovery count
-                       addi    r21,r21,1                                               ; Count this one
-                       stw             r21,hwMckHang(r2)                               ; Stick it back
-                       b               EatRupt                                                 ; All recovered...
+                       sync                                                                    ; ?
 
+                       b               EatRupt                                                 ; ?
 
+                       .align  5
+                       
+notDCache:
 ;
-;                      These are the uncorrectable errors, just count them then pass it along.
+;                      Check if the failure was in 
+;                      ml_probe_read.  If so, this is expected, so modify the PC to
+;                      ml_proble_read_mck and then eat the exception.
 ;
-       
-mckUE:         lwz             r21,hwMckUE(r2)                                 ; Get general uncorrectable error count
-                       addi    r21,r21,1                                               ; Count it
-                       stw             r21,hwMckUE(r2)                                 ; Stuff it
-                       b               PassUpTrap                                              ; Go south, young man...
-       
-mckhIFUE:      lwz             r21,hwMckIUEr(r2)                               ; Get I-Fetch TLB reload uncorrectable error count
-                       addi    r21,r21,1                                               ; Count it
-                       stw             r21,hwMckIUEr(r2)                               ; Stuff it
-                       b               PassUpTrap                                              ; Go south, young man...
-
-mckDUE:                lwz             r21,hwMckDUE(r2)                                ; Get deferred uncorrectable error count
-                       addi    r21,r21,1                                               ; Count it
-                       stw             r21,hwMckDUE(r2)                                ; Stuff it
-                       
-;
-;                      Right here is where we end up after a failure on a ml_probe_read_64.
-;                      We will check if that is the case, and if so, fix everything up and
-;                      return from it.
-                       
-                       lis             r8,hi16(EXT(ml_probe_read_64))  ; High of start
-                       lis             r9,hi16(EXT(ml_probe_read_mck_64))      ; High of end
-                       ori             r8,r8,lo16(EXT(ml_probe_read_64))       ; Low of start
-                       ori             r9,r9,lo16(EXT(ml_probe_read_mck_64))   ; Low of end
-                       cmpld   r23,r8                                                  ; Too soon?
-                       cmpld   cr1,r23,r9                                              ; Too late?
-                       
-                       cror    cr0_lt,cr0_lt,cr1_gt                    ; Too soo or too late?
-                       ld              r3,saver12(r13)                                 ; Get the original MSR
-                       ld              r5,savelr(r13)                                  ; Get the return address
-                       li              r4,0                                                    ; Get fail code
-                       blt--   PassUpTrap                                              ; This is a normal machine check, just pass up...
-                       std             r5,savesrr0(r13)                                ; Set the return MSR
-                       
-                       std             r3,savesrr1(r13)                                ; Set the return address
-                       std             r4,saver3(r13)                                  ; Set failure return code
-                       b               EatRupt                                                 ; Go return from ml_probe_read_64...
-
-mckDTW:                lwz             r21,hwMckDTW(r2)                                ; Get deferred tablewalk uncorrectable error count
-                       addi    r21,r21,1                                               ; Count it
-                       stw             r21,hwMckDTW(r2)                                ; Stuff it
-                       b               PassUpTrap                                              ; Go south, young man...
-
-mckL1D:                lwz             r21,hwMckL1DPE(r2)                              ; Get data cache parity error count
-                       addi    r21,r21,1                                               ; Count it
-                       stw             r21,hwMckL1DPE(r2)                              ; Stuff it
-                       b               PassUpTrap                                              ; Go south, young man...
-
-mckL1T:                lwz             r21,hwMckL1TPE(r2)                              ; Get TLB parity error count
-                       addi    r21,r21,1                                               ; Count it
-                       stw             r21,hwMckL1TPE(r2)                              ; Stuff it
-                       b               PassUpTrap                                              ; Go south, young man...
+                       lwz             r30,savesrr0(r13)                               ; Get the failing PC
+                       lis             r28,hi16(EXT(ml_probe_read_mck))        ; High order part
+                       lis             r27,hi16(EXT(ml_probe_read))    ; High order part
+                       ori             r28,r28,lo16(EXT(ml_probe_read_mck))    ; Get the low part
+                       ori             r27,r27,lo16(EXT(ml_probe_read))        ; Get the low part
+                       cmplw   r30,r28                                                 ; Check highest possible
+                       cmplw   cr1,r30,r27                                             ; Check lowest
+                       bge-    PassUp                                                  ; Outside of range
+                       blt-    cr1,PassUp                                              ; Outside of range
+;
+;                      We need to fix up the BATs here because the probe
+;                      routine messed them all up... As long as we are at it,
+;                      fix up to return directly to caller of probe.
+;
+               
+                       lis             r11,hi16(EXT(shadow_BAT)+shdDBAT)       ; Get shadow address
+                       ori             r11,r11,lo16(EXT(shadow_BAT)+shdDBAT)   ; Get shadow address
+                       
+                       lwz             r30,0(r11)                                              ; Pick up DBAT 0 high
+                       lwz             r28,4(r11)                                              ; Pick up DBAT 0 low
+                       lwz             r27,8(r11)                                              ; Pick up DBAT 1 high
+                       lwz             r18,16(r11)                                             ; Pick up DBAT 2 high
+                       lwz             r11,24(r11)                                             ; Pick up DBAT 3 high
                        
+                       sync
+                       mtdbatu 0,r30                                                   ; Restore DBAT 0 high
+                       mtdbatl 0,r28                                                   ; Restore DBAT 0 low
+                       mtdbatu 1,r27                                                   ; Restore DBAT 1 high
+                       mtdbatu 2,r18                                                   ; Restore DBAT 2 high
+                       mtdbatu 3,r11                                                   ; Restore DBAT 3 high 
+                       sync
+
+                       lwz             r27,saver6(r13)                                 ; Get the saved R6 value
+                       mtspr           hid0,r27                                        ; Restore HID0
+                       isync
+
+                       lwz             r28,savelr(r13)                                 ; Get return point
+                       lwz             r27,saver0(r13)                                 ; Get the saved MSR
+                       li              r30,0                                                   ; Get a failure RC
+                       stw             r28,savesrr0(r13)                               ; Set the return point
+                       stw             r27,savesrr1(r13)                               ; Set the continued MSR
+                       stw             r30,saver3(r13)                                 ; Set return code
+                       b               EatRupt                                                 ; Yum, yum, eat it all up...
 
 /*
  *                     Here's where we come back from some instruction emulator.  If we come back with
  *                     T_IN_VAIN, the emulation is done and we should just reload state and directly
  *                     go back to the interrupted code. Otherwise, we'll check to see if
  *                     we need to redrive with a different interrupt, i.e., DSI.
- *                     Note that this we are actually not redriving the rupt, rather changing it
- *                     into a different one.  Thus we clear the redrive bit.
  */
  
                        .align  5
@@ -2399,15 +1541,18 @@ mckL1T:         lwz             r21,hwMckL1TPE(r2)                              ; Get TLB parity error count
 
 LEXT(EmulExit)
 
-                       cmplwi  cr1,r11,T_IN_VAIN                               ; Was it emulated?
+                       cmplwi  r11,T_IN_VAIN                                   ; Was it emulated? 
                        lis             r1,hi16(SAVredrive)                             ; Get redrive request
-                       beq++   cr1,EatRupt                                             ; Yeah, just blast back to the user...
+                       mfsprg  r2,0                                                    ; Restore the per_proc area
+                       beq+    EatRupt                                                 ; Yeah, just blast back to the user...
                        lwz             r4,SAVflags(r13)                                ; Pick up the flags
 
                        and.    r0,r4,r1                                                ; Check if redrive requested
+                       andc    r4,r4,r1                                                ; Clear redrive
 
-                       beq++   PassUpTrap                                              ; No redrive, just keep on going...
+                       beq+    PassUp                                                  ; No redrive, just keep on going...
 
+                       stw             r4,SAVflags(r13)                                ; Set the flags
                        b               Redrive                                                 ; Redrive the exception...
                
 ;
@@ -2417,106 +1562,41 @@ LEXT(EmulExit)
 ;                      memory, otherwise we would need to switch on (at least) virtual data.
 ;                      SRs are already set up.
 ;
-       
-                       .align  5
-       
-PassUpTrap:    lis             r20,hi16(EXT(thandler))                 ; Get thandler address
-                       ori             r20,r20,lo16(EXT(thandler))             ; Get thandler address
-                       b               PassUp                                                  ; Go pass it up...
-       
-PassUpRupt:    lis             r20,hi16(EXT(ihandler))                 ; Get ihandler address
-                       ori             r20,r20,lo16(EXT(ihandler))             ; Get ihandler address
-                       b               PassUp                                                  ; Go pass it up...
-       
-                       .align  5
-       
-PassUpFPU:     lis             r20,hi16(EXT(fpu_switch))               ; Get FPU switcher address
-                       ori             r20,r20,lo16(EXT(fpu_switch))   ; Get FPU switcher address
-                       b               PassUp                                                  ; Go pass it up...
-       
-PassUpVMX:     lis             r20,hi16(EXT(vec_switch))               ; Get VMX switcher address
-                       ori             r20,r20,lo16(EXT(vec_switch))   ; Get VMX switcher address
-                       bt++    featAltivec,PassUp                              ; We have VMX on this CPU...
-                       li              r11,T_PROGRAM                                   ; Say that it is a program exception
-                       li              r20,8                                                   ; Set invalid instruction
-                       stw             r11,saveexception(r13)                  ; Set the new the exception code
-                       sth             r20,savesrr1+4(r13)                             ; Set the invalid instruction SRR code
-                       
-                       b               PassUpTrap                                              ; Go pass it up...
-       
-                       .align  5
-       
-PassUpAbend:   
-                       lis             r20,hi16(EXT(chandler))                 ; Get choke handler address
-                       ori             r20,r20,lo16(EXT(chandler))             ; Get choke handler address
-                       b               PassUp                                                  ; Go pass it up...
 
                        .align  5
 
-PassUp:                
-#if INSTRUMENT
-                       mfspr   r29,pmc1                                                ; INSTRUMENT - saveinstr[11] - Take stamp at passup or eatrupt
-                       stw             r29,0x6100+(11*16)+0x0(0)               ; INSTRUMENT - Save it
-                       mfspr   r29,pmc2                                                ; INSTRUMENT - Get stamp
-                       stw             r29,0x6100+(11*16)+0x4(0)               ; INSTRUMENT - Save it
-                       mfspr   r29,pmc3                                                ; INSTRUMENT - Get stamp
-                       stw             r29,0x6100+(11*16)+0x8(0)               ; INSTRUMENT - Save it
-                       mfspr   r29,pmc4                                                ; INSTRUMENT - Get stamp
-                       stw             r29,0x6100+(11*16)+0xC(0)               ; INSTRUMENT - Save it
-#endif                 
-                       
-                       lwz             r10,SAVflags(r13)                               ; Pick up the flags
+PassUp:                lis             r2,hi16(EXT(exception_handlers))        ; Get exception vector address
+                       ori             r2,r2,lo16(EXT(exception_handlers))     ; And low half
+                       lwzx    r6,r2,r11                                               ; Get the actual exception handler address
 
-                       li              r0,0xFFF                                                ; Get a page mask
-                       li              r2,MASK(MSR_BE)|MASK(MSR_SE)    ; Get the mask to save trace bits
-                       andc    r5,r13,r0                                               ; Back off to the start of savearea block
+PassUpDeb:     mtsrr0  r6                                                              ; Set up the handler address
+                       rlwinm  r5,r13,0,0,19                                   ; Back off to the start of savearea block
+                       
                        mfmsr   r3                                                              ; Get our MSR
-                       rlwinm  r10,r10,0,SAVredriveb+1,SAVredriveb-1   ; Clear the redrive before we pass it up
-                       li              r21,MSR_SUPERVISOR_INT_OFF              ; Get our normal MSR value
-                       and             r3,r3,r2                                                ; Clear all but trace
-                       lwz             r5,SACvrswap+4(r5)                              ; Get real to virtual conversion                        
-                       or              r21,r21,r3                                              ; Keep the trace bits if they are on
-                       stw             r10,SAVflags(r13)                               ; Set the flags with the cleared redrive flag
+                       rlwinm  r3,r3,0,MSR_BE_BIT+1,MSR_SE_BIT-1       ; Clear all but the trace bits
+                       li              r2,MSR_SUPERVISOR_INT_OFF               ; Get our normal MSR value
+                       lwz             r5,SACvrswap(r5)                                ; Get real to virtual conversion                        
+                       or              r2,r2,r3                                                ; Keep the trace bits if they are on
                        mr              r3,r11                                                  ; Pass the exception code in the paramter reg
+                       mtsrr1  r2                                                              ; Set up our normal MSR value
                        xor             r4,r13,r5                                               ; Pass up the virtual address of context savearea
-                       mfsprg  r29,0                                                   ; Get the per_proc block back
-                       rlwinm  r4,r4,0,0,31                                    ; Clean top half of virtual savearea if 64-bit
-
-                       mr              r3,r21                                                  ; Pass in the MSR we will go to
-                       bl              EXT(switchSegs)                                 ; Go handle the segment registers/STB
-
-#if INSTRUMENT
-                       mfspr   r30,pmc1                                                ; INSTRUMENT - saveinstr[7] - Take stamp afer switchsegs
-                       stw             r30,0x6100+(7*16)+0x0(0)                        ; INSTRUMENT - Save it
-                       mfspr   r30,pmc2                                                ; INSTRUMENT - Get stamp
-                       stw             r30,0x6100+(7*16)+0x4(0)                        ; INSTRUMENT - Save it
-                       mfspr   r30,pmc3                                                ; INSTRUMENT - Get stamp
-                       stw             r30,0x6100+(7*16)+0x8(0)                        ; INSTRUMENT - Save it
-                       mfspr   r30,pmc4                                                ; INSTRUMENT - Get stamp
-                       stw             r30,0x6100+(7*16)+0xC(0)                        ; INSTRUMENT - Save it
-#endif                 
-                       lwz             r3,saveexception(r13)                   ; Recall the exception code
-                       
-                       mtsrr0  r20                                                             ; Set up the handler address
-                       mtsrr1  r21                                                             ; Set up our normal MSR value
-
-                       bt++    pf64Bitb,puLaunch                               ; Handle 64-bit machine...
 
                        rfi                                                                             ; Launch the exception handler
-                       
-puLaunch:      rfid                                                                    ; Launch the exception handler
+
+                       .long   0                                                               ; Leave these here gol durn it!
+                       .long   0
+                       .long   0
+                       .long   0
+                       .long   0
+                       .long   0
+                       .long   0
+                       .long   0
 
 /*
- *                     This routine is the main place where we return from an interruption.
- *
- *                     This is also where we release the quickfret list.  These are saveareas
- *                     that were released as part of the exception exit path in hw_exceptions.
- *                     In order to save an atomic operation (which actually will not work
- *                     properly on a 64-bit machine) we use holdQFret to indicate that the list
- *                     is in flux and should not be looked at here.  This comes into play only
- *                     when we take a PTE miss when we are queuing a savearea onto qfret.
- *                     Quite rare but could happen.  If the flag is set, this code does not
- *                     release the list and waits until next time.
+ *                     This routine is the only place where we return from an interruption.
+ *                     Anyplace else is wrong.  Even if I write the code, it's still wrong.
+ *                     Feel free to come by and slap me if I do do it--even though I may
+ *                     have had a good reason to do it.
  *
  *                     All we need to remember here is that R13 must point to the savearea
  *                     that has the context we need to load up. Translation and interruptions
@@ -2527,50 +1607,88 @@ puLaunch:       rfid                                                                    ; Launch the exception handler
  *                     is any tomfoolery with savearea stacks, it must be taken care of 
  *                     before we get here.
  *
+ *                     Speaking of tomfoolery, this is where we synthesize interruptions
+ *                     if we need to.
  */
  
                        .align  5
  
 EatRupt:       mfsprg  r29,0                                                   ; Get the per_proc block back
                        mr              r31,r13                                                 ; Move the savearea pointer to the far end of the register set
-                       mfsprg  r27,2                                                   ; Get the processor features
                        
-                       lwz             r3,holdQFret(r29)                               ; Get the release hold off flag
-
-                       bt++    pf64Bitb,eat64a                                 ; Skip down to the 64-bit version of this
-
-;
-;                      This starts the 32-bit version
-;
+                       lwz             r30,quickfret(r29)                              ; Pick up the quick fret list, if any
 
-                       mr.             r3,r3                                                   ; Should we hold off the quick release?
-                       lwz             r30,quickfret+4(r29)                    ; Pick up the quick fret list, if any
-                       la              r21,saver0(r31)                                 ; Point to the first thing we restore
-                       bne-    ernoqfret                                               ; Hold off set, do not release just now...
+                       mfsprg  r27,2                                                   ; Get the processor features
+                       lwz             r21,savesrr1(r31)                               ; Get destination MSR
                        
 erchkfret:     mr.             r3,r30                                                  ; Any savearea to quickly release?
                        beq+    ernoqfret                                               ; No quickfrets...
-                       lwz             r30,SAVprev+4(r30)                              ; Chain back now
+                       lwz             r30,SAVprev(r30)                                ; Chain back now
                        
                        bl              EXT(save_ret_phys)                              ; Put it on the free list                       
-                       stw             r30,quickfret+4(r29)                    ; Dequeue previous guy (really, it is ok to wait until after the release)
+                       stw             r30,quickfret(r29)                              ; Dequeue previous guy (really, it is ok to wait until after the release)
                        b               erchkfret                                               ; Try the next one...
 
+
                        .align  5
                        
-ernoqfret:     
-#if INSTRUMENT
-                       mfspr   r30,pmc1                                                ; INSTRUMENT - saveinstr[5] - Take stamp at saveareas released
-                       stw             r30,0x6100+(5*16)+0x0(0)                        ; INSTRUMENT - Save it
-                       mfspr   r30,pmc2                                                ; INSTRUMENT - Get stamp
-                       stw             r30,0x6100+(5*16)+0x4(0)                        ; INSTRUMENT - Save it
-                       mfspr   r30,pmc3                                                ; INSTRUMENT - Get stamp
-                       stw             r30,0x6100+(5*16)+0x8(0)                        ; INSTRUMENT - Save it
-                       mfspr   r30,pmc4                                                ; INSTRUMENT - Get stamp
-                       stw             r30,0x6100+(5*16)+0xC(0)                        ; INSTRUMENT - Save it
-#endif                 
+ernoqfret:     mtcrf   0x60,r27                                                ; Set CRs with thermal facilities
+                       rlwinm. r0,r21,0,MSR_EE_BIT,MSR_EE_BIT  ; Are interruptions going to be enabled?
+                       crandc  31,pfThermalb,pfThermIntb               ; See if we have both thermometer and not interrupt facility
+                       la              r21,saver0(r31)                                 ; Point to the first thing we restore
+                       crandc  31,cr0_eq,31                                    ; Factor in enablement
+                       bf              31,tempisok                                             ; No thermal checking needed...
+
+;
+;                      We get to here if 1) there is a thermal facility, and 2) the hardware
+;                      will or cannot interrupt, and 3) the interrupt will be enabled after this point.
+;
+                       
+                       mfspr   r16,thrm3                                               ; Get thermal 3         
+                       mfspr   r14,thrm1                                               ; Get thermal 2         
+                       rlwinm. r16,r16,0,thrme,thrme                   ; Is the themometer enabled?
+                       mfspr   r15,thrm2                                               ; Get thermal 2 
+                       beq-    tempisok                                                ; No thermometer...
+                       rlwinm  r16,r14,2,28,31                                 ; Cluster THRM1s TIE, V, TIN, and TIV at bottom 4 bits
+                       srawi   r0,r15,31                                               ; Make a mask of 1s if temprature over
+                       rlwinm  r30,r15,2,28,31                                 ; Cluster THRM2s TIE, V, TIN, and TIV at bottom 4 bits
+;
+;                      Note that the following compare check that V, TIN, and TIV are set and that TIE is cleared.
+;                      This insures that we only emulate when the hardware is not set to interrupt.
+;
+                       cmplwi  cr0,r16,7                                               ; Is there a valid pending interruption for THRM1?
+                       cmplwi  cr1,r30,7                                               ; Is there a valid pending interruption for THRM2?
+                       and             r15,r15,r0                                              ; Keep high temp if that interrupted, zero if not
+                       cror    cr0_eq,cr0_eq,cr1_eq                    ; Merge both
+                       andc    r14,r14,r0                                              ; Keep low if high did not interrupt, zero if it did
+                       bne+    tempisok                                                ; Nope, temprature is in range
+                       
+                       li              r11,T_THERMAL                                   ; Time to emulate a thermal interruption
+                       or              r14,r14,r15                                             ; Get contents of interrupting register
+                       mr              r13,r31                                                 ; Make sure savearea is pointed to correctly
+                       stw             r11,saveexception(r31)                  ; Set the exception code
+                       stw             r14,savedar(r31)                                ; Set the contents of the interrupting register into the dar
+
+;
+;                      This code is here to prevent a problem that will probably never happen.  If we are
+;                      returning from an emulation routine (alignment, altivec assist, etc.) the SRs may
+;                      not be set to the proper kernel values.  Then, if we were to emulate a thermal here,
+;                      we would end up running in the kernel with a bogus SR.  So, to prevent
+;                      this unfortunate circumstance, we slam the SRs here. (I worry too much...)
+;
 
-                       dcbt    0,r21                                                   ; Touch in the first thing we need
+                       lis             r30,hi16(KERNEL_SEG_REG0_VALUE) ; Get the high half of the kernel SR0 value
+                       mtsr    sr0,r30                                                 ; Set the kernel SR0 
+                       addis   r30,r30,0x0010                                  ; Point to the second segment of kernel
+                       mtsr    sr1,r30                                                 ; Set the kernel SR1 
+                       addis   r30,r30,0x0010                                  ; Point to the third segment of kernel
+                       mtsr    sr2,r30                                                 ; Set the kernel SR2 
+                       addis   r30,r30,0x0010                                  ; Point to the third segment of kernel
+                       mtsr    sr3,r30                                                 ; Set the kernel SR3
+                       b               Redrive                                                 ; Go process this new interruption...
+
+
+tempisok:      dcbt    0,r21                                                   ; Touch in the first thing we need
                        
 ;
 ;                      Here we release the savearea.
@@ -2583,383 +1701,291 @@ ernoqfret:
 ;                      savearea to the head of the local list.  Then, if it needs to trim, it will
 ;                      start with the SECOND savearea, leaving ours intact.
 ;
+;                      Build the SR values depending upon destination.  If we are going to the kernel,
+;                      the SRs are almost all the way set up. SR14 (or the currently used copyin/out register)
+;                      must be set to whatever it was at the last exception because it varies.  All the rest
+;                      have been set up already.
+;
+;                      If we are going into user space, we need to check a bit more. SR0, SR1, SR2, and
+;                      SR14 (current implementation) must be restored always.  The others must be set if
+;                      they are different that what was loaded last time (i.e., tasks have switched).  
+;                      We check the last loaded address space ID and if the same, we skip the loads.  
+;                      This is a performance gain because SR manipulations are slow.
+;
+;                      There is also the special case when MSR_RI is set.  This happens when we are trying to
+;                      make a special user state access when we are in the kernel.  If we take an exception when
+;                      during that, the SRs may have been modified.  Therefore, we need to restore them to
+;                      what they were before the exception because they could be non-standard.  We saved them
+;                      during exception entry, so we will just load them here.
 ;
 
                        mr              r3,r31                                                  ; Get the exiting savearea in parm register
                        bl              EXT(save_ret_phys)                              ; Put it on the free list                       
-#if INSTRUMENT
-                       mfspr   r3,pmc1                                                 ; INSTRUMENT - saveinstr[6] - Take stamp afer savearea released
-                       stw             r3,0x6100+(6*16)+0x0(0)                 ; INSTRUMENT - Save it
-                       mfspr   r3,pmc2                                                 ; INSTRUMENT - Get stamp
-                       stw             r3,0x6100+(6*16)+0x4(0)                 ; INSTRUMENT - Save it
-                       mfspr   r3,pmc3                                                 ; INSTRUMENT - Get stamp
-                       stw             r3,0x6100+(6*16)+0x8(0)                 ; INSTRUMENT - Save it
-                       mfspr   r3,pmc4                                                 ; INSTRUMENT - Get stamp
-                       stw             r3,0x6100+(6*16)+0xC(0)                 ; INSTRUMENT - Save it
-#endif                 
 
-                       lwz             r3,savesrr1+4(r31)                              ; Pass in the MSR we are going to
-                       bl              EXT(switchSegs)                                 ; Go handle the segment registers/STB
-#if INSTRUMENT
-                       mfspr   r30,pmc1                                                ; INSTRUMENT - saveinstr[10] - Take stamp afer switchsegs
-                       stw             r30,0x6100+(10*16)+0x0(0)               ; INSTRUMENT - Save it
-                       mfspr   r30,pmc2                                                ; INSTRUMENT - Get stamp
-                       stw             r30,0x6100+(10*16)+0x4(0)               ; INSTRUMENT - Save it
-                       mfspr   r30,pmc3                                                ; INSTRUMENT - Get stamp
-                       stw             r30,0x6100+(10*16)+0x8(0)               ; INSTRUMENT - Save it
-                       mfspr   r30,pmc4                                                ; INSTRUMENT - Get stamp
-                       stw             r30,0x6100+(10*16)+0xC(0)               ; INSTRUMENT - Save it
-#endif                 
-                       li              r3,savesrr1+4                                   ; Get offset to the srr1 value
+                       li              r3,savesrr1                                             ; Get offset to the srr1 value
 
-                       lhz             r9,PP_CPU_FLAGS(r29)                    ; Get the processor flags
                        lwarx   r26,r3,r31                                              ; Get destination MSR and take reservation along the way (just so we can blow it away)
-                       
-                       rlwinm  r25,r26,27,22,22                                ; Move PR bit to BE
-                       
+                       lwz             r7,PP_USERPMAP(r29)                             ; Pick up the user pmap we may launch
+                       rlwinm. r17,r26,0,MSR_RI_BIT,MSR_RI_BIT ; See if we are returning from a special fault
                        cmplw   cr3,r14,r14                                             ; Set that we do not need to stop streams
 
-                       rlwinm  r9,r9,(((31-MSR_BE_BIT)+(traceBEb+16+1))&31),MSR_BE_BIT,MSR_BE_BIT      ; Set BE bit if special trace is on
-                       li              r21,emfp0                                               ; Point to the fp savearea
-                       and             r9,r9,r25                                               ; Clear BE if supervisor state
-                       or              r26,r26,r9                                              ; Flip on the BE bit for special trace if needed
-                       stwcx.  r26,r3,r31                                              ; Blow away any reservations we hold (and set BE)
-
-                       lwz             r25,savesrr0+4(r31)                             ; Get the SRR0 to use
-                       
-                       la              r28,saver4(r31)                                 ; Point to the 32-byte line with r4-r7
-                       dcbz    r21,r29                                                 ; Clear a work area
-                       lwz             r0,saver0+4(r31)                                ; Restore R0                    
-                       dcbt    0,r28                                                   ; Touch in r4-r7 
-                       lwz             r1,saver1+4(r31)                                ; Restore R1    
-                       lwz             r2,saver2+4(r31)                                ; Restore R2    
-                       la              r28,saver8(r31)                                 ; Point to the 32-byte line with r8-r11
-                       lwz             r3,saver3+4(r31)                                ; Restore R3
-            andis.     r6,r27,hi16(pfAltivec)                  ; Do we have altivec on the machine?
-            dcbt       0,r28                                                   ; touch in r8-r11
-                       lwz             r4,saver4+4(r31)                                ; Restore R4
-            la         r28,saver12(r31)                                ; Point to the 32-byte line with r12-r15
-                       mtsrr0  r25                                                             ; Restore the SRR0 now
-                       lwz             r5,saver5+4(r31)                                ; Restore R5
-                       mtsrr1  r26                                                             ; Restore the SRR1 now 
-                       lwz             r6,saver6+4(r31)                                ; Restore R6                    
-                       
-                       dcbt    0,r28                                                   ; touch in r12-r15
-                       la              r28,saver16(r31)
-                       
-                       lwz             r7,saver7+4(r31)                                ; Restore R7
-                       lwz             r8,saver8+4(r31)                                ; Restore R8    
-                       lwz             r9,saver9+4(r31)                                ; Restore R9
-            
-            dcbt       0,r28                                                   ; touch in r16-r19
-            la         r28,saver20(r31)                        
-                       
-                       lwz             r10,saver10+4(r31)                              ; Restore R10
-                       lwz             r11,saver11+4(r31)                              ; Restore R11                   
-                       
-                       dcbt    0,r28                                                   ; touch in r20-r23
-                       la              r28,savevscr(r31)                               ; Point to the status area
-                       
-                       lwz             r12,saver12+4(r31)                              ; Restore R12
-                       lwz             r13,saver13+4(r31)                              ; Restore R13                   
+                       beq+    nSpecAcc                                                ; Do not reload the kernel SRs if this is not a special access...
 
-            la         r14,savectr+4(r31)
-                       dcbt    0,r28                                                   ; Touch in VSCR and FPSCR
-            dcbt       0,r14                                                   ; touch in CTR, DAR, DSISR, VRSAVE, and Exception code
+                       lwz             r14,savesr0(r31)                                ; Get SR0 at fault time
+                       mtsr    sr0,r14                                                 ; Set SR0
+                       lwz             r14,savesr1(r31)                                ; Get SR1 at fault time
+                       mtsr    sr1,r14                                                 ; Set SR1
+                       lwz             r14,savesr2(r31)                                ; Get SR2 at fault time
+                       mtsr    sr2,r14                                                 ; Set SR2
+                       lwz             r14,savesr3(r31)                                ; Get SR3 at fault timee
+                       mtsr    sr3,r14                                                 ; Set SR3
+                       b               segsdone                                                ; We are all set up now...
 
-                       lwz             r26,next_savearea+4(r29)                ; Get the exception save area
-                       la              r28,saver24(r31)
+                       .align  5
 
-                       lwz             r14,saver14+4(r31)                              ; Restore R14   
-                       lwz             r15,saver15+4(r31)                              ; Restore R15                   
+nSpecAcc:      rlwinm. r17,r26,0,MSR_PR_BIT,MSR_PR_BIT ; See if we are going to user or system
+                       li              r14,PMAP_SEGS                                   ; Point to segments 
+                       bne+    gotouser                                                ; We are going into user state...
 
+                       lwz             r14,savesr14(r31)                               ; Get the copyin/out register at interrupt time
+                       mtsr    sr14,r14                                                ; Set SR14
+                       b               segsdone                                                ; We are all set up now...
+               
+                       .align  5
 
-                       stfd    f0,emfp0(r29)                                   ; Save FP0
-                       lwz             r27,savevrsave(r31)                             ; Get the vrsave
-            dcbt       0,r28                                                   ; touch in r24-r27
-                       la              r28,savevscr(r31)                               ; Point to the status area
-                       lfd             f0,savefpscrpad(r31)                    ; Get the fpscr
-            la         r22,saver28(r31)
-                       mtfsf   0xFF,f0                                                 ; Restore fpscr         
-                       lfd             f0,emfp0(r29)                                   ; Restore the used register
+gotouser:      dcbt    r14,r7                                                  ; Touch the segment register contents
+                       lwz             r9,spcFlags(r29)                                ; Pick up the special flags
+                       lwz             r16,PP_LASTPMAP(r29)                    ; Pick up the last loaded pmap
+                       addi    r14,r14,32                                              ; Second half of pmap segments
+                       rlwinm  r9,r9,userProtKeybit-2,2,2              ; Isolate the user state protection key 
+                       lwz             r15,PMAP_SPACE(r7)                              ; Get the primary space
+                       lwz             r13,PMAP_VFLAGS(r7)                             ; Get the flags
+                       dcbt    r14,r7                                                  ; Touch second page
+                       oris    r15,r15,hi16(SEG_REG_PROT)              ; Set segment 0 SR value
+                       mtcrf   0x0F,r13                                                ; Set CRs to correspond to the subordinate spaces
+                       xor             r15,r15,r9                                              ; Flip to proper segment register key
+                       lhz             r9,PP_CPU_FLAGS(r29)                    ; Get the processor flags
 
-                       beq             noavec3                                                 ; No Altivec on this CPU...
+                       addis   r13,r15,0x0000                                  ; Get SR0 value
+                       bf              16,nlsr0                                                ; No alternate here...
+                       lwz             r13,PMAP_SEGS+(0*4)(r7)                 ; Get SR0 value
                        
-                       stvxl   v0,r21,r29                                              ; Save a vector register
-                       lvxl    v0,0,r28                                                ; Get the vector status
-                       mtspr   vrsave,r27                                              ; Set the vrsave
-                       mtvscr  v0                                                              ; Set the vector status
-                       lvxl    v0,r21,r29                                              ; Restore work vector register
-
-noavec3:       dcbt    0,r22                                                   ; touch in r28-r31
-               
-                       lwz             r23,spcFlags(r29)                               ; Get the special flags from per_proc
-            la         r17,savesrr0(r31)
-                       la              r26,saver0(r26)                                 ; Point to the first part of the next savearea
-            dcbt       0,r17                                                   ; touch in SRR0, SRR1, CR, XER, LR 
-                       lhz             r28,pfrptdProc(r29)                             ; Get the reported processor type
-
-                       lwz             r16,saver16+4(r31)                              ; Restore R16
-                       lwz             r17,saver17+4(r31)                              ; Restore R17
-                       lwz             r18,saver18+4(r31)                              ; Restore R18   
-                       lwz             r19,saver19+4(r31)                              ; Restore R19   
-                       lwz             r20,saver20+4(r31)                              ; Restore R20
-                       lwz             r21,saver21+4(r31)                              ; Restore R21
-                       lwz             r22,saver22+4(r31)                              ; Restore R22
-
-                       cmpwi   cr1,r28,CPU_SUBTYPE_POWERPC_750 ; G3?
-
-                       dcbz    0,r26                                                   ; Clear and allocate next savearea we use in the off chance it is still in when we next interrupt
-
-                       andis.  r23,r23,hi16(perfMonitor)               ; Is the performance monitor enabled?
-                       lwz             r23,saver23+4(r31)                              ; Restore R23
-                       cmpwi   cr2,r28,CPU_SUBTYPE_POWERPC_7400        ; Yer standard G4?
-                       lwz             r24,saver24+4(r31)                              ; Restore R24                   
-                       lwz             r25,saver25+4(r31)                              ; Restore R25                   
-                       lwz             r26,saver26+4(r31)                              ; Restore R26           
-                       lwz             r27,saver27+4(r31)                              ; Restore R27                   
-
-                       beq+    noPerfMonRestore32                              ; No perf monitor... 
-
-                       beq-    cr1,perfMonRestore32_750                ; This is a G3...
-                       beq-    cr2,perfMonRestore32_7400               ; Standard G4...
-               
-                       lwz             r28,savepmc+16(r31)
-                       lwz             r29,savepmc+20(r31)
-                       mtspr   pmc5,r28                                                ; Restore PMC5
-                       mtspr   pmc6,r29                                                ; Restore PMC6
-
-perfMonRestore32_7400:
-                       lwz             r28,savemmcr2+4(r31)
-                       mtspr   mmcr2,r28                                               ; Restore MMCR2
-
-perfMonRestore32_750:
-                       lwz             r28,savepmc+0(r31)
-                       lwz             r29,savepmc+4(r31)
-                       mtspr   pmc1,r28                                                ; Restore PMC1 
-                       mtspr   pmc2,r29                                                ; Restore PMC2 
-                       lwz             r28,savepmc+8(r31)
-                       lwz             r29,savepmc+12(r31)
-                       mtspr   pmc3,r28                                                ; Restore PMC3
-                       mtspr   pmc4,r29                                                ; Restore PMC4
-                       lwz             r28,savemmcr1+4(r31)
-                       lwz             r29,savemmcr0+4(r31)
-                       mtspr   mmcr1,r28                                               ; Restore MMCR1
-                       mtspr   mmcr0,r29                                               ; Restore MMCR0
-
-noPerfMonRestore32:            
-                       lwz             r28,savecr(r31)                                 ; Get CR to restore
-                       lwz             r29,savexer+4(r31)                              ; Get XER to restore
-                       mtcr    r28                                                             ; Restore the CR
-                       lwz             r28,savelr+4(r31)                               ; Get LR to restore
-                       mtxer   r29                                                             ; Restore the XER
-                       lwz             r29,savectr+4(r31)                              ; Get the CTR to restore
-                       mtlr    r28                                                             ; Restore the LR 
-                       lwz             r28,saver30+4(r31)                              ; Get R30
-                       mtctr   r29                                                             ; Restore the CTR
-                       lwz             r29,saver31+4(r31)                              ; Get R31
-                       mtsprg  2,r28                                                   ; Save R30 for later
-                       lwz             r28,saver28+4(r31)                              ; Restore R28                   
-                       mtsprg  3,r29                                                   ; Save R31 for later
-                       lwz             r29,saver29+4(r31)                              ; Restore R29
+nlsr0:         mtsr    sr0,r13                                                 ; Load up the SR
+                       rlwinm  r9,r9,(((31-MSR_BE_BIT)+(traceBEb+16+1))&31),MSR_BE_BIT,MSR_BE_BIT      ; Set BE bit if special trace is on
 
-                       mfsprg  r31,0                                                   ; Get per_proc
-                       mfsprg  r30,2                                                   ; Restore R30 
-                       lwz             r31,pfAvailable(r31)                    ; Get the feature flags
-                       mtsprg  2,r31                                                   ; Set the feature flags
-                       mfsprg  r31,3                                                   ; Restore R31
+                       addis   r13,r15,0x0010                                  ; Get SR1 value
+                       bf              17,nlsr1                                                ; No alternate here...
+                       lwz             r13,PMAP_SEGS+(1*4)(r7)                 ; Get SR1 value
+                       
+nlsr1:         mtsr    sr1,r13                                                 ; Load up the SR
+                       or              r26,r26,r9                                              ; Flip on the BE bit for special trace if needed
 
-                       rfi                                                                             ; Click heels three times and think very hard that there is no place like home...
+                       cmplw   cr3,r7,r16                                              ; Are we running the same segs as last time?
 
-                       .long   0                                                               ; Leave this here
-                       .long   0
-                       .long   0
-                       .long   0
-                       .long   0
-                       .long   0
-                       .long   0
-                       .long   0
+                       addis   r13,r15,0x0020                                  ; Get SR2 value
+                       bf              18,nlsr2                                                ; No alternate here...
+                       lwz             r13,PMAP_SEGS+(2*4)(r7)                 ; Get SR2 value
+                       
+nlsr2:         mtsr    sr2,r13                                                 ; Load up the SR
 
+                       addis   r13,r15,0x0030                                  ; Get SR3 value
+                       bf              19,nlsr3                                                ; No alternate here...
+                       lwz             r13,PMAP_SEGS+(3*4)(r7)                 ; Get SR3 value
+                       
+nlsr3:         mtsr    sr3,r13                                                 ; Load up the SR
 
-;
-;                      This starts the 64-bit version
-;
+                       addis   r13,r15,0x00E0                                  ; Get SR14 value
+                       bf              30,nlsr14                                               ; No alternate here...
+                       lwz             r13,PMAP_SEGS+(14*4)(r7)                ; Get SR14 value
+                       
+nlsr14:                mtsr    sr14,r13                                                ; Load up the SR
 
-                       .align  7
+                       beq+    cr3,segsdone                                    ; All done if same pmap as last time...
+                       
+                       stw             r7,PP_LASTPMAP(r29)                             ; Remember what we just loaded                  
+                       
+                       addis   r13,r15,0x0040                                  ; Get SR4 value
+                       bf              20,nlsr4                                                ; No alternate here...
+                       lwz             r13,PMAP_SEGS+(4*4)(r7)                 ; Get SR4 value
+                       
+nlsr4:         mtsr    sr4,r13                                                 ; Load up the SR
 
-eat64a:                ld              r30,quickfret(r29)                              ; Pick up the quick fret list, if any
+                       addis   r13,r15,0x0050                                  ; Get SR5 value
+                       bf              21,nlsr5                                                ; No alternate here...
+                       lwz             r13,PMAP_SEGS+(5*4)(r7)                 ; Get SR5 value
+                       
+nlsr5:         mtsr    sr5,r13                                                 ; Load up the SR
 
-                       mr.             r3,r3                                                   ; Should we hold off the quick release?
-                       la              r21,saver0(r31)                                 ; Point to the first thing we restore
-                       bne--   ernoqfre64                                              ; Hold off set, do not release just now...
+                       addis   r13,r15,0x0060                                  ; Get SR6 value
+                       bf              22,nlsr6                                                ; No alternate here...
+                       lwz             r13,PMAP_SEGS+(6*4)(r7)                 ; Get SR6 value
                        
-erchkfre64:    mr.             r3,r30                                                  ; Any savearea to quickly release?
-                       beq+    ernoqfre64                                              ; No quickfrets...
-                       ld              r30,SAVprev(r30)                                ; Chain back now
+nlsr6:         mtsr    sr6,r13                                                 ; Load up the SR
+
+                       addis   r13,r15,0x0070                                  ; Get SR7 value
+                       bf              23,nlsr7                                                ; No alternate here...
+                       lwz             r13,PMAP_SEGS+(7*4)(r7)                 ; Get SR7 value
                        
-                       bl              EXT(save_ret_phys)                              ; Put it on the free list                       
+nlsr7:         mtsr    sr7,r13                                                 ; Load up the SR
 
-                       std             r30,quickfret(r29)                              ; Dequeue previous guy (really, it is ok to wait until after the release)
-                       b               erchkfre64                                              ; Try the next one...
+                       addis   r13,r15,0x0080                                  ; Get SR8 value
+                       bf              24,nlsr8                                                ; No alternate here...
+                       lwz             r13,PMAP_SEGS+(8*4)(r7)                 ; Get SR8 value
+                       
+nlsr8:         mtsr    sr8,r13                                                 ; Load up the SR
 
-                       .align  7
+                       addis   r13,r15,0x0090                                  ; Get SR9 value
+                       bf              25,nlsr9                                                ; No alternate here...
+                       lwz             r13,PMAP_SEGS+(9*4)(r7)                 ; Get SR9 value
                        
-ernoqfre64:    dcbt    0,r21                                                   ; Touch in the first thing we need
+nlsr9:         mtsr    sr9,r13                                                 ; Load up the SR
+
+                       addis   r13,r15,0x00A0                                  ; Get SR10 value
+                       bf              26,nlsr10                                               ; No alternate here...
+                       lwz             r13,PMAP_SEGS+(10*4)(r7)                ; Get SR10 value
                        
-;
-;                      Here we release the savearea.
-;
-;                      Important!!!!  The savearea is released before we are done with it. When the
-;                      local free savearea list (anchored at lclfree) gets too long, save_ret_phys
-;                      will trim the list, making the extra saveareas allocatable by another processor
-;                      The code in there must ALWAYS leave our savearea on the local list, otherwise
-;                      we could be very, very unhappy.  The code there always queues the "just released"
-;                      savearea to the head of the local list.  Then, if it needs to trim, it will
-;                      start with the SECOND savearea, leaving ours intact.
-;
-;
+nlsr10:                mtsr    sr10,r13                                                ; Load up the SR
 
-                       li              r3,lgKillResv                                   ; Get spot to kill reservation
-                       stdcx.  r3,0,r3                                                 ; Blow away any reservations we hold
+                       addis   r13,r15,0x00B0                                  ; Get SR11 value
+                       bf              27,nlsr11                                               ; No alternate here...
+                       lwz             r13,PMAP_SEGS+(11*4)(r7)                ; Get SR11 value
                        
-                       mr              r3,r31                                                  ; Get the exiting savearea in parm register
-                       bl              EXT(save_ret_phys)                              ; Put it on the free list                       
+nlsr11:                mtsr    sr11,r13                                                ; Load up the SR
 
-                       lwz             r3,savesrr1+4(r31)                              ; Pass in the MSR we will be going to
-                       bl              EXT(switchSegs)                                 ; Go handle the segment registers/STB
+                       addis   r13,r15,0x00C0                                  ; Get SR12 value
+                       bf              28,nlsr12                                               ; No alternate here...
+                       lwz             r13,PMAP_SEGS+(12*4)(r7)                ; Get SR12 value
+                       
+nlsr12:                mtsr    sr12,r13                                                ; Load up the SR
 
-                       lhz             r9,PP_CPU_FLAGS(r29)                    ; Get the processor flags
-                       ld              r26,savesrr1(r31)                               ; Get destination MSR
-                       cmplw   cr3,r14,r14                                             ; Set that we do not need to stop streams
-                       rlwinm  r25,r26,27,22,22                                ; Move PR bit to BE
+                       addis   r13,r15,0x00D0                                  ; Get SR13 value
+                       bf              29,nlsr13                                               ; No alternate here...
+                       lwz             r13,PMAP_SEGS+(13*4)(r7)                ; Get SR13 value
+                       
+nlsr13:                mtsr    sr13,r13                                                ; Load up the SR
 
-                       rlwinm  r9,r9,(((31-MSR_BE_BIT)+(traceBEb+16+1))&31),MSR_BE_BIT,MSR_BE_BIT      ; Set BE bit if special trace is on
-                       li              r21,emfp0                                               ; Point to a workarea
-                       and             r9,r9,r25                                               ; Clear BE if supervisor state
-                       or              r26,r26,r9                                              ; Flip on the BE bit for special trace if needed
+                       addis   r13,r15,0x00F0                                  ; Get SR15 value
+                       bf              31,nlsr15                                               ; No alternate here...
+                       lwz             r13,PMAP_SEGS+(15*4)(r7)                ; Get SR15 value
+                       
+nlsr15:                mtsr    sr15,r13                                                ; Load up the SR
+                       
+segsdone:      stwcx.  r26,r3,r31                                              ; Blow away any reservations we hold
 
-                       ld              r25,savesrr0(r31)                               ; Get the SRR0 to use
-                       la              r28,saver16(r31)                                ; Point to the 128-byte line with r16-r31
-                       dcbz128 r21,r29                                                 ; Clear a work area
-                       ld              r0,saver0(r31)                                  ; Restore R0                    
-                       dcbt    0,r28                                                   ; Touch in r16-r31 
-                       ld              r1,saver1(r31)                                  ; Restore R1    
-                       ld              r2,saver2(r31)                                  ; Restore R2    
-                       ld              r3,saver3(r31)                                  ; Restore R3
+                       li              r21,emfp0                                               ; Point to the fp savearea
+                       lwz             r25,savesrr0(r31)                               ; Get the SRR0 to use
+                       la              r28,saver8(r31)                                 ; Point to the next line to use
+                       dcbt    r21,r29                                                 ; Start moving in a work area
+                       lwz             r0,saver0(r31)                                  ; Restore R0                    
+                       dcbt    0,r28                                                   ; Touch it in 
+                       lwz             r1,saver1(r31)                                  ; Restore R1    
+                       lwz             r2,saver2(r31)                                  ; Restore R2    
+                       la              r28,saver16(r31)                                ; Point to the next line to get
+                       lwz             r3,saver3(r31)                                  ; Restore R3
                        mtcrf   0x80,r27                                                ; Get facility availability flags (do not touch CR1-7)
-                       l             r4,saver4(r31)                                  ; Restore R4
+                       lwz             r4,saver4(r31)                                  ; Restore R4
                        mtsrr0  r25                                                             ; Restore the SRR0 now
-                       l             r5,saver5(r31)                                  ; Restore R5
+                       lwz             r5,saver5(r31)                                  ; Restore R5
                        mtsrr1  r26                                                             ; Restore the SRR1 now 
-                       ld              r6,saver6(r31)                                  ; Restore R6                    
-                                               
-                       ld              r7,saver7(r31)                                  ; Restore R7
-                       ld              r8,saver8(r31)                                  ; Restore R8    
-                       ld              r9,saver9(r31)                                  ; Restore R9
-            
-                       la              r28,savevscr(r31)                               ; Point to the status area
-                       
-                       ld              r10,saver10(r31)                                ; Restore R10
-                       ld              r11,saver11(r31)                                ; Restore R11                   
-                       ld              r12,saver12(r31)                                ; Restore R12
-                       ld              r13,saver13(r31)                                ; Restore R13                   
+                       lwz             r6,saver6(r31)                                  ; Restore R6                    
+                       
+                       dcbt    0,r28                                                   ; Touch that next line on in
+                       la              r28,savevscr(r31)                               ; Point to the saved facility context
+                       
+                       lwz             r7,saver7(r31)                                  ; Restore R7    
+                       lwz             r8,saver8(r31)                                  ; Restore R8    
+                       lwz             r9,saver9(r31)                                  ; Restore R9                    
+                       mfmsr   r26                                                             ; Get the current MSR
+                       dcbt    0,r28                                                   ; Touch saved facility context          
+                       lwz             r10,saver10(r31)                                ; Restore R10
+                       lwz             r11,saver11(r31)                                ; Restore R11                   
+                       oris    r26,r26,hi16(MASK(MSR_VEC))             ; Get the vector enable bit
+                       lwz             r12,saver12(r31)                                ; Restore R12
+                       ori             r26,r26,lo16(MASK(MSR_FP))              ; Add in the float enable
+                       lwz             r13,saver13(r31)                                ; Restore R13                   
+                       la              r28,saver24(r31)                                ; Point to the next line to do 
 
-                       ld              r26,next_savearea(r29)                  ; Get the exception save area
+;
+;                      Note that floating point and vector will be enabled from here on until the RFI
+;
 
-                       ld              r14,saver14(r31)                                ; Restore R14   
-                       ld              r15,saver15(r31)                                ; Restore R15                   
-                       lwz             r27,savevrsave(r31)                             ; Get the vrsave
-                       
-                       bf--    pfAltivecb,noavec2s                             ; Skip if no VMX...
+                       mtmsr   r26                                                             ; Turn on vectors and floating point
+                       isync
+
+                       dcbt    0,r28                                                   ; Touch next line to do 
+
+                       lwz             r14,saver14(r31)                                ; Restore R14   
+                       lwz             r15,saver15(r31)                                ; Restore R15                   
+
+                       bf              pfAltivecb,noavec3                              ; No Altivec on this CPU...
                        
+                       la              r28,savevscr(r31)                               ; Point to the status area
                        stvxl   v0,r21,r29                                              ; Save a vector register
                        lvxl    v0,0,r28                                                ; Get the vector status
+                       lwz             r27,savevrsave(r31)                             ; Get the vrsave
                        mtvscr  v0                                                              ; Set the vector status
 
                        lvxl    v0,r21,r29                                              ; Restore work vector register
+                       beq+    cr3,noavec2                                             ; SRs have not changed, no need to stop the streams...
+                       dssall                                                                  ; Kill all data streams
+                       sync
                
-noavec2s:      mtspr   vrsave,r27                                              ; Set the vrsave
+noavec2:       mtspr   vrsave,r27                                              ; Set the vrsave
+
+noavec3:       bf-             pfFloatb,nofphere                               ; Skip if no floating point...
 
-                       lwz             r28,saveexception(r31)                  ; Get exception type
                        stfd    f0,emfp0(r29)                                   ; Save FP0
                        lfd             f0,savefpscrpad(r31)                    ; Get the fpscr
                        mtfsf   0xFF,f0                                                 ; Restore fpscr         
                        lfd             f0,emfp0(r29)                                   ; Restore the used register
-                       ld              r16,saver16(r31)                                ; Restore R16
-                       lwz             r30,spcFlags(r29)                               ; Get the special flags from per_proc
-                       ld              r17,saver17(r31)                                ; Restore R17
-                       ld              r18,saver18(r31)                                ; Restore R18   
-                       cmplwi  cr1,r28,T_RESET                                 ; Are we returning from a reset?
-                       ld              r19,saver19(r31)                                ; Restore R19   
-                       ld              r20,saver20(r31)                                ; Restore R20
-                       li              r27,0                                                   ; Get a zero
-                       ld              r21,saver21(r31)                                ; Restore R21
-                       la              r26,saver0(r26)                                 ; Point to the first part of the next savearea
-                       andis.  r30,r30,hi16(perfMonitor)               ; Is the performance monitor enabled?
-                       ld              r22,saver22(r31)                                ; Restore R22
-                       ld              r23,saver23(r31)                                ; Restore R23
-                       bne++   cr1,er64rrst                                    ; We are not returning from a reset...
-                       stw             r27,lo16(EXT(ResetHandler)-EXT(ExceptionVectorsStart)+RESETHANDLER_TYPE)(br0)   ; Allow resets again
-
-er64rrst:      ld              r24,saver24(r31)                                ; Restore R24                   
-
-                       dcbz128 0,r26                                                   ; Clear and allocate next savearea we use in the off chance it is still in when we next interrupt
-
-                       ld              r25,saver25(r31)                                ; Restore R25                   
-                       ld              r26,saver26(r31)                                ; Restore R26           
-                       ld              r27,saver27(r31)                                ; Restore R27                   
-
-                       beq++   noPerfMonRestore64                              ; Nope... 
-
-                       lwz             r28,savepmc+0(r31)
-                       lwz             r29,savepmc+4(r31)
-                       mtspr   pmc1_gp,r28                                             ; Restore PMC1 
-                       mtspr   pmc2_gp,r29                                             ; Restore PMC2 
-                       lwz             r28,savepmc+8(r31)
-                       lwz             r29,savepmc+12(r31)
-                       mtspr   pmc3_gp,r28                                             ; Restore PMC3
-                       mtspr   pmc4_gp,r29                                             ; Restore PMC4
-                       lwz             r28,savepmc+16(r31)
-                       lwz             r29,savepmc+20(r31)
-                       mtspr   pmc5_gp,r28                                             ; Restore PMC5 
-                       mtspr   pmc6_gp,r29                                             ; Restore PMC6 
-                       lwz             r28,savepmc+24(r31)
-                       lwz             r29,savepmc+28(r31)
-                       mtspr   pmc7_gp,r28                                             ; Restore PMC7
-                       mtspr   pmc8_gp,r29                                             ; Restore PMC8
-                       ld              r28,savemmcr1(r31)
-                       ld              r29,savemmcr2(r31)
-                       mtspr   mmcr1_gp,r28                                    ; Restore MMCR1
-                       mtspr   mmcra_gp,r29                                    ; Restore MMCRA
-                       ld              r28,savemmcr0(r31)
-                       
-                       mtspr   mmcr0_gp,r28                                    ; Restore MMCR0
-
-noPerfMonRestore64:            
-                       mfsprg  r30,0                                                   ; Get per_proc
+
+nofphere:      lwz             r16,saver16(r31)                                ; Restore R16
+                       lwz             r17,saver17(r31)                                ; Restore R17
+                       lwz             r18,saver18(r31)                                ; Restore R18   
+                       lwz             r19,saver19(r31)                                ; Restore R19   
+                       lwz             r20,saver20(r31)                                ; Restore R20
+                       lwz             r21,saver21(r31)                                ; Restore R21
+                       lwz             r22,saver22(r31)                                ; Restore R22
+
+                       lwz             r23,saver23(r31)                                ; Restore R23
+                       lwz             r24,saver24(r31)                                ; Restore R24                   
+                       lwz             r25,saver25(r31)                                ; Restore R25                   
+                       lwz             r26,saver26(r31)                                ; Restore R26           
+                       lwz             r27,saver27(r31)                                ; Restore R27                   
+
                        lwz             r28,savecr(r31)                                 ; Get CR to restore
-                       ld              r29,savexer(r31)                                ; Get XER to restore
+
+                       lwz             r29,savexer(r31)                                ; Get XER to restore
                        mtcr    r28                                                             ; Restore the CR
-                       l             r28,savelr(r31)                                 ; Get LR to restore
+                       lwz             r28,savelr(r31)                                 ; Get LR to restore
                        mtxer   r29                                                             ; Restore the XER
-                       l             r29,savectr(r31)                                ; Get the CTR to restore
+                       lwz             r29,savectr(r31)                                ; Get the CTR to restore
                        mtlr    r28                                                             ; Restore the LR 
-                       l             r28,saver30(r31)                                ; Get R30
+                       lwz             r28,saver30(r31)                                ; Get R30
                        mtctr   r29                                                             ; Restore the CTR
-                       l             r29,saver31(r31)                                ; Get R31
-                       mtspr   hsprg0,r28                                              ; Save R30 for later
-                       l             r28,saver28(r31)                                ; Restore R28                   
+                       lwz             r29,saver31(r31)                                ; Get R31
+                       mtsprg  2,r28                                                   ; Save R30 for later
+                       lwz             r28,saver28(r31)                                ; Restore R28                   
                        mtsprg  3,r29                                                   ; Save R31 for later
-                       l             r29,saver29(r31)                                ; Restore R29
+                       lwz             r29,saver29(r31)                                ; Restore R29
 
-                       lwz             r31,pfAvailable(r30)                    ; Get the feature flags
-                       lwz             r30,UAW(r30)                                    ; Get the User Assist Word
+                       mfsprg  r31,0                                                   ; Get per_proc
+                       mfsprg  r30,2                                                   ; Restore R30 
+                       lwz             r31,pfAvailable(r31)                    ; Get the feature flags
                        mtsprg  2,r31                                                   ; Set the feature flags
                        mfsprg  r31,3                                                   ; Restore R31
-                       mtsprg  3,r30                                                   ; Set the UAW
-                       mfspr   r30,hsprg0                                              ; Restore R30
 
-                       rfid                                                                    ; Click heels three times and think very hard that there is no place like home...
+                       rfi                                                                             ; Click heels three times and think very hard that there is no place like home...
+
+                       .long   0                                                               ; Leave this here
+                       .long   0
+                       .long   0
+                       .long   0
+                       .long   0
+                       .long   0
+                       .long   0
+                       .long   0
+
 
 
        
@@ -2968,7 +1994,7 @@ noPerfMonRestore64:
  *
  *
  * ENTRY :     IR and/or DR and/or interruptions can be on
- *                     R3 points to the virtual address of a savearea
+ *                     R3 points to the physical address of a savearea
  */
        
                        .align  5
@@ -2977,371 +2003,66 @@ noPerfMonRestore64:
 LEXT(exception_exit)
 
                        mfsprg  r29,2                                                   ; Get feature flags
-                       mr              r31,r3                                                  ; Get the savearea in the right register 
+                       mfmsr   r30                                                             ; Get the current MSR 
                        mtcrf   0x04,r29                                                ; Set the features                      
-                       li              r0,1                                                    ; Get this just in case         
-                       mtcrf   0x02,r29                                                ; Set the features                      
-                       lis             r30,hi16(MASK(MSR_VEC)|MASK(MSR_FP)|MASK(MSR_ME))       ; Set up the MSR we will use throughout. Note that ME come on here if MCK
-                       rlwinm  r4,r3,0,0,19                                    ; Round down to savearea block base
+                       rlwinm  r30,r30,0,MSR_FP_BIT+1,MSR_FP_BIT-1     ; Force floating point off
+                       mr              r31,r3                                                  ; Get the savearea in the right register 
+                       rlwinm  r30,r30,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1   ; Force vectors off
+                       li              r10,savesrr0                                    ; Point to one of the first things we touch in the savearea on exit
+                       andi.   r30,r30,0x7FCF                                  ; Turn off externals, IR, and DR 
                        lis             r1,hi16(SAVredrive)                             ; Get redrive request
-                       mfsprg  r2,0                                                    ; Get the per_proc block
-                       ori             r30,r30,lo16(MASK(MSR_VEC)|MASK(MSR_FP)|MASK(MSR_ME))   ; Rest of MSR
-                       bt++    pf64Bitb,eeSixtyFour                    ; We are 64-bit...
-                       
-                       lwz             r4,SACvrswap+4(r4)                              ; Get the virtual to real translation
-                       
+
                        bt              pfNoMSRirb,eeNoMSR                              ; No MSR...
 
                        mtmsr   r30                                                             ; Translation and all off
                        isync                                                                   ; Toss prefetch
                        b               eeNoMSRx
                        
-                       .align  5
-                       
-eeSixtyFour:
-                       ld              r4,SACvrswap(r4)                                ; Get the virtual to real translation
-                       rldimi  r30,r0,63,MSR_SF_BIT                    ; Set SF bit (bit 0)
-                       mtmsrd  r30                                                             ; Set 64-bit mode, turn off EE, DR, and IR
-                       isync                                                                   ; Toss prefetch
-                       b               eeNoMSRx
-                       
-                       .align  5
-                       
 eeNoMSR:       li              r0,loadMSR                                              ; Get the MSR setter SC
                        mr              r3,r30                                                  ; Get new MSR
                        sc                                                                              ; Set it
 
-eeNoMSRx:      xor             r31,r31,r4                                              ; Convert the savearea to physical addressing
+eeNoMSRx:      dcbt    r10,r31                                                 ; Touch in the first stuff we restore
+                       mfsprg  r2,0                                                    ; Get the per_proc block
                        lwz             r4,SAVflags(r31)                                ; Pick up the flags
                        mr              r13,r31                                                 ; Put savearea here also
 
-#if INSTRUMENT
-                       mfspr   r5,pmc1                                                 ; INSTRUMENT - saveinstr[8] - stamp exception exit
-                       stw             r5,0x6100+(8*16)+0x0(0)                 ; INSTRUMENT - Save it
-                       mfspr   r5,pmc2                                                 ; INSTRUMENT - Get stamp
-                       stw             r5,0x6100+(8*16)+0x4(0)                 ; INSTRUMENT - Save it
-                       mfspr   r5,pmc3                                                 ; INSTRUMENT - Get stamp
-                       stw             r5,0x6100+(8*16)+0x8(0)                 ; INSTRUMENT - Save it
-                       mfspr   r5,pmc4                                                 ; INSTRUMENT - Get stamp
-                       stw             r5,0x6100+(8*16)+0xC(0)                 ; INSTRUMENT - Save it
-#endif
-
-
                        and.    r0,r4,r1                                                ; Check if redrive requested
+                       andc    r4,r4,r1                                                ; Clear redrive
                        
                        dcbt    br0,r2                                                  ; We will need this in just a sec
 
                        beq+    EatRupt                                                 ; No redrive, just exit...
 
                        lwz             r11,saveexception(r13)                  ; Restore exception code
+                       stw             r4,SAVflags(r13)                                ; Set the flags
                        b               Redrive                                                 ; Redrive the exception...
-
-
                
-                       .align  12                                                              ; Force page alignment
 
+/*
+ *             Start of the trace table
+ */
+                       .align  12                                                              /* Align to 4k boundary */
+       
+                       .globl EXT(traceTableBeg)
+EXT(traceTableBeg):                                                                    /* Start of trace table */
+/*                     .fill   2048,4,0                                               Make an 8k trace table for now */
+                       .fill   13760,4,0                                               /* Make an .trace table for now */
+/*                     .fill   240000,4,0                                                 Make an .trace table for now */
+                       .globl EXT(traceTableEnd)
+EXT(traceTableEnd):                                                                    /* End of trace table */
+       
                        .globl EXT(ExceptionVectorsEnd)
 EXT(ExceptionVectorsEnd):                                                      /* Used if relocating the exception vectors */
-
-
-
-
-;
-;                      Here is where we keep the low memory globals
-;
-
-                       . = 0x5000
-                       .globl  EXT(lowGlo)
-                       
-EXT(lowGlo):
-
-                       .ascii  "Hagfish "                                              ; 5000 Unique eyecatcher
-                       .long   0                                                               ; 5008 Zero
-                       .long   0                                                               ; 500C Zero cont...
-                       .long   EXT(per_proc_info)                              ; 5010 pointer to per_procs
-                       .long   0                                                               ; 5014 reserved
-                       .long   0                                                               ; 5018 reserved
-                       .long   0                                                               ; 501C reserved
-                       .long   0                                                               ; 5020 reserved
-                       .long   0                                                               ; 5024 reserved
-                       .long   0                                                               ; 5028 reserved
-                       .long   0                                                               ; 502C reserved
-                       .long   0                                                               ; 5030 reserved
-                       .long   0                                                               ; 5034 reserved
-                       .long   0                                                               ; 5038 reserved
-                       .long   0                                                               ; 503C reserved
-                       .long   0                                                               ; 5040 reserved
-                       .long   0                                                               ; 5044 reserved
-                       .long   0                                                               ; 5048 reserved
-                       .long   0                                                               ; 504C reserved
-                       .long   0                                                               ; 5050 reserved
-                       .long   0                                                               ; 5054 reserved
-                       .long   0                                                               ; 5058 reserved
-                       .long   0                                                               ; 505C reserved
-                       .long   0                                                               ; 5060 reserved
-                       .long   0                                                               ; 5064 reserved
-                       .long   0                                                               ; 5068 reserved
-                       .long   0                                                               ; 506C reserved
-                       .long   0                                                               ; 5070 reserved
-                       .long   0                                                               ; 5074 reserved
-                       .long   0                                                               ; 5078 reserved
-                       .long   0                                                               ; 507C reserved
-
-                       .globl  EXT(trcWork)
-EXT(trcWork):
-                       .long   0                                                               ; 5080 The next trace entry to use
-#if DEBUG
-                       .long   0xFFFFFFFF                                              ; 5084 All enabled 
-#else
-                       .long   0x00000000                                              ; 5084 All disabled on non-debug systems
+#ifndef HACKALERTHACKALERT
+/* 
+ *             This .long needs to be here because the linker gets confused and tries to 
+ *             include the final label in a section in the next section if there is nothing 
+ *             after it
+ */
+       .long   0                                               /* (HACK/HACK/HACK) */
 #endif
-                       .long   0                                                               ; 5088 Start of the trace table
-                       .long   0                                                               ; 508C End (wrap point) of the trace
-                       .long   0                                                               ; 5090 Saved mask while in debugger
-                       .long   0                                                               ; 5094 Size of trace table (1 - 256 pages)
-                       .long   0                                                               ; 5098 traceGas[0]
-                       .long   0                                                               ; 509C traceGas[1]
-
-                       .long   0                                                               ; 50A0 reserved                 
-                       .long   0                                                               ; 50A4 reserved                 
-                       .long   0                                                               ; 50A8 reserved                 
-                       .long   0                                                               ; 50AC reserved                 
-                       .long   0                                                               ; 50B0 reserved                 
-                       .long   0                                                               ; 50B4 reserved                 
-                       .long   0                                                               ; 50B8 reserved                 
-                       .long   0                                                               ; 50BC reserved                 
-                       .long   0                                                               ; 50C0 reserved                 
-                       .long   0                                                               ; 50C4 reserved                 
-                       .long   0                                                               ; 50C8 reserved                 
-                       .long   0                                                               ; 50CC reserved                 
-                       .long   0                                                               ; 50D0 reserved                 
-                       .long   0                                                               ; 50D4 reserved                 
-                       .long   0                                                               ; 50D8 reserved                 
-                       .long   0                                                               ; 50DC reserved                 
-                       .long   0                                                               ; 50E0 reserved                 
-                       .long   0                                                               ; 50E4 reserved                 
-                       .long   0                                                               ; 50E8 reserved                 
-                       .long   0                                                               ; 50EC reserved                 
-                       .long   0                                                               ; 50F0 reserved                 
-                       .long   0                                                               ; 50F4 reserved                 
-                       .long   0                                                               ; 50F8 reserved                 
-                       .long   0                                                               ; 50FC reserved                 
-
-                       .globl  EXT(saveanchor)
-
-EXT(saveanchor):                                                                       ; 5100 saveanchor
-                       .set    .,.+SVsize
-                       
-                       .long   0                                                               ; 5140 reserved
-                       .long   0                                                               ; 5144 reserved
-                       .long   0                                                               ; 5148 reserved
-                       .long   0                                                               ; 514C reserved
-                       .long   0                                                               ; 5150 reserved
-                       .long   0                                                               ; 5154 reserved
-                       .long   0                                                               ; 5158 reserved
-                       .long   0                                                               ; 515C reserved
-                       .long   0                                                               ; 5160 reserved
-                       .long   0                                                               ; 5164 reserved
-                       .long   0                                                               ; 5168 reserved
-                       .long   0                                                               ; 516C reserved
-                       .long   0                                                               ; 5170 reserved
-                       .long   0                                                               ; 5174 reserved
-                       .long   0                                                               ; 5178 reserved
-                       .long   0                                                               ; 517C reserved
-                       
-                       .long   0                                                               ; 5180 tlbieLock
-
-                       .long   0                                                               ; 5184 reserved
-                       .long   0                                                               ; 5188 reserved
-                       .long   0                                                               ; 518C reserved
-                       .long   0                                                               ; 5190 reserved
-                       .long   0                                                               ; 5194 reserved
-                       .long   0                                                               ; 5198 reserved
-                       .long   0                                                               ; 519C reserved
-                       .long   0                                                               ; 51A0 reserved                 
-                       .long   0                                                               ; 51A4 reserved                 
-                       .long   0                                                               ; 51A8 reserved                 
-                       .long   0                                                               ; 51AC reserved                 
-                       .long   0                                                               ; 51B0 reserved                 
-                       .long   0                                                               ; 51B4 reserved                 
-                       .long   0                                                               ; 51B8 reserved                 
-                       .long   0                                                               ; 51BC reserved                 
-                       .long   0                                                               ; 51C0 reserved                 
-                       .long   0                                                               ; 51C4 reserved                 
-                       .long   0                                                               ; 51C8 reserved                 
-                       .long   0                                                               ; 51CC reserved                 
-                       .long   0                                                               ; 51D0 reserved                 
-                       .long   0                                                               ; 51D4 reserved                 
-                       .long   0                                                               ; 51D8 reserved                 
-                       .long   0                                                               ; 51DC reserved                 
-                       .long   0                                                               ; 51E0 reserved                 
-                       .long   0                                                               ; 51E4 reserved                 
-                       .long   0                                                               ; 51E8 reserved                 
-                       .long   0                                                               ; 51EC reserved                 
-                       .long   0                                                               ; 51F0 reserved                 
-                       .long   0                                                               ; 51F4 reserved                 
-                       .long   0                                                               ; 51F8 reserved                 
-                       .long   0                                                               ; 51FC reserved 
-                       
-                       .globl  EXT(dgWork)
-                       
-EXT(dgWork):
-                       
-                       .long   0                                                               ; 5200 dgLock
-                       .long   0                                                               ; 5204 dgFlags          
-                       .long   0                                                               ; 5208 dgMisc0          
-                       .long   0                                                               ; 520C dgMisc1          
-                       .long   0                                                               ; 5210 dgMisc2          
-                       .long   0                                                               ; 5214 dgMisc3          
-                       .long   0                                                               ; 5218 dgMisc4          
-                       .long   0                                                               ; 521C dgMisc5  
-                               
-                       .long   0                                                               ; 5220 reserved
-                       .long   0                                                               ; 5224 reserved
-                       .long   0                                                               ; 5228 reserved
-                       .long   0                                                               ; 522C reserved
-                       .long   0                                                               ; 5230 reserved
-                       .long   0                                                               ; 5234 reserved
-                       .long   0                                                               ; 5238 reserved
-                       .long   0                                                               ; 523C reserved
-                       .long   0                                                               ; 5240 reserved
-                       .long   0                                                               ; 5244 reserved
-                       .long   0                                                               ; 5248 reserved
-                       .long   0                                                               ; 524C reserved
-                       .long   0                                                               ; 5250 reserved
-                       .long   0                                                               ; 5254 reserved
-                       .long   0                                                               ; 5258 reserved
-                       .long   0                                                               ; 525C reserved
-                       .long   0                                                               ; 5260 reserved
-                       .long   0                                                               ; 5264 reserved
-                       .long   0                                                               ; 5268 reserved
-                       .long   0                                                               ; 526C reserved
-                       .long   0                                                               ; 5270 reserved
-                       .long   0                                                               ; 5274 reserved
-                       .long   0                                                               ; 5278 reserved
-                       .long   0                                                               ; 527C reserved
-                       
-                       .long   0                                                               ; 5280 reserved
-                       .long   0                                                               ; 5284 reserved
-                       .long   0                                                               ; 5288 reserved
-                       .long   0                                                               ; 528C reserved
-                       .long   0                                                               ; 5290 reserved
-                       .long   0                                                               ; 5294 reserved
-                       .long   0                                                               ; 5298 reserved
-                       .long   0                                                               ; 529C reserved
-                       .long   0                                                               ; 52A0 reserved                 
-                       .long   0                                                               ; 52A4 reserved                 
-                       .long   0                                                               ; 52A8 reserved                 
-                       .long   0                                                               ; 52AC reserved                 
-                       .long   0                                                               ; 52B0 reserved                 
-                       .long   0                                                               ; 52B4 reserved                 
-                       .long   0                                                               ; 52B8 reserved                 
-                       .long   0                                                               ; 52BC reserved                 
-                       .long   0                                                               ; 52C0 reserved                 
-                       .long   0                                                               ; 52C4 reserved                 
-                       .long   0                                                               ; 52C8 reserved                 
-                       .long   0                                                               ; 52CC reserved                 
-                       .long   0                                                               ; 52D0 reserved                 
-                       .long   0                                                               ; 52D4 reserved                 
-                       .long   0                                                               ; 52D8 reserved                 
-                       .long   0                                                               ; 52DC reserved                 
-                       .long   0                                                               ; 52E0 reserved                 
-                       .long   0                                                               ; 52E4 reserved                 
-                       .long   0                                                               ; 52E8 reserved                 
-                       .long   0                                                               ; 52EC reserved                 
-                       .long   0                                                               ; 52F0 reserved                 
-                       .long   0                                                               ; 52F4 reserved                 
-                       .long   0                                                               ; 52F8 reserved                 
-                       .long   0                                                               ; 52FC reserved 
-
-                       .globl  EXT(killresv)
-EXT(killresv):
-
-                       .long   0                                                               ; 5300 Used to kill reservations
-                       .long   0                                                               ; 5304 Used to kill reservations
-                       .long   0                                                               ; 5308 Used to kill reservations
-                       .long   0                                                               ; 530C Used to kill reservations
-                       .long   0                                                               ; 5310 Used to kill reservations
-                       .long   0                                                               ; 5314 Used to kill reservations
-                       .long   0                                                               ; 5318 Used to kill reservations
-                       .long   0                                                               ; 531C Used to kill reservations
-                       .long   0                                                               ; 5320 Used to kill reservations
-                       .long   0                                                               ; 5324 Used to kill reservations
-                       .long   0                                                               ; 5328 Used to kill reservations
-                       .long   0                                                               ; 532C Used to kill reservations
-                       .long   0                                                               ; 5330 Used to kill reservations
-                       .long   0                                                               ; 5334 Used to kill reservations
-                       .long   0                                                               ; 5338 Used to kill reservations
-                       .long   0                                                               ; 533C Used to kill reservations
-                       .long   0                                                               ; 5340 Used to kill reservations
-                       .long   0                                                               ; 5344 Used to kill reservations
-                       .long   0                                                               ; 5348 Used to kill reservations
-                       .long   0                                                               ; 534C Used to kill reservations
-                       .long   0                                                               ; 5350 Used to kill reservations
-                       .long   0                                                               ; 5354 Used to kill reservations
-                       .long   0                                                               ; 5358 Used to kill reservations
-                       .long   0                                                               ; 535C Used to kill reservations
-                       .long   0                                                               ; 5360 Used to kill reservations
-                       .long   0                                                               ; 5364 Used to kill reservations
-                       .long   0                                                               ; 5368 Used to kill reservations
-                       .long   0                                                               ; 536C Used to kill reservations
-                       .long   0                                                               ; 5370 Used to kill reservations
-                       .long   0                                                               ; 5374 Used to kill reservations
-                       .long   0                                                               ; 5378 Used to kill reservations
-                       .long   0                                                               ; 537C Used to kill reservations
-                       
-                       .long   0                                                               ; 5380 reserved
-                       .long   0                                                               ; 5384 reserved
-                       .long   0                                                               ; 5388 reserved
-                       .long   0                                                               ; 538C reserved
-                       .long   0                                                               ; 5390 reserved
-                       .long   0                                                               ; 5394 reserved
-                       .long   0                                                               ; 5398 reserved
-                       .long   0                                                               ; 539C reserved
-                       .long   0                                                               ; 53A0 reserved                 
-                       .long   0                                                               ; 53A4 reserved                 
-                       .long   0                                                               ; 53A8 reserved                 
-                       .long   0                                                               ; 53AC reserved                 
-                       .long   0                                                               ; 53B0 reserved                 
-                       .long   0                                                               ; 53B4 reserved                 
-                       .long   0                                                               ; 53B8 reserved                 
-                       .long   0                                                               ; 53BC reserved                 
-                       .long   0                                                               ; 53C0 reserved                 
-                       .long   0                                                               ; 53C4 reserved                 
-                       .long   0                                                               ; 53C8 reserved                 
-                       .long   0                                                               ; 53CC reserved                 
-                       .long   0                                                               ; 53D0 reserved                 
-                       .long   0                                                               ; 53D4 reserved                 
-                       .long   0                                                               ; 53D8 reserved                 
-                       .long   0                                                               ; 53DC reserved                 
-                       .long   0                                                               ; 53E0 reserved                 
-                       .long   0                                                               ; 53E4 reserved                 
-                       .long   0                                                               ; 53E8 reserved                 
-                       .long   0                                                               ; 53EC reserved                 
-                       .long   0                                                               ; 53F0 reserved                 
-                       .long   0                                                               ; 53F4 reserved                 
-                       .long   0                                                               ; 53F8 reserved                 
-                       .long   0                                                               ; 53FC reserved 
-
-
-;
-;      The "shared page" is used for low-level debugging
-;
-
-                       . = 0x6000
-                       .globl  EXT(sharedPage)
-
-EXT(sharedPage):                                                                       ; Per processor data area
-               .long   0xC24BC195                                                      ; Comm Area validity value 
-               .long   0x87859393                                                      ; Comm Area validity value 
-               .long   0xE681A2C8                                                      ; Comm Area validity value 
-               .long   0x8599855A                                                      ; Comm Area validity value 
-               .long   0xD74BD296                                                      ; Comm Area validity value 
-               .long   0x8388E681                                                      ; Comm Area validity value 
-               .long   0xA2C88599                                                      ; Comm Area validity value 
-               .short  0x855A                                                          ; Comm Area validity value 
-               .short  1                                                                       ; Comm Area version number
-               .fill   1016*4,1,0                                                      ; (filled with 0s)
 
        .data
        .align  ALIGN
@@ -3350,4 +2071,3 @@ EXT(exception_end):
        .long   EXT(ExceptionVectorsEnd) -EXT(ExceptionVectorsStart) /* phys fn */
 
 
-
index d6f0b81481c0435f44b41b7b7baf88e7178c7cb1..49ac015de2df88f539fcd1cbf56e7101de7ca462 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1f81ca4b0b24dabde4da6ef71b0849274fda3c59..98dd13a772ae56595651bf8e73c86815520c9134 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 172e52aae85f430e8977a5929ff05e626c9363e2..0a1080cefa2e21384aafc11f435ac36eb338b4e2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #include <ppc/proc_reg.h>
 #include <kern/processor.h>
 
-unsigned int max_cpus_initialized = 0;
-extern int forcenap;
-
-#define        MAX_CPUS_SET    0x1
-#define        MAX_CPUS_WAIT   0x2
-
 boolean_t get_interrupts_enabled(void);
 
 /* Map memory map IO space */
@@ -62,7 +53,7 @@ ml_static_malloc(
                return((vm_offset_t)NULL);
        else {
                vaddr = static_memory_end;
-               static_memory_end = round_page_32(vaddr+size);
+               static_memory_end = round_page(vaddr+size);
                return(vaddr);
        }
 }
@@ -89,14 +80,14 @@ ml_static_mfree(
 {
        vm_offset_t paddr_cur, vaddr_cur;
 
-       for (vaddr_cur = round_page_32(vaddr);
-            vaddr_cur < trunc_page_32(vaddr+size);
+       for (vaddr_cur = round_page(vaddr);
+            vaddr_cur < trunc_page(vaddr+size);
             vaddr_cur += PAGE_SIZE) {
                paddr_cur = pmap_extract(kernel_pmap, vaddr_cur);
                if (paddr_cur != (vm_offset_t)NULL) {
                        vm_page_wire_count--;
-                       pmap_remove(kernel_pmap, (addr64_t)vaddr_cur, (addr64_t)(vaddr_cur+PAGE_SIZE));
-                       vm_page_create(paddr_cur>>12,(paddr_cur+PAGE_SIZE)>>12);
+                       pmap_remove(kernel_pmap, vaddr_cur, vaddr_cur+PAGE_SIZE);
+                       vm_page_create(paddr_cur,paddr_cur+PAGE_SIZE);
                }
        }
 }
@@ -147,8 +138,40 @@ void ml_init_interrupt(void)
        (void) ml_set_interrupts_enabled(current_state);
 }
 
+boolean_t fake_get_interrupts_enabled(void)
+{
+       /*
+        * The scheduler is not active on this cpu. There is no need to disable 
+        * preemption. The current thread wont be dispatched on anhother cpu.
+        */
+       return((per_proc_info[cpu_number()].cpu_flags & turnEEon) != 0);
+}
+
+boolean_t fake_set_interrupts_enabled(boolean_t enable)
+{
+       boolean_t interrupt_state_prev;
+
+       /*
+        * The scheduler is not active on this cpu. There is no need to disable 
+        * preemption. The current thread wont be dispatched on anhother cpu.
+        */
+       interrupt_state_prev = 
+               (per_proc_info[cpu_number()].cpu_flags & turnEEon) != 0;
+       if (interrupt_state_prev != enable)
+               per_proc_info[cpu_number()].cpu_flags ^= turnEEon;
+       return(interrupt_state_prev);
+}
+
 /* Get Interrupts Enabled */
 boolean_t ml_get_interrupts_enabled(void)
+{
+       if (per_proc_info[cpu_number()].interrupts_enabled == TRUE)
+               return(get_interrupts_enabled());
+       else
+               return(fake_get_interrupts_enabled());
+}
+
+boolean_t get_interrupts_enabled(void)
 {
        return((mfmsr() & MASK(MSR_EE)) != 0);
 }
@@ -230,25 +253,21 @@ ml_processor_register(
        ipi_handler_t       *ipi_handler)
 {
        kern_return_t ret;
-       int target_cpu, cpu;
-       int donap;
+       int target_cpu;
 
        if (processor_info->boot_cpu == FALSE) {
                 if (cpu_register(&target_cpu) != KERN_SUCCESS)
                        return KERN_FAILURE;
        } else {
                /* boot_cpu is always 0 */
-               target_cpu = 0;
+               target_cpu= 0;
        }
 
        per_proc_info[target_cpu].cpu_id = processor_info->cpu_id;
        per_proc_info[target_cpu].start_paddr = processor_info->start_paddr;
 
-       donap = processor_info->supports_nap;           /* Assume we use requested nap */
-       if(forcenap) donap = forcenap - 1;                      /* If there was an override, use that */
-       
        if(per_proc_info[target_cpu].pf.Available & pfCanNap)
-         if(donap) 
+         if(processor_info->supports_nap) 
                per_proc_info[target_cpu].pf.Available |= pfWillNap;
 
        if(processor_info->time_base_enable !=  (void(*)(cpu_id_t, boolean_t ))NULL)
@@ -270,8 +289,6 @@ ml_enable_nap(int target_cpu, boolean_t nap_enabled)
 {
     boolean_t prev_value = (per_proc_info[target_cpu].pf.Available & pfCanNap) && (per_proc_info[target_cpu].pf.Available & pfWillNap);
     
-       if(forcenap) nap_enabled = forcenap - 1;                /* If we are to force nap on or off, do it */
        if(per_proc_info[target_cpu].pf.Available & pfCanNap) {                         /* Can the processor nap? */
                if (nap_enabled) per_proc_info[target_cpu].pf.Available |= pfWillNap;   /* Is nap supported on this machine? */
                else per_proc_info[target_cpu].pf.Available &= ~pfWillNap;              /* Clear if not */
@@ -279,49 +296,12 @@ ml_enable_nap(int target_cpu, boolean_t nap_enabled)
 
        if(target_cpu == cpu_number()) 
                __asm__ volatile("mtsprg 2,%0" : : "r" (per_proc_info[target_cpu].pf.Available));       /* Set live value */
-    return (prev_value);
-}
 
-void
-ml_init_max_cpus(unsigned long max_cpus)
-{
-       boolean_t current_state;
-
-       current_state = ml_set_interrupts_enabled(FALSE);
-       if (max_cpus_initialized != MAX_CPUS_SET) {
-               if (max_cpus > 0 && max_cpus < NCPUS)
-                       machine_info.max_cpus = max_cpus;
-               if (max_cpus_initialized == MAX_CPUS_WAIT)
-                       wakeup((event_t)&max_cpus_initialized);
-               max_cpus_initialized = MAX_CPUS_SET;
-       }
-       (void) ml_set_interrupts_enabled(current_state);
-}
-
-int
-ml_get_max_cpus(void)
-{
-       boolean_t current_state;
-
-       current_state = ml_set_interrupts_enabled(FALSE);
-       if (max_cpus_initialized != MAX_CPUS_SET) {
-               max_cpus_initialized = MAX_CPUS_WAIT;
-               assert_wait((event_t)&max_cpus_initialized, THREAD_UNINT);
-               (void)thread_block(THREAD_CONTINUE_NULL);
-       }
-       (void) ml_set_interrupts_enabled(current_state);
-       return(machine_info.max_cpus);
-}
-
-int
-ml_get_current_cpus(void)
-{
-       return machine_info.avail_cpus;
+    return (prev_value);
 }
 
 void
-ml_cpu_get_info(ml_cpu_info_t *cpu_info)
+ml_ppc_get_info(ml_ppc_cpu_info_t *cpu_info)
 {
   if (cpu_info == 0) return;
   
index 8569cd637ed329e8964c509cdf830e8126f50bc8..dc0cef117d8401caac242832a0735c8e20846fda 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -32,7 +29,6 @@
 #include <mach/mach_types.h>
 #include <mach/boolean.h>
 #include <kern/kern_types.h>
-#include <kern/sched_prim.h>
 #include <pexpert/pexpert.h>
 
 #include <sys/appleapiopts.h>
@@ -93,65 +89,22 @@ vm_offset_t ml_vtophys(
 boolean_t ml_probe_read(
        vm_offset_t paddr,
        unsigned int *val);
-boolean_t ml_probe_read_64(
-       addr64_t paddr,
-       unsigned int *val);
 
 /* Read physical address byte */
 unsigned int ml_phys_read_byte(
        vm_offset_t paddr);
-unsigned int ml_phys_read_byte_64(
-       addr64_t paddr);
-
-/* Read physical address half word */
-unsigned int ml_phys_read_half(
-       vm_offset_t paddr);
-unsigned int ml_phys_read_half_64(
-       addr64_t paddr);
 
-/* Read physical address word*/
+/* Read physical address */
 unsigned int ml_phys_read(
        vm_offset_t paddr);
-unsigned int ml_phys_read_64(
-       addr64_t paddr);
-unsigned int ml_phys_read_word(
-       vm_offset_t paddr);
-unsigned int ml_phys_read_word_64(
-       addr64_t paddr);
-
-/* Read physical address double word */
-unsigned long long ml_phys_read_double(
-       vm_offset_t paddr);
-unsigned long long ml_phys_read_double_64(
-       addr64_t paddr);
 
 /* Write physical address byte */
 void ml_phys_write_byte(
        vm_offset_t paddr, unsigned int data);
-void ml_phys_write_byte_64(
-       addr64_t paddr, unsigned int data);
 
-/* Write physical address half word */
-void ml_phys_write_half(
-       vm_offset_t paddr, unsigned int data);
-void ml_phys_write_half_64(
-       addr64_t paddr, unsigned int data);
-
-/* Write physical address word */
+/* Write physical address */
 void ml_phys_write(
        vm_offset_t paddr, unsigned int data);
-void ml_phys_write_64(
-       addr64_t paddr, unsigned int data);
-void ml_phys_write_word(
-       vm_offset_t paddr, unsigned int data);
-void ml_phys_write_word_64(
-       addr64_t paddr, unsigned int data);
-
-/* Write physical address double word */
-void ml_phys_write_double(
-       vm_offset_t paddr, unsigned long long data);
-void ml_phys_write_double_64(
-       addr64_t paddr, unsigned long long data);
 
 /* Struct for ml_processor_register */
 struct ml_processor_info_t {
@@ -196,6 +149,9 @@ boolean_t fake_get_interrupts_enabled(void);
 boolean_t fake_set_interrupts_enabled(
        boolean_t enable);
 
+/* check pending timers */
+void machine_clock_assist(void);
+
 void machine_idle(void);
 
 void machine_signal_idle(
@@ -227,20 +183,8 @@ void ml_thread_policy(
 #define MACHINE_NETWORK_WORKLOOP       0x00000001
 #define MACHINE_NETWORK_NETISR         0x00000002
 
-/* Initialize the maximum number of CPUs */
-void ml_init_max_cpus(
-       unsigned long max_cpus);
-
-/* Return the maximum number of CPUs set by ml_init_max_cpus() */
-int ml_get_max_cpus(
-       void);
-
-/* Return the current number of CPUs */
-int ml_get_current_cpus(
-       void);
-
-/* Struct for ml_cpu_get_info */
-struct ml_cpu_info {
+/* Struct for ml_ppc_get_cpu_info */
+struct ml_ppc_cpu_info_t {
        unsigned long           vector_unit;
        unsigned long           cache_line_size;
        unsigned long           l1_icache_size;
@@ -251,13 +195,12 @@ struct ml_cpu_info {
        unsigned long           l3_cache_size;
 };
 
-typedef struct ml_cpu_info ml_cpu_info_t;
+typedef struct ml_ppc_cpu_info_t ml_ppc_cpu_info_t;
 
 /* Get processor info */
-void ml_cpu_get_info(ml_cpu_info_t *cpu_info);
+void ml_ppc_get_info(ml_ppc_cpu_info_t *cpu_info);
 
 void ml_set_processor_speed(unsigned long speed);
-void ml_set_processor_voltage(unsigned long voltage);
 
 #endif /* __APPLE_API_PRIVATE */
 
index 9177b2a2a0814886fc5023814445173815e123c9..436307c24b39389929af8f27ebbbb660a41d07d1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #include <mach/ppc/vm_param.h>
 #include <ppc/exception.h>
        
-    
-/*
- * ml_set_physical()                   -- turn off DR and (if 64-bit) turn SF on
- *                                                                it is assumed that pf64Bit is already in cr6
- * ml_set_physical_get_ffs()   -- turn DR off, SF on, and get feature flags 
- * ml_set_physical_disabled()  -- turn DR and EE off, SF on, get feature flags
- * ml_set_translation_off()            -- turn DR, IR, and EE off, SF on, get feature flags
- *
- * Callable only from assembler, these return:
- *      r2 -- new MSR
- *     r11 -- old MSR
- *     r10 -- feature flags (pf64Bit etc, ie SPRG 2)
- *     cr6 -- feature flags 24-27, ie pf64Bit, pf128Byte, and pf32Byte
- *
- * Uses r0 and r2.  ml_set_translation_off also uses r3 and cr5.
- */
-
-        .align 4
-        .globl EXT(ml_set_translation_off)
-LEXT(ml_set_translation_off)
-        mfsprg r10,2                                           // get feature flags
-               li              r0,0                                            ; Clear this
-        mtcrf  0x02,r10                                        // move pf64Bit etc to cr6
-        ori            r0,r0,lo16(MASK(MSR_EE)+MASK(MSR_FP)+MASK(MSR_IR)+MASK(MSR_DR)) // turn off all 4
-        mfmsr  r11                                                     // get MSR
-               oris    r0,r0,hi16(MASK(MSR_VEC))       // Turn off vector too
-        mtcrf  0x04,r10                                        // move pfNoMSRir etc to cr5
-        andc   r2,r11,r0                                       // turn off EE, IR, and DR
-        bt++   pf64Bitb,ml_set_physical_64     // skip if 64-bit (only they take the hint)
-        bf             pfNoMSRirb,ml_set_physical_32   // skip if we can load MSR directly
-        li             r0,loadMSR                                      // Get the MSR setter SC
-        mr             r3,r2                                           // copy new MSR to r2
-        sc                                                                     // Set it
-        blr
-        
-               .align  4
-               .globl  EXT(ml_set_physical_disabled)
-
-LEXT(ml_set_physical_disabled)
-               li              r0,0                                            ; Clear
-        mfsprg r10,2                                           // get feature flags
-        ori            r0,r0,lo16(MASK(MSR_EE))        // turn EE and fp off
-        mtcrf  0x02,r10                                        // move pf64Bit etc to cr6
-        b              ml_set_physical_join
-
-               .align  5
-               .globl  EXT(ml_set_physical_get_ffs)
-
-LEXT(ml_set_physical_get_ffs)
-        mfsprg r10,2                                           // get feature flags
-        mtcrf  0x02,r10                                        // move pf64Bit etc to cr6
-
-               .globl  EXT(ml_set_physical)
-LEXT(ml_set_physical)
-
-        li             r0,0                                            // do not turn off interrupts
-
-ml_set_physical_join:
-               oris    r0,r0,hi16(MASK(MSR_VEC))       // Always gonna turn of vectors
-        mfmsr  r11                                                     // get MSR
-        ori            r0,r0,lo16(MASK(MSR_DR)+MASK(MSR_FP))   // always turn off DR and FP bit
-        andc   r2,r11,r0                                       // turn off DR and maybe EE
-        bt++   pf64Bitb,ml_set_physical_64     // skip if 64-bit (only they take the hint)
-ml_set_physical_32:
-        mtmsr  r2                                                      // turn off translation
-        isync
-        blr
-        
-ml_set_physical_64:
-        li             r0,1                                            // get a 1 to slam into SF
-        rldimi r2,r0,63,MSR_SF_BIT                     // set SF bit (bit 0)
-        mtmsrd r2                                                      // set 64-bit mode, turn off data relocation
-        isync                                                          // synchronize
-        blr
-    
-
-/*
- * ml_restore(old_MSR)
- *
- * Callable only from assembler, restores the MSR in r11 saved by ml_set_physical.
- * We assume cr6 and r11 are as set by ml_set_physical, ie:
- *     cr6 - pf64Bit flag (feature flags 24-27)
- *     r11 - old MSR
- */
-               .align  5
-               .globl  EXT(ml_restore)
-
-LEXT(ml_restore)
-        bt++   pf64Bitb,ml_restore_64          // handle 64-bit cpus (only they take the hint)
-        mtmsr  r11                                                     // restore a 32-bit MSR
-        isync
-        blr
-        
-ml_restore_64:
-        mtmsrd r11                                                     // restore a 64-bit MSR
-        isync
-        blr
-
-    
 /* PCI config cycle probing
  *
  *     boolean_t ml_probe_read(vm_offset_t paddr, unsigned int *val)
@@ -147,23 +44,16 @@ ml_restore_64:
 LEXT(ml_probe_read)
 
                        mfsprg  r9,2                                                    ; Get feature flags
-                       
-                       rlwinm. r0,r9,0,pf64Bitb,pf64Bitb               ; Are we on a 64-bit machine?
-                       rlwinm  r3,r3,0,0,31                                    ; Clean up for 64-bit machines
-                       bne++   mpr64bit                                                ; Go do this the 64-bit way...
-
-mpr32bit:      lis             r8,hi16(MASK(MSR_VEC))                  ; Get the vector flag
                        mfmsr   r0                                                              ; Save the current MSR
-                       ori             r8,r8,lo16(MASK(MSR_FP))                ; Add the FP flag
-
+                       rlwinm  r0,r0,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r0,r0,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
                        neg             r10,r3                                                  ; Number of bytes to end of page
-                       andc    r0,r0,r8                                                ; Clear VEC and FP
+                       rlwinm  r2,r0,0,MSR_EE_BIT+1,MSR_EE_BIT-1       ; Clear interruptions
                        rlwinm. r10,r10,0,20,31                                 ; Clear excess junk and test for page bndry
-                       ori             r8,r8,lo16(MASK(MSR_EE)|MASK(MSR_IR)|MASK(MSR_DR))              ; Drop EE, IR, and DR
                        mr              r12,r3                                                  ; Save the load address
-                       andc    r2,r0,r8                                                ; Clear VEC, FP, and EE
                        mtcrf   0x04,r9                                                 ; Set the features                      
                        cmplwi  cr1,r10,4                                               ; At least 4 bytes left in page?
+                       rlwinm  r2,r2,0,MSR_DR_BIT+1,MSR_IR_BIT-1       ; Clear translation                     
                        beq-    mprdoit                                                 ; We are right on the boundary...
                        li              r3,0
                        bltlr-  cr1                                                             ; No, just return failure...
@@ -239,6 +129,9 @@ mprNoMuM:
                        mtmsr   r2                                                              ; Turn translation back off
                        isync
                        
+                       mtspr   hid0, r6                                                        ; Restore HID0
+                       isync
+                       
                        lis             r10,hi16(EXT(shadow_BAT)+shdDBAT)       ; Get shadow address
                        ori             r10,r10,lo16(EXT(shadow_BAT)+shdDBAT)   ; Get shadow address
                        
@@ -268,421 +161,121 @@ mprNoMuM:
                        .globl  EXT(ml_probe_read_mck)
 LEXT(ml_probe_read_mck)
 
-    
-/* PCI config cycle probing - 64-bit
- *
- *     boolean_t ml_probe_read_64(addr64_t paddr, unsigned int *val)
- *
- *     Read the memory location at physical address paddr.
- *  This is a part of a device probe, so there is a good chance we will
- *  have a machine check here. So we have to be able to handle that.
- *  We assume that machine checks are enabled both in MSR and HIDs
- */
-
-;                      Force a line boundry here
-                       .align  6
-                       .globl  EXT(ml_probe_read_64)
-
-LEXT(ml_probe_read_64)
-
-                       mfsprg  r9,2                                                    ; Get feature flags
-                       rlwinm  r3,r3,0,1,0                                             ; Copy low 32 bits to top 32
-                       rlwinm. r0,r9,0,pf64Bitb,pf64Bitb               ; Are we on a 64-bit machine?
-                       rlwimi  r3,r4,0,0,31                                    ; Insert low part of 64-bit address in bottom 32 bits                   
-                       
-                       mr              r4,r5                                                   ; Move result to common register
-                       beq--   mpr32bit                                                ; Go do this the 32-bit way...
-
-mpr64bit:      andi.   r0,r3,3                                                 ; Check if we are on a word boundary
-                       li              r0,0                                                    ; Clear the EE bit (and everything else for that matter)
-                       bne--   mprFail                                                 ; Boundary not good...
-                       mfmsr   r11                                                             ; Get the MSR
-                       mtmsrd  r0,1                                                    ; Set the EE bit only (do not care about RI)
-                       rlwinm  r11,r11,0,MSR_EE_BIT,MSR_EE_BIT ; Isolate just the EE bit
-                       mfmsr   r10                                                             ; Refresh our view of the MSR (VMX/FP may have changed)
-                       or              r12,r10,r11                                             ; Turn on EE if on before we turned it off
-                       ori             r0,r0,lo16(MASK(MSR_IR)|MASK(MSR_DR))   ; Get the IR and DR bits
-                       li              r2,1                                                    ; Get a 1
-                       sldi    r2,r2,63                                                ; Get the 64-bit bit
-                       andc    r10,r10,r0                                              ; Clear IR and DR
-                       or              r10,r10,r2                                              ; Set 64-bit
-                       
-                       li              r0,1                                                    ; Get a 1
-                       mtmsrd  r10                                                             ; Translation and EE off, 64-bit on
-                       isync                   
-                       
-                       sldi    r0,r0,32+8                                              ; Get the right bit to inhibit caching
-
-                       mfspr   r8,hid4                                                 ; Get HID4
-                       or              r2,r8,r0                                                ; Set bit to make real accesses cache-inhibited
-                       sync                                                                    ; Sync up
-                       mtspr   hid4,r2                                                 ; Make real accesses cache-inhibited
-                       isync                                                                   ; Toss prefetches
-                       
-                       lis             r7,0xE000                                               ; Get the unlikeliest ESID possible
-                       srdi    r7,r7,1                                                 ; Make 0x7FFFFFFFF0000000
-                       slbie   r7                                                              ; Make sure the ERAT is cleared 
-                       
-                       sync
-                       isync
-
-                       eieio                                                                   ; Make sure of all previous accesses
-                       
-                       lwz             r11,0(r3)                                               ; Get it and maybe machine check here
-                       
-                       eieio                                                                   ; Make sure of ordering again
-                       sync                                                                    ; Get caught up yet again
-                       isync                                                                   ; Do not go further till we are here
-
-                       sync                                                                    ; Sync up
-                       mtspr   hid4,r8                                                 ; Make real accesses not cache-inhibited
-                       isync                                                                   ; Toss prefetches
-
-                       lis             r7,0xE000                                               ; Get the unlikeliest ESID possible
-                       srdi    r7,r7,1                                                 ; Make 0x7FFFFFFFF0000000
-                       slbie   r7                                                              ; Make sure the ERAT is cleared 
-
-                       mtmsrd  r12                                                             ; Restore entry MSR
-                       isync
-                       
-                       stw             r11,0(r4)                                               ; Pass back the result
-                       li              r3,1                                                    ; Indicate success
-                       blr                                                                             ; Leave...
-
-mprFail:       li              r3,0                                                    ; Set failure
-                       blr                                                                             ; Leave...
-
-;                      Force a line boundry here. This means we will be able to check addresses better
-                       .align  6
-                       .globl  EXT(ml_probe_read_mck_64)
-LEXT(ml_probe_read_mck_64)
-
-
-/* Read physical address byte
+/* Read physical address
  *
  *     unsigned int ml_phys_read_byte(vm_offset_t paddr)
- *     unsigned int ml_phys_read_byte_64(addr64_t paddr)
  *
  *     Read the byte at physical address paddr. Memory should not be cache inhibited.
  */
 
 ;                      Force a line boundry here
-
                        .align  5
-                       .globl  EXT(ml_phys_read_byte_64)
-
-LEXT(ml_phys_read_byte_64)
-
-                       rlwinm  r3,r3,0,1,0                                             ; Copy low 32 bits to top 32
-                       rlwimi  r3,r4,0,0,31                                    ; Insert low part of 64-bit address in bottom 32 bits
-            b          ml_phys_read_byte_join                  
-
                        .globl  EXT(ml_phys_read_byte)
 
 LEXT(ml_phys_read_byte)
-            rlwinm   r3,r3,0,0,31                              ; truncate address to 32-bits
-ml_phys_read_byte_join:                                                                ; r3 = address to read (reg64_t)
-                       mflr    r11                                                             ; Save the return
-                       bl              rdwrpre                                                 ; Get set up, translation/interrupts off, 64-bit on, etc.
-                       
-                       lbz             r3,0(r3)                                                ; Get the byte
-                       b               rdwrpost                                                ; Clean up and leave...
-
-
-/* Read physical address half word
- *
- *     unsigned int ml_phys_read_half(vm_offset_t paddr)
- *     unsigned int ml_phys_read_half_64(addr64_t paddr)
- *
- *     Read the half word at physical address paddr. Memory should not be cache inhibited.
- */
-
-;                      Force a line boundry here
-
-                       .align  5
-                       .globl  EXT(ml_phys_read_half_64)
-
-LEXT(ml_phys_read_half_64)
 
-                       rlwinm  r3,r3,0,1,0                                             ; Copy low 32 bits to top 32
-                       rlwimi  r3,r4,0,0,31                                    ; Insert low part of 64-bit address in bottom 32 bits
-            b          ml_phys_read_half_join          
+                       mfmsr   r10                                                             ; Save the current MSR
+                       rlwinm  r10,r10,0,MSR_FP_BIT+1,MSR_FP_BIT-1     ; Force floating point off
+                       rlwinm  r10,r10,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1   ; Force vectors off
+                       rlwinm  r4,r10,0,MSR_EE_BIT+1,MSR_EE_BIT-1      ; Clear interruptions
+                       rlwinm  r4,r4,0,MSR_DR_BIT+1,MSR_DR_BIT-1       ; Clear translation     
 
-                       .globl  EXT(ml_phys_read_half)
+                       mtmsr   r4                                                              ; Translation and all off
+                       isync                                                                   ; Toss prefetch
 
-LEXT(ml_phys_read_half)
-            rlwinm   r3,r3,0,0,31                              ; truncate address to 32-bits
-ml_phys_read_half_join:                                                                ; r3 = address to read (reg64_t)
-                       mflr    r11                                                             ; Save the return
-                       bl              rdwrpre                                                 ; Get set up, translation/interrupts off, 64-bit on, etc.
-                       
-                       lhz             r3,0(r3)                                                ; Get the half word
-                       b               rdwrpost                                                ; Clean up and leave...
+                       lbz             r3,0(r3)                                                ; Get the byte
+                       sync
 
+                       mtmsr   r10                                                             ; Restore translation and rupts
+                       isync
+                       blr
 
-/* Read physical address word
+/* Read physical address
  *
  *     unsigned int ml_phys_read(vm_offset_t paddr)
- *     unsigned int ml_phys_read_64(addr64_t paddr)
- *     unsigned int ml_phys_read_word(vm_offset_t paddr)
- *     unsigned int ml_phys_read_word_64(addr64_t paddr)
  *
  *     Read the word at physical address paddr. Memory should not be cache inhibited.
  */
 
 ;                      Force a line boundry here
-
                        .align  5
-                       .globl  EXT(ml_phys_read_64)
-                       .globl  EXT(ml_phys_read_word_64)
-
-LEXT(ml_phys_read_64)
-LEXT(ml_phys_read_word_64)
-
-                       rlwinm  r3,r3,0,1,0                                             ; Copy low 32 bits to top 32
-                       rlwimi  r3,r4,0,0,31                                    ; Insert low part of 64-bit address in bottom 32 bits
-            b          ml_phys_read_word_join          
-
                        .globl  EXT(ml_phys_read)
-                       .globl  EXT(ml_phys_read_word)
 
 LEXT(ml_phys_read)
-LEXT(ml_phys_read_word)
-            rlwinm   r3,r3,0,0,31                              ; truncate address to 32-bits
-ml_phys_read_word_join:                                                                ; r3 = address to read (reg64_t)
-                       mflr    r11                                                             ; Save the return
-                       bl              rdwrpre                                                 ; Get set up, translation/interrupts off, 64-bit on, etc.
-                       
-                       lwz             r3,0(r3)                                                ; Get the word
-                       b               rdwrpost                                                ; Clean up and leave...
-
-
-/* Read physical address double word
- *
- *     unsigned long long ml_phys_read_double(vm_offset_t paddr)
- *     unsigned long long ml_phys_read_double_64(addr64_t paddr)
- *
- *     Read the double word at physical address paddr. Memory should not be cache inhibited.
- */
-
-;                      Force a line boundry here
 
-                       .align  5
-                       .globl  EXT(ml_phys_read_double_64)
-
-LEXT(ml_phys_read_double_64)
-
-                       rlwinm  r3,r3,0,1,0                                             ; Copy low 32 bits to top 32
-                       rlwimi  r3,r4,0,0,31                                    ; Insert low part of 64-bit address in bottom 32 bits                   
-            b          ml_phys_read_double_join                
-
-                       .globl  EXT(ml_phys_read_double)
+                       mfmsr   r0                                                              ; Save the current MSR
+                       rlwinm  r0,r0,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r0,r0,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r4,r0,0,MSR_EE_BIT+1,MSR_EE_BIT-1       ; Clear interruptions
+                       rlwinm  r4,r4,0,MSR_DR_BIT+1,MSR_DR_BIT-1       ; Clear translation     
 
-LEXT(ml_phys_read_double)
-            rlwinm   r3,r3,0,0,31                              ; truncate address to 32-bits
-ml_phys_read_double_join:                                                      ; r3 = address to read (reg64_t)
-                       mflr    r11                                                             ; Save the return
-                       bl              rdwrpre                                                 ; Get set up, translation/interrupts off, 64-bit on, etc.
+                       mtmsr   r4                                                              ; Translation and all off
+                       isync                                                                   ; Toss prefetch
                        
-                       lwz             r4,4(r3)                                                ; Get the low word
-                       lwz             r3,0(r3)                                                ; Get the high word
-                       b               rdwrpost                                                ; Clean up and leave...
+                       lwz             r3,0(r3)                                                ; Get the word
+                       sync
 
+                       mtmsr   r0                                                              ; Restore translation and rupts
+                       isync
+                       blr
 
 /* Write physical address byte
  *
  *     void ml_phys_write_byte(vm_offset_t paddr, unsigned int data)
- *     void ml_phys_write_byte_64(addr64_t paddr, unsigned int data)
  *
  *     Write the byte at physical address paddr. Memory should not be cache inhibited.
  */
 
+;                      Force a line boundry here
                        .align  5
-                       .globl  EXT(ml_phys_write_byte_64)
-
-LEXT(ml_phys_write_byte_64)
-
-                       rlwinm  r3,r3,0,1,0                                             ; Copy low 32 bits to top 32
-                       rlwimi  r3,r4,0,0,31                                    ; Insert low part of 64-bit address in bottom 32 bits                   
-                       mr              r4,r5                                                   ; Copy over the data
-            b          ml_phys_write_byte_join
-
                        .globl  EXT(ml_phys_write_byte)
 
 LEXT(ml_phys_write_byte)
-            rlwinm   r3,r3,0,0,31                              ; truncate address to 32-bits
-ml_phys_write_byte_join:                                                       ; r3 = address to write (reg64_t), r4 = data
-                       mflr    r11                                                             ; Save the return
-                       bl              rdwrpre                                                 ; Get set up, translation/interrupts off, 64-bit on, etc.
-                       
-                       stb             r4,0(r3)                                                ; Set the byte
-                       b               rdwrpost                                                ; Clean up and leave...
-
 
-/* Write physical address half word
- *
- *     void ml_phys_write_half(vm_offset_t paddr, unsigned int data)
- *     void ml_phys_write_half_64(addr64_t paddr, unsigned int data)
- *
- *     Write the half word at physical address paddr. Memory should not be cache inhibited.
- */
-
-                       .align  5
-                       .globl  EXT(ml_phys_write_half_64)
-
-LEXT(ml_phys_write_half_64)
-
-                       rlwinm  r3,r3,0,1,0                                             ; Copy low 32 bits to top 32
-                       rlwimi  r3,r4,0,0,31                                    ; Insert low part of 64-bit address in bottom 32 bits                   
-                       mr              r4,r5                                                   ; Copy over the data
-            b          ml_phys_write_half_join
-
-                       .globl  EXT(ml_phys_write_half)
+                       mfmsr   r0                                                              ; Save the current MSR
+                       rlwinm  r0,r0,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r0,r0,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r5,r0,0,MSR_EE_BIT+1,MSR_EE_BIT-1       ; Clear interruptions
+                       rlwinm  r5,r5,0,MSR_DR_BIT+1,MSR_DR_BIT-1       ; Clear translation     
 
-LEXT(ml_phys_write_half)
-            rlwinm   r3,r3,0,0,31                              ; truncate address to 32-bits
-ml_phys_write_half_join:                                                       ; r3 = address to write (reg64_t), r4 = data
-                       mflr    r11                                                             ; Save the return
-                       bl              rdwrpre                                                 ; Get set up, translation/interrupts off, 64-bit on, etc.
+                       mtmsr   r5                                                              ; Translation and all off
+                       isync                                                                   ; Toss prefetch
                        
-                       sth             r4,0(r3)                                                ; Set the half word
-                       b               rdwrpost                                                ; Clean up and leave...
+                       stb             r4,0(r3)                                                ; Set the byte
+                       sync
 
+                       mtmsr   r0                                                              ; Restore translation and rupts
+                       isync
+                       blr
 
-/* Write physical address word
+/* Write physical address
  *
  *     void ml_phys_write(vm_offset_t paddr, unsigned int data)
- *     void ml_phys_write_64(addr64_t paddr, unsigned int data)
- *     void ml_phys_write_word(vm_offset_t paddr, unsigned int data)
- *     void ml_phys_write_word_64(addr64_t paddr, unsigned int data)
  *
  *     Write the word at physical address paddr. Memory should not be cache inhibited.
  */
 
+;                      Force a line boundry here
                        .align  5
-                       .globl  EXT(ml_phys_write_64)
-                       .globl  EXT(ml_phys_write_word_64)
-
-LEXT(ml_phys_write_64)
-LEXT(ml_phys_write_word_64)
-
-                       rlwinm  r3,r3,0,1,0                                             ; Copy low 32 bits to top 32
-                       rlwimi  r3,r4,0,0,31                                    ; Insert low part of 64-bit address in bottom 32 bits                   
-                       mr              r4,r5                                                   ; Copy over the data
-            b          ml_phys_write_word_join
-
                        .globl  EXT(ml_phys_write)
-                       .globl  EXT(ml_phys_write_word)
 
 LEXT(ml_phys_write)
-LEXT(ml_phys_write_word)
-            rlwinm   r3,r3,0,0,31                              ; truncate address to 32-bits
-ml_phys_write_word_join:                                                       ; r3 = address to write (reg64_t), r4 = data
-                       mflr    r11                                                             ; Save the return
-                       bl              rdwrpre                                                 ; Get set up, translation/interrupts off, 64-bit on, etc.
-                       
-                       stw             r4,0(r3)                                                ; Set the word
-                       b               rdwrpost                                                ; Clean up and leave...
-
-
-/* Write physical address double word
- *
- *     void ml_phys_write_double(vm_offset_t paddr, unsigned long long data)
- *     void ml_phys_write_double_64(addr64_t paddr, unsigned long long data)
- *
- *     Write the double word at physical address paddr. Memory should not be cache inhibited.
- */
-
-                       .align  5
-                       .globl  EXT(ml_phys_write_double_64)
-
-LEXT(ml_phys_write_double_64)
-
-                       rlwinm  r3,r3,0,1,0                                             ; Copy low 32 bits to top 32
-                       rlwimi  r3,r4,0,0,31                                    ; Insert low part of 64-bit address in bottom 32 bits                   
-                       mr              r4,r5                                                   ; Copy over the high data
-                       mr              r5,r6                                                   ; Copy over the low data
-            b          ml_phys_write_double_join
-
-                       .globl  EXT(ml_phys_write_double)
 
-LEXT(ml_phys_write_double)
-            rlwinm   r3,r3,0,0,31                              ; truncate address to 32-bits
-ml_phys_write_double_join:                                                     ; r3 = address to write (reg64_t), r4,r5 = data (long long)
-                       mflr    r11                                                             ; Save the return
-                       bl              rdwrpre                                                 ; Get set up, translation/interrupts off, 64-bit on, etc.
-                       
-                       stw             r4,0(r3)                                                ; Set the high word
-                       stw             r5,4(r3)                                                ; Set the low word
-                       b               rdwrpost                                                ; Clean up and leave...
-
-
-                       .align  5
+                       mfmsr   r0                                                              ; Save the current MSR
+                       rlwinm  r0,r0,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r0,r0,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r5,r0,0,MSR_EE_BIT+1,MSR_EE_BIT-1       ; Clear interruptions
+                       rlwinm  r5,r5,0,MSR_DR_BIT+1,MSR_DR_BIT-1       ; Clear translation     
 
-rdwrpre:       mfsprg  r12,2                                                   ; Get feature flags 
-                       lis             r8,hi16(MASK(MSR_VEC))                  ; Get the vector flag
-                       mfmsr   r10                                                             ; Save the MSR 
-                       ori             r8,r8,lo16(MASK(MSR_FP))                ; Add the FP flag
-                       mtcrf   0x02,r12                                                ; move pf64Bit
-                       andc    r10,r10,r8                                              ; Clear VEC and FP
-                       ori             r9,r8,lo16(MASK(MSR_EE)|MASK(MSR_IR)|MASK(MSR_DR))              ; Drop EE, DR, and IR
-                       li              r2,1                                                    ; Prepare for 64 bit
-                       andc    r9,r10,r9                                               ; Clear VEC, FP, DR, and EE
-                       bf--    pf64Bitb,rdwrpre32                              ; Join 32-bit code...
-                       
-                       srdi    r7,r3,31                                                ; Get a 1 if address is in I/O memory
-                       rldimi  r9,r2,63,MSR_SF_BIT                             ; set SF bit (bit 0)
-                       cmpldi  cr7,r7,1                                                ; Is source in I/O memory?
-                       mtmsrd  r9                                                              ; set 64-bit mode, turn off EE, DR, and IR
-                       isync                                                                   ; synchronize
-
-                       sldi    r0,r2,32+8                                              ; Get the right bit to turn off caching
-                       
-                       bnelr++ cr7                                                             ; We are not in the I/O area, all ready...
-                       
-                       mfspr   r8,hid4                                                 ; Get HID4
-                       or              r2,r8,r0                                                ; Set bit to make real accesses cache-inhibited
-                       sync                                                                    ; Sync up
-                       mtspr   hid4,r2                                                 ; Make real accesses cache-inhibited
-                       isync                                                                   ; Toss prefetches
-                       
-                       lis             r7,0xE000                                               ; Get the unlikeliest ESID possible
-                       srdi    r7,r7,1                                                 ; Make 0x7FFFFFFFF0000000
-                       slbie   r7                                                              ; Make sure the ERAT is cleared 
+                       mtmsr   r5                                                              ; Translation and all off
+                       isync                                                                   ; Toss prefetch
                        
+                       stw             r4,0(r3)                                                ; Set the word
                        sync
-                       isync
-                       blr                                                                             ; Finally,  all ready...
-       
-                       .align  5
-                       
-rdwrpre32:     rlwimi  r9,r10,0,MSR_IR_BIT,MSR_IR_BIT  ; Leave the IR bit unchanged
-                       mtmsr   r9                                                              ; Drop EE, DR, and leave IR unchanged
-                       isync
-                       blr                                                                             ; All set up, leave...
-                       
-                       .align  5
-                       
-rdwrpost:      mtlr    r11                                                             ; Restore the return
-                       bt++    pf64Bitb,rdwrpost64                             ; Join 64-bit code...
-                       
-                       mtmsr   r10                                                             ; Restore entry MSR (sans FP and VEC)
-                       isync
-                       blr                                                                             ; Leave...
-                       
-rdwrpost64:    bne++   cr7,rdwrpcok                                    ; Skip enabling real mode caching if we did not change it...
-
-                       sync                                                                    ; Sync up
-                       mtspr   hid4,r8                                                 ; Make real accesses not cache-inhibited
-                       isync                                                                   ; Toss prefetches
 
-                       lis             r7,0xE000                                               ; Get the unlikeliest ESID possible
-                       srdi    r7,r7,1                                                 ; Make 0x7FFFFFFFF0000000
-                       slbie   r7                                                              ; Make sure the ERAT is cleared 
-
-rdwrpcok:      mtmsrd  r10                                                             ; Restore entry MSR (sans FP and VEC)
+                       mtmsr   r0                                                              ; Restore translation and rupts
                        isync
-                       blr                                                                             ; Leave...
+                       blr
 
 
 /* set interrupts enabled or disabled
@@ -698,42 +291,56 @@ rdwrpcok: mtmsrd  r10                                                             ; Restore entry MSR (sans FP and VEC)
  
 LEXT(ml_set_interrupts_enabled)
 
-                       andi.   r4,r3,1                                                 ; Are we turning interruptions on?
-                       lis             r0,hi16(MASK(MSR_VEC))                  ; Get vector enable
+                       mfsprg  r7,0
+                       lwz             r4,PP_INTS_ENABLED(r7)
+                       mr.             r4,r4
+                       beq-    EXT(fake_set_interrupts_enabled)
                        mfmsr   r5                                                              ; Get the current MSR
-                       ori             r0,r0,lo16(MASK(MSR_EE)|MASK(MSR_FP))   ; Get float enable and EE enable
+                       rlwinm  r5,r5,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       mr              r4,r3                                                   ; Save the old value
+                       rlwinm  r5,r5,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
                        rlwinm  r3,r5,17,31,31                                  ; Set return value
-                       andc    r5,r5,r0                                                ; Force VEC and FP off
-                       bne         CheckPreemption                                     ; Interrupts going on, check ASTs...
-
-                       mtmsr   r5                              ; Slam diable (always going disabled here)
-                       isync                                                                   ; Need this because FP/Vec might go off
+                       rlwimi  r5,r4,15,16,16                                  ; Insert new EE bit
+                       andi.   r8,r5,lo16(MASK(MSR_EE))                        ; Interruptions
+                       bne     CheckPreemption
+NoPreemption:
+                       mtmsr   r5                              ; Slam enablement
                        blr
 
-                       .align  5
-
 CheckPreemption:
-                       mfsprg  r7,0
-                       ori             r5,r5,lo16(MASK(MSR_EE))                ; Turn on the enable
-                       lwz             r8,PP_NEED_AST(r7)                              ; Get pointer to AST flags
-                       mfsprg  r9,1                                                    ; Get current activation
-                       li              r6,AST_URGENT                                   ; Get the type we will preempt for 
-                       lwz             r7,ACT_PREEMPT_CNT(r9)                  ; Get preemption count
-                       lwz             r8,0(r8)                                                ; Get AST flags
-                       lis             r0,hi16(DoPreemptCall)                  ; High part of Preempt FW call
-                       cmpwi   cr1,r7,0                                                ; Are preemptions masked off?
-                       and.    r8,r8,r6                                                ; Are we urgent?
-                       crorc   cr1_eq,cr0_eq,cr1_eq                    ; Remember if preemptions are masked or not urgent
-                       ori             r0,r0,lo16(DoPreemptCall)       ; Bottome of FW call
-
+                       lwz             r8,PP_NEED_AST(r7)
+                       li              r6,AST_URGENT
+                       lwz             r8,0(r8)
+                       lwz             r7,PP_PREEMPT_CNT(r7)
+                       lis             r0,HIGH_ADDR(DoPreemptCall)
+                       and.    r8,r8,r6
+                       ori             r0,r0,LOW_ADDR(DoPreemptCall)   
+                       beq+    NoPreemption
+                       cmpi    cr0, r7, 0
                        mtmsr   r5                                                              ; Restore the MSR now, before we can preempt
-                       isync                                                                   ; Need this because FP/Vec might go off
-
-                       beqlr++ cr1                                                             ; Return if no premption...
+                       bnelr+                                                                  ; Return if no premption
                        sc                                                                              ; Preempt
                        blr
 
 
+/*  Emulate a decremeter exception
+ *
+ *     void machine_clock_assist(void)
+ *
+ */
+
+;                      Force a line boundry here
+                       .align  5
+                       .globl  EXT(machine_clock_assist)
+LEXT(machine_clock_assist)
+
+                       mfsprg  r7,0
+                       lwz             r4,PP_INTS_ENABLED(r7)
+                       mr.             r4,r4
+                       beq-    EXT(CreateFakeDEC)
+                       blr
+
 /*  Set machine into idle power-saving mode. 
  *
  *     void machine_idle_ppc(void)
@@ -744,24 +351,23 @@ CheckPreemption:
  *
  */
 
+
 ;                      Force a line boundry here
                        .align  5
                        .globl  EXT(machine_idle_ppc)
 
 LEXT(machine_idle_ppc)
 
-                       lis             r0,hi16(MASK(MSR_VEC))                  ; Get the vector flag
-                       mfmsr   r3                                                              ; Save the MSR 
-                       ori             r0,r0,lo16(MASK(MSR_FP))                ; Add the FP flag
-                       andc    r3,r3,r0                                                ; Clear VEC and FP
-                       ori             r0,r0,lo16(MASK(MSR_EE))                ; Drop EE also
-                       andc    r5,r3,r0                                                ; Clear VEC, FP, DR, and EE
-
+                       mfmsr   r3                                                              ; Get the current MSR
+                       rlwinm  r3,r3,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r3,r3,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       rlwinm  r5,r3,0,MSR_EE_BIT+1,MSR_EE_BIT-1       ; Turn off interruptions
                        mtmsr   r5                                                              ; Hold up interruptions for now
                        isync                                                                   ; May have messed with fp/vec
                        mfsprg  r12,0                                                   ; Get the per_proc_info
-                       mfsprg  r11,2                                                   ; Get CPU specific features
                        mfspr   r6,hid0                                                 ; Get the current power-saving mode
+                       mfsprg  r11,2                                                   ; Get CPU specific features
+                       rlwinm  r6,r6,0,sleep+1,doze-1                  ; Clear all possible power-saving modes (not DPM though)        
                        mtcrf   0xC7,r11                                                ; Get the facility flags
 
                        lis             r4,hi16(napm)                                   ; Assume we can nap
@@ -782,21 +388,21 @@ yesnap:           mftbu   r9                                                              ; Get the upper timebase
                        stw             r8,napStamp(r12)                                ; Set high order time stamp
                        stw             r7,napStamp+4(r12)                              ; Set low order nap stamp
 
-                       rlwinm. r7,r11,0,pfNoL2PFNapb,pfNoL2PFNapb      ; Turn off L2 Prefetch before nap?
+                       rlwinm. r7,r11,0,pfNoL2PFNapb,pfNoL2PFNapb                      ; Turn off L2 Prefetch before nap?
                        beq     miL2PFok
 
                        mfspr   r7,msscr0                                               ; Get currect MSSCR0 value
-                       rlwinm  r7,r7,0,0,l2pfes-1                              ; Disable L2 Prefetch
+                       rlwinm  r7,r7,0,0,l2pfes-1                                      ; Dissable L2 Prefetch
                        mtspr   msscr0,r7                                               ; Updates MSSCR0 value
                        sync
                        isync
 
 miL2PFok:
-                       rlwinm. r7,r11,0,pfSlowNapb,pfSlowNapb  ; Should nap at slow speed?
+                       rlwinm. r7,r11,0,pfSlowNapb,pfSlowNapb                          ; Should nap at slow speed?
                        beq     minoslownap
 
                        mfspr   r7,hid1                                                 ; Get current HID1 value
-                       oris    r7,r7,hi16(hid1psm)                             ; Select PLL1
+                       oris    r7,r7,hi16(hid1psm)                                     ; Select PLL1
                        mtspr   hid1,r7                                                 ; Update HID1 value
 
 minoslownap:
@@ -808,31 +414,11 @@ minoslownap:
 ;                      is taken and set everything up to return directly to machine_idle_ret.
 ;                      So, make sure everything we need there is already set up...
 ;
-
-                       li              r10,hi16(dozem|napm|sleepm)             ; Mask of power management bits
-               
-                       bf--    pf64Bitb,mipNSF1                                ; skip if 32-bit...
-                       
-                       sldi    r4,r4,32                                                ; Position the flags
-                       sldi    r10,r10,32                                              ; Position the masks
-
-               
-mipNSF1:       andc    r6,r6,r10                                               ; Clean up the old power bits           
-
                        ori             r7,r5,lo16(MASK(MSR_EE))                ; Flip on EE
                        or              r6,r6,r4                                                ; Set nap or doze
                        oris    r5,r7,hi16(MASK(MSR_POW))               ; Turn on power management in next MSR
-                       
-                       sync
                        mtspr   hid0,r6                                                 ; Set up the HID for nap/doze
-                       mfspr   r6,hid0                                                 ; Yes, this is silly, keep it here
-                       mfspr   r6,hid0                                                 ; Yes, this is a duplicate, keep it here
-                       mfspr   r6,hid0                                                 ; Yes, this is a duplicate, keep it here
-                       mfspr   r6,hid0                                                 ; Yes, this is a duplicate, keep it here
-                       mfspr   r6,hid0                                                 ; Yes, this is a duplicate, keep it here
-                       mfspr   r6,hid0                                                 ; Yes, this is a duplicate, keep it here
                        isync                                                                   ; Make sure it is set
-               
                        mtmsr   r7                                                              ; Enable for interrupts
                        rlwinm. r11,r11,0,pfAltivecb,pfAltivecb ; Do we have altivec?
                        beq-    minovec                                                 ; No...
@@ -889,46 +475,30 @@ deadsleep:        addi    r3,r3,1                                                 ; Make analyzer happy
                        b               deadsleep                                               ; Die the death of 1000 joys...
 #endif 
                        
-                       mfsprg  r12,0                                                   ; Get the per_proc_info
                        mfspr   r4,hid0                                                 ; Get the current power-saving mode
                        eqv             r10,r10,r10                                             ; Get all foxes
                        mfsprg  r11,2                                                   ; Get CPU specific features
 
-                       rlwinm. r5,r11,0,pfNoL2PFNapb,pfNoL2PFNapb      ; Turn off L2 Prefetch before sleep?
+                       rlwinm. r5,r11,0,pfNoL2PFNapb,pfNoL2PFNapb                      ; Turn off L2 Prefetch before sleep?
                        beq     mpsL2PFok
 
                        mfspr   r5,msscr0                                               ; Get currect MSSCR0 value
-                       rlwinm  r5,r5,0,0,l2pfes-1                              ; Disable L2 Prefetch
+                       rlwinm  r5,r5,0,0,l2pfes-1                                      ; Dissable L2 Prefetch
                        mtspr   msscr0,r5                                               ; Updates MSSCR0 value
                        sync
                        isync
 
 mpsL2PFok:
-                       rlwinm. r5,r11,0,pf64Bitb,pf64Bitb              ; PM bits are shifted on 64bit systems.
-                       bne             mpsPF64bit
-
-                       rlwinm  r4,r4,0,sleep+1,doze-1                  ; Clear all possible power-saving modes (not DPM though)
-                       oris    r4,r4,hi16(sleepm)                              ; Set sleep
-                       b       mpsClearDEC
-
-mpsPF64bit:
-                       lis     r5, hi16(dozem|napm|sleepm)                     ; Clear all possible power-saving modes (not DPM though)
-                       sldi    r5, r5, 32
-                       andc    r4, r4, r5
-                       lis     r5, hi16(napm)                                          ; Set sleep
-//                     lis     r5, hi16(dozem)                                         ; Set sleep
-                       sldi    r5, r5, 32
-                       or      r4, r4, r5
-
-mpsClearDEC:
                        mfmsr   r5                                                              ; Get the current MSR
                        rlwinm  r10,r10,0,1,31                                  ; Make 0x7FFFFFFF
+                       rlwinm  r4,r4,0,sleep+1,doze-1                  ; Clear all possible power-saving modes (not DPM though)        
                        mtdec   r10                                                             ; Load decrimenter with 0x7FFFFFFF
                        isync                                                                   ; and make sure,
                        mfdec   r9                                                              ; really sure, it gets there
                        
                        mtcrf   0x07,r11                                                ; Get the cache flags, etc
 
+                       oris    r4,r4,hi16(sleepm)                              ; Set sleep
                        rlwinm  r5,r5,0,MSR_DR_BIT+1,MSR_IR_BIT-1       ; Turn off translation          
 ;
 ;                      Note that we need translation off before we set the HID to sleep.  Otherwise
@@ -949,12 +519,6 @@ mpsNoMSRx:
                        ori             r3,r5,lo16(MASK(MSR_EE))                ; Flip on EE
                        sync
                        mtspr   hid0,r4                                                 ; Set up the HID to sleep
-                       mfspr   r4,hid0                                                 ; Yes, this is silly, keep it here
-                       mfspr   r4,hid0                                                 ; Yes, this is a duplicate, keep it here
-                       mfspr   r4,hid0                                                 ; Yes, this is a duplicate, keep it here
-                       mfspr   r4,hid0                                                 ; Yes, this is a duplicate, keep it here
-                       mfspr   r4,hid0                                                 ; Yes, this is a duplicate, keep it here
-                       mfspr   r4,hid0                                                 ; Yes, this is a duplicate, keep it here
 
                        mtmsr   r3                                                              ; Enable for interrupts to drain decrimenter
                                
@@ -977,8 +541,7 @@ mpsNoMSRx:
                        oris    r5,r5,hi16(MASK(MSR_POW))               ; Turn on power management in next MSR
                                                                                                        ; Leave EE off because power goes off shortly
 
-slSleepNow:
-                       sync                                                                    ; Sync it all up
+slSleepNow:    sync                                                                    ; Sync it all up
                        mtmsr   r5                                                              ; Do sleep with interruptions enabled
                        isync                                                                   ; Take a pill
                        b               slSleepNow                                              ; Go back to sleep if we wake up...
@@ -1010,25 +573,14 @@ LEXT(cacheInit)
                        
                        mfsprg  r11,2                                                   ; Get CPU specific features
                        mfmsr   r7                                                              ; Get the current MSR
+                       rlwinm  r4,r9,0,dpm+1,doze-1                    ; Clear all possible power-saving modes (also disable DPM)      
                        rlwinm  r7,r7,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
                        rlwinm  r7,r7,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
                        rlwimi  r11,r11,pfLClckb+1,31,31                ; Move pfLClck to another position (to keep from using non-volatile CRs)
                        rlwinm  r5,r7,0,MSR_DR_BIT+1,MSR_IR_BIT-1       ; Turn off translation          
                        rlwinm  r5,r5,0,MSR_EE_BIT+1,MSR_EE_BIT-1       ; Turn off interruptions
                        mtcrf   0x87,r11                                                ; Get the feature flags
-                       lis             r10,hi16(dozem|napm|sleepm|dpmm)        ; Mask of power management bits
-                       bf--    pf64Bitb,cIniNSF1                               ; Skip if 32-bit...
-                       
-                       sldi    r10,r10,32                                              ; Position the masks
-
-cIniNSF1:      andc    r4,r9,r10                                               ; Clean up the old power bits           
                        mtspr   hid0,r4                                                 ; Set up the HID
-                       mfspr   r4,hid0                                                 ; Yes, this is silly, keep it here
-                       mfspr   r4,hid0                                                 ; Yes, this is a duplicate, keep it here
-                       mfspr   r4,hid0                                                 ; Yes, this is a duplicate, keep it here
-                       mfspr   r4,hid0                                                 ; Yes, this is a duplicate, keep it here
-                       mfspr   r4,hid0                                                 ; Yes, this is a duplicate, keep it here
-                       mfspr   r4,hid0                                                 ; Yes, this is a duplicate, keep it here
 
                        bt              pfNoMSRirb,ciNoMSR                              ; No MSR...
 
@@ -1047,12 +599,11 @@ ciNoMSRx:
                        dssall                                                                  ; Stop streams
                        sync
 
-cinoDSS:       li              r5,tlbieLock                                    ; Get the TLBIE lock
+cinoDSS:       lis             r5,hi16(EXT(tlb_system_lock))   ; Get the TLBIE lock
                        li              r0,128                                                  ; Get number of TLB entries
+                       ori             r5,r5,lo16(EXT(tlb_system_lock))        ; Grab up the bottom part
                        
                        li              r6,0                                                    ; Start at 0
-                       bf--    pf64Bitb,citlbhang                              ; Skip if 32-bit...
-                       li              r0,1024                                                 ; Get the number of TLB entries
 
 citlbhang:     lwarx   r2,0,r5                                                 ; Get the TLBIE lock
                        mr.             r2,r2                                                   ; Is it locked?
@@ -1076,19 +627,14 @@ cipurgeTLB:      tlbie   r6                                                              ; Purge this entry
                        sync
                        isync
                        
-                       bf--    pf64Bitb,cinoSMP                                ; Skip if 32-bit...
-                       ptesync                                                                 ; Wait for quiet again
-                       sync
-                       
-cinoSMP:       stw             r2,tlbieLock(0)                                 ; Unlock TLBIE lock
-
-                       bt++    pf64Bitb,cin64                                  ; Skip if 64-bit...
+cinoSMP:       stw             r2,0(r5)                                                ; Unlock TLBIE lock
 
+                       cror    cr0_eq,pfL1ib,pfL1db                    ; Check for either I- or D-cache
+                       bf-             cr0_eq,cinoL1                                   ; No level 1 to flush...
                        rlwinm. r0,r9,0,ice,dce                                 ; Were either of the level 1s on?
                        beq-    cinoL1                                                  ; No, no need to flush...
                        
-            rlwinm.    r0,r11,0,pfL1fab,pfL1fab                ; do we have L1 flush assist?
-                       beq             ciswdl1                                                 ; If no hw flush assist, go do by software...
+                       bf              pfL1fab,ciswdl1                                 ; If no hw flush assist, go do by software...
                        
                        mfspr   r8,msscr0                                               ; Get the memory system control register
                        oris    r8,r8,hi16(dl1hwfm)                             ; Turn on the hardware flush request
@@ -1212,9 +758,7 @@ cinoL1:
 ;
 ;                      Flush and disable the level 2
 ;
-            mfsprg     r10,2                                                   ; need to check 2 features we did not put in CR
-            rlwinm.    r0,r10,0,pfL2b,pfL2b                    ; do we have L2?
-                       beq             cinol2                                                  ; No level 2 cache to flush
+                       bf              pfL2b,cinol2                                    ; No level 2 cache to flush
 
                        mfspr   r8,l2cr                                                 ; Get the L2CR
                        lwz             r3,pfl2cr(r12)                                  ; Get the L2CR value
@@ -1229,8 +773,7 @@ cinoL1:
                        bne-    ciinvdl2                                                ; Yes, just invalidate and get PLL synced...            
                        
 ciflushl2:
-            rlwinm.    r0,r10,0,pfL2fab,pfL2fab                ; hardware-assisted L2 flush?
-                       beq             ciswfl2                                                 ; Flush not in hardware...
+                       bf              pfL2fab,ciswfl2                                 ; Flush not in hardware...
                        
                        mr              r10,r8                                                  ; Take a copy now
                        
@@ -1281,7 +824,7 @@ ciswfldl2a:        lwz             r0,0(r10)                                               ; Load something to flush something
                        addi    r10,r10,32                                              ; Next line
                        bdnz    ciswfldl2a                                              ; Do the lot...
                        
-ciinvdl2:      rlwinm  r3,r3,0,l2e+1,31                                ; Clear the enable bit
+ciinvdl2:      rlwinm  r8,r3,0,l2e+1,31                                ; Use the saved L2CR and clear the enable bit
                        b               cinla                                                   ; Branch to next line...
 
                        .align  5
@@ -1308,9 +851,7 @@ ciinvl2:   sync
                        sync
                        isync
 ciinvdl2a:     mfspr   r2,l2cr                                                 ; Get the L2CR
-            mfsprg     r0,2                                                    ; need to check a feature in "non-volatile" set
-            rlwinm.    r0,r0,0,pfL2ib,pfL2ib                   ; flush in HW?
-                       beq             ciinvdl2b                                               ; Flush not in hardware...
+                       bf              pfL2ib,ciinvdl2b                                ; Flush not in hardware...
                        rlwinm. r2,r2,0,l2i,l2i                                 ; Is the invalidate still going?
                        bne+    ciinvdl2a                                               ; Assume so, this will take a looong time...
                        sync
@@ -1362,7 +903,7 @@ cihwfl3:   mfspr   r10,l3cr                                                ; Get back the L3CR
                        rlwinm. r10,r10,0,l3hwf,l3hwf                   ; Is the flush over?
                        bne+    cihwfl3                                                 ; Nope, keep going...
 
-ciinvdl3:      rlwinm  r8,r3,0,l3e+1,31                                ; Clear the enable bit
+ciinvdl3:      rlwinm  r8,r3,0,l3e+1,31                                ; Use saved L3CR value and clear the enable bit
                        sync                                                                    ; Make sure of life, liberty, and justice
                        mtspr   l3cr,r8                                                 ; Disable L3
                        sync
@@ -1412,13 +953,11 @@ ciinvdl3c:       addi    r2,r2,-1                                                ; ?
                        mtspr   l3cr,r3                                                 ; Enable it as desired
                        sync
 cinol3:
-            mfsprg     r0,2                                                    ; need to check a feature in "non-volatile" set
-            rlwinm.    r0,r0,0,pfL2b,pfL2b                             ; is there an L2 cache?
-                       beq             cinol2a                                                 ; No level 2 cache to enable
+                       bf              pfL2b,cinol2a                                   ; No level 2 cache to enable
 
                        lwz             r3,pfl2cr(r12)                                  ; Get the L2CR value
                        cmplwi          r3, 0                                           ; Should the L2 be all the way off?
-                       beq             cinol2a                                                 : Yes, done with L2
+                       beq             cinol2a                                         : Yes, done with L2
                        mtspr   l2cr,r3                                                 ; Enable it as desired
                        sync
 
@@ -1447,161 +986,6 @@ cinoexit:        mtspr   hid0,r9                                                 ; Turn off the invalidate (needed for some older m
                        blr                                                                             ; Return...
 
 
-;
-;                      Handle 64-bit architecture
-;                      This processor can not run without caches, so we just push everything out
-;                      and flush.  It will be relativily clean afterwards
-;
-                       
-                       .align  5
-                       
-cin64:         
-                       li              r10,hi16(dozem|napm|sleepm)             ; Mask of power management bits we want cleared
-                       sldi    r10,r10,32                                              ; Position the masks
-                       andc    r9,r9,r10                                               ; Clean up the old power bits
-                       mr              r4,r9   
-                       isync
-                       mtspr   hid0,r4                                                 ; Set up the HID
-                       mfspr   r4,hid0                                                 ; Yes, this is silly, keep it here
-                       mfspr   r4,hid0                                                 ; Yes, this is a duplicate, keep it here
-                       mfspr   r4,hid0                                                 ; Yes, this is a duplicate, keep it here
-                       mfspr   r4,hid0                                                 ; Yes, this is a duplicate, keep it here
-                       mfspr   r4,hid0                                                 ; Yes, this is a duplicate, keep it here
-                       mfspr   r4,hid0                                                 ; Yes, this is a duplicate, keep it here
-                       isync
-
-                       mfspr   r10,hid1                                                ; Save hid1
-                       mfspr   r4,hid4                                                 ; Save hid4
-                       mr              r12,r10                                                 ; Really save hid1
-                       mr              r11,r4                                                  ; Get a working copy of hid4
-
-                       li              r0,0                                                    ; Get a 0
-                       eqv             r2,r2,r2                                                ; Get all foxes
-                       
-                       rldimi  r10,r0,55,7                                             ; Clear I$ prefetch bits (7:8)
-                       
-                       isync
-                       mtspr   hid1,r10                                                ; Stick it
-                       mtspr   hid1,r10                                                ; Stick it again
-                       isync
-
-                       rldimi  r11,r2,38,25                                    ; Disable D$ prefetch (25:25)
-                       
-                       sync
-                       mtspr   hid4,r11                                                ; Stick it
-                       isync
-
-                       li              r3,8                                                    ; Set bit 28+32
-                       sldi    r3,r3,32                                                ; Make it bit 28
-                       or              r3,r3,r11                                               ; Turn on the flash invalidate L1D$
-                       
-                       oris    r5,r11,0x0600                                   ; Set disable L1D$ bits         
-                       sync
-                       mtspr   hid4,r3                                                 ; Invalidate
-                       isync
-       
-                       mtspr   hid4,r5                                                 ; Un-invalidate and disable L1D$
-                       isync
-                       
-                       lis             r8,GUSModeReg                                   ; Get the GUS mode ring address
-                       mfsprg  r0,2                                                    ; Get the feature flags
-                       ori             r8,r8,0x8000                                    ; Set to read data
-                       rlwinm. r0,r0,pfSCOMFixUpb+1,31,31              ; Set shift if we need a fix me up
-
-                       sync
-
-                       mtspr   scomc,r8                                                ; Request the GUS mode
-                       mfspr   r11,scomd                                               ; Get the GUS mode
-                       mfspr   r8,scomc                                                ; Get back the status (we just ignore it)
-                       sync
-                       isync                                                   
-
-                       sld             r11,r11,r0                                              ; Fix up if needed
-
-                       ori             r6,r11,lo16(GUSMdmapen)                 ; Set the bit that means direct L2 cache address
-                       lis             r8,GUSModeReg                                   ; Get GUS mode register address
-                               
-                       sync
-
-                       mtspr   scomd,r6                                                ; Set that we want direct L2 mode
-                       mtspr   scomc,r8                                                ; Tell GUS we want direct L2 mode
-                       mfspr   r3,scomc                                                ; Get back the status
-                       sync
-                       isync                                                   
-
-                       li              r3,0                                                    ; Clear start point
-               
-cflushlp:      lis             r6,0x0040                                               ; Pick 4MB line as our target
-                       or              r6,r6,r3                                                ; Put in the line offset
-                       lwz             r5,0(r6)                                                ; Load a line
-                       addis   r6,r6,8                                                 ; Roll bit 42:44
-                       lwz             r5,0(r6)                                                ; Load a line
-                       addis   r6,r6,8                                                 ; Roll bit 42:44
-                       lwz             r5,0(r6)                                                ; Load a line
-                       addis   r6,r6,8                                                 ; Roll bit 42:44
-                       lwz             r5,0(r6)                                                ; Load a line
-                       addis   r6,r6,8                                                 ; Roll bit 42:44
-                       lwz             r5,0(r6)                                                ; Load a line
-                       addis   r6,r6,8                                                 ; Roll bit 42:44
-                       lwz             r5,0(r6)                                                ; Load a line
-                       addis   r6,r6,8                                                 ; Roll bit 42:44
-                       lwz             r5,0(r6)                                                ; Load a line
-                       addis   r6,r6,8                                                 ; Roll bit 42:44
-                       lwz             r5,0(r6)                                                ; Load a line
-
-                       addi    r3,r3,128                                               ; Next line
-                       andis.  r5,r3,8                                                 ; Have we done enough?
-                       beq++   cflushlp                                                ; Not yet...
-                       
-                       sync
-
-                       lis             r6,0x0040                                               ; Pick 4MB line as our target
-
-cflushx:       dcbf    0,r6                                                    ; Flush line and invalidate
-                       addi    r6,r6,128                                               ; Next line
-                       andis.  r5,r6,0x0080                                    ; Have we done enough?
-                       beq++   cflushx                                                 ; Keep on flushing...
-
-                       mr              r3,r10                                                  ; Copy current hid1
-                       rldimi  r3,r2,54,9                                              ; Set force icbi match mode
-                       
-                       li              r6,0                                                    ; Set start if ICBI range
-                       isync
-                       mtspr   hid1,r3                                                 ; Stick it
-                       mtspr   hid1,r3                                                 ; Stick it again
-                       isync
-
-cflicbi:       icbi    0,r6                                                    ; Kill I$
-                       addi    r6,r6,128                                               ; Next line
-                       andis.  r5,r6,1                                                 ; Have we done them all?
-                       beq++   cflicbi                                                 ; Not yet...
-
-                       lis             r8,GUSModeReg                                   ; Get GUS mode register address
-                               
-                       sync
-
-                       mtspr   scomd,r11                                               ; Set that we do not want direct mode
-                       mtspr   scomc,r8                                                ; Tell GUS we do not want direct mode
-                       mfspr   r3,scomc                                                ; Get back the status
-                       sync
-                       isync                                                   
-                       
-                       isync
-                       mtspr   hid1,r12                                                ; Restore entry hid1
-                       mtspr   hid1,r12                                                ; Stick it again
-                       isync
-               
-                       sync
-                       mtspr   hid4,r4                                                 ; Restore entry hid4
-                       isync
-
-                       sync
-                       mtmsr   r7                                                              ; Restore MSR to entry
-                       isync
-                       blr                                                                             ; Return...
-                       
-                       
-
 /*  Disables all caches
  *
  *     void cacheDisable(void)
@@ -1625,16 +1009,13 @@ LEXT(cacheDisable)
                        
 cdNoAlt:       sync
                        
-                       btlr    pf64Bitb                                                ; No way to disable a 64-bit machine...
-                       
                        mfspr   r5,hid0                                                 ; Get the hid
                        rlwinm  r5,r5,0,dce+1,ice-1                             ; Clear the I- and D- cache enables
                        mtspr   hid0,r5                                                 ; Turn off dem caches
                        sync
 
-            rlwinm.    r0,r11,0,pfL2b,pfL2b                    ; is there an L2?
-                       beq             cdNoL2                                                  ; Skip if no L2...
-
+                       bf              pfL2b,cdNoL2                                    ; Skip if no L2...
+                       
                        mfspr   r5,l2cr                                                 ; Get the L2
                        rlwinm  r5,r5,0,l2e+1,31                                ; Turn off enable bit
 
@@ -1878,99 +1259,36 @@ throtoff:       mfspr   r3,ictc                                                 ; Get the old throttle
 LEXT(ml_get_timebase)
 
 loop:
-                       mftbu   r4
-                       mftb    r5
-                       mftbu   r6
-                       cmpw    r6, r4
-                       bne-    loop
-                       
-                       stw     r4, 0(r3)
-                       stw     r5, 4(r3)
-                       
-                       blr
-
-/*
- *             unsigned int cpu_number(void)
- *
- *                     Returns the current cpu number. 
- */
+        mftbu   r4
+        mftb    r5
+        mftbu   r6
+        cmpw    r6, r4
+        bne-    loop
 
-                       .align  5
-                       .globl  EXT(cpu_number)
-
-LEXT(cpu_number)
-
-                       mfsprg  r7,0                                                    ; Get per-proc block
-                       lhz             r3,PP_CPU_NUMBER(r7)                    ; Get CPU number 
-                       blr                                                                             ; Return...
-
-/*
- *             thread_t current_thread(void)
- *
- *                     Return the active thread for both inside and outside osfmk consumption
- */
-                       .align  5
-                       .globl  EXT(current_thread)
+        stw     r4, 0(r3)
+        stw     r5, 4(r3)
 
-LEXT(current_thread)
-
-                       mfsprg  r3,1
-                       lwz             r3,ACT_THREAD(r3)
-                       blr
-
-/*
- *             set_machine_current_thread(thread_t)
- *
- *                     Set the active thread 
- */
-                       .align  5
-                       .globl  EXT(set_machine_current_thread)
-
-LEXT(set_machine_current_thread)
-
-                       mfsprg  r6,0                                                    ; Get the per_proc
-                       stw             r3,PP_ACTIVE_THREAD(r6)                 ; Set the active thread
-                       blr                                                                             ; Return...
-
-/*
- *             void set_machine_current_act(thread_act_t)
- *
- *                     Set the current activation
- */
-                       .align  5
-                       .globl  EXT(set_machine_current_act)
-
-LEXT(set_machine_current_act)
-
-                       mtsprg  1,r3                                                    ; Set spr1 with the active thread
-                       blr                                                                             ; Return...
-
-/*
- *             thread_act_t current_act(void)
- *
- *                     Return the current activation
- */
-                       .align  5
-                       .globl  EXT(current_act)
-
-LEXT(current_act)
-
-                       mfsprg  r3,1
-                       blr
+        blr
 
 /*
- *             cpu_data_t* get_cpu_data(void)
- *
- *                     Return the cpu_data
+ *             The routine that implements cpu_number.
  */
-                       .align  5
-                       .globl  EXT(get_cpu_data)
 
-LEXT(get_cpu_data)
+               .align  5
+               .globl  EXT(cpu_number)
  
-                       mfsprg  r3,0                                                    ; Get the per_proc
-                       addi    r3,r3,PP_ACTIVE_THREAD                  ; Get the pointer to the CPU data from per proc
-                       blr                                                                             ; Return...
+LEXT(cpu_number)
+               mfmsr   r9                                              /* Save the old MSR */
+               rlwinm  r9,r9,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+               rlwinm  r9,r9,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+               rlwinm  r8,r9,0,17,15                   /* Clear interruptions */
+               mtmsr   r8                                              /* Interrupts off */
+               isync
+               mfsprg  r7,0                                    /* Get per-proc block */
+               lhz             r3,PP_CPU_NUMBER(r7)    /* Get CPU number */
+               mtmsr   r9                                              /* Restore interruptions to entry */
+               blr                                                             /* Return... */
 
 /*
 **      ml_sense_nmi()
@@ -2020,18 +1338,3 @@ sps1:
 
 sps2:
                        blr
-
-/*
-**      ml_set_processor_voltage()
-**
-*/
-;                      Force a line boundry here
-                       .align  5
-                       .globl  EXT(ml_set_processor_voltage)
-
-LEXT(ml_set_processor_voltage)
-                       mfspr   r4, hid2                                                        ; Get HID2 value
-                       rlwimi  r4, r3, 31-hid2vmin, hid2vmin, hid2vmin                         ; Insert the voltage mode bit
-                       mtspr   hid2, r4                                                        ; Set the voltage mode
-                       sync                                                                    ; Make sure it is done
-                       blr
index 92d5f6f4aef2c385b8a364c7bcdcee9583e83218..087c562d53b7964e677d7da9cecf678d7a4d2e79 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index be26348d350ed8cf1c92cf21c9891808a7a629b2..453c62f152115fa575e42c9fecd36b02cc5756ce 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index d45facf9cba8551f5f2bb24e47fcede89a40b655..7df7e9afcc9107cfa540422d0a233a8cf14c156c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5fc22ea7de538ff5a7189ebf5c168547d8676922..fb337d30554f1f8b91366d13c72c2ec81dc77737 100644 (file)
@@ -1,24 +1,21 @@
 /*
- * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #include <kern/spl.h>
 
 #include <kern/misc_protos.h>
-#include <ppc/exception.h>
 #include <ppc/misc_protos.h>
 #include <ppc/proc_reg.h>
 
 #include <vm/pmap.h>
 #include <ppc/pmap.h>
+#include <ppc/pmap_internals.h>
 #include <ppc/mem.h>
 
 #include <ppc/new_screen.h>
 
 #define PERFTIMES 0
 
+#if PERFTIMES && DEBUG
+#define debugLog2(a, b, c) dbgLog2(a, b, c)
+#else
+#define debugLog2(a, b, c)
+#endif
+
 vm_map_t        mapping_map = VM_MAP_NULL;
+#define                MAPPING_MAP_SIZE        33554432        /* 32MB address space */
 
-unsigned int   incrVSID = 0;                                           /* VSID increment value */
+unsigned int   incrVSID = 0;                                                                   /* VSID increment value */
 unsigned int   mappingdeb0 = 0;                                                
-unsigned int   mappingdeb1 = 0;
-int ppc_max_adrsp;                                                                     /* Maximum address spaces */                    
-                               
-addr64_t               *mapdebug;                                                      /* (BRINGUP) */
-extern unsigned int DebugWork;                                         /* (BRINGUP) */
-                                               
+unsigned int   mappingdeb1 = 0;                                                
 extern unsigned int    hash_table_size;                                                
-
-void mapping_verify(void);
-void mapping_phys_unused(ppnum_t pa);
-
+extern vm_offset_t mem_size;
 /*
  *     ppc_prot translates from the mach representation of protections to the PPC version.
  *  We also allow for a direct setting of the protection bits. This extends the mach
@@ -152,485 +148,925 @@ void mapping_phys_unused(ppnum_t pa);
 
 void mapping_init(void) {
 
-       unsigned int tmp, maxeff, rwidth;
-       
-       ppc_max_adrsp = maxAdrSp;                                                                       /* Set maximum address spaces */                        
+       unsigned int tmp;
        
-       maxeff = 32;                                                                                            /* Assume 32-bit */
-       if(per_proc_info[0].pf.Available & pf64Bit) maxeff = 64;        /* Is this a 64-bit machine? */
-       
-       rwidth = per_proc_info[0].pf.pfMaxVAddr - maxAdrSpb;            /* Reduce address width by width of address space ID */
-       if(rwidth > maxeff) rwidth = maxeff;                                            /* If we still have more virtual than effective, clamp at effective */
+       __asm__ volatile("cntlzw %0, %1" : "=r" (tmp) : "r" (hash_table_size)); /* Get number of leading 0s */
+
+       incrVSID = 1 << ((32 - tmp + 1) >> 1);                                          /* Get ceiling of sqrt of table size */
+       incrVSID |= 1 << ((32 - tmp + 1) >> 2);                                         /* Get ceiling of quadroot of table size */
+       incrVSID |= 1;                                                                                          /* Set bit and add 1 */
+       return;
+
+}
+
+
+/*
+ *             mapping_remove(pmap_t pmap, vm_offset_t va);
+ *                     Given a pmap and virtual address, this routine finds the mapping and removes it from
+ *                     both its PTEG hash list and the physical entry list.  The mapping block will be added to
+ *                     the free list.  If the free list threshold is reached, garbage collection will happen.
+ *                     We also kick back a return code to say whether or not we had one to remove.
+ *
+ *                     We have a strict ordering here:  the mapping must be removed from the PTEG hash list before
+ *                     it can be removed from the physical entry list.  This allows us to get by with only the PTEG
+ *                     hash lock at page fault time. The physical entry lock must be held while we remove the mapping 
+ *                     from both lists. The PTEG lock is one of the lowest level locks.  No PTE fault, interruptions,
+ *                     losing control, getting other locks, etc., are allowed when you hold it. You do, and you die.
+ *                     It's just that simple!
+ *
+ *                     When the phys_entry lock is held, the mappings chained to that one are guaranteed to stay around.
+ *                     However, a mapping's order on the PTEG hash chain is not.  The interrupt handler uses the PTEG
+ *                     lock to control the hash cahin and may move the position of the mapping for MRU calculations.
+ *
+ *                     Note that mappings do not need to point to a physical entry. When they don't, it indicates 
+ *                     the mapping is outside of physical memory and usually refers to a memory mapped device of
+ *                     some sort.  Naturally, we can't lock what we don't have, so the phys entry lock and unlock
+ *                     routines return normally, but don't do anything.
+ */
+
+boolean_t mapping_remove(pmap_t pmap, vm_offset_t va) {                        /* Remove a single mapping for this VADDR 
+                                                                                                                                  Returns TRUE if a mapping was found to remove */
+
+       mapping         *mp, *mpv;
+       register blokmap *blm;
+       spl_t           s;
+       unsigned int *useadd, *useaddr, uindx;
+       int i;
+       struct phys_entry       *pp;
+       mapping                 *mp1, *mpv1;
        
-       vm_max_address = 0xFFFFFFFFFFFFFFFFULL >> (64 - rwidth);                /* Get maximum effective address supported */
-       vm_max_physical = 0xFFFFFFFFFFFFFFFFULL >> (64 - per_proc_info[0].pf.pfMaxPAddr);       /* Get maximum physical address supported */
+       debugLog2(1, va, pmap->space);                                                          /* start mapping_remove */
+
+       s=splhigh();                                                                                            /* Don't bother me */
        
-       if(per_proc_info[0].pf.Available & pf64Bit) {                           /* Are we 64 bit? */
-               tmp = 12;                                                                                               /* Size of hash space */
+       mp = hw_lock_phys_vir(pmap->space, va);                                         /* Lock the physical entry for this mapping */
+
+       if(!mp) {                                                                                                       /* Did we find one? */
+               splx(s);                                                                                        /* Allow 'rupts now */
+               if(mp = (mapping *)hw_rem_blk(pmap, va, va)) {                  /* No normal pages, try to remove an odd-sized one */
+                       
+                       if((unsigned int)mp & 1) {                                                      /* Make sure we don't unmap a permanent one */
+                               blm = (blokmap *)hw_cpv((mapping *)((unsigned int)mp & 0xFFFFFFFC));            /* Get virtual address */
+                               panic("mapping_remove: attempt to unmap a permanent mapping - pmap = %08X, va = %08X, mapping = %08X\n",
+                                       pmap, va, blm);
+                       }
+                       while ((unsigned int)mp & 2)
+                               mp = (mapping *)hw_rem_blk(pmap, va, va);
+#if 0
+                       blm = (blokmap *)hw_cpv(mp);                                            /* (TEST/DEBUG) */
+                       kprintf("mapping_remove: removed block map - bm=%08X; start=%08X; end=%08X; PTEr=%08X\n",       /* (TEST/DEBUG) */
+                        blm, blm->start, blm->end, blm->PTEr);
+#endif
+                       mapping_free(hw_cpv(mp));                                                       /* Release it */
+                       debugLog2(2, 1, 0);                                                                     /* End mapping_remove */
+                       return TRUE;                                                                            /* Tell them we did it */
+               }
+               debugLog2(2, 0, 0);                                                                             /* end mapping_remove */
+               return FALSE;                                                                                   /* Didn't find any, return FALSE... */
        }
-       else {
-               __asm__ volatile("cntlzw %0, %1" : "=r" (tmp) : "r" (hash_table_size)); /* Get number of leading 0s */
-               tmp = 32 - tmp;                                                                                 /* Size of hash space */
+       if((unsigned int)mp&1) {                                                                        /* Did we timeout? */
+               panic("mapping_remove: timeout locking physical entry\n");      /* Yeah, scream about it! */
+               splx(s);                                                                                                /* Restore the interrupt level */
+               return FALSE;                                                                                   /* Bad hair day, return FALSE... */
        }
+       
+       mpv = hw_cpv(mp);                                                                                       /* Get virtual address of mapping */
+#if DEBUG
+       if(hw_atomic_sub(&mpv->pmap->stats.resident_count, 1) < 0) panic("pmap resident count went negative\n");
+#else
+       (void)hw_atomic_sub(&mpv->pmap->stats.resident_count, 1);       /* Decrement the resident page count */
+#endif
+       useadd = (unsigned int *)&pmap->pmapUsage[(va >> pmapUsageShft) & pmapUsageMask];       /* Point to slot to bump */
+       useaddr = (unsigned int *)((unsigned int)useadd & -4);          /* Round down to word */
+       (void)hw_atomic_sub(useaddr, (useaddr == useadd) ? 0x00010000 : 1);     /* Increment the even or odd slot */
 
-       incrVSID = 1 << ((tmp + 1) >> 1);                                                       /* Get ceiling of sqrt of table size */
-       incrVSID |= 1 << ((tmp + 1) >> 2);                                                      /* Get ceiling of quadroot of table size */
-       incrVSID |= 1;                                                                                          /* Set bit and add 1 */
+#if 0
+       for(i = 0; i < (pmapUsageMask + 1); i++) {                                      /* (TEST/DEBUG) */
+               if((mpv->pmap->pmapUsage[i]) > 8192) {                                  /* (TEST/DEBUG) */
+                       panic("mapping_remove: pmapUsage slot for %08X has invalid count (%d) for pmap %08X\n",
+                               i * pmapUsageSize, mpv->pmap->pmapUsage[i], mpv->pmap);
+               }
+       }
+#endif
+       
+       hw_rem_map(mp);                                                                                         /* Remove the corresponding mapping */
 
-       return;
+       pp = mpv->physent;
 
-}
+       if ((mpv->physent) && (pmap->vflags & pmapVMhost)) {
+
+               while(mp1 = (mapping *)((unsigned int)pp->phys_link & ~PHYS_FLAGS)) {   /* Keep going so long as there's another */
+
+                       mpv1 = hw_cpv(mp1);                                                                             /* Get the virtual address */
+#if DEBUG
+                       if(hw_atomic_sub(&mpv1->pmap->stats.resident_count, 1) < 0) panic("pmap resident count went negative\n");
+#else
+                       (void)hw_atomic_sub(&mpv1->pmap->stats.resident_count, 1);      /* Decrement the resident page count */
+#endif
+
+                       uindx = ((mpv1->PTEv >> 24) & 0x78) | ((mpv1->PTEv >> 3) & 7);  /* Join segment number and top 2 bits of the API */
+                       useadd = (unsigned int *)&mpv1->pmap->pmapUsage[uindx]; /* Point to slot to bump */
+                       useaddr = (unsigned int *)((unsigned int)useadd & -4);  /* Round down to word */
+                       (void)hw_atomic_sub(useaddr, (useaddr == useadd) ? 0x00010000 : 1);     /* Increment the even or odd slot */
+
+#if 0
+                       for(i = 0; i < (pmapUsageMask + 1); i++) {                              /* (TEST/DEBUG) */
+                               if((mpv1->pmap->pmapUsage[i]) > 8192) {                         /* (TEST/DEBUG) */
+                                       panic("mapping_remove: pmapUsage slot for %08X has invalid count (%d) for pmap %08X\n",
+                               i * pmapUsageSize, mpv1->pmap->pmapUsage[i], mpv1->pmap);
+                       }
+               }
+#endif
+       
+                       hw_rem_map(mp1);                                                                                /* Remove the mapping */
+                       mapping_free(mpv1);                                                                             /* Add mapping to the free list */
+               }
+       }
 
+       if(mpv->physent)hw_unlock_bit((unsigned int *)&mpv->physent->phys_link, PHYS_LOCK);     /* Unlock physical entry associated with mapping */
+       
+       splx(s);                                                                                                        /* Was there something you needed? */
+               
+       mapping_free(mpv);                                                                                      /* Add mapping to the free list */
+       debugLog2(2, 1, 0);                                                                                     /* end mapping_remove */
+       return TRUE;                                                                                            /* Tell them we did it */
+}
 
 /*
- *             mapping_remove(pmap_t pmap, addr64_t va);
- *                     Given a pmap and virtual address, this routine finds the mapping and unmaps it.
- *                     The mapping block will be added to
- *                     the free list.  If the free list threshold is reached, garbage collection will happen.
+ *             mapping_purge_pmap(struct phys_entry *pp, pmap_t pmap) - release all mappings for this physent for the specified map
  *
- *                     We also pass back the next higher mapped address. This is done so that the higher level
- *                     pmap_remove function can release a range of addresses simply by calling mapping_remove
- *                     in a loop until it finishes the range or is returned a vaddr of 0.
+ *             This guy releases any mappings that exist for a physical page on a specified map.
+ *             We get the lock on the phys_entry, and hold it through out this whole routine.
+ *             That way, no one can change the queue out from underneath us.  We keep fetching
+ *             the physents mapping anchor until it is null, then we're done.  
  *
- *                     Note that if the mapping is not found, we return the next VA ORed with 1
+ *             For each mapping, we call the remove routine to remove it from the PTEG hash list and 
+ *             decriment the pmap's residency count.  Then we release the mapping back to the free list.
  *
  */
 
-addr64_t mapping_remove(pmap_t pmap, addr64_t va) {            /* Remove a single mapping for this VADDR 
-                                                                                                                  Returns TRUE if a mapping was found to remove */
+void mapping_purge_pmap(struct phys_entry *pp, pmap_t pmap) {          /* Remove all mappings from specified pmap for this physent */
 
-       mapping         *mp;
-       addr64_t        nextva;
+       mapping         *mp, *mp_next, *mpv;
+       spl_t           s;
+       unsigned int *useadd, *useaddr, uindx;
+       int i;
+               
+       s=splhigh();                                                                    /* Don't bother me */
        
-       disable_preemption();                                                           /* Don't change threads */
-
-       while(1) {                                                                                      /* Keep trying until we truely fail */
-               mp = hw_rem_map(pmap, va, &nextva);                             /* Remove a mapping from this pmap */
-               if(((unsigned int)mp & mapRetCode) != mapRtRemove) break;       /* If it is gone, we are done */
+       if(!hw_lock_bit((unsigned int *)&pp->phys_link, PHYS_LOCK, LockTimeOut)) {      /* Lock the physical entry */
+               panic("\nmapping_purge_pmap: Timeout attempting to lock physical entry at %08X: %08X %08X\n", 
+                       pp, pp->phys_link, pp->pte1);   /* Complain about timeout */
        }
 
-       enable_preemption();                                                            /* Thread change ok */
+       mp = (mapping *)((unsigned int)pp->phys_link & ~PHYS_FLAGS);
+       
+       while(mp) {     /* Keep going so long as there's another */
 
-       if(!mp) return (nextva | 1);                                            /* Nothing found to unmap */
+               mpv = hw_cpv(mp);                                       /* Get the virtual address */
+               if(mpv->pmap != pmap) {
+                       mp = (mapping *)((unsigned int)mpv->next & ~PHYS_FLAGS);
+                       continue;
+               }
+#if DEBUG
+               if(hw_atomic_sub(&mpv->pmap->stats.resident_count, 1) < 0) panic("pmap resident count went negative\n");
+#else
+               (void)hw_atomic_sub(&mpv->pmap->stats.resident_count, 1);       /* Decrement the resident page count */
+#endif
 
-       if((unsigned int)mp & mapRetCode) {                                     /* Was there a failure? */
+               uindx = ((mpv->PTEv >> 24) & 0x78) | ((mpv->PTEv >> 3) & 7);    /* Join seg # and top 2 bits of API */
+               useadd = (unsigned int *)&mpv->pmap->pmapUsage[uindx];  /* Point to slot to bump */
+               useaddr = (unsigned int *)((unsigned int)useadd & -4);  /* Round down to word */
+               (void)hw_atomic_sub(useaddr, (useaddr == useadd) ? 0x00010000 : 1); /* Incr the even or odd slot */
+
+       
+       
+               mp_next = (mapping *)((unsigned int)mpv->next & ~PHYS_FLAGS);
+               hw_rem_map(mp);                                         /* Remove the mapping */
+               mapping_free(mpv);                                      /* Add mapping to the free list */
+               mp = mp_next;
+       }
+               
+       hw_unlock_bit((unsigned int *)&pp->phys_link, PHYS_LOCK);       /* We're done, unlock the physical entry */
+       splx(s);
+       return;
+}
+/*
+ *             mapping_purge(struct phys_entry *pp) - release all mappings for this physent to the free list 
+ *
+ *             This guy releases any mappings that exist for a physical page.
+ *             We get the lock on the phys_entry, and hold it through out this whole routine.
+ *             That way, no one can change the queue out from underneath us.  We keep fetching
+ *             the physents mapping anchor until it is null, then we're done.  
+ *
+ *             For each mapping, we call the remove routine to remove it from the PTEG hash list and 
+ *             decriment the pmap's residency count.  Then we release the mapping back to the free list.
+ *
+ */
+void mapping_purge(struct phys_entry *pp) {                                            /* Remove all mappings for this physent */
+
+       mapping         *mp, *mpv;
+       spl_t           s;
+       unsigned int *useadd, *useaddr, uindx;
+       int i;
+               
+       s=splhigh();                                                                                            /* Don't bother me */
+       debugLog2(3, pp->pte1, 0);                                                                      /* start mapping_purge */
        
-               panic("mapping_remove: hw_rem_map failed - pmap = %08X, va = %016llX, code = %08X\n",
-                       pmap, va, mp);
+       if(!hw_lock_bit((unsigned int *)&pp->phys_link, PHYS_LOCK, LockTimeOut)) {              /* Lock the physical entry */
+               panic("\nmapping_purge: Timeout attempting to lock physical entry at %08X: %08X %08X\n", 
+                       pp, pp->phys_link, pp->pte1);   /* Complain about timeout */
        }
        
-       mapping_free(mp);                                                                       /* Add mapping to the free list */
+       while(mp = (mapping *)((unsigned int)pp->phys_link & ~PHYS_FLAGS)) {    /* Keep going so long as there's another */
 
-       return nextva;                                                                          /* Tell them we did it */
+               mpv = hw_cpv(mp);                                                                               /* Get the virtual address */
+#if DEBUG
+               if(hw_atomic_sub(&mpv->pmap->stats.resident_count, 1) < 0) panic("pmap resident count went negative\n");
+#else
+               (void)hw_atomic_sub(&mpv->pmap->stats.resident_count, 1);       /* Decrement the resident page count */
+#endif
+
+               uindx = ((mpv->PTEv >> 24) & 0x78) | ((mpv->PTEv >> 3) & 7);    /* Join segment number and top 2 bits of the API */
+               useadd = (unsigned int *)&mpv->pmap->pmapUsage[uindx];  /* Point to slot to bump */
+               useaddr = (unsigned int *)((unsigned int)useadd & -4);  /* Round down to word */
+               (void)hw_atomic_sub(useaddr, (useaddr == useadd) ? 0x00010000 : 1);     /* Increment the even or odd slot */
+
+#if 0
+       for(i = 0; i < (pmapUsageMask + 1); i++) {                                      /* (TEST/DEBUG) */
+               if((mpv->pmap->pmapUsage[i]) > 8192) {                                  /* (TEST/DEBUG) */
+                       panic("mapping_remove: pmapUsage slot for %08X has invalid count (%d) for pmap %08X\n",
+                               i * pmapUsageSize, mpv->pmap->pmapUsage[i], mpv->pmap);
+               }
+       }
+#endif
+       
+       
+               hw_rem_map(mp);                                                                                 /* Remove the mapping */
+               mapping_free(mpv);                                                                              /* Add mapping to the free list */
+       }
+               
+       hw_unlock_bit((unsigned int *)&pp->phys_link, PHYS_LOCK);       /* We're done, unlock the physical entry */
+       
+       debugLog2(4, pp->pte1, 0);                                                                      /* end mapping_purge */
+       splx(s);                                                                                                        /* Was there something you needed? */
+       return;                                                                                                         /* Tell them we did it */
 }
 
+
 /*
- *             mapping_make(pmap, va, pa, flags, size, prot) - map a virtual address to a real one 
+ *             mapping_make(pmap, pp, va, spa, prot, attr, locked) - map a virtual address to a real one 
  *
  *             This routine takes the given parameters, builds a mapping block, and queues it into the 
  *             correct lists.
  *             
- *             pmap (virtual address)          is the pmap to map into
- *             va   (virtual address)          is the 64-bit virtual address that is being mapped
- *             pa      (physical page number)  is the physical page number (i.e., physcial address >> 12). This is
- *                                                                     a 32-bit quantity.
- *             Flags:
- *                     block                                   if 1, mapping is a block, size parameter is used. Note: we do not keep 
- *                                                                     reference and change information or allow protection changes of blocks.
- *                                                                     any changes must first unmap and then remap the area.
- *                     use attribute                   Use specified attributes for map, not defaults for physical page
- *                     perm                                    Mapping is permanent
- *                     cache inhibited                 Cache inhibited (used if use attribute or block set )
- *                     guarded                                 Guarded access (used if use attribute or block set )
- *             size                                            size of block (not used if not block)
- *             prot                                            VM protection bits
- *             attr                                            Cachability/Guardedness    
- *
- *             Returns 0 if mapping was successful.  Returns vaddr that overlaps/collides.
- *             Returns 1 for any other failure.
- *
- *             Note that we make an assumption that all memory in the range 0f 0x0000000080000000 to 0x00000000FFFFFFFF is reserved
- *             for I/O and default the cache attrubutes appropriately.  The caller is free to set whatever they want however.
- *
- *             If there is any physical page that is not found in the physent table, the mapping is forced to be a
- *             block mapping of length 1.  This keeps us from trying to update a physent during later mapping use,
- *             e.g., fault handling.
- *
+ *             The pp parameter can be null.  This allows us to make a mapping that is not
+ *             associated with any physical page.  We may need this for certain I/O areas.
  *
+ *             If the phys_entry address is null, we neither lock or chain into it.
+ *             If locked is 1, we already hold the lock on the phys_entry and won't get nor release it.
  */
  
-addr64_t mapping_make(pmap_t pmap, addr64_t va, ppnum_t pa, unsigned int flags, unsigned int size, vm_prot_t prot) {   /* Make an address mapping */
+mapping *mapping_make(pmap_t pmap, struct phys_entry *pp, vm_offset_t va, vm_offset_t pa, vm_prot_t prot, int attr, boolean_t locked) {        /* Make an address mapping */
 
-       register mapping *mp;
-       addr64_t colladdr;
-       unsigned int pindex, mflags, pattr, wimg;
-       phys_entry *physent;
-       int i, nlists;
-
-       disable_preemption();                                                                           /* Don't change threads */
+       register mapping *mp, *mpv;
+       unsigned int *useadd, *useaddr;
+       spl_t           s;
+       int i;
 
-       pindex = 0;
+       debugLog2(5, va, pa);                                                                           /* start mapping_purge */
+       mpv = mapping_alloc();                                                                          /* Get a spare mapping block */
        
-       mflags = 0x01000000;                                                                            /* Start building mpFlags field (busy count = 1) */
+       mpv->pmap = pmap;                                                                                       /* Initialize the pmap pointer */
+       mpv->physent = pp;                                                                                      /* Initialize the pointer to the physical entry */
+       mpv->PTEr = ((unsigned int)pa & ~(PAGE_SIZE - 1)) | attr<<3 | ppc_prot(prot);   /* Build the real portion of the PTE */
+       mpv->PTEv = (((unsigned int)va >> 1) & 0x78000000) | (pmap->space << 7) | (((unsigned int)va >> 22) & 0x0000003F);      /* Build the VSID */
+
+       s=splhigh();                                                                                            /* Don't bother from now on */
        
-       if(!(flags & mmFlgBlock)) {                                                                     /* Is this a block map? */
+       mp = hw_cvp(mpv);                                                                                       /* Get the physical address of this */
 
-               size = 1;                                                                                               /* Set size to 1 page if not block */
-        
-               physent = mapping_phys_lookup(pa, &pindex);                             /* Get physical entry */
-               if(!physent) {                                                                                  /* Did we find the physical page? */
-                       mflags |= mpBlock;                                                                      /* Force this to a block if no physent */
-                       size = 1;                                                                                       /* Force size to 1 page */
-                       pattr = 0;                                                                                      /* Assume normal, non-I/O memory */
-                       if((pa & 0xFFF80000) == 0x00080000) pattr = mmFlgCInhib | mmFlgGuarded; /* If this page is in I/O range, set I/O attributes */
+       if(pp && !locked) {                                                                                     /* Is there a physical entry? Or do we already hold the lock? */
+               if(!hw_lock_bit((unsigned int *)&pp->phys_link, PHYS_LOCK, LockTimeOut)) {      /* Lock the physical entry */
+                       panic("\nmapping_make: Timeout attempting to lock physical entry at %08X: %08X %08X\n", 
+                               pp, pp->phys_link, pp->pte1);                                   /* Complain about timeout */
                }
-               else pattr = ((physent->ppLink & (ppI | ppG)) >> 4);    /* Get the default attributes from physent */
-               
-               if(flags & mmFlgUseAttr) pattr = flags & (mmFlgCInhib | mmFlgGuarded);  /* Use requested attributes */
        }
-       else {                                                                                                          /* This is a block */
-                
-               pattr = flags & (mmFlgCInhib | mmFlgGuarded);                   /* Use requested attributes */
-               mflags |= mpBlock;                                                                              /* Show that this is a block */
+               
+       if(pp) {                                                                                                        /* See of there is a physcial entry */
+               mpv->next = (mapping *)((unsigned int)pp->phys_link & ~PHYS_FLAGS);             /* Move the old anchor to the new mappings forward */
+               pp->phys_link = (mapping *)((unsigned int)mp | (unsigned int)pp->phys_link & PHYS_FLAGS);       /* Point the anchor at us.  Now we're on the list (keep the flags) */
        }
        
-       wimg = 0x2;                                                                                                     /* Set basic PPC wimg to 0b0010 - Coherent */
-       if(pattr & mmFlgCInhib) wimg |= 0x4;                                            /* Add cache inhibited if we need to */
-       if(pattr & mmFlgGuarded) wimg |= 0x1;                                           /* Add guarded if we need to */
+       hw_add_map(mp, pmap->space, va);                                                        /* Stick it on the PTEG hash list */
        
-       mflags = mflags | (pindex << 16);                                                       /* Stick in the physical entry table index */
+       (void)hw_atomic_add(&mpv->pmap->stats.resident_count, 1);       /* Increment the resident page count */
+       useadd = (unsigned int *)&pmap->pmapUsage[(va >> pmapUsageShft) & pmapUsageMask];       /* Point to slot to bump */
+       useaddr = (unsigned int *)((unsigned int)useadd & -4);          /* Round down to word */
+       (void)hw_atomic_add(useaddr, (useaddr == useadd) ? 0x00010000 : 1);     /* Increment the even or odd slot */
+#if 0
+       for(i = 0; i < (pmapUsageMask + 1); i++) {                                      /* (TEST/DEBUG) */
+               if((mpv->pmap->pmapUsage[i]) > 8192) {                                  /* (TEST/DEBUG) */
+                       panic("mapping_remove: pmapUsage slot for %08X has invalid count (%d) for pmap %08X\n",
+                               i * pmapUsageSize, mpv->pmap->pmapUsage[i], mpv->pmap);
+               }
+       }
+#endif
+
+       if(pp && !locked)hw_unlock_bit((unsigned int *)&pp->phys_link, PHYS_LOCK);      /* If we have one and we didn't hold on entry, unlock the physical entry */
+               
+       splx(s);                                                                                                        /* Ok for interruptions now */
+       debugLog2(6, pmap->space, prot);                                                        /* end mapping_purge */
+       return mpv;                                                                                                     /* Leave... */
+}
+
+
+/*
+ *             Enters optimal translations for odd-sized V=F blocks.
+ *
+ *             Builds a block map for each power-of-two hunk o' address
+ *             that exists.  This is specific to the processor type.  
+ *             PPC uses BAT register size stuff.  Future PPC might have
+ *             something else.
+ *
+ *             The supplied va is expected to be maxoptimal vs the supplied boundary. We're too
+ *             stupid to know otherwise so we only look at the va anyhow, so there...
+ *
+ */
+void mapping_block_map_opt(pmap_t pmap, vm_offset_t va, vm_offset_t pa, vm_offset_t bnd, vm_size_t size, vm_prot_t prot, int attr) {   /* Maps optimal autogenned blocks */
+
+       register blokmap *blm, *oblm;
+       unsigned int    pg;
+       unsigned int    maxsize, boundary, leading, trailing, cbsize, minsize, tomin;
+       int                             i, maxshft, nummax, minshft;
+
+#if 1
+       kprintf("mapping_block_map_opt: pmap=%08X; va=%08X; pa=%08X; ; bnd=%08X; size=%08X; prot=%08X; attr=%08X\n",    /* (TEST/DEBUG) */
+        pmap, va, pa, bnd, size, prot, attr);
+#endif
        
-       if(flags & mmFlgPerm) mflags |= mpPerm;                                         /* Set permanent mapping */
+       minsize = blokValid ^ (blokValid & (blokValid - 1));    /* Set minimum subblock size */
+       maxsize = 0x80000000 >> cntlzw(blokValid);              /* Set maximum subblock size */
        
-       size = size - 1;                                                                                        /* Change size to offset */
-       if(size > 0xFFFF) return 1;                                                                     /* Leave if size is too big */
+       minshft = 31 - cntlzw(minsize);                                 /* Shift to position minimum size */
+       maxshft = 31 - cntlzw(blokValid);                               /* Shift to position maximum size */
        
-       nlists = mapSetLists(pmap);                                                                     /* Set number of lists this will be on */
+       leading = ((va + bnd - 1) & -bnd) - va;                 /* Get size of leading area */
+       trailing = size - leading;                                              /* Get size of trailing area */
+       tomin = ((va + minsize - 1) & -minsize) - va;   /* Get size needed to round up to the minimum block size */
        
-       mp = mapping_alloc(nlists);                                                                     /* Get a spare mapping block with this many lists */
+#if 1
+       kprintf("mapping_block_map_opt: bnd=%08X; leading=%08X; trailing=%08X; tomin=%08X\n", bnd, leading, trailing, tomin);           /* (TEST/DEBUG) */
+#endif
 
-                                                                /* the mapping is zero except that the mpLists field is set */
-       mp->mpFlags |= mflags;                                                                          /* Add in the rest of the flags to mpLists */
-       mp->mpSpace = pmap->space;                                                                      /* Set the address space/pmap lookup ID */
-       mp->mpBSize = size;                                                                                     /* Set the size */
-       mp->mpPte = 0;                                                                                          /* Set the PTE invalid */
-       mp->mpPAddr = pa;                                                                                       /* Set the physical page number */
-       mp->mpVAddr = (va & ~mpHWFlags) | (wimg << 3) | ppc_prot(prot); /* Add the protection and attributes to the field */
+       if(tomin)pmap_map_block(pmap, va, pa, tomin, prot, attr, 0); /* Map up to minimum block size */
        
-       while(1) {                                                                                                      /* Keep trying... */
-               colladdr = hw_add_map(pmap, mp);                                                /* Go add the mapping to the pmap */
-               if(!colladdr) {                                                                                 /* All is ok... */
-                       enable_preemption();                                                            /* Ok to switch around here */
-                       return 0;                                                                                       /* Return... */
-               }
-               
-               if((colladdr & mapRetCode) == mapRtRemove) {                    /* Is our target being removed? */
-                       (void)mapping_remove(pmap, colladdr);                           /* Yes, go help out */
-                       continue;                                                                                       /* Try to add it now */
-               }
+       va = va + tomin;                                                                /* Adjust virtual start */
+       pa = pa + tomin;                                                                /* Adjust physical start */
+       leading = leading - tomin;                                              /* Adjust leading size */
+       
+/*
+ *     Some of this code is very classic PPC.  We need to fix this up.
+ */
+       leading = leading >> minshft;                                   /* Position for bit testing */
+       cbsize = minsize;                                                               /* Set the minimum size */
+       
+       for(i = 0; i < (maxshft - minshft + 1); i ++) { /* Cycle through all block sizes, small to large */
                
-               if((colladdr & mapRetCode) == mapRtMapDup) {                    /* Is our target already mapped (collision mapping must be identical)? */
-                       mapping_free(mp);                                                                       /* Return mapping to the free list */
-                       enable_preemption();                                                            /* Ok to switch around here */
-                       return 0;                                                                                       /* Normal return */
+               if(leading & 1) {               
+                       pmap_map_block(pmap, va, pa, cbsize, prot, attr, 0); /* Map up to next boundary */
+                       pa = pa + cbsize;                                               /* Bump up physical address */
+                       va = va + cbsize;                                               /* Bump up virtual address */
                }
+       
+               leading = leading >> 1;                                         /* Shift up to next size */
+               cbsize = cbsize << 1;                                           /* Here too */
+
+       }
+       
+       nummax = trailing >> maxshft;                                   /* Get number of max size blocks left */
+       for(i=0; i < nummax - 1; i++) {                                 /* Account for all max size block left but 1 */
+               pmap_map_block(pmap, va, pa, maxsize, prot, attr, 0); /* Map up to next boundary */
+
+               pa = pa + maxsize;                                                      /* Bump up physical address */
+               va = va + maxsize;                                                      /* Bump up virtual address */
+               trailing -= maxsize;                                            /* Back off what we just did */
+       }
+       
+       cbsize = maxsize;                                                               /* Start at maximum size */
+       
+       for(i = 0; i < (maxshft - minshft + 1); i ++) { /* Cycle through all block sizes, high to low */
                
-               if(colladdr != mapRtBadLk) {                                                    /* Did it collide? */
-                       mapping_free(mp);                                                                       /* Yeah, toss the pending mapping */
-                       enable_preemption();                                                            /* Ok to switch around here */
-                       return colladdr;                                                                        /* Pass back the overlapping address */
-               }
-                       
-               panic("mapping_make: hw_add_map failed - code = %08X, pmap = %08X, va = %016llX, mapping = %08X\n",
-                       colladdr, pmap, va, mp);                                                        /* Die dead */
+               if(trailing & cbsize) { 
+                       trailing &= ~cbsize;                                    /* Remove the block we are allocating */                                                
+                       pmap_map_block(pmap, va, pa, cbsize, prot, attr, 0); /* Map up to next boundary */
+                       pa = pa + cbsize;                                               /* Bump up physical address */
+                       va = va + cbsize;                                               /* Bump up virtual address */
+               }       
+               cbsize = cbsize >> 1;                                           /* Next size down */
        }
        
-       return 1;                                                                                                       /* Leave... */
+       if(trailing) pmap_map_block(pmap, va, pa, trailing, prot, attr, 0); /* Map up to end */
+       
+       return;                                                                                                 /* Return */
 }
 
 
 /*
- *             mapping *mapping_find(pmap, va, *nextva, full) - Finds a mapping 
+ *             Enters translations for odd-sized V=F blocks.
  *
- *             Looks up the vaddr and returns the mapping and the next mapped va
- *             If full is true, it will descend through all nested pmaps to find actual mapping
+ *             Checks to insure that the request is at least ODDBLKMIN in size.  If smaller, the request
+ *             will be split into normal-sized page mappings.
  *
- *             Must be called with interruptions disabled or we can hang trying to remove found mapping.
+ *             The higher level VM map should be locked to insure that we don't have a
+ *             double diddle here.
  *
- *             Returns 0 if not found and the virtual address of the mapping if it is
- *             Note that the mappings busy count is bumped. It is the responsibility of the caller
- *             to drop the count.  If this is not done, any attempt to remove the mapping will hang.
+ *             We panic if we get a block that overlaps with another. We do not merge adjacent
+ *             blocks because removing any address within a block removes the entire block and if
+ *             would really mess things up if we trashed too much.
  *
- *             NOTE: The nextva field is not valid when full is TRUE.
+ *             Once a block is mapped, it is unmutable, that is, protection, catch mode, etc. can
+ *             not be changed.  The block must be unmapped and then remapped with the new stuff.
+ *             We also do not keep track of reference or change flags.
  *
+ *             Blocks are kept in MRU order anchored from the pmap. The chain is traversed only
+ *             with interruptions and translation disabled and under the control of the lock located
+ *             in the first block map. MRU is used because it is expected that the same entry 
+ *             will be accessed repeatedly while PTEs are being generated to cover those addresses.
  *
  */
  
-mapping *mapping_find(pmap_t pmap, addr64_t va, addr64_t *nextva, int full) {  /* Make an address mapping */
+void pmap_map_block(pmap_t pmap, vm_offset_t va, vm_offset_t pa, vm_size_t size, vm_prot_t prot, int attr, unsigned int flags) {       /* Map an autogenned block */
 
-       register mapping *mp;
-       addr64_t        curva;
-       pmap_t  curpmap;
-       int     nestdepth;
+       register blokmap *blm, *oblm, *oblm_virt;;
+       unsigned int pg;
+
+#if 0
+       kprintf("pmap_map_block: pmap=%08X; va=%08X; pa=%08X; size=%08X; prot=%08X; attr=%08X\n",       /* (TEST/DEBUG) */
+        pmap, va, pa, size, prot, attr);
+#endif
+
+       if(size < ODDBLKMIN) {                                                                  /* Is this below the minimum size? */
+               for(pg = 0; pg < size; pg += PAGE_SIZE) {                       /* Add all pages in this block */
+                       mapping_make(pmap, 0, va + pg, pa + pg, prot, attr, 0); /* Map this page on in */
+#if 0
+                       kprintf("pmap_map_block: mm: va=%08X; pa=%08X\n",       /* (TEST/DEBUG) */
+                               va + pg, pa + pg);
+#endif
+               }
+               return;                                                                                         /* All done */
+       }
+       
+       blm = (blokmap *)mapping_alloc();                                               /* Get a block mapping */
+       
+       blm->start = (unsigned int)va & -PAGE_SIZE;                             /* Get virtual block start */
+       blm->end = (blm->start + size - 1) | (PAGE_SIZE - 1);   /* Get virtual block end */
+       blm->current = 0;
+       blm->PTEr = ((unsigned int)pa & -PAGE_SIZE) | attr<<3 | ppc_prot(prot); /* Build the real portion of the base PTE */
+       blm->space = pmap->space;                                                               /* Set the space (only needed for remove) */
+       blm->blkFlags = flags;                                                                  /* Set the block's flags */
+       
+#if 0
+       kprintf("pmap_map_block: bm=%08X; start=%08X; end=%08X; PTEr=%08X\n",   /* (TEST/DEBUG) */
+        blm, blm->start, blm->end, blm->PTEr);
+#endif
+
+       blm = (blokmap *)hw_cvp((mapping *)blm);                                /* Get the physical address of this */
+
+#if 0
+       kprintf("pmap_map_block: bm (real)=%08X; pmap->bmaps=%08X\n",   /* (TEST/DEBUG) */
+        blm, pmap->bmaps);
+#endif
+
+       do {
+               oblm = hw_add_blk(pmap, blm); 
+               if ((unsigned int)oblm & 2) {
+                       oblm_virt = (blokmap *)hw_cpv((mapping *)((unsigned int)oblm & 0xFFFFFFFC));
+                       mapping_remove(pmap, oblm_virt->start);
+               };
+       } while ((unsigned int)oblm & 2);
+
+       if (oblm) {
+               oblm = (blokmap *)hw_cpv((mapping *) oblm);                             /* Get the old block virtual address */
+               blm = (blokmap *)hw_cpv((mapping *)blm);                                /* Back to the virtual address of this */
+               if((oblm->start != blm->start) ||                                       /* If we have a match, then this is a fault race and */
+                               (oblm->end != blm->end) ||                              /* is acceptable */
+                               (oblm->PTEr != blm->PTEr))
+                       panic("pmap_map_block: block map overlap - blm = %08X\n", oblm);/* Otherwise, Squeak loudly and carry a big stick */
+               mapping_free((struct mapping *)blm);
+       }
 
-       curpmap = pmap;                                                                                         /* Remember entry */
-       nestdepth = 0;                                                                                          /* Set nest depth */
-       curva = (addr64_t)va;                                                                                   /* Set current va */
+#if 0
+       kprintf("pmap_map_block: pmap->bmaps=%08X\n",                   /* (TEST/DEBUG) */
+        blm, pmap->bmaps);
+#endif
+
+       return;                                                                                                 /* Return */
+}
+
+
+/*
+ *             Optimally enters translations for odd-sized V=F blocks.
+ *
+ *             Checks to insure that the request is at least ODDBLKMIN in size.  If smaller, the request
+ *             will be split into normal-sized page mappings.
+ *
+ *             This one is different than pmap_map_block in that it will allocate it's own virtual
+ *             target address. Rather than allocating a single block,
+ *             it will also allocate multiple blocks that are power-of-two aligned/sized.  This allows
+ *             hardware-level mapping that takes advantage of BAT maps or large page sizes.
+ *
+ *             Most considerations for pmap_map_block apply.
+ *
+ *
+ */
+kern_return_t pmap_map_block_opt(vm_map_t map, vm_offset_t *va, 
+       vm_offset_t pa, vm_size_t size, vm_prot_t prot, int attr) {     /* Map an optimal autogenned block */
 
-       while(1) {
+       register blokmap *blm, *oblm;
+       unsigned int    pg;
+    kern_return_t      err;
+       unsigned int    bnd;
+
+#if 1
+       kprintf("pmap_map_block_opt: map=%08X; pa=%08X; size=%08X; prot=%08X; attr=%08X\n",     /* (TEST/DEBUG) */
+               map, pa, size, prot, attr);
+#endif
 
-               mp = hw_find_map(curpmap, curva, nextva);                               /* Find the mapping for this address */
-               if((unsigned int)mp == mapRtBadLk) {                                    /* Did we lock up ok? */
-                       panic("mapping_find: pmap lock failure - rc = %08X, pmap = %08X\n", mp, curpmap);       /* Die... */
+       if(size < ODDBLKMIN) {                                                                  /* Is this below the minimum size? */
+               err = vm_allocate(map, va, size, VM_FLAGS_ANYWHERE);    /* Make us some memories */
+               if(err) {
+#if DEBUG
+                       kprintf("pmap_map_block_opt: vm_allocate() returned %d\n", err);        /* Say we died */
+#endif
+                       return(err);                                                                    /* Pass back the error */
                }
-               
-               if(!mp || !(mp->mpFlags & mpNest) || !full) break;              /* Are we a nest or are we only going one deep? */
+#if 1
+               kprintf("pmap_map_block_opt: small; vaddr = %08X\n", *va);      /* (TEST/DEBUG) */
+#endif
 
-               if(mp->mpFlags & mpSpecial) {                                                   /* Don't chain through a special mapping */
-                       mp = 0;                                                                                         /* Set not found */
-                       break;
+               for(pg = 0; pg < size; pg += PAGE_SIZE) {                       /* Add all pages in this block */
+                       mapping_make(map->pmap, 0, *va + pg, pa + pg, prot, attr, 0);   /* Map this page on in */
                }
+               return(KERN_SUCCESS);                                                           /* All done */
+       }
+       
+       err = vm_map_block(map, va, &bnd, pa, size, prot);              /* Go get an optimal allocation */
 
-               if(nestdepth++ > 64) {                                                                  /* Have we nested too far down? */
-                       panic("mapping_find: too many nested pmaps - va = %016llX, curva = %016llX, pmap = %08X, curpmap = %08X\n",
-                               va, curva, pmap, curpmap);
+       if(err == KERN_INVALID_ADDRESS) {                                               /* Can we try a brute force block mapping? */
+               err = vm_allocate(map, va, size, VM_FLAGS_ANYWHERE);    /* Make us some memories */
+               if(err) {
+#if DEBUG
+                       kprintf("pmap_map_block_opt: non-optimal vm_allocate() returned %d\n", err);    /* Say we died */
+#endif
+                       return(err);                                                                    /* Pass back the error */
                }
-               
-               curva = curva + mp->mpNestReloc;                                                /* Relocate va to new pmap */
-               curpmap = pmapTrans[mp->mpSpace].pmapVAddr;                             /* Get the address of the nested pmap */
-               mapping_drop_busy(mp);                                                                  /* We have everything we need from the mapping */
-               
+#if 1
+               kprintf("pmap_map_block_opt: non-optimal - vaddr = %08X\n", *va);       /* (TEST/DEBUG) */
+#endif
+               pmap_map_block(map->pmap, *va, pa, size, prot, attr, 0);        /* Set up a block mapped area */
+               return KERN_SUCCESS;                                                            /* All done now */
+       }
+
+       if(err != KERN_SUCCESS) {                                                               /* We couldn't get any address range to map this... */
+#if DEBUG
+               kprintf("pmap_map_block_opt: vm_allocate() returned %d\n", err);        /* Say we couldn' do it */
+#endif
+               return(err);
        }
 
-       return mp;                                                                                                      /* Return the mapping if we found one */
+#if 1
+       kprintf("pmap_map_block_opt: optimal - vaddr=%08X; bnd=%08X\n", *va, bnd);      /* (TEST/DEBUG) */
+#endif
+       mapping_block_map_opt(map->pmap, *va, pa, bnd, size, prot, attr);       /* Go build the maps */
+       return(KERN_SUCCESS);                                                                   /* All done */
 }
 
+
+#if 0
+
 /*
- *              kern_return_t mapping_protect(pmap_t pmap, addt_t va, vm_prot_t prot, addr64_t *nextva) - change the protection of a virtual page
+ *             Enters translations for odd-sized V=F blocks and merges adjacent or overlapping
+ *             areas.
  *
- *             This routine takes a pmap and virtual address and changes
- *             the protection.  If there are PTEs associated with the mappings, they will be invalidated before
- *             the protection is changed. 
+ *             Once blocks are merged, they act like one block, i.e., if you remove it,
+ *             it all goes...
  *
- *             We return success if we change the protection or if there is no page mapped at va.  We return failure if
- *             the va corresponds to a block mapped area or the mapping is permanant.
+ *             This can only be used during boot.  Ain't no way we can handle SMP
+ *             or preemption easily, so we restrict it.  We don't check either. We
+ *             assume only skilled professional programmers will attempt using this
+ *             function. We assume no responsibility, either real or imagined, for
+ *             injury or death resulting from unauthorized use of this function.
  *
+ *             No user servicable parts inside. Notice to be removed by end-user only,
+ *             under penalty of applicable federal and state laws.
+ *
+ *             See descriptions of pmap_map_block. Ignore the part where we say we panic for
+ *             overlapping areas.  Note that we do panic if we can't merge.
  *
  */
+void pmap_map_block_merge(pmap_t pmap, vm_offset_t va, vm_offset_t pa, vm_size_t size, vm_prot_t prot, int attr) {     /* Map an autogenned block */
 
-int mapping_protect(pmap_t pmap, addr64_t va, vm_prot_t prot, addr64_t *nextva) {      /* Change protection of a virtual page */
+       register blokmap *blm, *oblm;
+       unsigned int pg;
+       spl_t           s;
 
-       int     ret;
-       
-       ret = hw_protect(pmap, va, ppc_prot(prot), nextva);     /* Try to change the protect here */
+#if 1
+       kprintf("pmap_map_block_merge: pmap=%08X; va=%08X; pa=%08X; size=%08X; prot=%08X; attr=%08X\n", /* (TEST/DEBUG) */
+        pmap, va, pa, size, prot, attr);
+#endif
 
-       switch (ret) {                                                          /* Decode return code */
+       s=splhigh();                                                                                            /* Don't bother from now on */
+       if(size < ODDBLKMIN) {                                                                          /* Is this below the minimum size? */
+               for(pg = 0; pg < size; pg += PAGE_SIZE) {                               /* Add all pages in this block */
+                       mapping_make(pmap, 0, va + pg, pa + pg, prot, attr, 0); /* Map this page on in */
+               }
+               return;                                                                                                 /* All done */
+       }
        
-               case mapRtOK:                                                   /* Changed */
-               case mapRtNotFnd:                                               /* Didn't find it */
-                       return mapRtOK;                                         /* Ok, return... */
-                       break;
+       blm = (blokmap *)mapping_alloc();                                                       /* Get a block mapping */
+       
+       blm->start = (unsigned int)va & -PAGE_SIZE;                                     /* Get virtual block start */
+       blm->end = (blm->start + size - 1) | (PAGE_SIZE - 1);           /* Get virtual block end */
+       blm->PTEr = ((unsigned int)pa & -PAGE_SIZE) | attr<<3 | ppc_prot(prot); /* Build the real portion of the base PTE */
+       
+#if 1
+       kprintf("pmap_map_block_merge: bm=%08X; start=%08X; end=%08X; PTEr=%08X\n",     /* (TEST/DEBUG) */
+        blm, blm->start, blm->end, blm->PTEr);
+#endif
 
-               case mapRtBlock:                                                /* Block map, just ignore request */
-               case mapRtNest:                                                 /* Nested pmap, just ignore request */
-                       return ret;                                                     /* Pass back return code */
-                       break;
-                       
-               default:
-                       panic("mapping_protect: hw_protect failed - rc = %d, pmap = %08X, va = %016llX\n", ret, pmap, va);
-               
+       blm = (blokmap *)hw_cvp((mapping *)blm);                                        /* Get the physical address of this */
+
+#if 1
+       kprintf("pmap_map_block_merge: bm (real)=%08X; pmap->bmaps=%08X\n",     /* (TEST/DEBUG) */
+        blm, pmap->bmaps);
+#endif
+
+       if(oblm = hw_add_blk(pmap, blm)) {                                                      /* Add to list and make sure we don't overlap anything */
+               panic("pmap_map_block_merge: block map overlap - blm = %08X\n", oblm);  /* Squeak loudly and carry a big stick */
        }
 
+#if 1
+       kprintf("pmap_map_block_merge: pmap->bmaps=%08X\n",                     /* (TEST/DEBUG) */
+        blm, pmap->bmaps);
+#endif
+       splx(s);                                                                                                        /* Ok for interruptions now */
+
+       return;                                                                                                         /* Return */
 }
+#endif
 
 /*
- *             void mapping_protect_phys(ppnum_t pa, vm_prot_t prot) - change the protection of a physical page
+ *             void mapping_protect_phys(phys_entry *pp, vm_prot_t prot) - change the protection of a physical page
  *
  *             This routine takes a physical entry and runs through all mappings attached to it and changes
  *             the protection.  If there are PTEs associated with the mappings, they will be invalidated before
- *             the protection is changed.  There is no limitation on changes, e.g., 
+ *             the protection is changed.  We don't try to save the PTE.  We won't worry about the LRU calculations
+ *             either (I don't think, maybe I'll change my mind later).  There is no limitation on changes, e.g., 
  *             higher to lower, lower to higher.
  *
- *             Any mapping that is marked permanent is not changed
- *
  *             Phys_entry is unlocked.
  */
 
-void mapping_protect_phys(ppnum_t pa, vm_prot_t prot) {        /* Change protection of all mappings to page */
-       
-       unsigned int pindex;
-       phys_entry *physent;
+void mapping_protect_phys(struct phys_entry *pp, vm_prot_t prot, boolean_t locked) {   /* Change protection of all mappings to page */
+
+       spl_t                           spl;
        
-       physent = mapping_phys_lookup(pa, &pindex);                                     /* Get physical entry */
-       if(!physent) {                                                                                          /* Did we find the physical page? */
-               panic("mapping_protect_phys: invalid physical page %08X\n", pa);
-       }
+       debugLog2(9, pp->pte1, prot);                                                           /* end remap */
+       spl=splhigh();                                                                                          /* No interruptions during this */
+       if(!locked) {                                                                                           /* Do we need to lock the physent? */
+               if(!hw_lock_bit((unsigned int *)&pp->phys_link, PHYS_LOCK, LockTimeOut)) {      /* Lock the physical entry */
+                       panic("\nmapping_protect: Timeout attempting to lock physical entry at %08X: %08X %08X\n", 
+                               pp, pp->phys_link, pp->pte1);                                           /* Complain about timeout */
+               }
+       }       
 
-       hw_walk_phys(physent, hwpSPrtPhy, hwpSPrtMap, hwpNoop, ppc_prot(prot)); /* Set the new protection for page and mappings */
+       hw_prot(pp, ppc_prot(prot));                                                            /* Go set the protection on this physical page */
 
+       if(!locked) hw_unlock_bit((unsigned int *)&pp->phys_link, PHYS_LOCK);   /* We're done, unlock the physical entry */
+       splx(spl);                                                                                                      /* Restore interrupt state */
+       debugLog2(10, pp->pte1, 0);                                                                     /* end remap */
+       
        return;                                                                                                         /* Leave... */
 }
 
-
 /*
- *             void mapping_clr_mod(ppnum_t pa) - clears the change bit of a physical page
+ *             void mapping_protect(pmap_t pmap, vm_offset_t vaddr, vm_prot_t prot) - change the protection of a virtual page
+ *
+ *             This routine takes a pmap and virtual address and changes
+ *             the protection.  If there are PTEs associated with the mappings, they will be invalidated before
+ *             the protection is changed.  We don't try to save the PTE.  We won't worry about the LRU calculations
+ *             either (I don't think, maybe I'll change my mind later).  There is no limitation on changes, e.g., 
+ *             higher to lower, lower to higher.
  *
- *             This routine takes a physical entry and runs through all mappings attached to it and turns
- *             off the change bit. 
  */
 
-void mapping_clr_mod(ppnum_t pa) {                                                             /* Clears the change bit of a physical page */
+void mapping_protect(pmap_t pmap, vm_offset_t vaddr, vm_prot_t prot) { /* Change protection of a virtual page */
+
+       mapping         *mp, *mpv;
+       spl_t           s;
+
+       debugLog2(9, vaddr, pmap);                                      /* start mapping_protect */
+       s = splhigh();                                                          /* Don't bother me */
+               
+       mp = hw_lock_phys_vir(pmap->space, vaddr);      /* Lock the physical entry for this mapping */
+
+       if(!mp) {                                                                       /* Did we find one? */
+               splx(s);                                                                /* Restore the interrupt level */
+               debugLog2(10, 0, 0);                                            /* end mapping_pmap */
+               return;                                                                 /* Didn't find any... */
+       }
+       if((unsigned int)mp & 1) {                                      /* Did we timeout? */
+               panic("mapping_protect: timeout locking physical entry\n");     /* Yeah, scream about it! */
+               splx(s);                                                                /* Restore the interrupt level */
+               return;                                                                 /* Bad hair day... */
+       }
+               
+       hw_prot_virt(mp, ppc_prot(prot));                       /* Go set the protection on this virtual mapping */
 
-       unsigned int pindex;
-       phys_entry *physent;
+       mpv = hw_cpv(mp);                                                       /* Get virtual address of mapping */
+       if(mpv->physent) {                                                      /* If there is a physical page, */
+               hw_unlock_bit((unsigned int *)&mpv->physent->phys_link, PHYS_LOCK);     /* Unlock the physical entry */
+       }
+       splx(s);                                                                        /* Restore interrupt state */
+       debugLog2(10, mpv->PTEr, 0);                            /* end remap */
        
-       physent = mapping_phys_lookup(pa, &pindex);                                     /* Get physical entry */
-       if(!physent) {                                                                                          /* Did we find the physical page? */
-               panic("mapping_clr_mod: invalid physical page %08X\n", pa);
+       return;                                                                         /* Leave... */
+}
+
+/*
+ *             mapping_phys_attr(struct phys_entry *pp, vm_prot_t prot, unsigned int wimg) Sets the default physical page attributes
+ *
+ *             This routine takes a physical entry and sets the physical attributes.  There can be no mappings
+ *             associated with this page when we do it.
+ */
+
+void mapping_phys_attr(struct phys_entry *pp, vm_prot_t prot, unsigned int wimg) {     /* Sets the default physical page attributes */
+
+       debugLog2(11, pp->pte1, prot);                                                          /* end remap */
+
+       if(!hw_lock_bit((unsigned int *)&pp->phys_link, PHYS_LOCK, LockTimeOut)) {      /* Lock the physical entry */
+               panic("\nmapping_phys_attr: Timeout attempting to lock physical entry at %08X: %08X %08X\n", 
+                       pp, pp->phys_link, pp->pte1);                                           /* Complain about timeout */
        }
 
-       hw_walk_phys(physent, hwpNoop, hwpCCngMap, hwpCCngPhy, 0);      /* Clear change for page and mappings */
+       hw_phys_attr(pp, ppc_prot(prot), wimg);                                         /* Go set the default WIMG and protection */
+
+       hw_unlock_bit((unsigned int *)&pp->phys_link, PHYS_LOCK);       /* We're done, unlock the physical entry */
+       debugLog2(12, pp->pte1, wimg);                                                          /* end remap */
+       
        return;                                                                                                         /* Leave... */
 }
 
-
 /*
- *             void mapping_set_mod(ppnum_t pa) - set the change bit of a physical page
+ *             void mapping_invall(phys_entry *pp) - invalidates all ptes associated with a page
  *
- *             This routine takes a physical entry and runs through all mappings attached to it and turns
- *             on the change bit.  
+ *             This routine takes a physical entry and runs through all mappings attached to it and invalidates
+ *             any PTEs it finds.
+ *
+ *             Interruptions must be disabled and the physical entry locked at entry.
  */
 
-void mapping_set_mod(ppnum_t pa) {                                                             /* Sets the change bit of a physical page */
+void mapping_invall(struct phys_entry *pp) {                                   /* Clear all PTEs pointing to a physical page */
 
-       unsigned int pindex;
-       phys_entry *physent;
+       hw_inv_all(pp);                                                                                         /* Go set the change bit of a physical page */
        
-       physent = mapping_phys_lookup(pa, &pindex);                                     /* Get physical entry */
-       if(!physent) {                                                                                          /* Did we find the physical page? */
-               panic("mapping_set_mod: invalid physical page %08X\n", pa);
-       }
-
-       hw_walk_phys(physent, hwpNoop, hwpSCngMap, hwpSCngPhy, 0);      /* Set change for page and mappings */
        return;                                                                                                         /* Leave... */
 }
 
 
 /*
- *             void mapping_clr_ref(ppnum_t pa) - clears the reference bit of a physical page
+ *             void mapping_clr_mod(phys_entry *pp) - clears the change bit of a physical page
  *
  *             This routine takes a physical entry and runs through all mappings attached to it and turns
- *             off the reference bit.  
+ *             off the change bit.  If there are PTEs associated with the mappings, they will be invalidated before
+ *             the change bit is changed.  We don't try to save the PTE.  We won't worry about the LRU calculations
+ *             either (I don't think, maybe I'll change my mind later).
+ *
+ *             Interruptions must be disabled and the physical entry locked at entry.
  */
 
-void mapping_clr_ref(ppnum_t pa) {                                                             /* Clears the reference bit of a physical page */
+void mapping_clr_mod(struct phys_entry *pp) {                                  /* Clears the change bit of a physical page */
 
-       unsigned int pindex;
-       phys_entry *physent;
-       
-       physent = mapping_phys_lookup(pa, &pindex);                                     /* Get physical entry */
-       if(!physent) {                                                                                          /* Did we find the physical page? */
-               panic("mapping_clr_ref: invalid physical page %08X\n", pa);
-       }
-
-       hw_walk_phys(physent, hwpNoop, hwpCRefMap, hwpCRefPhy, 0);      /* Clear reference for page and mappings */
+       hw_clr_mod(pp);                                                                                         /* Go clear the change bit of a physical page */
        return;                                                                                                         /* Leave... */
 }
 
 
 /*
- *             void mapping_set_ref(ppnum_t pa) - set the reference bit of a physical page
+ *             void mapping_set_mod(phys_entry *pp) - set the change bit of a physical page
  *
  *             This routine takes a physical entry and runs through all mappings attached to it and turns
- *             on the reference bit. 
+ *             on the change bit.  If there are PTEs associated with the mappings, they will be invalidated before
+ *             the change bit is changed.  We don't try to save the PTE.  We won't worry about the LRU calculations
+ *             either (I don't think, maybe I'll change my mind later).
+ *
+ *             Interruptions must be disabled and the physical entry locked at entry.
  */
 
-void mapping_set_ref(ppnum_t pa) {                                                             /* Sets the reference bit of a physical page */
-
-       unsigned int pindex;
-       phys_entry *physent;
-       
-       physent = mapping_phys_lookup(pa, &pindex);                                     /* Get physical entry */
-       if(!physent) {                                                                                          /* Did we find the physical page? */
-               panic("mapping_set_ref: invalid physical page %08X\n", pa);
-       }
+void mapping_set_mod(struct phys_entry *pp) {                                  /* Sets the change bit of a physical page */
 
-       hw_walk_phys(physent, hwpNoop, hwpSRefMap, hwpSRefPhy, 0);      /* Set reference for page and mappings */
+       hw_set_mod(pp);                                                                                         /* Go set the change bit of a physical page */
        return;                                                                                                         /* Leave... */
 }
 
 
 /*
- *             void mapping_tst_mod(ppnum_t pa) - test the change bit of a physical page
+ *             void mapping_clr_ref(struct phys_entry *pp) - clears the reference bit of a physical page
  *
- *             This routine takes a physical entry and runs through all mappings attached to it and tests
- *             the changed bit. 
+ *             This routine takes a physical entry and runs through all mappings attached to it and turns
+ *             off the reference bit.  If there are PTEs associated with the mappings, they will be invalidated before
+ *             the reference bit is changed.  We don't try to save the PTE.  We won't worry about the LRU calculations
+ *             either (I don't think, maybe I'll change my mind later).
+ *
+ *             Interruptions must be disabled at entry.
  */
 
-boolean_t mapping_tst_mod(ppnum_t pa) {                                                        /* Tests the change bit of a physical page */
+void mapping_clr_ref(struct phys_entry *pp) {                                  /* Clears the reference bit of a physical page */
 
-       unsigned int pindex, rc;
-       phys_entry *physent;
-       
-       physent = mapping_phys_lookup(pa, &pindex);                                     /* Get physical entry */
-       if(!physent) {                                                                                          /* Did we find the physical page? */
-               panic("mapping_tst_mod: invalid physical page %08X\n", pa);
+       mapping *mp;
+
+       debugLog2(13, pp->pte1, 0);                                                                     /* end remap */
+       if(!hw_lock_bit((unsigned int *)&pp->phys_link, PHYS_LOCK, LockTimeOut)) {      /* Lock the physical entry for this mapping */
+               panic("Lock timeout getting lock on physical entry\n"); /* Just die... */
        }
+       hw_clr_ref(pp);                                                                                         /* Go clear the reference bit of a physical page */
+       hw_unlock_bit((unsigned int *)&pp->phys_link, PHYS_LOCK);       /* Unlock physical entry */
+       debugLog2(14, pp->pte1, 0);                                                                     /* end remap */
+       return;                                                                                                         /* Leave... */
+}
+
+
+/*
+ *             void mapping_set_ref(phys_entry *pp) - set the reference bit of a physical page
+ *
+ *             This routine takes a physical entry and runs through all mappings attached to it and turns
+ *             on the reference bit.  If there are PTEs associated with the mappings, they will be invalidated before
+ *             the reference bit is changed.  We don't try to save the PTE.  We won't worry about the LRU calculations
+ *             either (I don't think, maybe I'll change my mind later).
+ *
+ *             Interruptions must be disabled and the physical entry locked at entry.
+ */
+
+void mapping_set_ref(struct phys_entry *pp) {                                  /* Sets the reference bit of a physical page */
 
-       rc = hw_walk_phys(physent, hwpTCngPhy, hwpTCngMap, hwpNoop, 0); /* Set change for page and mappings */
-       return ((rc & (unsigned long)ppC) != 0);                                        /* Leave with change bit */
+       hw_set_ref(pp);                                                                                         /* Go set the reference bit of a physical page */
+       return;                                                                                                         /* Leave... */
 }
 
 
 /*
- *             void mapping_tst_ref(ppnum_t pa) - tests the reference bit of a physical page
+ *             void mapping_tst_mod(phys_entry *pp) - test the change bit of a physical page
  *
  *             This routine takes a physical entry and runs through all mappings attached to it and tests
- *             the reference bit. 
+ *             the changed bit.  If there are PTEs associated with the mappings, they will be invalidated before
+ *             the changed bit is tested.  We don't try to save the PTE.  We won't worry about the LRU calculations
+ *             either (I don't think, maybe I'll change my mind later).
+ *
+ *             Interruptions must be disabled and the physical entry locked at entry.
  */
 
-boolean_t mapping_tst_ref(ppnum_t pa) {                                                        /* Tests the reference bit of a physical page */
-
-       unsigned int pindex, rc;
-       phys_entry *physent;
-       
-       physent = mapping_phys_lookup(pa, &pindex);                                     /* Get physical entry */
-       if(!physent) {                                                                                          /* Did we find the physical page? */
-               panic("mapping_tst_ref: invalid physical page %08X\n", pa);
-       }
+boolean_t mapping_tst_mod(struct phys_entry *pp) {                             /* Tests the change bit of a physical page */
 
-       rc = hw_walk_phys(physent, hwpTRefPhy, hwpTRefMap, hwpNoop, 0); /* Test reference for page and mappings */
-       return ((rc & (unsigned long)ppR) != 0);                                        /* Leave with reference bit */
+       return(hw_tst_mod(pp));                                                                         /* Go test the change bit of a physical page */
 }
 
 
 /*
- *             phys_ent  *mapping_phys_lookup(ppnum_t pp, unsigned int *pindex) - tests the reference bit of a physical page
+ *             void mapping_tst_ref(phys_entry *pp) - tests the reference bit of a physical page
+ *
+ *             This routine takes a physical entry and runs through all mappings attached to it and tests
+ *             the reference bit.  If there are PTEs associated with the mappings, they will be invalidated before
+ *             the reference bit is changed.  We don't try to save the PTE.  We won't worry about the LRU calculations
+ *             either (I don't think, maybe I'll change my mind later).
  *
- *             This routine takes a physical page number and returns the phys_entry associated with it.  It also
- *             calculates the bank address associated with the entry
- *             the reference bit. 
+ *             Interruptions must be disabled and the physical entry locked at entry.
  */
 
-phys_entry *mapping_phys_lookup(ppnum_t pp, unsigned int *pindex) {    /* Finds the physical entry for the page */
+boolean_t mapping_tst_ref(struct phys_entry *pp) {                             /* Tests the reference bit of a physical page */
 
-       phys_entry *physent;
-       int i;
-       
-       for(i = 0; i < pmap_mem_regions_count; i++) {                           /* Walk through the list */
-               if(!(unsigned int)pmap_mem_regions[i].mrPhysTab) continue;      /* Skip any empty lists */
-               if((pp < pmap_mem_regions[i].mrStart) || (pp > pmap_mem_regions[i].mrEnd)) continue;    /* This isn't ours */
-               
-               *pindex = (i * sizeof(mem_region_t)) / 4;                               /* Make the word index to this list */
-               
-               return &pmap_mem_regions[i].mrPhysTab[pp - pmap_mem_regions[i].mrStart];        /* Return the physent pointer */
-       }
-       
-       return (phys_entry *)0;                                                                         /* Shucks, can't find it... */
-       
+       return(hw_tst_ref(pp));                                                                         /* Go test the reference bit of a physical page */
 }
 
 
+/*
+ *             void mapping_phys_init(physent, wimg) - fills in the default processor dependent areas of the phys ent
+ *
+ *             Currently, this sets the default word 1 of the PTE.  The only bits set are the WIMG bits
+ */
+
+void mapping_phys_init(struct phys_entry *pp, unsigned int pa, unsigned int wimg) {            /* Initializes hw specific storage attributes */
+
+       pp->pte1 = (pa & -PAGE_SIZE) | ((wimg << 3) & 0x00000078);      /* Set the WIMG and phys addr in the default PTE1 */
+
+       return;                                                                                                         /* Leave... */
+}
 
 
 /*
@@ -641,8 +1077,8 @@ phys_entry *mapping_phys_lookup(ppnum_t pp, unsigned int *pindex) {        /* Finds the
  *             The list will be replenshed from mapCtl.mapcrel if there are enough.  Otherwise,
  *             a new one is allocated.
  *
- *             This routine allocates and/or frees memory and must be called from a safe place. 
- *             Currently, vm_pageout_scan is the safest place. 
+ *             This routine allocates and/or memory and must be called from a safe place. 
+ *             Currently, vm_pageout_scan is the safest place. We insure that the 
  */
 
 thread_call_t                          mapping_adjust_call;
@@ -657,7 +1093,7 @@ void mapping_adjust(void) {                                                                                /* Adjust free mappings */
        extern int vm_page_free_count;
 
        if(mapCtl.mapcmin <= MAPPERBLOK) {
-               mapCtl.mapcmin = (sane_size / PAGE_SIZE) / 16;
+               mapCtl.mapcmin = (mem_size / PAGE_SIZE) / 16;
 
 #if DEBUG
                kprintf("mapping_adjust: minimum entries rqrd = %08X\n", mapCtl.mapcmin);
@@ -688,10 +1124,10 @@ void mapping_adjust(void) {                                                                              /* Adjust free mappings */
                        mapCtl.mapcreln--;                                                                      /* Back off the count */
                        allocsize = MAPPERBLOK;                                                         /* Show we allocated one block */                       
                }
-        else {                                                                                                 /* No free ones, try to get it */
+               else {                                                                                                  /* No free ones, try to get it */
                        
                        allocsize = (allocsize + MAPPERBLOK - 1) / MAPPERBLOK;  /* Get the number of pages we need */
-                       
+
                        hw_lock_unlock((hw_lock_t)&mapCtl.mapclock);            /* Unlock our stuff */
                        splx(s);                                                                                        /* Restore 'rupts */
 
@@ -702,21 +1138,18 @@ void mapping_adjust(void) {                                                                              /* Adjust free mappings */
                                }
                                if(retr == KERN_SUCCESS) break;                                 /* We got some memory, bail out... */
                        }
-               
                        allocsize = allocsize * MAPPERBLOK;                                     /* Convert pages to number of maps allocated */
                        s = splhigh();                                                                          /* Don't bother from now on */
                        if(!hw_lock_to((hw_lock_t)&mapCtl.mapclock, LockTimeOut)) {     /* Lock the control header */ 
                                panic("mapping_adjust - timeout getting control lock (2)\n");   /* Tell all and die */
                        }
                }
-
                if (retr != KERN_SUCCESS)
                        break;                                                                                          /* Fail to alocate, bail out... */
                for(; allocsize > 0; allocsize -= MAPPERBLOK) {                 /* Release one block at a time */
                        mapping_free_init((vm_offset_t)mbn, 0, 1);                      /* Initialize a non-permanent block */
                        mbn = (mappingblok *)((unsigned int)mbn + PAGE_SIZE);   /* Point to the next slot */
                }
-
                if ((mapCtl.mapcinuse + mapCtl.mapcfree + (mapCtl.mapcreln * (MAPPERBLOK + 1))) > mapCtl.mapcmaxalloc)
                        mapCtl.mapcmaxalloc = mapCtl.mapcinuse + mapCtl.mapcfree + (mapCtl.mapcreln * (MAPPERBLOK + 1));
        }
@@ -737,13 +1170,11 @@ void mapping_adjust(void) {                                                                              /* Adjust free mappings */
 
        while((unsigned int)mbn) {                                                                      /* Toss 'em all */
                mb = mbn->nextblok;                                                                             /* Get the next */
-               
                kmem_free(mapping_map, (vm_offset_t) mbn, PAGE_SIZE);   /* Release this mapping block */
-       
                mbn = mb;                                                                                               /* Chain to the next */
        }
 
-       __asm__ volatile("eieio");                                                                      /* Make sure all is well */
+       __asm__ volatile("sync");                                                                       /* Make sure all is well */
        mapCtl.mapcrecurse = 0;                                                                         /* We are done now */
        return;
 }
@@ -762,53 +1193,18 @@ void mapping_free(struct mapping *mp) {                                                  /* Release a mapping */
 
        mappingblok     *mb, *mbn;
        spl_t                   s;
-       unsigned int    full, mindx, lists;
+       unsigned int    full, mindx;
 
-       mindx = ((unsigned int)mp & (PAGE_SIZE - 1)) >> 6;                      /* Get index to mapping */
+       mindx = ((unsigned int)mp & (PAGE_SIZE - 1)) >> 5;                      /* Get index to mapping */
        mb = (mappingblok *)((unsigned int)mp & -PAGE_SIZE);            /* Point to the mapping block */
-    lists = (mp->mpFlags & mpLists);                                                   /* get #lists */
-    if ((lists == 0) || (lists > kSkipListMaxLists))                   /* panic if out of range */
-        panic("mapping_free: mpLists invalid\n");
-
-#if 0
-       mp->mpFlags = 0x99999999;                                                                       /* (BRINGUP) */ 
-       mp->mpSpace = 0x9999;                                                                           /* (BRINGUP) */ 
-       mp->mpBSize = 0x9999;                                                                           /* (BRINGUP) */ 
-       mp->mpPte   = 0x99999998;                                                                       /* (BRINGUP) */ 
-       mp->mpPAddr = 0x99999999;                                                                       /* (BRINGUP) */ 
-       mp->mpVAddr = 0x9999999999999999ULL;                                            /* (BRINGUP) */ 
-       mp->mpAlias = 0x9999999999999999ULL;                                            /* (BRINGUP) */ 
-       mp->mpList0 = 0x9999999999999999ULL;                                            /* (BRINGUP) */ 
-       mp->mpList[0] = 0x9999999999999999ULL;                                          /* (BRINGUP) */ 
-       mp->mpList[1] = 0x9999999999999999ULL;                                          /* (BRINGUP) */ 
-       mp->mpList[2] = 0x9999999999999999ULL;                                          /* (BRINGUP) */ 
-
-       if(lists > mpBasicLists) {                                                                      /* (BRINGUP) */ 
-               mp->mpList[3] = 0x9999999999999999ULL;                                  /* (BRINGUP) */ 
-               mp->mpList[4] = 0x9999999999999999ULL;                                  /* (BRINGUP) */ 
-               mp->mpList[5] = 0x9999999999999999ULL;                                  /* (BRINGUP) */ 
-               mp->mpList[6] = 0x9999999999999999ULL;                                  /* (BRINGUP) */ 
-               mp->mpList[7] = 0x9999999999999999ULL;                                  /* (BRINGUP) */ 
-               mp->mpList[8] = 0x9999999999999999ULL;                                  /* (BRINGUP) */ 
-               mp->mpList[9] = 0x9999999999999999ULL;                                  /* (BRINGUP) */ 
-               mp->mpList[10] = 0x9999999999999999ULL;                                 /* (BRINGUP) */ 
-       }
-#endif 
-       
 
        s = splhigh();                                                                                          /* Don't bother from now on */
        if(!hw_lock_to((hw_lock_t)&mapCtl.mapclock, LockTimeOut)) {     /* Lock the control header */ 
                panic("mapping_free - timeout getting control lock\n"); /* Tell all and die */
        }
        
-       full = !(mb->mapblokfree[0] | mb->mapblokfree[1]);                      /* See if full now */ 
+       full = !(mb->mapblokfree[0] | mb->mapblokfree[1] | mb->mapblokfree[2] | mb->mapblokfree[3]);    /* See if full now */ 
        mb->mapblokfree[mindx >> 5] |= (0x80000000 >> (mindx & 31));    /* Flip on the free bit */
-    if ( lists > mpBasicLists ) {                                                              /* if big block, lite the 2nd bit too */
-        mindx++;
-        mb->mapblokfree[mindx >> 5] |= (0x80000000 >> (mindx & 31));
-        mapCtl.mapcfree++;
-        mapCtl.mapcinuse--;
-    }
        
        if(full) {                                                                                                      /* If it was full before this: */
                mb->nextblok = mapCtl.mapcnext;                                                 /* Move head of list to us */
@@ -823,7 +1219,8 @@ void mapping_free(struct mapping *mp) {                                                    /* Release a mapping */
        mapCtl.mapcfreec++;                                                                                     /* Count total calls */
 
        if(mapCtl.mapcfree > mapCtl.mapcmin) {                                          /* Should we consider releasing this? */
-               if(((mb->mapblokfree[0] | 0x80000000) & mb->mapblokfree[1]) == 0xFFFFFFFF) {    /* See if empty now */ 
+               if(((mb->mapblokfree[0] | 0x80000000) & mb->mapblokfree[1] & mb->mapblokfree[2] & mb->mapblokfree[3]) 
+                  == 0xFFFFFFFF) {                                                                             /* See if empty now */ 
 
                        if(mapCtl.mapcnext == mb) {                                                     /* Are we first on the list? */
                                mapCtl.mapcnext = mb->nextblok;                                 /* Unchain us */
@@ -865,169 +1262,70 @@ void mapping_free(struct mapping *mp) {                                                 /* Release a mapping */
 
 
 /*
- *             mapping_alloc(lists) - obtain a mapping from the free list 
+ *             mapping_alloc(void) - obtain a mapping from the free list 
  *
- *             This routine takes a mapping off of the free list and returns its address.
- *             The mapping is zeroed, and its mpLists count is set.  The caller passes in
- *             the number of skiplists it would prefer; if this number is greater than 
- *             mpBasicLists (ie, 4) then we need to allocate a 128-byte mapping, which is
- *             just two consequtive free entries coallesced into one.  If we cannot find
- *             two consequtive free entries, we clamp the list count down to mpBasicLists
- *             and return a basic 64-byte node.  Our caller never knows the difference.
+ *             This routine takes a mapping off of the free list and returns it's address.
  *
- *             If this allocation empties a block, we remove it from the free list.
+ *             We do this by finding a free entry in the first block and allocating it.
+ *             If this allocation empties the block, we remove it from the free list.
  *             If this allocation drops the total number of free entries below a threshold,
  *             we allocate a new block.
  *
  */
 
-mapping *mapping_alloc(int lists) {                                                            /* Obtain a mapping */
+mapping *mapping_alloc(void) {                                                                 /* Obtain a mapping */
 
        register mapping *mp;
        mappingblok     *mb, *mbn;
        spl_t                   s;
        int                             mindx;
        kern_return_t   retr;
-    int                                big = (lists > mpBasicLists);                           /* set flag if big block req'd */
-       pmap_t                  refpmap, ckpmap;
-       unsigned int    space, i;
-       int                             ref_count;
-       addr64_t                va, nextva;
-       extern  pmap_t  free_pmap_list;
-       extern  int             free_pmap_count;
-       decl_simple_lock_data(extern,free_pmap_lock)
-       boolean_t               found_mapping;
-       boolean_t               do_rescan;
-    
+
        s = splhigh();                                                                                          /* Don't bother from now on */
        if(!hw_lock_to((hw_lock_t)&mapCtl.mapclock, LockTimeOut)) {     /* Lock the control header */ 
                panic("mapping_alloc - timeout getting control lock\n");        /* Tell all and die */
        }
 
-       if(!((unsigned int)mapCtl.mapcnext)) {                                          /* Are there any free mappings? */
-       
-/*
- *             No free mappings.  First, there may be some mapping blocks on the "to be released"
- *             list.  If so, rescue one.  Otherwise, try to steal a couple blocks worth.
- */
-
-               if(mbn = mapCtl.mapcrel) {                                                              /* Try to rescue a block from impending doom */
-                       mapCtl.mapcrel = mbn->nextblok;                                         /* Pop the queue */
-                       mapCtl.mapcreln--;                                                                      /* Back off the count */
-                       mapping_free_init((vm_offset_t)mbn, 0, 1);                      /* Initialize a non-permanent block */
-                       goto rescued;
-               }
-
-               hw_lock_unlock((hw_lock_t)&mapCtl.mapclock);
-
-               simple_lock(&free_pmap_lock);
-
-               if(!hw_lock_to((hw_lock_t)&mapCtl.mapclock, LockTimeOut)) {     /* Lock the control header */ 
-                       panic("mapping_alloc - timeout getting control lock\n");        /* Tell all and die */
-               }
-
-               if (!((unsigned int)mapCtl.mapcnext)) {
-
-                       refpmap = (pmap_t)cursor_pmap->pmap_link.next;
-                       space = mapCtl.mapcflush.spacenum;
-                       while (refpmap != cursor_pmap) {
-                               if(((pmap_t)(refpmap->pmap_link.next))->spaceNum > space) break;
-                               refpmap = (pmap_t)refpmap->pmap_link.next;
-                       }
-
-                       ckpmap = refpmap;
-                       va = mapCtl.mapcflush.addr;
-                       found_mapping = FALSE;
-
-                       while (mapCtl.mapcfree <= (MAPPERBLOK*2)) {
-
+       if(!(mb = mapCtl.mapcnext)) {                                                           /* Get the first block entry */
+               unsigned int                    i;
+               struct mappingflush             mappingflush;
+               PCA                                             *pca_min, *pca_max;
+               PCA                                             *pca_base;
+
+               pca_min = (PCA *)(hash_table_base+hash_table_size);
+               pca_max = (PCA *)(hash_table_base+hash_table_size+hash_table_size);
+
+               while (mapCtl.mapcfree <= (MAPPERBLOK*2)) {
+                       mapCtl.mapcflush.mappingcnt = 0;
+                       pca_base = mapCtl.mapcflush.pcaptr;
+                       do {
+                               hw_select_mappings(&mapCtl.mapcflush);
+                               mapCtl.mapcflush.pcaptr++;
+                               if (mapCtl.mapcflush.pcaptr >= pca_max)
+                                       mapCtl.mapcflush.pcaptr = pca_min;
+                       } while ((mapCtl.mapcflush.mappingcnt == 0) && (mapCtl.mapcflush.pcaptr != pca_base));
+
+                       if ((mapCtl.mapcflush.mappingcnt == 0) && (mapCtl.mapcflush.pcaptr == pca_base)) {
                                hw_lock_unlock((hw_lock_t)&mapCtl.mapclock);
-
-                               ckpmap = (pmap_t)ckpmap->pmap_link.next;
-
-                               if ((ckpmap->stats.resident_count != 0) && (ckpmap != kernel_pmap)) {
-                                       do_rescan = TRUE;
-                                       for (i=0;i<8;i++) {
-                                               mp = hw_purge_map(ckpmap, va, &nextva);
-
-                                               if((unsigned int)mp & mapRetCode) {
-                                                       panic("mapping_alloc: hw_purge_map failed - pmap = %08X, va = %16llX, code = %08X\n", ckpmap, va, mp);
-                                               }
-
-                                               if(!mp) { 
-                                                       if (do_rescan)
-                                                               do_rescan = FALSE;
-                                                       else
-                                                               break;
-                                               } else {
-                                                       mapping_free(mp);
-                                                       found_mapping = TRUE;
-                                               }
-
-                                               va = nextva;
-                                       }
-                               }
-
-                               if (ckpmap == refpmap) {
-                                       if (found_mapping == FALSE)
-                                               panic("no valid pmap to purge mappings\n");
-                                       else
-                                               found_mapping = FALSE;
-                               }
-
-                               if(!hw_lock_to((hw_lock_t)&mapCtl.mapclock, LockTimeOut)) {     /* Lock the control header */ 
-                                       panic("mapping_alloc - timeout getting control lock\n");        /* Tell all and die */
-                               }
-
+                               panic("mapping_alloc - all mappings are wired\n");
+                       }
+                       mappingflush = mapCtl.mapcflush;
+                       hw_lock_unlock((hw_lock_t)&mapCtl.mapclock);
+                       splx(s);
+                       for (i=0;i<mappingflush.mappingcnt;i++)
+                               mapping_remove(mappingflush.mapping[i].pmap, 
+                                              mappingflush.mapping[i].offset);
+                       s = splhigh();
+                       if(!hw_lock_to((hw_lock_t)&mapCtl.mapclock, LockTimeOut)) {
+                               panic("mapping_alloc - timeout getting control lock\n");
                        }
-
-                       mapCtl.mapcflush.spacenum = ckpmap->spaceNum;
-                       mapCtl.mapcflush.addr = nextva;
                }
-
-               simple_unlock(&free_pmap_lock);
-       }
-
-rescued:
-
-       mb = mapCtl.mapcnext;
-    
-    if ( big ) {                                                                                               /* if we need a big (128-byte) mapping */
-        mapCtl.mapcbig++;                                                                              /* count attempts to allocate a big mapping */
-        mbn = NULL;                                                                                            /* this will be prev ptr */
-        mindx = 0;
-        while( mb ) {                                                                                  /* loop over mapping blocks with free entries */
-            mindx = mapalc2(mb);                                                               /* try for 2 consequtive free bits in this block */
-
-           if ( mindx )        break;                                                                  /* exit loop if we found them */
-            mbn = mb;                                                                                  /* remember previous block */
-            mb = mb->nextblok;                                                                 /* move on to next block */
-        }
-        if ( mindx == 0 ) {                                                                            /* if we couldn't find 2 consequtive bits... */
-            mapCtl.mapcbigfails++;                                                             /* count failures */
-            big = 0;                                                                                   /* forget that we needed a big mapping */
-            lists = mpBasicLists;                                                              /* clamp list count down to the max in a 64-byte mapping */
-            mb = mapCtl.mapcnext;                                                              /* back to the first block with a free entry */
-        }
-        else {                                                                                                 /* if we did find a big mapping */
-            mapCtl.mapcfree--;                                                                 /* Decrement free count twice */
-            mapCtl.mapcinuse++;                                                                        /* Bump in use count twice */
-            if ( mindx < 0 ) {                                                                 /* if we just used the last 2 free bits in this block */
-                if (mbn) {                                                                             /* if this wasn't the first block */
-                    mindx = -mindx;                                                            /* make positive */
-                    mbn->nextblok = mb->nextblok;                              /* unlink this one from the middle of block list */
-                    if (mb ==  mapCtl.mapclast)        {                               /* if we emptied last block */
-                        mapCtl.mapclast = mbn;                                 /* then prev block is now last */
-                    }
-                }
-            }
-        }
-    }
-    
-    if ( !big ) {                                                                                              /* if we need a small (64-byte) mapping */
-        if(!(mindx = mapalc1(mb)))                                                             /* Allocate a 1-bit slot */
-            panic("mapping_alloc - empty mapping block detected at %08X\n", mb);
-    }
+               mb = mapCtl.mapcnext;
+       }
+       
+       if(!(mindx = mapalc(mb))) {                                                                     /* Allocate a slot */
+               panic("mapping_alloc - empty mapping block detected at %08X\n", mb);    /* Not allowed to find none */
+       }
        
        if(mindx < 0) {                                                                                         /* Did we just take the last one */
                mindx = -mindx;                                                                                 /* Make positive */
@@ -1048,7 +1346,6 @@ rescued:
  *     For early boot, we are set up to only rescue one block at a time.  This is because we prime
  *     the release list with as much as we need until threads start.
  */
-
        if(mapCtl.mapcfree < mapCtl.mapcmin) {                                          /* See if we need to replenish */
                if(mbn = mapCtl.mapcrel) {                                                              /* Try to rescue a block from impending doom */
                        mapCtl.mapcrel = mbn->nextblok;                                         /* Pop the queue */
@@ -1068,9 +1365,7 @@ rescued:
        splx(s);                                                                                                        /* Restore 'rupts */
        
        mp = &((mapping *)mb)[mindx];                                                           /* Point to the allocated mapping */
-    mp->mpFlags = lists;                                                                               /* set the list count */
-
-
+    __asm__ volatile("dcbz 0,%0" : : "r" (mp));                                        /* Clean it up */
        return mp;                                                                                                      /* Send it back... */
 }
 
@@ -1082,7 +1377,7 @@ consider_mapping_adjust()
 
        s = splhigh();                                                                                          /* Don't bother from now on */
        if(!hw_lock_to((hw_lock_t)&mapCtl.mapclock, LockTimeOut)) {     /* Lock the control header */ 
-               panic("consider_mapping_adjust -- lock timeout\n");
+               panic("mapping_alloc - timeout getting control lock\n");        /* Tell all and die */
        }
 
         if (mapCtl.mapcfree < (mapCtl.mapcmin / 4)) {
@@ -1101,15 +1396,8 @@ consider_mapping_adjust()
 /*
  *             void mapping_free_init(mb, perm) - Adds a block of storage to the free mapping list
  *
- *             The mapping block is a page size area on a page boundary.  It contains 1 header and 63
- *             mappings.  This call adds and initializes a block for use.  Mappings come in two sizes,
- *             64 and 128 bytes (the only difference is the number of skip-lists.)  When we allocate a
- *             128-byte mapping we just look for two consequtive free 64-byte mappings, so most of the
- *             code only deals with "basic" 64-byte mappings.  This works for two reasons:
- *                     - Only one in 256 mappings is big, so they are rare.
- *                     - If we cannot find two consequtive free mappings, we just return a small one.
- *                       There is no problem with doing this, except a minor performance degredation.
- *             Therefore, all counts etc in the mapping control structure are in units of small blocks.
+ *             The mapping block is a page size area on a page boundary.  It contains 1 header and 127
+ *             mappings.  This call adds and initializes a block for use.
  *     
  *             The header contains a chain link, bit maps, a virtual to real translation mask, and
  *             some statistics. Bit maps map each slot on the page (bit 0 is not used because it 
@@ -1141,38 +1429,33 @@ void mapping_free_init(vm_offset_t mbl, int perm, boolean_t locked) {
        mappingblok     *mb;
        spl_t           s;
        int                     i;
-       addr64_t        raddr;
-       ppnum_t         pp;
+       unsigned int    raddr;
 
-       mb = (mappingblok *)mbl;                                                                /* Start of area */     
+       mb = (mappingblok *)mbl;                                                                /* Start of area */
+       
        
        if(perm >= 0) {                                                                                 /* See if we need to initialize the block */
                if(perm) {
-                       raddr = (addr64_t)((unsigned int)mbl);                  /* Perm means V=R */
+                       raddr = (unsigned int)mbl;                                              /* Perm means V=R */
                        mb->mapblokflags = mbPerm;                                              /* Set perm */
-//                     mb->mapblokflags |= (unsigned int)mb;                   /* (BRINGUP) */
                }
                else {
-                       pp = pmap_find_phys(kernel_pmap, (addr64_t)mbl);        /* Get the physical page */
-                       if(!pp) {                                                                               /* What gives?  Where's the page? */
-                               panic("mapping_free_init: could not find translation for vaddr %016llX\n", (addr64_t)mbl);
-                       }
-                       
-                       raddr = (addr64_t)pp << 12;                                             /* Convert physical page to physical address */
+                       raddr = kvtophys(mbl);                                                  /* Get real address */
                        mb->mapblokflags = 0;                                                   /* Set not perm */
-//                     mb->mapblokflags |= (unsigned int)mb;                   /* (BRINGUP) */
                }
                
-               mb->mapblokvrswap = raddr ^ (addr64_t)((unsigned int)mbl);              /* Form translation mask */
+               mb->mapblokvrswap = raddr ^ (unsigned int)mbl;          /* Form translation mask */
                
                mb->mapblokfree[0] = 0x7FFFFFFF;                                        /* Set first 32 (minus 1) free */
                mb->mapblokfree[1] = 0xFFFFFFFF;                                        /* Set next 32 free */
+               mb->mapblokfree[2] = 0xFFFFFFFF;                                        /* Set next 32 free */
+               mb->mapblokfree[3] = 0xFFFFFFFF;                                        /* Set next 32 free */
        }
        
        s = splhigh();                                                                                  /* Don't bother from now on */
        if(!locked) {                                                                                   /* Do we need the lock? */
                if(!hw_lock_to((hw_lock_t)&mapCtl.mapclock, LockTimeOut)) {             /* Lock the control header */ 
-                       panic("mapping_free_init: timeout getting control lock\n");     /* Tell all and die */
+                       panic("mapping_free_init - timeout getting control lock\n");    /* Tell all and die */
                }
        }
        
@@ -1198,8 +1481,7 @@ void mapping_free_init(vm_offset_t mbl, int perm, boolean_t locked) {
        if(!locked) {                                                                                   /* Do we need to unlock? */
                hw_lock_unlock((hw_lock_t)&mapCtl.mapclock);            /* Unlock our stuff */
        }
-
-       splx(s);                                                                                                /* Restore 'rupts */
+               splx(s);                                                                                        /* Restore 'rupts */
        return;                                                                                                 /* All done, leave... */
 }
 
@@ -1236,9 +1518,9 @@ void mapping_prealloc(unsigned int size) {                                        /* Preallocates mapppings for lar
                splx(s);                                                                                        /* Restore 'rupts */
                return;
        }
-       if (!hw_compare_and_store(0, 1, &mapCtl.mapcrecurse)) {     /* Make sure we aren't recursing */
+       if (!hw_compare_and_store(0, 1, &mapCtl.mapcrecurse)) {                 /* Make sure we aren't recursing */
                hw_lock_unlock((hw_lock_t)&mapCtl.mapclock);                    /* Unlock our stuff */
-               splx(s);                                                                                        /* Restore 'rupts */
+               splx(s);                                                        /* Restore 'rupts */
                return;
        }
        nmapb = (nmapb + MAPPERBLOK - 1) / MAPPERBLOK;                  /* Get number of blocks to get */
@@ -1248,8 +1530,9 @@ void mapping_prealloc(unsigned int size) {                                        /* Preallocates mapppings for lar
        
        for(i = 0; i < nmapb; i++) {                                                    /* Allocate 'em all */
                retr = kmem_alloc_wired(mapping_map, (vm_offset_t *)&mbn, PAGE_SIZE);   /* Find a virtual address to use */
-               if(retr != KERN_SUCCESS)                                                        /* Did we get some memory? */
+               if(retr != KERN_SUCCESS) {                                                      /* Did we get some memory? */
                        break;
+               }
                mapping_free_init((vm_offset_t)mbn, -1, 0);                     /* Initialize on to the release queue */
        }
        if ((mapCtl.mapcinuse + mapCtl.mapcfree + (mapCtl.mapcreln * (MAPPERBLOK + 1))) > mapCtl.mapcmaxalloc)
@@ -1300,7 +1583,7 @@ void mapping_free_prime(void) {                                                                   /* Primes the mapping block release list
        mappingblok     *mbn;
        vm_offset_t     mapping_min;
        
-       retr = kmem_suballoc(kernel_map, &mapping_min, sane_size / 16,
+       retr = kmem_suballoc(kernel_map, &mapping_min, MAPPING_MAP_SIZE,
                             FALSE, TRUE, &mapping_map);
 
        if (retr != KERN_SUCCESS)
@@ -1343,41 +1626,86 @@ mapping_fake_zone_info(int *count, vm_size_t *cur_size, vm_size_t *max_size, vm_
 
 
 /*
- *             addr64_t        mapping_p2v(pmap_t pmap, ppnum_t pa) - Finds first virtual mapping of a physical page in a space
+ *             vm_offset_t     mapping_p2v(pmap_t pmap, phys_entry *pp) - Finds first virtual mapping of a physical page in a space
  *
- *             First looks up  the physical entry associated witht the physical page.  Then searches the alias
- *             list for a matching pmap.  It grabs the virtual address from the mapping, drops busy, and returns 
- *             that.
+ *             Gets a lock on the physical entry.  Then it searches the list of attached mappings for one with
+ *             the same space.  If it finds it, it returns the virtual address.
  *
+ *             Note that this will fail if the pmap has nested pmaps in it.  Fact is, I'll check
+ *             for it and fail it myself...
  */
 
-addr64_t       mapping_p2v(pmap_t pmap, ppnum_t pa) {                          /* Finds first virtual mapping of a physical page in a space */
+vm_offset_t    mapping_p2v(pmap_t pmap, struct phys_entry *pp) {               /* Finds first virtual mapping of a physical page in a space */
 
-       spl_t s;
-       mapping *mp;
-       unsigned int pindex;
-       phys_entry *physent;
-       addr64_t va;
+       spl_t                           s;
+       register mapping        *mp, *mpv;
+       vm_offset_t                     va;
 
-       physent = mapping_phys_lookup(pa, &pindex);                                     /* Get physical entry */
-       if(!physent) {                                                                                          /* Did we find the physical page? */
-               panic("mapping_p2v: invalid physical page %08X\n", pa);
+       if(pmap->vflags & pmapAltSeg) return 0;                                 /* If there are nested pmaps, fail immediately */
+
+       s = splhigh();
+       if(!hw_lock_bit((unsigned int *)&pp->phys_link, PHYS_LOCK, LockTimeOut)) {      /* Try to get the lock on the physical entry */
+               splx(s);                                                                                        /* Restore 'rupts */
+               panic("mapping_p2v: timeout getting lock on physent\n");                        /* Arrrgghhhh! */
+               return(0);                                                                                      /* Should die before here */
+       }
+       
+       va = 0;                                                                                                 /* Assume failure */
+       
+       for(mpv = hw_cpv(pp->phys_link); mpv; mpv = hw_cpv(mpv->next)) {        /* Scan 'em all */
+               
+               if(!(((mpv->PTEv >> 7) & 0x000FFFFF) == pmap->space)) continue; /* Skip all the rest if this is not the right space... */ 
+               
+               va = ((((unsigned int)mpv->PTEhash & -64) << 6) ^ (pmap->space  << 12)) & 0x003FF000;   /* Backward hash to the wrapped VADDR */
+               va = va | ((mpv->PTEv << 1) & 0xF0000000);                      /* Move in the segment number */
+               va = va | ((mpv->PTEv << 22) & 0x0FC00000);                     /* Add in the API for the top of the address */
+               break;                                                                                          /* We're done now, pass virtual address back */
        }
+       
+       hw_unlock_bit((unsigned int *)&pp->phys_link, PHYS_LOCK);                               /* Unlock the physical entry */
+       splx(s);                                                                                                /* Restore 'rupts */
+       return(va);                                                                                             /* Return the result or 0... */
+}
 
-       s = splhigh();                                                                                  /* Make sure interruptions are disabled */
+/*
+ *     kvtophys(addr)
+ *
+ *     Convert a kernel virtual address to a physical address
+ */
+vm_offset_t kvtophys(vm_offset_t va) {
+
+       register mapping                *mp, *mpv;
+       register blokmap                *bmp;
+       register vm_offset_t    pa;
+       spl_t                           s;
+       
+       s=splhigh();                                                                                    /* Don't bother from now on */
+       mp = hw_lock_phys_vir(PPC_SID_KERNEL, va);                              /* Find mapping and lock the physical entry for this mapping */
 
-       mp = hw_find_space(physent, pmap->space);                               /* Go find the first mapping to the page from the requested pmap */
+       if((unsigned int)mp&1) {                                                                /* Did the lock on the phys entry time out? */
+               splx(s);                                                                                        /* Restore 'rupts */
+               panic("kvtophys: timeout obtaining lock on physical entry (vaddr=%08X)\n", va); /* Scream bloody murder! */
+               return 0;
+       }
 
-       if(mp) {                                                                                                /* Did we find one? */
-               va = mp->mpVAddr & -4096;                                                       /* If so, get the cleaned up vaddr */
-               mapping_drop_busy(mp);                                                          /* Go ahead and relase the mapping now */
+       if(!mp) {                                                                                               /* If it was not a normal page */
+               pa = hw_cvp_blk(kernel_pmap, va);                                       /* Try to convert odd-sized page (returns 0 if not found) */
+               splx(s);                                                                                        /* Restore 'rupts */
+               return pa;                                                                                      /* Return physical address */
        }
-       else va = 0;                                                                                    /* Return failure */
 
-       splx(s);                                                                                                /* Restore 'rupts */
+       mpv = hw_cpv(mp);                                                                               /* Convert to virtual addressing */
        
-       return va;                                                                                              /* Bye, bye... */
+       if(!mpv->physent) {                                                                             /* Was there a physical entry? */
+               pa = (vm_offset_t)((mpv->PTEr & -PAGE_SIZE) | ((unsigned int)va & (PAGE_SIZE-1)));      /* Get physical address from physent */
+       }
+       else {
+               pa = (vm_offset_t)((mpv->physent->pte1 & -PAGE_SIZE) | ((unsigned int)va & (PAGE_SIZE-1)));     /* Get physical address from physent */
+               hw_unlock_bit((unsigned int *)&mpv->physent->phys_link, PHYS_LOCK);     /* Unlock the physical entry */
+       }
        
+       splx(s);                                                                                                /* Restore 'rupts */
+       return pa;                                                                                              /* Return the physical address... */
 }
 
 /*
@@ -1389,27 +1717,17 @@ addr64_t        mapping_p2v(pmap_t pmap, ppnum_t pa) {                          /* Finds first virtual mappin
 
 vm_offset_t phystokv(vm_offset_t pa) {
 
-       addr64_t        va;
-       ppnum_t pp;
+       struct phys_entry       *pp;
+       vm_offset_t                     va;
 
-       pp = pa >> 12;                                                                                  /* Convert to a page number */
-       
-       if(!(va = mapping_p2v(kernel_pmap, pp))) {
+       pp = pmap_find_physentry(pa);                                                   /* Find the physical entry */
+       if (PHYS_NULL == pp) {
+               return (vm_offset_t)NULL;                                                       /* If none, return null */
+       }
+       if(!(va=mapping_p2v(kernel_pmap, pp))) {
                return 0;                                                                                       /* Can't find it, return 0... */
        }
-       
-       return (va | (pa & (PAGE_SIZE - 1)));                                   /* Build and return VADDR... */
-
-}
-
-/*
- *     kvtophys(addr)
- *
- *     Convert a kernel virtual address to a physical address
- */
-vm_offset_t kvtophys(vm_offset_t va) {
-
-       return pmap_extract(kernel_pmap, va);                                   /* Find mapping and lock the physical entry for this mapping */
+       return (va | (pa & (PAGE_SIZE-1)));                                             /* Build and return VADDR... */
 
 }
 
@@ -1431,203 +1749,346 @@ void ignore_zero_fault(boolean_t type) {                              /* Sets up to ignore or honor any fa
 }
 
 
-/* 
- *             Copies data between a physical page and a virtual page, or 2 physical.  This is used to 
- *             move data from the kernel to user state. Note that the "which" parm
- *             says which of the parameters is physical and if we need to flush sink/source.  
- *             Note that both addresses may be physicical but only one may be virtual
+/*
+ *     Allocates a range of virtual addresses in a map as optimally as
+ *     possible for block mapping.  The start address is aligned such
+ *     that a minimum number of power-of-two sized/aligned blocks is
+ *     required to cover the entire range. 
  *
- *             The rules are that the size can be anything.  Either address can be on any boundary
- *             and span pages.  The physical data must be congiguous as must the virtual.
+ *     We also use a mask of valid block sizes to determine optimality.
  *
- *             We can block when we try to resolve the virtual address at each page boundary.
- *             We don't check protection on the physical page.
+ *     Note that the passed in pa is not actually mapped to the selected va,
+ *     rather, it is used to figure the optimal boundary.  The actual 
+ *     V to R mapping is done externally.
  *
- *             Note that we will not check the entire range and if a page translation fails,
- *             we will stop with partial contents copied.
+ *     This function will return KERN_INVALID_ADDRESS if an optimal address 
+ *     can not be found.  It is not necessarily a fatal error, the caller may still be
+ *     still be able to do a non-optimal assignment.
+ */
+
+kern_return_t vm_map_block(vm_map_t map, vm_offset_t *va, vm_offset_t *bnd, vm_offset_t pa, 
+       vm_size_t size, vm_prot_t prot) {
+
+       vm_map_entry_t  entry, next, tmp_entry, new_entry;
+       vm_offset_t             start, end, algnpa, endadr, strtadr, curradr;
+       vm_offset_t             boundary;
+       
+       unsigned int    maxsize, minsize, leading, trailing;
+       
+       assert(page_aligned(pa));
+       assert(page_aligned(size));
+
+       if (map == VM_MAP_NULL) return(KERN_INVALID_ARGUMENT);  /* Dude, like we need a target map */
+       
+       minsize = blokValid ^ (blokValid & (blokValid - 1));    /* Set minimum subblock size */
+       maxsize = 0x80000000 >> cntlzw(blokValid);      /* Set maximum subblock size */
+       
+       boundary = 0x80000000 >> cntlzw(size);          /* Get optimal boundary */
+       if(boundary > maxsize) boundary = maxsize;      /* Pin this at maximum supported hardware size */
+       
+       vm_map_lock(map);                                                       /* No touchee no mapee */
+
+       for(; boundary > minsize; boundary >>= 1) {     /* Try all optimizations until we find one */
+               if(!(boundary & blokValid)) continue;   /* Skip unavailable block sizes */
+               algnpa = (pa + boundary - 1) & -boundary;       /* Round physical up */
+               leading = algnpa - pa;                                  /* Get leading size */
+               
+               curradr = 0;                                                    /* Start low */
+               
+               while(1) {                                                              /* Try all possible values for this opt level */
+
+                       curradr = curradr + boundary;           /* Get the next optimal address */
+                       strtadr = curradr - leading;            /* Calculate start of optimal range */
+                       endadr = strtadr + size;                        /* And now the end */
+                       
+                       if((curradr < boundary) ||                      /* Did address wrap here? */
+                               (strtadr > curradr) ||                  /* How about this way? */
+                               (endadr < strtadr)) break;              /* We wrapped, try next lower optimization... */
+               
+                       if(strtadr < map->min_offset) continue; /* Jump to the next higher slot... */
+                       if(endadr > map->max_offset) break;     /* No room right now... */
+                       
+                       if(vm_map_lookup_entry(map, strtadr, &entry)) continue; /* Find slot, continue if allocated... */
+               
+                       next = entry->vme_next;                         /* Get the next entry */
+                       if((next == vm_map_to_entry(map)) ||    /* Are we the last entry? */
+                               (next->vme_start >= endadr)) {  /* or do we end before the next entry? */
+                       
+                               new_entry = vm_map_entry_insert(map, entry, strtadr, endadr, /* Yes, carve out our entry */
+                                       VM_OBJECT_NULL,
+                                       0,                                                      /* Offset into object of 0 */
+                                       FALSE,                                          /* No copy needed */
+                                       FALSE,                                          /* Not shared */
+                                       FALSE,                                          /* Not in transition */
+                                       prot,                                           /* Set the protection to requested */
+                                       prot,                                           /* We can't change protection */
+                                       VM_BEHAVIOR_DEFAULT,            /* Use default behavior, but makes no never mind,
+                                                                                                  'cause we don't page in this area */
+                                       VM_INHERIT_DEFAULT,             /* Default inheritance */
+                                       0);                                                     /* Nothing is wired */
+                       
+                               vm_map_unlock(map);                             /* Let the world see it all */
+                               *va = strtadr;                                  /* Tell everyone */
+                               *bnd = boundary;                                /* Say what boundary we are aligned to */
+                               return(KERN_SUCCESS);                   /* Leave, all is right with the world... */
+                       }
+               }               
+       }       
+
+       vm_map_unlock(map);                                                     /* Couldn't find a slot */
+       return(KERN_INVALID_ADDRESS);
+}
+
+/* 
+ *             Copies data from a physical page to a virtual page.  This is used to 
+ *             move data from the kernel to user state.
+ *
+ *             Note that it is invalid to have a source that spans a page boundry.
+ *             This can block.
+ *             We don't check protection either.
+ *             And we don't handle a block mapped sink address either.
  *
  */
  
-kern_return_t copypv(addr64_t source, addr64_t sink, unsigned int size, int which) {
+kern_return_t copyp2v(vm_offset_t source, vm_offset_t sink, unsigned int size) {
  
        vm_map_t map;
        kern_return_t ret;
-       addr64_t pa, nextva, vaddr, paddr;
-       register mapping *mp;
+       unsigned int spaceid;
+       int left, csize;
+       vm_offset_t pa;
+       register mapping *mpv, *mp;
        spl_t s;
-       unsigned int sz, left, lop, csize;
-       int needtran, bothphys;
-       unsigned int pindex;
-       phys_entry *physent;
-       vm_prot_t prot;
 
-       map = (which & cppvKmap) ? kernel_map : current_map_fast();
+       if((size == 0) || ((source ^ (source + size - 1)) & -PAGE_SIZE)) return KERN_FAILURE;   /* We don't allow a source page crosser */
+       map = current_act()->map;                                               /* Get the current map */
 
-       if((which & (cppvPsrc | cppvPsnk)) == 0 ) {             /* Make sure that only one is virtual */
-               panic("copypv: no more than 1 parameter may be virtual\n");     /* Not allowed */
-       }
-       
-       bothphys = 1;                                                                   /* Assume both are physical */
+       while(size) {
+               s=splhigh();                                                            /* Don't bother me */
        
-       if(!(which & cppvPsnk)) {                                               /* Is there a virtual page here? */
-               vaddr = sink;                                                           /* Sink side is virtual */
-               bothphys = 0;                                                           /* Show both aren't physical */
-               prot = VM_PROT_READ | VM_PROT_WRITE;            /* Sink always must be read/write */
-       } else if(!(which & cppvPsrc)) {                                /* Source side is virtual */
-               vaddr = source;                                                         /* Source side is virtual */
-               bothphys = 0;                                                           /* Show both aren't physical */
-               prot = VM_PROT_READ;                                            /* Virtual source is always read only */
-       }
+               spaceid = map->pmap->pmapSegs[(unsigned int)sink >> 28];        /* Get space ID. Don't bother to clean top bits */
 
-       needtran = 1;                                                                   /* Show we need to map the virtual the first time */
-       s = splhigh();                                                                  /* Don't bother me */
+               mp = hw_lock_phys_vir(spaceid, sink);           /* Lock the physical entry for the sink */
+               if(!mp) {                                                                       /* Was it there? */
+                       splx(s);                                                                /* Restore the interrupt level */
+                       ret = vm_fault(map, trunc_page(sink), VM_PROT_READ | VM_PROT_WRITE, FALSE, NULL, 0);    /* Didn't find it, try to fault it in... */
+                       if (ret == KERN_SUCCESS) continue;              /* We got it in, try again to find it... */
 
-       while(size) {
+                       return KERN_FAILURE;                                    /* Didn't find any, return no good... */
+               }
+               if((unsigned int)mp&1) {                                        /* Did we timeout? */
+                       panic("dumpaddr: timeout locking physical entry for virtual address (%08X)\n", sink);   /* Yeah, scream about it! */
+                       splx(s);                                                                /* Restore the interrupt level */
+                       return KERN_FAILURE;                                    /* Bad hair day, return FALSE... */
+               }
 
-               if(!bothphys && (needtran || !(vaddr & 4095LL))) {      /* If first time or we stepped onto a new page, we need to translate */
-                       if(!needtran) {                                                 /* If this is not the first translation, we need to drop the old busy */
-                               mapping_drop_busy(mp);                          /* Release the old mapping now */
-                       }
-                       needtran = 0;
-                       
-                       while(1) {
-                               mp = mapping_find(map->pmap, vaddr, &nextva, 1);        /* Find and busy the mapping */
-                               if(!mp) {                                                       /* Was it there? */
-                                       if(per_proc_info[cpu_number()].istackptr == 0)
-                                               panic("copypv: No vaild mapping on memory %s %x", "RD", vaddr);
-
-                                       splx(s);                                                /* Restore the interrupt level */
-                                       ret = vm_fault(map, trunc_page_32((vm_offset_t)vaddr), prot, FALSE, NULL, 0);   /* Didn't find it, try to fault it in... */
-                               
-                                       if(ret != KERN_SUCCESS)return KERN_FAILURE;     /* Didn't find any, return no good... */
-                                       
-                                       s = splhigh();                                  /* Don't bother me */
-                                       continue;                                               /* Go try for the map again... */
-       
-                               }
-               
-                               /* Note that we have to have the destination writable.  So, if we already have it, or we are mapping the source,
-                                       we can just leave.
-                               */              
-                               if((which & cppvPsnk) || !(mp->mpVAddr & 1)) break;             /* We got it mapped R/W or the source is not virtual, leave... */
-                       
-                               mapping_drop_busy(mp);                          /* Go ahead and release the mapping for now */
-                               if(per_proc_info[cpu_number()].istackptr == 0)
-                                       panic("copypv: No vaild mapping on memory %s %x", "RDWR", vaddr);
-                               splx(s);                                                        /* Restore the interrupt level */
-                               
-                               ret = vm_fault(map, trunc_page_32((vm_offset_t)vaddr), VM_PROT_READ | VM_PROT_WRITE, FALSE, NULL, 0);   /* check for a COW area */
-                               if (ret != KERN_SUCCESS) return KERN_FAILURE;   /* We couldn't get it R/W, leave in disgrace... */
-                               s = splhigh();                                          /* Don't bother me */
-                       }
-                       paddr = ((addr64_t)mp->mpPAddr << 12) + (vaddr - (mp->mpVAddr & -4096LL));        /* construct the physical address... this calculation works */
-                                                                                                         /* properly on both single page and block mappings */
-                       if(which & cppvPsrc) sink = paddr;              /* If source is physical, then the sink is virtual */
-                       else source = paddr;                                    /* Otherwise the source is */
+               mpv = hw_cpv(mp);                                                       /* Convert mapping block to virtual */
+
+               if(mpv->PTEr & 1) {                                                     /* Are we write protected? yes, could indicate COW */
+                       hw_unlock_bit((unsigned int *)&mpv->physent->phys_link, PHYS_LOCK);     /* Unlock the sink */
+                       splx(s);                                                                /* Restore the interrupt level */
+                       ret = vm_fault(map, trunc_page(sink), VM_PROT_READ | VM_PROT_WRITE, FALSE, NULL, 0);    /* check for a COW area */
+                       if (ret == KERN_SUCCESS) continue;              /* We got it in, try again to find it... */
+                       return KERN_FAILURE;                                    /* Didn't find any, return no good... */
                }
-                       
-               lop = (unsigned int)(4096LL - (sink & 4095LL));         /* Assume sink smallest */
-               if(lop > (unsigned int)(4096LL - (source & 4095LL))) lop = (unsigned int)(4096LL - (source & 4095LL));  /* No, source is smaller */
-               
-               csize = size;                                                           /* Assume we can copy it all */
-               if(lop < size) csize = lop;                                     /* Nope, we can't do it all */
-               
-               if(which & cppvFsrc) flush_dcache64(source, csize, 1);  /* If requested, flush source before move */
-               if(which & cppvFsnk) flush_dcache64(sink, csize, 1);    /* If requested, flush sink before move */
+               left = PAGE_SIZE - (sink & PAGE_MASK);          /* Get amount left on sink page */
+
+               csize = size < left ? size : left;              /* Set amount to copy this pass */
+
+               pa = (vm_offset_t)((mpv->physent->pte1 & ~PAGE_MASK) | ((unsigned int)sink & PAGE_MASK));       /* Get physical address of sink */
+
+               bcopy_physvir((char *)source, (char *)pa, csize);       /* Do a physical copy, virtually */
+
+               hw_set_mod(mpv->physent);                                       /* Go set the change of the sink */
+
+               hw_unlock_bit((unsigned int *)&mpv->physent->phys_link, PHYS_LOCK);     /* Unlock the sink */
+               splx(s);                                                                        /* Open up for interrupts */
+
+               sink += csize;                                                          /* Move up to start of next page */
+               source += csize;                                                        /* Move up source */
+               size -= csize;                                                          /* Set amount for next pass */
+       }
+       return KERN_SUCCESS;
+}
 
-               bcopy_physvir(source, sink, csize);                     /* Do a physical copy, virtually */
-               
-               if(which & cppvFsrc) flush_dcache64(source, csize, 1);  /* If requested, flush source after move */
-               if(which & cppvFsnk) flush_dcache64(sink, csize, 1);    /* If requested, flush sink after move */
 
 /*
- *             Note that for certain ram disk flavors, we may be copying outside of known memory.
- *             Therefore, before we try to mark it modifed, we check if it exists.
+ * copy 'size' bytes from physical to physical address
+ * the caller must validate the physical ranges 
+ *
+ * if flush_action == 0, no cache flush necessary
+ * if flush_action == 1, flush the source
+ * if flush_action == 2, flush the dest
+ * if flush_action == 3, flush both source and dest
  */
 
-               if( !(which & cppvNoModSnk)) {
-                       physent = mapping_phys_lookup(sink >> 12, &pindex);     /* Get physical entry for sink */
-                       if(physent) mapping_set_mod((ppnum_t)(sink >> 12));             /* Make sure we know that it is modified */
-               }
-               if( !(which & cppvNoRefSrc)) {
-                       physent = mapping_phys_lookup(source >> 12, &pindex);   /* Get physical entry for source */
-                       if(physent) mapping_set_ref((ppnum_t)(source >> 12));           /* Make sure we know that it is modified */
-               }
-               size = size - csize;                                            /* Calculate what is left */
-               vaddr = vaddr + csize;                                          /* Move to next sink address */
-               source = source + csize;                                        /* Bump source to next physical address */
-               sink = sink + csize;                                            /* Bump sink to next physical address */
+kern_return_t copyp2p(vm_offset_t source, vm_offset_t dest, unsigned int size, unsigned int flush_action) {
+
+        switch(flush_action) {
+       case 1:
+               flush_dcache(source, size, 1);
+               break;
+       case 2:
+               flush_dcache(dest, size, 1);
+               break;
+       case 3:
+               flush_dcache(source, size, 1);
+               flush_dcache(dest, size, 1);
+               break;
+
        }
-       
-       if(!bothphys) mapping_drop_busy(mp);                    /* Go ahead and release the mapping of the virtual page if any */
-       splx(s);                                                                                /* Open up for interrupts */
+        bcopy_phys((char *)source, (char *)dest, size);        /* Do a physical copy */
+
+        switch(flush_action) {
+       case 1:
+               flush_dcache(source, size, 1);
+               break;
+       case 2:
+               flush_dcache(dest, size, 1);
+               break;
+       case 3:
+               flush_dcache(source, size, 1);
+               flush_dcache(dest, size, 1);
+               break;
 
-       return KERN_SUCCESS;
+       }
 }
 
 
+
+#if DEBUG
 /*
- *     Debug code 
+ *             Dumps out the mapping stuff associated with a virtual address
  */
+void dumpaddr(space_t space, vm_offset_t va) {
 
-void mapping_verify(void) {
+       mapping         *mp, *mpv;
+       vm_offset_t     pa;
+       spl_t           s;
 
-       spl_t           s;
-       mappingblok     *mb, *mbn;
-       int                     relncnt;
-       unsigned int    dumbodude;
+       s=splhigh();                                                                                    /* Don't bother me */
 
-       dumbodude = 0;
-       
-       s = splhigh();                                                                                  /* Don't bother from now on */
+       mp = hw_lock_phys_vir(space, va);                                               /* Lock the physical entry for this mapping */
+       if(!mp) {                                                                                               /* Did we find one? */
+               splx(s);                                                                                        /* Restore the interrupt level */
+               printf("dumpaddr: virtual address (%08X) not mapped\n", va);    
+               return;                                                                                         /* Didn't find any, return FALSE... */
+       }
+       if((unsigned int)mp&1) {                                                                /* Did we timeout? */
+               panic("dumpaddr: timeout locking physical entry for virtual address (%08X)\n", va);     /* Yeah, scream about it! */
+               splx(s);                                                                                        /* Restore the interrupt level */
+               return;                                                                                         /* Bad hair day, return FALSE... */
+       }
+       printf("dumpaddr: space=%08X; vaddr=%08X\n", space, va);        /* Say what address were dumping */
+       mpv = hw_cpv(mp);                                                                               /* Get virtual address of mapping */
+       dumpmapping(mpv);
+       if(mpv->physent) {
+               dumppca(mpv);
+               hw_unlock_bit((unsigned int *)&mpv->physent->phys_link, PHYS_LOCK);     /* Unlock physical entry associated with mapping */
+       }
+       splx(s);                                                                                                /* Was there something you needed? */
+       return;                                                                                                 /* Tell them we did it */
+}
 
-       mbn = 0;                                                                                                /* Start with none */
-       for(mb = mapCtl.mapcnext; mb; mb = mb->nextblok) {              /* Walk the free chain */
-               if((mb->mapblokflags & 0x7FFFFFFF) != mb) {                     /* Is tag ok? */
-                       panic("mapping_verify: flags tag bad, free chain; mb = %08X, tag = %08X\n", mb, mb->mapblokflags);
-               }
-               mbn = mb;                                                                                       /* Remember the last one */
+
+
+/*
+ *             Prints out a mapping control block
+ *
+ */
+void dumpmapping(struct mapping *mp) {                                                 /* Dump out a mapping */
+
+       printf("Dump of mapping block: %08X\n", mp);                    /* Header */
+       printf("                 next: %08X\n", mp->next);                 
+       printf("             hashnext: %08X\n", mp->hashnext);                 
+       printf("              PTEhash: %08X\n", mp->PTEhash);                 
+       printf("               PTEent: %08X\n", mp->PTEent);                 
+       printf("              physent: %08X\n", mp->physent);                 
+       printf("                 PTEv: %08X\n", mp->PTEv);                 
+       printf("                 PTEr: %08X\n", mp->PTEr);                 
+       printf("                 pmap: %08X\n", mp->pmap);
+       
+       if(mp->physent) {                                                                       /* Print physent if it exists */
+               printf("Associated physical entry: %08X %08X\n", mp->physent->phys_link, mp->physent->pte1);
        }
-       
-       if(mapCtl.mapcnext && (mapCtl.mapclast != mbn)) {               /* Do we point to the last one? */
-               panic("mapping_verify: last pointer bad; mb = %08X, mapclast = %08X\n", mb, mapCtl.mapclast);
+       else {
+               printf("Associated physical entry: none\n");
        }
        
-       relncnt = 0;                                                                                    /* Clear count */
-       for(mb = mapCtl.mapcrel; mb; mb = mb->nextblok) {               /* Walk the release chain */
-               dumbodude |= mb->mapblokflags;                                          /* Just touch it to make sure it is mapped */
-               relncnt++;                                                                                      /* Count this one */
-       }
+       dumppca(mp);                                                                            /* Dump out the PCA information */
        
-       if(mapCtl.mapcreln != relncnt) {                                                        /* Is the count on release queue ok? */
-               panic("mapping_verify: bad release queue count; mapcreln = %d, cnt = %d, ignore this = %08X\n", mapCtl.mapcreln, relncnt, dumbodude);
-       }
+       return;
+}
 
-       splx(s);                                                                                                /* Restore 'rupts */
+/*
+ *             Prints out a PTEG control area
+ *
+ */
+void dumppca(struct mapping *mp) {                                             /* PCA */
+
+       PCA                             *pca;
+       unsigned int    *pteg;
+       
+       pca = (PCA *)((unsigned int)mp->PTEhash&-64);           /* Back up to the start of the PCA */
+       pteg=(unsigned int *)((unsigned int)pca-(((hash_table_base&0x0000FFFF)+1)<<16));
+       printf(" Dump of PCA: %08X\n", pca);            /* Header */
+       printf("     PCAlock: %08X\n", pca->PCAlock);                 
+       printf("     PCAallo: %08X\n", pca->flgs.PCAallo);                 
+       printf("     PCAhash: %08X %08X %08X %08X\n", pca->PCAhash[0], pca->PCAhash[1], pca->PCAhash[2], pca->PCAhash[3]);                 
+       printf("              %08X %08X %08X %08X\n", pca->PCAhash[4], pca->PCAhash[5], pca->PCAhash[6], pca->PCAhash[7]);                 
+       printf("Dump of PTEG: %08X\n", pteg);           /* Header */
+       printf("              %08X %08X %08X %08X\n", pteg[0], pteg[1], pteg[2], pteg[3]);                 
+       printf("              %08X %08X %08X %08X\n", pteg[4], pteg[5], pteg[6], pteg[7]);                 
+       printf("              %08X %08X %08X %08X\n", pteg[8], pteg[9], pteg[10], pteg[11]);                 
+       printf("              %08X %08X %08X %08X\n", pteg[12], pteg[13], pteg[14], pteg[15]);                 
+       return;
+}
 
+/*
+ *             Dumps starting with a physical entry
+ */
+void dumpphys(struct phys_entry *pp) {                                                 /* Dump from physent */
+
+       mapping                 *mp;
+       PCA                             *pca;
+       unsigned int    *pteg;
+
+       printf("Dump from physical entry %08X: %08X %08X\n", pp, pp->phys_link, pp->pte1);
+       mp = hw_cpv(pp->phys_link);
+       while(mp) {
+               dumpmapping(mp);
+               dumppca(mp);
+               mp = hw_cpv(mp->next);
+       }
+       
        return;
 }
 
-void mapping_phys_unused(ppnum_t pa) {
+#endif
 
-       unsigned int pindex;
-       phys_entry *physent;
 
-       physent = mapping_phys_lookup(pa, &pindex);                             /* Get physical entry */
-       if(!physent) return;                                                                    /* Did we find the physical page? */
+kern_return_t bmapvideo(vm_offset_t *info);
+kern_return_t bmapvideo(vm_offset_t *info) {
 
-       if(!(physent->ppLink & ~(ppLock | ppN | ppFlags))) return;      /* No one else is here */
-       
-       panic("mapping_phys_unused: physical page (%08X) in use, physent = %08X\n", pa, physent);
+       extern struct vc_info vinfo;
        
+       (void)copyout((char *)&vinfo, (char *)info, sizeof(struct vc_info));    /* Copy out the video info */
+       return KERN_SUCCESS;
 }
+
+kern_return_t bmapmap(vm_offset_t va, vm_offset_t pa, vm_size_t size, vm_prot_t prot, int attr);
+kern_return_t bmapmap(vm_offset_t va, vm_offset_t pa, vm_size_t size, vm_prot_t prot, int attr) {
        
+       pmap_map_block(current_act()->task->map->pmap, va, pa, size, prot, attr, 0);    /* Map it in */
+       return KERN_SUCCESS;
+}
+
+kern_return_t bmapmapr(vm_offset_t va);
+kern_return_t bmapmapr(vm_offset_t va) {
        
-       
-       
-       
-       
-       
-       
-       
-       
+       mapping_remove(current_act()->task->map->pmap, va);     /* Remove map */
+       return KERN_SUCCESS;
+}
index 6889313a83d550d48c0be97872483a15dfc65f24..8c278ab08217637e5c552034fc8da7f478642a0d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #ifndef        _PPC_MAPPINGS_H_
 #define        _PPC_MAPPINGS_H_
 
-#include <cpus.h>
-
-#include <mach/mach_types.h>
-#include <mach/vm_types.h>
-#include <mach/machine/vm_types.h>
-#include <mach/vm_prot.h>
-#include <mach/vm_statistics.h>
-#include <kern/assert.h>
-#include <kern/cpu_number.h>
-#include <kern/lock.h>
-#include <kern/queue.h>
-#include <ppc/proc_reg.h>
-
-/*
- * Don't change these structures unless you change the assembly code
- */
-
-/*
- *     This control block serves as anchor for all virtual mappings of the same physical
- *     page, i.e., aliases.  There is a table for each bank (mem_region).  All tables
- *     must reside in V=R storage and within the first 2GB of memory. Also, the
- *     mappings to which it points must be on at least a 64-byte boundary. These 
- *     requirements allow a total of 2 bits for status and flags, and allow all address
- *     calculations to be 32-bit.
- */
-
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
-typedef struct phys_entry {
-       addr64_t        ppLink;                         /* Physical pointer to aliased mappings and flags */
-#define                ppLock          0x8000000000000000LL    /* Lock for alias chain */
-#define                ppN                     0x4000000000000000LL    /* Not executable */
-#define                ppFlags         0x000000000000003FLL    /* Status and flags */
-#define                ppI                     0x0000000000000020LL    /* Cache inhibited */
-#define                ppIb            58                                              /* Cache inhibited */
-#define                ppG                     0x0000000000000010LL    /* Guarded */
-#define                ppGb            59                                              /* Guarded */
-#define                ppR                     0x0000000000000008LL    /* Referenced */
-#define                ppRb            60                                              /* Referenced */
-#define                ppC                     0x0000000000000004LL    /* Changed */
-#define                ppCb            61                                              /* Changed */
-#define                ppPP            0x0000000000000003LL    /* Protection */
-#define                ppPPb           62                                              /* Protection begin */
-#define                ppPPe           63                                              /* Protection end */
-} phys_entry;
-#pragma pack()
-
-/* Memory may be non-contiguous. This data structure contains info
- * for mapping this non-contiguous space into the contiguous
- * physical->virtual mapping tables. An array of this type is
- * provided to the pmap system at bootstrap by ppc_vm_init.
- *
- */
-
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
-typedef struct mem_region {
-       phys_entry                      *mrPhysTab;     /* Base of region table */
-       ppnum_t                         mrStart;        /* Start of region */
-       ppnum_t                         mrEnd;          /* Last page in region */
-       ppnum_t                         mrAStart;       /* Next page in region to allocate */
-       ppnum_t                         mrAEnd;         /* Last page in region to allocate */
-} mem_region_t;
-#pragma pack()
-
-#define mrSize sizeof(mem_region_t)
-#define PMAP_MEM_REGION_MAX 26
-
-extern mem_region_t pmap_mem_regions[PMAP_MEM_REGION_MAX + 1];
-extern int          pmap_mem_regions_count;
-
-/* Prototypes */
-
-
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
 typedef struct PCA {                                   /* PTEG Control Area */
+       unsigned int            PCAlock;                /* PCA lock */
        union flgs {
                unsigned int    PCAallo;                /* Allocation controls */
                struct PCAalflgs {                              /* Keep these in order!!! */
                        unsigned char   PCAfree;        /* Indicates the slot is free */
-                       unsigned char   PCAsteal;       /* Steal scan start position */
                        unsigned char   PCAauto;        /* Indicates that the PTE was autogenned */
-                       unsigned char   PCAmisc;        /* Misc. flags */
-#define PCAlock 1                                              /* This locks up the associated PTEG */
-#define PCAlockb 31
+                       unsigned char   PCAslck;        /* Indicates that the slot is locked */
+                       unsigned char   PCAsteal;       /* Steal scan start position */
                } PCAalflgs;
        } flgs;
+       unsigned int            PCAgas[6];              /* Filler to 32 byte boundary */
+       unsigned int            PCAhash[8];             /* PTEG hash chains */
 } PCA;
-#pragma pack()
 
-/* Mappings currently come in two sizes: 64 and 128 bytes.  The only difference is the
- * number of skiplists (ie, mpLists): 64-byte mappings have 1-4 lists and 128-byte mappings
- * have from 5-12.  Only 1 in 256 mappings is large, so an average mapping is 64.25 bytes.
- * All mappings are 64-byte aligned.
- *
- * Special note on mpFIP and mpRIP:
- *     These flags are manipulated under various locks.  RIP is always set under an
- *     exclusive lock while FIP is shared.  The only worry is that there is a possibility that
- *     FIP could be attempted by more than 1 processor at a time.  Obviously, one will win.
- *     The other(s) bail all the way to user state and may refault (or not).  There are only
- *     a few things in mpFlags that are not static, mpFIP, mpRIP, mpRemovable, and mpBusy.
- *     
- *     We organize these so that mpFIP is in a byte with static data and mpRIP and mpRemovable
- *     is in another.  That means that we can use a store byte to update the guys without
- *     worrying about load and reserve. Note that mpFIP must be set atomically because it is
- *     under a share lock, but it may be clear with a simple store byte. So far as mpRIP
- *     goes, it is in the same byte as mpRemovable.  However, mpRemovable is set atomically
- *     but never cleared, and mpRIP will not ever be set until after mpRemovable. Note that
- *     mpRIP is never cleared either.
- *     
- */   
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
+#define MAPFLAGS 0x0000001F
+#define BMAP 0x00000001
+
 typedef struct mapping {
-       unsigned int            mpFlags;                /* 0x000 - Various flags, lock bit. These are static except for lock */
-#define        mpBusy                          0xFF000000      /*         Busy count */
-#define        mpPIndex                        0x00FF0000      /*         Index into physical table (in words) */
-#define        mpSpecial                       0x00008000      /*         Special mapping - processor specific. */
-#define        mpSpecialb                      16                      /*         Special mapping - processor specific. */
-#define        mpFIP                           0x00004000      /*         Fault in progress */
-#define        mpFIPb                          17                      /*         Fault in progress */
-#define        mpNest                          0x00001000      /*         Mapping describes nested pmap */
-#define        mpNestb                         19                      /*         Mapping describes nested pmap */
-#define mpPerm                         0x00000800      /*         Mapping is permanent */
-#define mpPermb                                20                      /*         Mapping is permanent */
-#define mpBlock                                0x00000400      /*         Mapping is a block map - used for V=F or I/O */
-#define mpBlockb                       21                      /*         Mapping is a block map - used for V=F or I/O */
-#define mpRIP                          0x00000080      /*         Remove in progress - DO NOT MOVE */
-#define mpRIPb                         24                      /*         Remove in progress */
-#define        mpRemovable                     0x00000040      /*         Mapping is removable - DO NOT MOVE */
-#define        mpRemovableb            25                      /*         Mapping is removable */
-#define mpRSVD1                                0x00002330      /*         Reserved for future use */
-#define mpLists                                0x0000001F      /*         Number of skip lists mapping is on, max of 27 */
-#define mpListsb                       27                      /*         Number of skip lists mapping is on, max of 27 */
+       struct mapping          *next;                  /* MUST BE FIRST - chain off physent */
+       struct mapping          *hashnext;              /* Next mapping in same hash group */
+       unsigned int            *PTEhash;               /* Pointer to the head of the mapping hash list */
+       unsigned int            *PTEent;                /* Pointer to PTE if exists */
+       struct phys_entry       *physent;               /* Quick pointer back to the physical entry */
+       unsigned int            PTEv;                   /* Virtual half of HW PTE */
+       unsigned int            PTEr;                   /* Real half of HW PTE. This is used ONLY if
+                                                                                  there is no physical entry associated
+                                                                                  with this mapping, ie.e, physent==0 */
+       struct pmap             *pmap;                  /* Quick pointer back to the containing pmap */
+} mapping;
+
+/* 
+ *     This control block maps odd size blocks of memory.  The mapping must
+ *     be V=F (Virtual = Fixed), i.e., virtually and physically contiguous
+ *     multiples of hardware size pages.
+ *
+ *     This control block overlays the mapping CB and is allocated from the
+ *     same pool.
+ *
+ *     It is expected that only a small number of these exist for each address
+ *     space and will typically be for I/O areas. It is further assumed that 
+ *     there is a minimum size (ODDBLKMIN) for these blocks.  If smaller, the
+ *     block will be split into N normal page mappings.
+ *
+ *     Binary tree for fast lookups. 
+ */
 
-       unsigned short          mpSpace;                /* 0x004 - Address space hash */
-       unsigned short          mpBSize;                /* 0x006 - Block size - 1 in pages - max block size 256MB */
-       unsigned int            mpPte;                  /* 0x008 - Offset to PTEG in hash table. Offset to exact PTE if mpHValid set - NOTE: this MUST be 0 for block mappings */
-#define mpHValid                       0x00000001      /* PTE is entered in hash table */
-#define mpHValidb                      31                      /* PTE is entered in hash table */
-       ppnum_t                         mpPAddr;                /* 0x00C - Physical page number */
-       addr64_t                        mpVAddr;                /* 0x010 - Starting virtual address */
-#define mpHWFlags                      0x0000000000000FFFULL   /* Reference/Change, WIMG, AC, N, protection flags from PTE */
-#define mpPP                           0x0000000000000007ULL   /* Protection flags */
-#define mpPPb                          61
-#define mpKKN                          0x0000000000000007ULL   /* Segment key and no execute flag (nested pmap) */
-#define mpKKNb                         61
-#define mpWIMG                         0x0000000000000078ULL   /* Attribute bits */
-#define mpWIMGb                                57
-#define mpW                                    0x0000000000000040ULL
-#define mpWb                           57
-#define mpI                                    0x0000000000000020ULL
-#define mpIb                           58
-#define mpM                                    0x0000000000000010ULL
-#define mpMb                           59
-#define mpG                                    0x0000000000000008ULL
-#define mpGb                           60
-#define mpWIMGe                                60
-#define mpC                                    0x0000000000000080ULL   /* Change bit */
-#define mpCb                           56
-#define mpR                                    0x0000000000000100ULL   /* Reference bit */
-#define mpRb                           55
-       addr64_t                        mpAlias;                /* 0x018 - Pointer to alias mappings of physical page */
-#define mpNestReloc                    mpAlias         /* 0x018 - Redefines mpAlias relocation value of vaddr to nested pmap value */
-#define mpBlkRemCur                    mpAlias         /* 0x018 - Next offset in block map to remove (this is 4 bytes) */
-       addr64_t                        mpList0;                /* 0x020 - Forward chain of mappings. This one is always used */
-       addr64_t                        mpList[3];              /* 0x028 - Forward chain of mappings. Next higher order */
-/*                                                                                0x040 - End of basic mapping */
-#define        mpBasicSize                     64
-#define        mpBasicLists            4
-/* note the dependence on kSkipListMaxLists, which must be <= #lists in a 256-byte mapping (ie, <=28) */
-/*     addr64_t                        mpList4[8];                0x040 - First extended list entries */
-/*                                                                                0x080 - End of first extended mapping */
-/*     addr64_t                        mpList12[8];       0x080 - Second extended list entries */
-/*                                                                                0x0C0 - End of second extended mapping */
-/*     addr64_t                        mpList20[8];       0x0C0 - Third extended list entries */
-/*                                                                                0x100 - End of third extended mapping */
 
-} mapping;
-#pragma pack()
+typedef struct blokmap {
+       struct blokmap          *next;                  /* Next block in list */
+       unsigned int            start;                  /* Start of block */
+       unsigned int            end;                    /* End of block */
+       unsigned int            PTEr;                   /* Real half of HW PTE at base address */
+       unsigned int            space;                  /* Cached VSID */
+       unsigned int            blkFlags;               /* Flags for this block */
+#define blkPerm        0x80000000
+#define blkRem         0x40000000
+#define blkPermbit     0
+#define blkRembit      1
+       unsigned int            current;                /* Partial block remove current start */
+       unsigned int            gas4;                   /* Reserved */
+} blokmap;
+
+#define ODDBLKMIN (8 * PAGE_SIZE)
+#define        BLKREMMAX 128
 
 #define MAPPING_NULL   ((struct mapping *) 0)
 
@@ -214,15 +99,16 @@ typedef struct mapping {
 #define mapRWRW   0x00000002
 #define mapRORO   0x00000003
 
-/* All counts are in units of basic 64-byte mappings.  A 128-byte mapping is
- * just two adjacent 64-byte entries.
- */
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
+
+typedef struct mfmapping {
+       struct pmap                     *pmap;
+       vm_offset_t                     offset;
+} mfmapping;
 
 typedef struct mappingflush {
-       addr64_t                        addr;                   /* Start address to search mapping */
-       unsigned int            spacenum;               /* Last space num to search pmap */
-       unsigned int            mapfgas[1];             /* Pad to 64 bytes */
+       PCA                             *pcaptr;
+       unsigned int            mappingcnt;
+       struct mfmapping        mapping[8];
 } mappingflush;
 
 typedef struct mappingctl {
@@ -237,103 +123,69 @@ typedef struct mappingctl {
        int                                     mapcholdoff;    /* Hold off clearing release list */
        unsigned int            mapcfreec;              /* Total calls to mapping free */
        unsigned int            mapcallocc;             /* Total calls to mapping alloc */
-    unsigned int               mapcbig;                /* Count times a big mapping was requested of mapping_alloc */
-    unsigned int               mapcbigfails;   /* Times caller asked for a big one but we gave 'em a small one */
        unsigned int            mapcmin;                /* Minimum free mappings to keep */
        unsigned int            mapcmaxalloc;   /* Maximum number of mappings allocated at one time */
-       unsigned int            mapcgas[1];             /* Pad to 64 bytes */
        struct mappingflush     mapcflush;
+       unsigned int            mapcgas[1];             /* Pad to 64 bytes */
 } mappingctl;
-#pragma pack()
 
-/* MAPPERBLOK is the number of basic 64-byte mappings per block (ie, per page.) */
-#define MAPPERBLOK 63
+#define MAPPERBLOK 127
 #define MAPALTHRSH (4*MAPPERBLOK)
 #define MAPFRTHRSH (2 * ((MAPALTHRSH + MAPPERBLOK - 1) / MAPPERBLOK))
 typedef struct mappingblok {
-       unsigned int            mapblokfree[2]; /* Bit map of free mapping entrys */
-       addr64_t                        mapblokvrswap;  /* Virtual address XORed with physical address */
+       unsigned int            mapblokfree[4]; /* Bit map of free mapping entrys */
+       unsigned int            mapblokvrswap;  /* Virtual address XORed with physical address */
        unsigned int            mapblokflags;   /* Various flags */
 #define mbPerm 0x80000000                              /* Block is permanent */
        struct mappingblok      *nextblok;              /* Pointer to the next mapping block */
 } mappingblok;
 
-#define mapRemChunk 128
-
-#define mapRetCode     0xF
-#define mapRtOK                0
-#define mapRtBadLk     1
-#define mapRtPerm      2
-#define mapRtNotFnd    3
-#define mapRtBlock     4
-#define mapRtNest      5
-#define mapRtRemove    6
-#define mapRtMapDup    7
-
 extern mappingctl      mapCtl;                         /* Mapping allocation control */
 
-extern addr64_t        mapping_remove(pmap_t pmap, addr64_t va);       /* Remove a single mapping for this VADDR */
-extern mapping                 *mapping_find(struct pmap *pmap, addr64_t va, addr64_t *nextva, int full);      /* Finds a mapping */
+extern void            mapping_phys_init(struct phys_entry *pp, unsigned int pa, unsigned int wimg);   /* Initializes hw specific storage attributes */
+extern boolean_t       mapping_remove(pmap_t pmap, vm_offset_t va);    /* Remove a single mapping for this VADDR */
 extern void            mapping_free_init(vm_offset_t mbl, int perm, boolean_t locked); /* Sets start and end of a block of mappings */
 extern void            mapping_adjust(void);                                           /* Adjust free mapping count */
 extern void            mapping_free_prime(void);                                       /* Primes the mapping block release list */
 extern void            mapping_prealloc(unsigned int);                         /* Preallocate mappings for large use */
 extern void            mapping_relpre(void);                                           /* Releases preallocate request */
 extern void            mapping_init(void);                                                     /* Do initial stuff */
-extern mapping            *mapping_alloc(int lists);                                   /* Obtain a mapping */
+extern void            mapping_flush(void);
+extern mapping                 *mapping_alloc(void);                                           /* Obtain a mapping */
 extern void            mapping_free(struct mapping *mp);                       /* Release a mapping */
-extern boolean_t       mapping_tst_ref(ppnum_t pa);                            /* Tests the reference bit of a physical page */
-extern boolean_t       mapping_tst_mod(ppnum_t pa);                            /* Tests the change bit of a physical page */
-extern void            mapping_set_ref(ppnum_t pa);                            /* Sets the reference bit of a physical page */
-extern void            mapping_clr_ref(ppnum_t pa);                            /* Clears the reference bit of a physical page */
-extern void            mapping_set_mod(ppnum_t pa);                            /* Sets the change bit of a physical page */
-extern void            mapping_clr_mod(ppnum_t pa);                            /* Clears the change bit of a physical page */
-extern void            mapping_protect_phys(ppnum_t pa, vm_prot_t prot);       /* Change protection of all mappings to page */
-extern int                     mapping_protect(pmap_t pmap, addr64_t va, vm_prot_t prot, addr64_t *nextva);    /* Change protection of a single mapping to page */
-extern addr64_t                mapping_make(pmap_t pmap, addr64_t va, ppnum_t pa, unsigned int flags, unsigned int size, vm_prot_t prot); /* Make a mapping */
-/* Flags for mapping_make */
-#define mmFlgBlock             0x80000000      /* This is a block map, use size for number of pages covered */
-#define mmFlgUseAttr   0x40000000      /* Use specified attributes */
-#define mmFlgPerm              0x20000000      /* Mapping is permanant */
-#define mmFlgCInhib            0x00000002      /* Cahching inhibited - use if mapFlgUseAttr set or block */
-#define mmFlgGuarded   0x00000001      /* Access guarded - use if mapFlgUseAttr set or block */
-extern void            mapping_purge(ppnum_t pa);              /* Remove all mappings for this physent */
-extern addr64_t                mapping_p2v(pmap_t pmap, ppnum_t pa);   /* Finds first virtual mapping of a physical page in a space */
-extern void                    mapping_drop_busy(struct mapping *mapping);     /* Drops busy count on mapping */
-extern phys_entry  *mapping_phys_lookup(ppnum_t pp, unsigned int *pindex);     /* Finds the physical entry for the page */
-extern int                     mapalc1(struct mappingblok *mb);                        /* Finds and allcates a 1-bit mapping entry */
-extern int                     mapalc2(struct mappingblok *mb);                        /* Finds and allcates a 2-bit mapping entry */
+extern boolean_t       mapping_tst_ref(struct phys_entry *pp);         /* Tests the reference bit of a physical page */
+extern boolean_t       mapping_tst_mod(struct phys_entry *pp);         /* Tests the change bit of a physical page */
+extern void            mapping_set_ref(struct phys_entry *pp);         /* Sets the reference bit of a physical page */
+extern void            mapping_clr_ref(struct phys_entry *pp);         /* Clears the reference bit of a physical page */
+extern void            mapping_set_mod(struct phys_entry *pp);         /* Sets the change bit of a physical page */
+extern void            mapping_clr_mod(struct phys_entry *pp);         /* Clears the change bit of a physical page */
+extern void            mapping_invall(struct phys_entry *pp);          /* Clear all PTEs pointing to a physical page */
+extern void            mapping_protect_phys(struct phys_entry *pp, vm_prot_t prot, boolean_t locked);  /* Change protection of all mappings to page */
+extern void            mapping_protect(pmap_t pmap, vm_offset_t vaddr, vm_prot_t prot);        /* Change protection of a single mapping to page */
+extern mapping                 *mapping_make(pmap_t pmap, struct phys_entry *pp, vm_offset_t va, vm_offset_t pa, vm_prot_t prot, int attr, boolean_t locked);  /* Make an address mapping */
+extern void            mapping_purge(struct phys_entry *pp);           /* Remove all mappings for this physent */
+extern void            mapping_purge_pmap(struct phys_entry *pp, pmap_t pmap); /* Remove physent mappings for this pmap */
+extern vm_offset_t     mapping_p2v(pmap_t pmap, struct phys_entry *pp);        /* Finds first virtual mapping of a physical page in a space */
+extern void            mapping_phys_attr(struct phys_entry *pp, vm_prot_t prot, unsigned int wimg);    /* Sets the default physical page attributes */
+extern void            mapping_block_map_opt(pmap_t pmap, vm_offset_t va, vm_offset_t pa, vm_offset_t bnd, vm_size_t size, vm_prot_t prot, int attr);  /* Map a block optimally */
+extern int                     mapalc(struct mappingblok *mb);                         /* Finds and allcates a mapping entry */
 extern void                    ignore_zero_fault(boolean_t type);                      /* Sets up to ignore or honor any fault on page 0 access for the current thread */
 
 
-extern mapping                 *hw_rem_map(struct pmap *pmap, addr64_t va, addr64_t *next);    /* Remove a mapping from the system */
-extern mapping                 *hw_purge_map(struct pmap *pmap, addr64_t va, addr64_t *next);  /* Remove a regular mapping from the system */
-extern mapping                 *hw_purge_space(struct phys_entry *pp, struct pmap *pmap);      /* Remove the first mapping for a specific pmap from physentry */
-extern mapping                 *hw_purge_phys(struct phys_entry *pp);          /* Remove the first mapping for a physentry */
-extern mapping                 *hw_find_map(struct pmap *pmap, addr64_t va, addr64_t *nextva); /* Finds a mapping */
-extern addr64_t                hw_add_map(struct pmap *pmap, struct mapping *mp);      /* Add a mapping to a pmap */
-extern int                     hw_protect(pmap_t pmap, addr64_t va, vm_prot_t prot, addr64_t *nextva); /* Change the protection of a virtual page */
-extern unsigned int    hw_test_rc(pmap_t pmap, addr64_t va, boolean_t reset);  /* Test and optionally reset the RC bit of specific mapping */
-
-extern unsigned int    hw_phys_walk(struct phys_entry *pp, unsigned int preop, unsigned int op, /* Perform function on all mappings on a physical page */
-       unsigned int postop, unsigned int parm);        
-#define hwpNoop                0       /* No operation */
-#define hwpSPrtPhy     1       /* Sets protection in physent  */
-#define hwpSPrtMap     2       /* Sets protection in mapping  */
-#define hwpSAtrPhy     3       /* Sets attributes in physent  */
-#define hwpSAtrMap     4       /* Sets attributes in mapping  */
-#define hwpCRefPhy     5       /* Clears reference in physent  */
-#define hwpCRefMap     6       /* Clears reference in mapping  */
-#define hwpCCngPhy     7       /* Clears change in physent  */
-#define hwpCCngMap     8       /* Clears change in mapping  */
-#define hwpSRefPhy     9       /* Sets reference in physent  */
-#define hwpSRefMap     10      /* Sets reference in mapping  */
-#define hwpSCngPhy     11      /* Sets change in physent  */
-#define hwpSCngMap     12      /* Sets change in mapping  */
-#define hwpTRefPhy     13      /* Tests reference in physent  */
-#define hwpTRefMap     14      /* Tests reference in mapping  */
-#define hwpTCngPhy     15      /* Tests change in physent  */
-#define hwpTCngMap     16      /* Tests change in mapping  */
+extern mapping                 *hw_lock_phys_vir(space_t space, vm_offset_t va);       /* Finds and locks a physical entry by vaddr */
+extern mapping                 *hw_cpv(struct mapping *mapping);                       /* Converts a physical mapping control block address to virtual */
+extern mapping                 *hw_cvp(struct mapping *mapping);                       /* Converts a virtual mapping control block address to physical */
+extern void            hw_rem_map(struct mapping *mapping);            /* Remove a mapping from the system */
+extern void                    hw_add_map(struct mapping *mp, space_t space, vm_offset_t va);  /* Add a mapping to the PTEG hash list */
+extern void                    hw_select_mappings(struct mappingflush *mappingflush); /* Select user mappings in a PTEG */
+extern blokmap                 *hw_rem_blk(pmap_t pmap, vm_offset_t sva, vm_offset_t eva);     /* Remove a block that falls within a range */
+extern vm_offset_t     hw_cvp_blk(pmap_t pmap, vm_offset_t va);        /* Convert mapped block virtual to physical */
+extern blokmap                 *hw_add_blk(pmap_t pmap, struct blokmap *bmr);  /* Add a block to the pmap */
+extern void            hw_prot(struct phys_entry *pp, vm_prot_t prot); /* Change the protection of a physical page */
+extern void            hw_prot_virt(struct mapping *mp, vm_prot_t prot);       /* Change the protection of a virtual page */
+extern void            hw_attr_virt(struct mapping *mp, unsigned int wimg);    /* Change the attributes of a virtual page */
+extern void            hw_phys_attr(struct phys_entry *pp, vm_prot_t prot, unsigned int wimg); /* Sets the default physical page attributes */
+extern unsigned int    hw_test_rc(struct mapping *mp, boolean_t reset);        /* Test and optionally reset the RC bit of specific mapping */
 
 extern boolean_t       hw_tst_mod(struct phys_entry *pp);                      /* Tests change bit */
 extern void            hw_set_mod(struct phys_entry *pp);                      /* Set change bit */
@@ -343,17 +195,15 @@ extern boolean_t  hw_tst_ref(struct phys_entry *pp);                      /* Tests reference bit */
 extern void            hw_set_ref(struct phys_entry *pp);                      /* Set reference bit */
 extern void            hw_clr_ref(struct phys_entry *pp);                      /* Clear reference bit */
 
+extern void            hw_inv_all(struct phys_entry *pp);                      /* Invalidate all PTEs associated with page */
 extern void            hw_set_user_space(pmap_t pmap);                         /* Indicate we need a space switch */
 extern void            hw_set_user_space_dis(pmap_t pmap);                     /* Indicate we need a space switch (already disabled) */
-extern void            hw_setup_trans(void);                                           /* Setup hardware for translation */
-extern void            hw_start_trans(void);                                           /* Start translation for the first time */
-extern void            hw_map_seg(pmap_t pmap, addr64_t seg, addr64_t va);             /* Validate a segment */
-extern void            hw_blow_seg(addr64_t seg);                                      /* Invalidate a segment */
-extern void            invalidateSegs(pmap_t pmap);                            /* Invalidate the segment cache */
-extern struct phys_entry *pmap_find_physentry(ppnum_t pa);
-extern void                    mapLog(unsigned int laddr, unsigned int type, addr64_t va);
-extern unsigned int    mapSkipListVerifyC(struct pmap *pmap, unsigned long long *dumpa);
-extern void                    fillPage(ppnum_t pa, unsigned int fill);
+kern_return_t          copyp2v(vm_offset_t source, vm_offset_t sink, unsigned int size);       /* Copy a physical page to a virtual address */
+extern void                    *LRA(space_t space, void *vaddr);                       /* Translate virtual to real using only HW tables */
+extern void            dumpaddr(space_t space, vm_offset_t va);
+extern void                    dumpmapping(struct mapping *mp);                        /* Print contents of a mapping */
+extern void                    dumppca(struct mapping *mp);                            /* Print contents of a PCA */
+extern void                    dumpphys(struct phys_entry *pp);                        /* Prints stuff starting at phys */
 
 extern unsigned int    mappingdeb0;                                                            /* (TEST/DEBUG) */
 extern unsigned int    incrVSID;                                                                       /* VSID increment value */
diff --git a/osfmk/ppc/mem.c b/osfmk/ppc/mem.c
new file mode 100644 (file)
index 0000000..5d2a932
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*
+ * @OSF_COPYRIGHT@
+ */
+
+/* A marvelous selection of support routines for virtual memory */
+
+#include <cpus.h>
+#include <debug.h>
+#include <mach_kdb.h>
+#include <mach_vm_debug.h>
+
+#include <kern/cpu_number.h>
+#include <kern/misc_protos.h>
+#include <kern/assert.h>
+#include <ppc/misc_protos.h>
+#include <ppc/mem.h>
+#include <ppc/pmap_internals.h>                /* For pmap_pteg_overflow */
+
+/* These refer to physical addresses and are set and referenced elsewhere */
+
+unsigned int hash_table_base;
+unsigned int hash_table_size;
+
+unsigned int hash_function_mask;
+
+struct shadowBAT shadow_BAT;
+
+/* gather statistics about hash table usage */
+
+#if    DEBUG
+#define MEM_STATS 1
+#else
+#define MEM_STATS 0
+#endif /* DEBUG */
+
+#if MEM_STATS
+/* hash table usage information */
+struct hash_table_stats {
+       int find_pte_in_pteg_calls;
+       int find_pte_in_pteg_not_found;
+       int find_pte_in_pteg_location[8];
+       struct find_or_alloc_calls {
+               int found_primary;
+               int found_secondary;
+               int alloc_primary;
+               int alloc_secondary;
+               int overflow;
+               int not_found;
+       } find_or_alloc_calls[2];
+       
+} hash_table_stats[NCPUS];
+
+#define INC_STAT(LOC) \
+       hash_table_stats[cpu_number()].find_pte_in_pteg_location[LOC]++
+
+#else  /* MEM_STATS */
+#define INC_STAT(LOC)
+#endif /* MEM_STATS */
+
+/* Set up the machine registers for the given hash table.
+ * The table has already been zeroed.
+ */
+void hash_table_init(unsigned int base, unsigned int size)
+{
+       sync();                                 /* SYNC: it's not just the law, it's a good idea... */
+       mtsdr1(hash_table_base | ((size-1)>>16));       /* Slam the SDR1 with the has table address */
+       sync();                                 /* SYNC: it's not just the law, it's a good idea... */
+       isync();
+}
+
index a88c27ae4e66f0a8b3f8ad474756fcd2ca15b9b2..ef9169ac8624dd4bb305db14569d5f4a737c0886 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 
 #include <ppc/proc_reg.h>
 #include <ppc/pmap.h>
+#include <ppc/pmap_internals.h>
 #include <mach/vm_types.h>
 
-extern addr64_t hash_table_base;
+extern vm_offset_t hash_table_base;
 extern unsigned int hash_table_size;
 
 void hash_table_init(vm_offset_t base, vm_offset_t size);
 
 #define MAX_BAT                4
 
-#pragma pack(1)                                                        /* Make sure the structure stays as we defined it */
 typedef struct ppcBAT {
        unsigned int    upper;  /* Upper half of BAT */
        unsigned int    lower;  /* Lower half of BAT */
 } ppcBAT;
-#pragma pack()
 
-#pragma pack(1)                                                        /* Make sure the structure stays as we defined it */
 struct shadowBAT {
        ppcBAT  IBATs[MAX_BAT]; /* Instruction BATs */
        ppcBAT  DBATs[MAX_BAT]; /* Data BAT */
 };
-#pragma pack()
 
 extern struct shadowBAT shadow_BAT;     
 
index 74e307f5425b0c31c74f5b8592a8205f86fb15bb..5ed36d0e77864839abcd5cfe855b59fc73322bdd 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3d6c1974a86da29ba18128d9bee0f40ae6c6def0..f4668f2ef3ad900ca8f6a9232eda9b6f9698ab90 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -50,13 +47,13 @@ ENTRY(getrpc, TAG_NO_FRAME_USED)
 
 /* Mask and unmask interrupts at the processor level */        
 ENTRY(interrupt_disable, TAG_NO_FRAME_USED)
-                       lis             r8,hi16(MASK(MSR_VEC))                  ; Get the vector flag
-                       mfmsr   r0                                                              ; Save the MSR 
-                       ori             r8,r8,lo16(MASK(MSR_EE)|MASK(MSR_FP))   ; Add the FP flag
-                       andc    r0,r0,r8                                                ; Clear VEC, FP, DR, and EE
-                       mtmsr   r0
-                       isync
-                       blr
+       mfmsr   r0
+       rlwinm  r0,r0,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+       rlwinm  r0,r0,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+       rlwinm  r0,     r0,     0,      MSR_EE_BIT+1,   MSR_EE_BIT-1
+       mtmsr   r0
+       isync
+       blr
 
 ENTRY(interrupt_enable, TAG_NO_FRAME_USED)
 
@@ -73,13 +70,13 @@ ENTRY(interrupt_enable, TAG_NO_FRAME_USED)
 
 /* Mask and unmask interrupts at the processor level */        
 ENTRY(db_interrupt_disable, TAG_NO_FRAME_USED)
-                       lis             r8,hi16(MASK(MSR_VEC))                  ; Get the vector flag
-                       mfmsr   r0                                                              ; Save the MSR 
-                       ori             r8,r8,lo16(MASK(MSR_EE)|MASK(MSR_FP))   ; Add the FP flag
-                       andc    r0,r0,r8                                                ; Clear VEC, FP, DR, and EE
-                       mtmsr   r0
-                       isync
-                       blr
+       mfmsr   r0
+       rlwinm  r0,r0,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+       rlwinm  r0,r0,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+       rlwinm  r0,     r0,     0,      MSR_EE_BIT+1,   MSR_EE_BIT-1
+       mtmsr   r0
+       isync
+       blr
 
 ENTRY(db_interrupt_enable, TAG_NO_FRAME_USED)
        mfmsr   r0
@@ -95,12 +92,11 @@ ENTRY(db_interrupt_enable, TAG_NO_FRAME_USED)
  
 ENTRY(Call_Debugger, TAG_NO_FRAME_USED)
 
-
-                       lis             r8,hi16(MASK(MSR_VEC))                  ; Get the vector flag
                        mfmsr   r7                              ; Get the current MSR
-                       ori             r8,r8,lo16(MASK(MSR_EE)|MASK(MSR_FP))   ; Add the FP flag
+                       rlwinm  r7,r7,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r7,r7,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
                        mflr    r0                              ; Save the return
-                       andc    r7,r7,r8                                                ; Clear VEC and FP
+                       rlwinm  r7,r7,0,MSR_EE_BIT+1,MSR_EE_BIT-1       ; Turn off interruptions
                        mtmsr   r7                              ; Do it 
                        isync
                        mfsprg  r8,0                    ; Get the per_proc block
@@ -123,11 +119,9 @@ cdNewDeb:  li              r0,0                    ; Clear this out
                        
                        bl              EXT(Call_DebuggerC)     ; Call the "C" phase of this
                
-                       lis             r8,hi16(MASK(MSR_VEC))                  ; Get the vector flag
-                       mfmsr   r0                              ; Get the current MSR
-                       ori             r8,r8,lo16(MASK(MSR_EE)|MASK(MSR_FP))   ; Add the FP flag
+                       mfmsr   r0                              ; Get the MSR just in case it was enabled
                        addi    r1,r1,FM_SIZE   ; Pop off first stack frame
-                       andc    r0,r0,r8                ; Turn off all the interesting stuff
+                       rlwinm  r0,r0,0,MSR_EE_BIT+1,MSR_EE_BIT-1       ; Turn off interruptions enable bit
                        mtmsr   r0
                
                        mfsprg  r8,0                    ; Get the per_proc block address
@@ -195,10 +189,6 @@ ENTRY(mtdec, TAG_NO_FRAME_USED)
        mtdec   ARG0
        blr
 
-ENTRY(cntlzw, TAG_NO_FRAME_USED)
-       cntlzw  r3,r3
-       blr
-
 /* Decrementer frequency and realtime|timebase processor registers
  * are different between ppc601 and ppc603/4, we define them all.
  */
@@ -298,11 +288,3 @@ ENTRY(mfsda, TAG_NO_FRAME_USED)
        mfspr   r3,sda
        blr
 
-       .globl  EXT(hid0get64)
-       
-LEXT(hid0get64)
-
-       mfspr   r4,hid0                                 ; Get the HID0
-       srdi    r3,r4,32                                ; Move top down
-       rlwinm  r4,r4,0,0,31                    ; Clean top
-       blr
index e32760863d7a67e3a06e61dfce9201652cc0f17f..2b22949dc8394ac6a98fa38d2ddf98e45be0e693 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -52,10 +49,9 @@ extern char *strcpy(char *dest, const char *src);
 extern void vprintf(const char *fmt, va_list args);
 extern void printf(const char *fmt, ...);
 
-extern void    bzero_nc(char* buf, int size); /* uncached-safe */
 extern void bcopy_nc(char *from, char *to, int size); /* uncached-safe */
-extern void bcopy_phys(addr64_t from, addr64_t to, int size); /* Physical to physical copy (ints must be disabled) */
-extern void bcopy_physvir(addr64_t from, addr64_t to, int size); /* Physical to physical copy virtually (ints must be disabled) */
+extern void bcopy_phys(char *from, char *to, int size); /* Physical to physical copy (ints must be disabled) */
+extern void bcopy_physvir(char *from, char *to, int size); /* Physical to physical copy virtually (ints must be disabled) */
 
 extern void ppc_init(boot_args *args);
 extern struct savearea *enterDebugger(unsigned int trap,
@@ -63,10 +59,7 @@ extern struct savearea *enterDebugger(unsigned int trap,
                                      unsigned int dsisr);
 
 extern void draw_panic_dialog(void);
-extern void ppc_vm_init(uint64_t mem_size, boot_args *args);
-
-extern int ppcNull(struct savearea *);
-extern int ppcNullinst(struct savearea *);
+extern void ppc_vm_init(unsigned int mem_size, boot_args *args);
 
 extern void autoconf(void);
 extern void machine_init(void);
@@ -79,14 +72,13 @@ extern void interrupt_init(void);
 extern void interrupt_enable(void);
 extern void interrupt_disable(void);
 extern void disable_bluebox_internal(thread_act_t act);
-extern uint64_t hid0get64(void);
 #if    MACH_KDB
 extern void db_interrupt_enable(void);
 extern void db_interrupt_disable(void);
 #endif /* MACH_KDB */
 
 extern void phys_zero(vm_offset_t, vm_size_t);
-extern void phys_copy(addr64_t, addr64_t, vm_size_t);
+extern void phys_copy(vm_offset_t, vm_offset_t, vm_size_t);
 
 extern void Load_context(thread_t th);
 
@@ -99,8 +91,6 @@ extern void vec_save(struct facility_context *);
 extern void toss_live_fpu(struct facility_context *);
 extern void toss_live_vec(struct facility_context *);
 
-extern void condStop(unsigned int, unsigned int);
-
 extern int nsec_to_processor_clock_ticks(int nsec);
 
 extern void tick_delay(int ticks);
index 6d1ae0b7a8151ae26591be64e2f45b9d55db2560..05eb00f1f6620761d27c25a9041ed17f87674a1f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -86,7 +83,6 @@
 #include <ppc/FirmwareCalls.h>
 #include <ppc/setjmp.h>
 #include <ppc/exception.h>
-#include <ppc/hw_perfmon.h>
 
 #include <kern/clock.h>
 #include <kern/debug.h>
@@ -186,7 +182,6 @@ char *failNames[] = {
        "No saveareas",                         /* failNoSavearea */
        "Savearea corruption",          /* failSaveareaCorr */
        "Invalid live context",         /* failBadLiveContext */
-       "Unaligned stack",                      /* failUnalignedStk */
        "Unknown failure code"          /* Unknown failure code - must always be last */
 };
 
@@ -194,6 +189,7 @@ char *invxcption = "Unknown code";
 
 extern const char version[];
 extern char *trap_type[];
+extern vm_offset_t mem_actual;
 
 #if !MACH_KDB
 void kdb_trap(int type, struct savearea *regs);
@@ -303,14 +299,13 @@ machine_conf(void)
 {
        machine_info.max_cpus = NCPUS;
        machine_info.avail_cpus = 1;
-       machine_info.memory_size = mem_size;    /* Note that this will be 2 GB for >= 2 GB machines */
+       machine_info.memory_size = mem_size;
 }
 
 void
 machine_init(void)
 {
        clock_config();
-       perfmon_init();
 }
 
 void slave_machine_init(void)
@@ -365,7 +360,6 @@ print_backtrace(struct savearea *ssp)
        thread_act_t *act;
        savearea *sv, *svssp;
        int cpu;
-       savearea *psv;
 
 /*
  *     We need this lock to make sure we don't hang up when we double panic on an MP.
@@ -383,7 +377,7 @@ print_backtrace(struct savearea *ssp)
        if(current_thread()) sv = (savearea *)current_act()->mact.pcb;  /* Find most current savearea if system has started */
 
        fence = 0xFFFFFFFF;                                             /* Show we go all the way */
-       if(sv) fence = (unsigned int)sv->save_r1;       /* Stop at previous exception point */
+       if(sv) fence = sv->save_r1;                             /* Stop at previous exception point */
        
        if(!svssp) {                                                    /* Should we start from stack? */
                kdb_printf("Latest stack backtrace for cpu %d:\n", cpu_number());
@@ -398,9 +392,8 @@ print_backtrace(struct savearea *ssp)
        else {                                                                  /* Were we passed an exception? */
                fence = 0xFFFFFFFF;                                     /* Show we go all the way */
                if(svssp->save_hdr.save_prev) {
-                       if((svssp->save_hdr.save_prev <= vm_last_addr) && ((unsigned int)pmap_find_phys(kernel_pmap, (addr64_t)svssp->save_hdr.save_prev))) {   /* Valid address? */    
-                               psv = (savearea *)((unsigned int)svssp->save_hdr.save_prev);    /* Get the 64-bit back chain converted to a regualr pointer */
-                               fence = (unsigned int)psv->save_r1;     /* Stop at previous exception point */
+                       if((svssp->save_hdr.save_prev <= VM_MAX_KERNEL_ADDRESS) && ((unsigned int)LRA(PPC_SID_KERNEL, (void *)svssp->save_hdr.save_prev))) {    /* Valid address? */    
+                               fence = svssp->save_hdr.save_prev->save_r1;     /* Stop at previous exception point */
                        }
                }
        
@@ -418,7 +411,7 @@ print_backtrace(struct savearea *ssp)
        kdb_printf("Proceeding back via exception chain:\n");
 
        while(sv) {                                                             /* Do them all... */
-               if(!((sv <= vm_last_addr) && (unsigned int)pmap_find_phys(kernel_pmap, (addr64_t)sv))) {        /* Valid address? */    
+               if(!((sv <= VM_MAX_KERNEL_ADDRESS) && (unsigned int)LRA(PPC_SID_KERNEL, (void *)sv))) { /* Valid address? */    
                        kdb_printf("   Exception state (sv=0x%08X) Not mapped or invalid. stopping...\n", sv);
                        break;
                }
@@ -430,15 +423,14 @@ print_backtrace(struct savearea *ssp)
                else {
                        fence = 0xFFFFFFFF;                             /* Show we go all the way */
                        if(sv->save_hdr.save_prev) {
-                               if((sv->save_hdr.save_prev <= vm_last_addr) && ((unsigned int)pmap_find_phys(kernel_pmap, (addr64_t)sv->save_hdr.save_prev))) { /* Valid address? */    
-                                       psv = (savearea *)((unsigned int)sv->save_hdr.save_prev);       /* Get the 64-bit back chain converted to a regualr pointer */
-                                       fence = (unsigned int)psv->save_r1;     /* Stop at previous exception point */
+                               if((sv->save_hdr.save_prev <= VM_MAX_KERNEL_ADDRESS) && ((unsigned int)LRA(PPC_SID_KERNEL, (void *)sv->save_hdr.save_prev))) {  /* Valid address? */    
+                                       fence = sv->save_hdr.save_prev->save_r1;        /* Stop at previous exception point */
                                }
                        }
                        dump_savearea(sv, fence);               /* Dump this savearea */        
                }       
                
-               sv = (savearea *)sv->save_hdr.save_prev;        /* Back chain */
+               sv = sv->save_hdr.save_prev;            /* Back chain */
        }
        
        kdb_printf("\nKernel version:\n%s\n",version);  /* Print kernel version */
@@ -460,11 +452,11 @@ void dump_savearea(savearea *sv, unsigned int fence) {
        else xcode = trap_type[sv->save_exception / 4];         /* Point to the type */
        
        kdb_printf("      PC=0x%08X; MSR=0x%08X; DAR=0x%08X; DSISR=0x%08X; LR=0x%08X; R1=0x%08X; XCP=0x%08X (%s)\n",
-               (unsigned int)sv->save_srr0, (unsigned int)sv->save_srr1, (unsigned int)sv->save_dar, sv->save_dsisr,
-               (unsigned int)sv->save_lr, (unsigned int)sv->save_r1, sv->save_exception, xcode);
+               sv->save_srr0, sv->save_srr1, sv->save_dar, sv->save_dsisr,
+               sv->save_lr, sv->save_r1, sv->save_exception, xcode);
        
        if(!(sv->save_srr1 & MASK(MSR_PR))) {           /* Are we in the kernel? */
-               dump_backtrace((unsigned int)sv->save_r1, fence);       /* Dump the stack back trace from  here if not user state */
+               dump_backtrace(sv->save_r1, fence);             /* Dump the stack back trace from  here if not user state */
        }
        
        return;
@@ -486,23 +478,23 @@ void dump_backtrace(unsigned int stackptr, unsigned int fence) {
        
                if(!stackptr || (stackptr == fence)) break;             /* Hit stop point or end... */
                
-               if(stackptr & 0x0000000F) {                             /* Is stack pointer valid? */
+               if(stackptr & 0x0000000f) {                             /* Is stack pointer valid? */
                        kdb_printf("\n         backtrace terminated - unaligned frame address: 0x%08X\n", stackptr);    /* No, tell 'em */
                        break;
                }
 
-               raddr = (unsigned int)pmap_find_phys(kernel_pmap, (addr64_t)stackptr);  /* Get physical frame address */
-               if(!raddr || (stackptr > vm_last_addr)) {               /* Is it mapped? */
+               raddr = (unsigned int)LRA(PPC_SID_KERNEL, (void *)stackptr);    /* Get physical frame address */
+               if(!raddr || (stackptr > VM_MAX_KERNEL_ADDRESS)) {              /* Is it mapped? */
                        kdb_printf("\n         backtrace terminated - frame not mapped or invalid: 0x%08X\n", stackptr);        /* No, tell 'em */
                        break;
                }
        
-               if(!mapping_phys_lookup(raddr, &dumbo)) {       /* Is it within physical RAM? */
+               if(raddr >= mem_actual) {                                       /* Is it within physical RAM? */
                        kdb_printf("\n         backtrace terminated - frame outside of RAM: v=0x%08X, p=%08X\n", stackptr, raddr);      /* No, tell 'em */
                        break;
                }
        
-               ReadReal((addr64_t)((raddr << 12) | (stackptr & 4095)), &sframe[0]);    /* Fetch the stack frame */
+               ReadReal(raddr, &sframe[0]);                            /* Fetch the stack frame */
 
                bframes[i] = sframe[LRindex];                           /* Save the link register */
                
@@ -624,11 +616,11 @@ void SysChoked(int type, savearea *sv) {                  /* The system is bad dead */
        disableDebugOuput = FALSE;
        debug_mode = TRUE;
 
-       failcode = (unsigned int)sv->save_r3;                   /* Get the failure code */
+       failcode = sv->save_r3;                                                 /* Get the failure code */
        if(failcode > failUnknown) failcode = failUnknown;      /* Set unknown code code */
        
-       kprintf("System Failure: cpu=%d; code=%08X (%s)\n", cpu_number(), (unsigned int)sv->save_r3, failNames[failcode]);
-       kdb_printf("System Failure: cpu=%d; code=%08X (%s)\n", cpu_number(), (unsigned int)sv->save_r3, failNames[failcode]);
+       kprintf("System Failure: cpu=%d; code=%08X (%s)\n", cpu_number(), sv->save_r3, failNames[failcode]);
+       kdb_printf("System Failure: cpu=%d; code=%08X (%s)\n", cpu_number(), sv->save_r3, failNames[failcode]);
 
        print_backtrace(sv);                                                    /* Attempt to print backtrace */
        Call_DebuggerC(type, sv);                                               /* Attempt to get into debugger */
@@ -649,8 +641,7 @@ int Call_DebuggerC(
         struct savearea *saved_state)
 {
        int                             directcall, wait;
-       addr64_t                instr_ptr;
-       ppnum_t                 instr_pp;
+       vm_offset_t             instr_ptr;
        unsigned int    instr;
        int                     my_cpu, tcpu;
 
@@ -682,16 +673,13 @@ int Call_DebuggerC(
                   my_cpu, debugger_is_slave[my_cpu], debugger_cpu, saved_state->save_srr0);
        }
        
-       instr_pp = (vm_offset_t)pmap_find_phys(kernel_pmap, (addr64_t)(saved_state->save_srr0));
-
-       if (instr_pp) {
-               instr_ptr = (addr64_t)(((addr64_t)instr_pp << 12) | (saved_state->save_srr0 & 0xFFF));  /* Make physical address */
-               instr = ml_phys_read_64(instr_ptr);                             /* Get the trap that caused entry */
+       if (instr_ptr = (vm_offset_t)LRA(PPC_SID_KERNEL, (void *)(saved_state->save_srr0))) {
+               instr = ml_phys_read(instr_ptr);                                /* Get the trap that caused entry */
        } 
        else instr = 0;
 
 #if 0
-       if (debugger_debug) kprintf("Call_DebuggerC(%d): instr_pp = %08X, instr_ptr = %016llX, instr = %08X\n", my_cpu, instr_pp, instr_ptr, instr);    /* (TEST/DEBUG) */
+       if (debugger_debug) kprintf("Call_DebuggerC(%d): instr_ptr = %08X, instr = %08X\n", my_cpu, instr_ptr, instr);  /* (TEST/DEBUG) */
 #endif
 
        if (db_breakpoints_inserted) cpus_holding_bkpts++;      /* Bump up the holding count */
index 6dee8f87a92038b65c8f502516cbcc078b86a4f8..cb3188f3396743e0f93186d64875fa4820bdfbb8 100644 (file)
@@ -1,24 +1,21 @@
 /*
- * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #include <assym.s>
 #include <sys/errno.h>
 
-#define INSTRUMENT 0
-
-//<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
 /*
  * void pmap_zero_page(vm_offset_t pa)
  *
- * Zero a page of physical memory.  This routine runs in 32 or 64-bit mode,
- * and handles 32 and 128-byte cache lines.
+ * zero a page of physical memory.
  */
 
+#if DEBUG
+       /* C debug stub in pmap.c calls this */
+ENTRY(pmap_zero_page_assembler, TAG_NO_FRAME_USED)
+#else
+ENTRY(pmap_zero_page, TAG_NO_FRAME_USED)
+#endif /* DEBUG */
+
+               mfmsr   r6                                                              /* Get the MSR */
+               rlwinm  r6,r6,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+               rlwinm  r6,r6,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+               rlwinm  r7,     r6,     0,      MSR_DR_BIT+1,   MSR_DR_BIT-1    /* Turn off DR */
+               rlwinm  r7,r7,0,MSR_EE_BIT+1,MSR_EE_BIT-1       ; Disable interruptions
+               li              r4,PPC_PGBYTES-CACHE_LINE_SIZE  /* Point to the end of the page */
+               mtmsr   r7                                                              /* Set MSR to DR off */
+               isync                                                                   /* Ensure data translations are off */
+
+
+.L_phys_zero_loop:     
+               subic.  r5,r4,CACHE_LINE_SIZE                   /* Point to the next one */
+               dcbz    r4, r3                                                  /* Clear the whole thing to 0s */
+               subi    r4,r5,CACHE_LINE_SIZE                   /* Point to the next one */
+               dcbz    r5, r3                                                  /* Clear the next to zeros */
+               bgt+    .L_phys_zero_loop                               /* Keep going until we do the page... */
+
+               sync                                                                    /* Make sure they're all done */
+               li              r4,PPC_PGBYTES-CACHE_LINE_SIZE  /* Point to the end of the page */
+
+.L_inst_inval_loop:    
+               subic.  r5,r4,CACHE_LINE_SIZE                   /* Point to the next one */
+               icbi    r4, r3                                                  /* Clear the whole thing to 0s */
+               subi    r4,r5,CACHE_LINE_SIZE                   /* Point to the next one */
+               icbi    r5, r3                                                  /* Clear the next to zeros */
+               bgt+    .L_inst_inval_loop                              /* Keep going until we do the page... */
+
+               sync                                                                    /* Make sure they're all done */
+
+               mtmsr   r6              /* Restore original translations */
+               isync                   /* Ensure data translations are on */
 
-               .align  5
-               .globl  EXT(pmap_zero_page)
-
-LEXT(pmap_zero_page)
-
-        mflr   r12                                                             // save return address
-        bl             EXT(ml_set_physical_disabled)   // turn DR and EE off, SF on, get features in r10
-        mtlr   r12                                                             // restore return address
-        andi.  r9,r10,pf32Byte+pf128Byte               // r9 <- cache line size
-
-        subfic r4,r9,PPC_PGBYTES                               // r4 <- starting offset in page
-               
-               bt++    pf64Bitb,page0S4                                // Go do the big guys...
-               
-               slwi    r3,r3,12                                                // get page address from page num
-               b               page_zero_1                                             // Jump to line aligned loop...
-
-        .align 5
-
-               nop
-               nop
-               nop
-               nop
-               nop
-               nop
-               nop
-               
-page0S4:
-               sldi    r3,r3,12                                                // get page address from page num
-
-page_zero_1:                                                                   // loop zeroing cache lines
-        sub.   r5,r4,r9                                                // more to go?
-        dcbz128        r3,r4                                                   // zero either 32 or 128 bytes
-        sub            r4,r5,r9                                                // generate next offset
-        dcbz128        r3,r5
-        bne--  page_zero_1
-        
-        b              EXT(ml_restore)                                 // restore MSR and do the isync
-
+               blr
 
-//<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
 /* void
  * phys_copy(src, dst, bytecount)
- *      addr64_t           src;
- *      addr64_t           dst;
+ *      vm_offset_t     src;
+ *      vm_offset_t     dst;
  *      int             bytecount
  *
  * This routine will copy bytecount bytes from physical address src to physical
- * address dst.  It runs in 64-bit mode if necessary, but does not handle
- * overlap or make any attempt to be optimal.  Length must be a signed word.
- * Not performance critical.
+ * address dst. 
  */
 
+ENTRY(phys_copy, TAG_NO_FRAME_USED)
+
+       /* Switch off data translations */
+       mfmsr   r6
+       rlwinm  r6,r6,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+       rlwinm  r6,r6,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+       rlwinm  r7,     r6,     0,      MSR_DR_BIT+1,   MSR_DR_BIT-1
+       rlwinm  r7,     r7,     0,      MSR_EE_BIT+1,   MSR_EE_BIT-1
+       mtmsr   r7
+       isync                   /* Ensure data translations are off */
+
+       subi    r3,     r3,     4
+       subi    r4,     r4,     4
+
+       cmpwi   r5,     3
+       ble-    .L_phys_copy_bytes
+.L_phys_copy_loop:
+       lwz     r0,     4(r3)
+       addi    r3,     r3,     4
+       subi    r5,     r5,     4
+       stw     r0,     4(r4)
+       addi    r4,     r4,     4
+       cmpwi   r5,     3
+       bgt+    .L_phys_copy_loop
+
+       /* If no leftover bytes, we're done now */
+       cmpwi   r5,     0
+       beq+    .L_phys_copy_done
+       
+.L_phys_copy_bytes:
+       addi    r3,     r3,     3
+       addi    r4,     r4,     3
+.L_phys_copy_byte_loop:        
+       lbz     r0,     1(r3)
+       addi    r3,     r3,     1
+       subi    r5,     r5,     1
+       stb     r0,     1(r4)
+       addi    r4,     r4,     1
+       cmpwi   r5,     0
+       bne+    .L_phys_copy_byte_loop
+
+.L_phys_copy_done:
+       mtmsr   r6              /* Restore original translations */
+       isync                   /* Ensure data translations are off */
+
+       blr
 
-               .align  5
-               .globl  EXT(phys_copy)
-
-LEXT(phys_copy)
-
-               rlwinm  r3,r3,0,1,0                                     ; Duplicate high half of long long paddr into top of reg
-        mflr   r12                                                             // get return address
-               rlwimi  r3,r4,0,0,31                            ; Combine bottom of long long to full 64-bits
-               rlwinm  r4,r5,0,1,0                                     ; Duplicate high half of long long paddr into top of reg
-        bl             EXT(ml_set_physical_disabled)   // turn DR and EE off, SF on, get features in r10
-               rlwimi  r4,r6,0,0,31                            ; Combine bottom of long long to full 64-bits
-        mtlr   r12                                                             // restore return address
-        subic. r5,r7,4                                                 // a word to copy?
-        b              phys_copy_2
-        
-               .align  5
-         
-phys_copy_1:                                                                   // loop copying words
-        subic. r5,r5,4                                                 // more to go?
-        lwz            r0,0(r3)
-        addi   r3,r3,4
-        stw            r0,0(r4)
-        addi   r4,r4,4
-phys_copy_2:
-        bge            phys_copy_1
-        addic. r5,r5,4                                                 // restore count
-        ble            phys_copy_4                                             // no more
-        
-                                                                                       // Loop is aligned here
-        
-phys_copy_3:                                                                   // loop copying bytes
-        subic. r5,r5,1                                                 // more to go?
-        lbz            r0,0(r3)
-        addi   r3,r3,1
-        stb            r0,0(r4)
-        addi   r4,r4,1
-        bgt            phys_copy_3
-phys_copy_4:        
-        b              EXT(ml_restore)                                 // restore MSR and do the isync
-
-
-//<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
 /* void
  * pmap_copy_page(src, dst)
- *      ppnum_t     src;
- *      ppnum_t     dst;
+ *      vm_offset_t     src;
+ *      vm_offset_t     dst;
  *
  * This routine will copy the physical page src to physical page dst
  * 
- * This routine assumes that the src and dst are page numbers and that the
- * destination is cached.  It runs on 32 and 64 bit processors, with and
- * without altivec, and with 32 and 128 byte cache lines.
- * We also must assume that no-one will be executing within the destination
- * page, and that this will be used for paging.  Because this
- * is a common routine, we have tuned loops for each processor class.
+ * This routine assumes that the src and dst are page aligned and that the
+ * destination is cached.
+ *
+ * We also must assume that noone will be executing within the destination
+ * page.  We also assume that this will be used for paging
  *
  */
-#define        kSFSize (FM_SIZE+160)
 
+#if DEBUG
+       /* if debug, we have a little piece of C around this
+        * in pmap.c that gives some trace ability
+        */
+ENTRY(pmap_copy_page_assembler, TAG_NO_FRAME_USED)
+#else
 ENTRY(pmap_copy_page, TAG_NO_FRAME_USED)
-
-               lis             r2,hi16(MASK(MSR_VEC))                  ; Get the vector flag
-        mflr   r0                                                              // get return
-               ori             r2,r2,lo16(MASK(MSR_FP))                ; Add the FP flag
-               stw             r0,8(r1)                                                // save
-        stwu   r1,-kSFSize(r1)                                 // set up a stack frame for VRs or FPRs
-        mfmsr  r11                                                             // save MSR at entry
-        mfsprg r10,2                                                   // get feature flags
-        andc   r11,r11,r2                                              // Clear out vec and fp
-        ori            r2,r2,lo16(MASK(MSR_EE))                // Get EE on also
-        andc   r2,r11,r2                                               // Clear out EE as well
-        mtcrf  0x02,r10                                                // we need to test pf64Bit
-        ori            r2,r2,MASK(MSR_FP)                              // must enable FP for G3...
-        mtcrf  0x80,r10                                                // we need to test pfAltivec too
-        oris   r2,r2,hi16(MASK(MSR_VEC))               // enable altivec for G4 (ignored if G3)
-        mtmsr  r2                                                              // turn EE off, FP and VEC on
-        isync
-        bt++   pf64Bitb,pmap_copy_64                   // skip if 64-bit processor (only they take hint)
-               slwi    r3,r3,12                                                // get page address from page num
-               slwi    r4,r4,12                                                // get page address from page num
-        rlwinm r12,r2,0,MSR_DR_BIT+1,MSR_DR_BIT-1      // get ready to turn off DR
-        bt             pfAltivecb,pmap_copy_g4                 // altivec but not 64-bit means G4
-        
-        
-        // G3 -- copy using FPRs
-        
-        stfd   f0,FM_SIZE+0(r1)                                // save the 4 FPRs we use to copy
-        stfd   f1,FM_SIZE+8(r1)
-        li             r5,PPC_PGBYTES/32                               // count of cache lines in a page
-        stfd   f2,FM_SIZE+16(r1)
-        mtctr  r5
-        stfd   f3,FM_SIZE+24(r1)
-        mtmsr  r12                                                             // turn off DR after saving FPRs on stack
-        isync
-        
-pmap_g3_copy_loop:                                                             // loop over 32-byte cache lines
-        dcbz   0,r4                                                    // avoid read of dest line
-        lfd            f0,0(r3)
-        lfd            f1,8(r3)
-        lfd            f2,16(r3)
-        lfd            f3,24(r3)
-        addi   r3,r3,32
-        stfd   f0,0(r4)
-        stfd   f1,8(r4)
-        stfd   f2,16(r4)
-        stfd   f3,24(r4)
-        dcbst  0,r4                                                    // flush dest line to RAM
-        addi   r4,r4,32
-        bdnz   pmap_g3_copy_loop
-        
-        sync                                                                   // wait for stores to take
-        subi   r4,r4,PPC_PGBYTES                               // restore ptr to destintation page
-        li             r6,PPC_PGBYTES-32                               // point to last line in page
-pmap_g3_icache_flush:
-        subic. r5,r6,32                                                // more to go?
-        icbi   r4,r6                                                   // flush another line in icache
-        subi   r6,r5,32                                                // get offset to next line
-        icbi   r4,r5
-        bne            pmap_g3_icache_flush
-        
-        sync
-        mtmsr  r2                                                              // turn DR back on
-        isync
-        lfd            f0,FM_SIZE+0(r1)                                // restore the FPRs
-        lfd            f1,FM_SIZE+8(r1)
-        lfd            f2,FM_SIZE+16(r1)
-        lfd            f3,FM_SIZE+24(r1)        
-        
-        b              pmap_g4_restore                                 // restore MSR and done
-
-        
-        // G4 -- copy using VRs
-
-pmap_copy_g4:                                                                  // r2=(MSR-EE), r12=(r2-DR), r10=features, r11=old MSR
-        la             r9,FM_SIZE+16(r1)                               // place where we save VRs to r9
-        li             r5,16                                                   // load x-form offsets into r5-r9
-        li             r6,32                                                   // another offset
-        stvx   v0,0,r9                                                 // save some VRs so we can use to copy
-        li             r7,48                                                   // another offset
-        stvx   v1,r5,r9
-        li             r0,PPC_PGBYTES/64                               // we loop over 64-byte chunks
-        stvx   v2,r6,r9
-        mtctr  r0
-        li             r8,96                                                   // get look-ahead for touch
-        stvx   v3,r7,r9
-        li             r9,128
-        mtmsr  r12                                                             // now we've saved VRs on stack, turn off DR
-        isync                                                                  // wait for it to happen
-        b              pmap_g4_copy_loop
-        
-        .align 5                                                               // align inner loops
-pmap_g4_copy_loop:                                                             // loop over 64-byte chunks
-        dcbt   r3,r8                                                   // touch 3 lines ahead
-        nop                                                                            // avoid a 17-word loop...
-        dcbt   r3,r9                                                   // touch 4 lines ahead
-        nop                                                                            // more padding
-        dcba   0,r4                                                    // avoid pre-fetch of 1st dest line
-        lvx            v0,0,r3                                                 // offset 0
-        lvx            v1,r5,r3                                                // offset 16
-        lvx            v2,r6,r3                                                // offset 32
-        lvx            v3,r7,r3                                                // offset 48
-        addi   r3,r3,64
-        dcba   r6,r4                                                   // avoid pre-fetch of 2nd line
-        stvx   v0,0,r4                                                 // offset 0
-        stvx   v1,r5,r4                                                // offset 16
-        stvx   v2,r6,r4                                                // offset 32
-        stvx   v3,r7,r4                                                // offset 48
-        dcbf   0,r4                                                    // push line 1
-        dcbf   r6,r4                                                   // and line 2
-        addi   r4,r4,64
-        bdnz   pmap_g4_copy_loop
-
-        sync                                                                   // wait for stores to take
-        subi   r4,r4,PPC_PGBYTES                               // restore ptr to destintation page
-        li             r8,PPC_PGBYTES-32                               // point to last line in page
-pmap_g4_icache_flush:
-        subic. r9,r8,32                                                // more to go?
-        icbi   r4,r8                                                   // flush from icache
-        subi   r8,r9,32                                                // get offset to next line
-        icbi   r4,r9
-        bne            pmap_g4_icache_flush
-        
-        sync
-        mtmsr  r2                                                              // turn DR back on
-        isync
-        la             r9,FM_SIZE+16(r1)                               // get base of VR save area
-        lvx            v0,0,r9                                                 // restore the VRs
-        lvx            v1,r5,r9
-        lvx            v2,r6,r9
-        lvx            v3,r7,r9        
-        
-pmap_g4_restore:                                                               // r11=MSR
-        mtmsr  r11                                                             // turn EE on, VEC and FR off
-        isync                                                                  // wait for it to happen
-        addi   r1,r1,kSFSize                                   // pop off our stack frame
-        lwz            r0,8(r1)                                                // restore return address
-        mtlr   r0
-        blr
-        
-        
-        // 64-bit/128-byte processor: copy using VRs
-        
-pmap_copy_64:                                                                  // r10=features, r11=old MSR
-               sldi    r3,r3,12                                                // get page address from page num
-               sldi    r4,r4,12                                                // get page address from page num
-               la              r9,FM_SIZE+16(r1)                               // get base of VR save area
-        li             r5,16                                                   // load x-form offsets into r5-r9
-        li             r6,32                                                   // another offset
-        bf             pfAltivecb,pmap_novmx_copy              // altivec suppressed...
-        stvx   v0,0,r9                                                 // save 8 VRs so we can copy wo bubbles
-        stvx   v1,r5,r9
-        li             r7,48                                                   // another offset
-        li             r0,PPC_PGBYTES/128                              // we loop over 128-byte chunks
-        stvx   v2,r6,r9
-        stvx   v3,r7,r9
-        addi   r9,r9,64                                                // advance base ptr so we can store another 4
-        mtctr  r0
-        li             r0,MASK(MSR_DR)                                 // get DR bit
-        stvx   v4,0,r9
-        stvx   v5,r5,r9
-        andc   r12,r2,r0                                               // turn off DR bit
-        li             r0,1                                                    // get a 1 to slam into SF
-        stvx   v6,r6,r9
-        stvx   v7,r7,r9
-        rldimi r12,r0,63,MSR_SF_BIT                    // set SF bit (bit 0)
-        li             r8,-128                                                 // offset so we can reach back one line
-        mtmsrd r12                                                             // now we've saved VRs, turn DR off and SF on
-        isync                                                                  // wait for it to happen
-        dcbt128        0,r3,1                                                  // start a forward stream
-        b              pmap_64_copy_loop
-        
-        .align 5                                                               // align inner loops
-pmap_64_copy_loop:                                                             // loop over 128-byte chunks
-        dcbz128        0,r4                                                    // avoid read of destination line
-        lvx            v0,0,r3                                                 // offset 0
-        lvx            v1,r5,r3                                                // offset 16
-        lvx            v2,r6,r3                                                // offset 32
-        lvx            v3,r7,r3                                                // offset 48
-        addi   r3,r3,64                                                // don't have enough GPRs so add 64 2x
-        lvx            v4,0,r3                                                 // offset 64
-        lvx            v5,r5,r3                                                // offset 80
-        lvx            v6,r6,r3                                                // offset 96
-        lvx            v7,r7,r3                                                // offset 112
-        addi   r3,r3,64
-        stvx   v0,0,r4                                                 // offset 0
-        stvx   v1,r5,r4                                                // offset 16
-        stvx   v2,r6,r4                                                // offset 32
-        stvx   v3,r7,r4                                                // offset 48
-        addi   r4,r4,64
-        stvx   v4,0,r4                                                 // offset 64
-        stvx   v5,r5,r4                                                // offset 80
-        stvx   v6,r6,r4                                                // offset 96
-        stvx   v7,r7,r4                                                // offset 112
-        addi   r4,r4,64
-        dcbf   r8,r4                                                   // flush the line we just wrote
-        bdnz   pmap_64_copy_loop
-
-        sync                                                                   // wait for stores to take
-        subi   r4,r4,PPC_PGBYTES                               // restore ptr to destintation page
-        li             r8,PPC_PGBYTES-128                              // point to last line in page
-pmap_64_icache_flush:
-        subic. r9,r8,128                                               // more to go?
-        icbi   r4,r8                                                   // flush from icache
-        subi   r8,r9,128                                               // get offset to next line
-        icbi   r4,r9
-        bne            pmap_64_icache_flush
-        
-        sync
-        mtmsrd r2                                                              // turn DR back on, SF off
-        isync
-        la             r9,FM_SIZE+16(r1)                               // get base address of VR save area on stack
-        lvx            v0,0,r9                                                 // restore the VRs
-        lvx            v1,r5,r9
-        lvx            v2,r6,r9
-        lvx            v3,r7,r9
-        addi   r9,r9,64        
-        lvx            v4,0,r9
-        lvx            v5,r5,r9
-        lvx            v6,r6,r9
-        lvx            v7,r7,r9
-
-        b              pmap_g4_restore                                 // restore lower half of MSR and return
-
- //
- //            Copy on 64-bit without VMX
- //
-
-pmap_novmx_copy:        
-               li              r0,PPC_PGBYTES/128                              // we loop over 128-byte chunks
-               mtctr   r0
-               li              r0,MASK(MSR_DR)                                 // get DR bit
-               andc    r12,r2,r0                                               // turn off DR bit
-               li              r0,1                                                    // get a 1 to slam into SF
-               rldimi  r12,r0,63,MSR_SF_BIT                    // set SF bit (bit 0)
-               mtmsrd  r12                                                             // now we've saved VRs, turn DR off and SF on
-               isync                                                                   // wait for it to happen
-               dcbt128 0,r3,1                                                  // start a forward stream 
-       
-pmap_novmx_copy_loop:                                                  // loop over 128-byte cache lines
-        dcbz128        0,r4                                                    // avoid read of dest line
-        
-        ld             r0,0(r3)                                                // Load half a line
-        ld             r12,8(r3)
-        ld             r5,16(r3)
-        ld             r6,24(r3)
-        ld             r7,32(r3)
-        ld             r8,40(r3)
-        ld             r9,48(r3)
-        ld             r10,56(r3)
-        
-        std            r0,0(r4)                                                // Store half a line
-        std            r12,8(r4)
-        std            r5,16(r4)
-        std            r6,24(r4)
-        std            r7,32(r4)
-        std            r8,40(r4)
-        std            r9,48(r4)
-        std            r10,56(r4)
-        
-        ld             r0,64(r3)                                               // Load half a line
-        ld             r12,72(r3)
-        ld             r5,80(r3)
-        ld             r6,88(r3)
-        ld             r7,96(r3)
-        ld             r8,104(r3)
-        ld             r9,112(r3)
-        ld             r10,120(r3)
-        
-        addi   r3,r3,128
-        std            r0,64(r4)                                               // Store half a line
-        std            r12,72(r4)
-        std            r5,80(r4)
-        std            r6,88(r4)
-        std            r7,96(r4)
-        std            r8,104(r4)
-        std            r9,112(r4)
-        std            r10,120(r4)
-        
-        dcbf   0,r4                                                    // flush the line we just wrote
-               addi    r4,r4,128
-        bdnz   pmap_novmx_copy_loop
-
-        sync                                                                   // wait for stores to take
-        subi   r4,r4,PPC_PGBYTES                               // restore ptr to destintation page
-        li             r8,PPC_PGBYTES-128                              // point to last line in page
-
-pmap_novmx_icache_flush:
-        subic. r9,r8,128                                               // more to go?
-        icbi   r4,r8                                                   // flush from icache
-        subi   r8,r9,128                                               // get offset to next line
-        icbi   r4,r9
-        bne            pmap_novmx_icache_flush
-        
-        sync
-        mtmsrd r2                                                              // turn DR back on, SF off
-        isync
-
-        b              pmap_g4_restore                                 // restore lower half of MSR and return
-
-
-
-//<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>   
+#endif /* DEBUG */
+
+#if 0
+                       mfpvr   r9                                                      ; Get the PVR
+                       rlwinm  r9,r9,16,16,31                          ; Isolate the PPC processor
+                       cmplwi  r9,PROCESSOR_VERSION_Max        ; Do we have Altivec?
+                       beq+    wegotaltivec                            ; Yeah...
+#endif
                
-// Stack frame format used by copyin, copyout, copyinstr and copyoutstr.
-// These routines all run both on 32 and 64-bit machines, though because they are called
-// by the BSD kernel they are always in 32-bit mode when entered.  The mapped ptr returned
-// by MapUserAddressSpace will be 64 bits however on 64-bit machines.  Beware to avoid
-// using compare instructions on this ptr.  This mapped ptr is kept globally in r31, so there
-// is no need to store or load it, which are mode-dependent operations since it could be
-// 32 or 64 bits.
-
-#define        kkFrameSize     (FM_SIZE+32)
-
-#define        kkBufSize       (FM_SIZE+0)
-#define        kkCR            (FM_SIZE+4)
-#define        kkSource        (FM_SIZE+8)
-#define        kkDest          (FM_SIZE+12)
-#define        kkCountPtr      (FM_SIZE+16)
-#define        kkR31Save       (FM_SIZE+20)
-// nonvolatile CR bits we use as flags in cr3
-
-#define        kk64bit         12
-#define        kkNull          13
-#define        kkIn            14
-#define        kkString        15
-#define        kkZero          15
-
-
-//<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
+                       mfmsr   r9                                                      ; Get the MSR
+                       rlwinm  r9,r9,0,MSR_FP_BIT+1,MSR_FP_BIT-1       ; Force floating point off
+                       rlwinm  r9,r9,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1     ; Force vectors off
+                       stwu    r1,-(FM_SIZE+32)(r1)            ; Make a frame for us
+                       rlwinm  r7,r9,0,MSR_EE_BIT+1,MSR_EE_BIT-1       ; Disable interruptions
+                       ori             r7,r7,lo16(MASK(MSR_FP))        ; Turn on the FPU
+                       mtmsr   r7                                                      ; Disable rupts and enable FPU
+                       isync
+               
+                       stfd    f0,FM_SIZE+0(r1)                        ; Save an FP register
+                       rlwinm  r7,r7,0,MSR_DR_BIT+1,MSR_DR_BIT-1       ; Clear the DDAT bit
+                       stfd    f1,FM_SIZE+8(r1)                        ; Save an FP register
+                       addi    r6,r3,PPC_PGBYTES                       ; Point to the start of the next page
+                       stfd    f2,FM_SIZE+16(r1)                       ; Save an FP register
+                       mr              r8,r4                                           ; Save the destination
+                       stfd    f3,FM_SIZE+24(r1)                       ; Save an FP register
+               
+                       mtmsr   r7                                                      ; Set the new MSR
+                       isync                                                           ; Ensure data translations are off
+
+                       dcbt    br0, r3                                         /* Start in first input line */
+                       li              r5,     CACHE_LINE_SIZE                 /* Get the line size */
+
+.L_pmap_copy_page_loop:
+                       dcbz    0, r4                                           /* Allocate a line for the output */
+                       lfd             f0, 0(r3)                                       /* Get first 8 */
+                       lfd             f1, 8(r3)                                       /* Get second 8 */
+                       lfd             f2, 16(r3)                                      /* Get third 8 */
+                       stfd    f0, 0(r4)                                       /* Put first 8 */
+                       dcbt    r5, r3                                          /* Start next line coming in */
+                       lfd             f3, 24(r3)                                      /* Get fourth 8 */
+                       stfd    f1,     8(r4)                                   /* Put second 8 */
+                       addi    r3,r3,CACHE_LINE_SIZE           /* Point to the next line in */
+                       stfd    f2,     16(r4)                                  /* Put third 8 */
+                       cmplw   cr0,r3,r6                                       /* See if we're finished yet */
+                       stfd    f3,     24(r4)                                  /* Put fourth 8 */
+                       dcbst   br0,r4                                          /* Force it out */
+                       addi    r4,r4,CACHE_LINE_SIZE           /* Point to the next line out */
+                       blt+    .L_pmap_copy_page_loop          /* Copy the whole page */
+                       
+                       sync                                                            /* Make sure they're all done */
+                       li              r4,PPC_PGBYTES-CACHE_LINE_SIZE  /* Point to the end of the page */
+
+invalinst:     
+                       subic.  r5,r4,CACHE_LINE_SIZE           /* Point to the next one */
+                       icbi    r4, r8                                          /* Trash the i-cache */
+                       subi    r4,r5,CACHE_LINE_SIZE           /* Point to the next one */
+                       icbi    r5, r8                                          /* Trash the i-cache */
+                       bgt+    invalinst                                       /* Keep going until we do the page... */
+       
+                       rlwimi  r7,r9,0,MSR_DR_BIT,MSR_DR_BIT   ; Set DDAT if on
+                       sync                                                            ; Make sure all invalidates done
+                       
+                       mtmsr   r7                                                      ; Set DDAT correctly
+                       isync           
+                       
+                       lfd             f0,FM_SIZE+0(r1)                        ; Restore an FP register
+                       lfd             f1,FM_SIZE+8(r1)                        ; Restore an FP register
+                       lfd             f2,FM_SIZE+16(r1)                       ; Restore an FP register
+                       lfd             f3,FM_SIZE+24(r1)                       ; Restore an FP register
+                       
+                       lwz             r1,0(r1)                                        ; Pop up the stack
+       
+                       mtmsr   r9                                                      ; Turn off FPU now and maybe rupts back on
+                       isync                                                           
+                       blr
+               
+#if 0
+;
+;                      This is not very optimal.  We just do it here for a test of 
+;                      Altivec in the kernel.
+;
+wegotaltivec:
+                       mfmsr   r9                                                      ; Get the MSR
+                       lis             r8,hi16(0xC0000000)                     ; Make sure we keep the first 2 vector registers
+                       rlwinm  r7,r9,0,MSR_EE_BIT+1,MSR_EE_BIT-1       ; Disable interruptions
+                       lis             r6,lo16(2*256+128)                      ; Specify 128 blocks of 2 vectors each
+                       rlwinm  r7,r7,0,MSR_DR_BIT+1,MSR_DR_BIT-1       ; Clear the DDAT bit
+                       ori             r6,r6,32                                        ; Set a 32-byte stride
+                       mtsprg  256,r8                                          ; Set VRSave
+                       mtmsr   r7                                                      ; Disable rupts and turn xlate off
+                       isync
+       
+                       addi    r11,r3,4096                                     ; Point to the next page
+                       li              r10,16                                          ; Get vector size
+
+avmovepg:      lvxl    v0,br0,r3                                       ; Get first half of line
+                       dcba    br0,r4                                          ; Allocate output
+                       lvxl    v1,r10,r3                                       ; Get second half of line
+                       stvxl   v0,br0,r4                                       ; Save first half of line
+                       addi    r3,r3,32                                        ; Point to the next line
+                       icbi    br0,r4                                          ; Make the icache go away also
+                       stvxl   v1,r10,r4                                       ; Save second half of line
+                       cmplw   r3,r11                                          ; Have we reached the next page?
+                       dcbst   br0,r4                                          ; Make sure the line is on its way out
+                       addi    r4,r4,32                                        ; Point to the next line
+                       blt+    avmovepg                                        ; Move the next line...
+                       
+                       li              r8,0                                            ; Clear this
+                       sync                                                            ; Make sure all the memory stuff is done
+                       mtsprg  256,r8                                          ; Show we are not using VRs any more
+                       mtmsr   r9                                                      ; Translation and interruptions back on
+                       isync
+                       blr
+#endif
+               
+
+       
+
 /*
  * int
- * copyoutstr(src, dst, maxcount, count)
+ * copyin(src, dst, count)
  *     vm_offset_t     src;
  *     vm_offset_t     dst;
- *     vm_size_t       maxcount; 
- *     vm_size_t*      count;
+ *     int             count;
  *
- * Set *count to the number of bytes copied.
  */
 
-ENTRY(copyoutstr, TAG_NO_FRAME_USED)
-        mfcr   r2                                                              // we use nonvolatile cr3
-        li             r0,0
-        crset  kkString                                                // flag as a string op
-        mr             r10,r4                                                  // for copyout, dest ptr (r4) is in user space
-        stw            r0,0(r6)                                                // initialize #bytes moved
-        crclr  kkIn                                                    // flag as copyout
-        b              copyJoin
+ENTRY2(copyin, copyinmsg, TAG_NO_FRAME_USED)
+
+/* Preamble allowing us to call a sub-function */
+               mflr    r0
+               stw             r0,FM_LR_SAVE(r1)
+               stwu    r1,-(FM_SIZE+16)(r1)
+               
+               cmpli   cr0,r5,0
+               ble-    cr0,.L_copyinout_trivial
+
+/* we know we have a valid copyin to do now */
+/* Set up thread_recover in case we hit an illegal address */
+               
+               mfsprg  r8,1                                                    /* Get the current act */ 
+               lwz             r10,ACT_THREAD(r8)
+               lis             r11,hi16(.L_copyinout_error)
+               lwz             r8,ACT_VMMAP(r8)
+               ori             r11,r11,lo16(.L_copyinout_error)
+               add             r9,r3,r5                                                /* Get the end of the source */
+               lwz             r8,VMMAP_PMAP(r8)                               ; Get the pmap
+               rlwinm  r12,r3,6,26,29                                  ; Get index to the segment slot
+               subi    r9,r9,1                                                 /* Make sure we don't go too far */
+               add             r8,r8,r12                                               ; Start indexing to the segment value
+               stw             r11,THREAD_RECOVER(r10)
+               xor             r9,r9,r3                                                /* Smoosh 'em together */
+               lwz             r8,PMAP_SEGS(r8)                                ; Get the source SR value
+               rlwinm. r9,r9,0,1,3                                             /* Top nybble equal? */
+               mtsr    SR_COPYIN,r8                                    ; Set the SR
+               isync
+#if 0
+               lis             r0,HIGH_ADDR(EXT(dbgRegsCall))  /* (TEST/DEBUG) */      
+               ori             r0,r0,LOW_ADDR(EXT(dbgRegsCall))        /* (TEST/DEBUG) */      
+               sc                                                                              /* (TEST/DEBUG) */
+#endif
+       
+/* For optimization, we check if the copyin lies on a segment
+ * boundary. If it doesn't, we can use a simple copy. If it
+ * does, we split it into two separate copies in some C code.
+ */
+       
+               bne-    .L_call_copyin_multiple                 /* Nope, we went past the segment boundary... */
+
+               rlwinm  r3,r3,0,4,31
+               oris    r3,r3,(SR_COPYIN_NUM << (28-16))        /* Set the copyin segment as the source */
+       
+               bl              EXT(bcopy)
+               
+/* Now that copyin is done, we don't need a recovery point */
 
+               addi    r1,r1,FM_SIZE+16
+               mfsprg  r6,1                                                    /* Get the current act */ 
+               lwz             r10,ACT_THREAD(r6)
+               li              r3,0
+               lwz             r0,FM_LR_SAVE(r1)
+               stw             r3,THREAD_RECOVER(r10)                  /* Clear recovery */
+               mtlr    r0
+               blr
+       
+/* we get here via the exception handler if an illegal
+ * user memory reference was made.
+ */
+.L_copyinout_error:
+
+/* Now that copyin is done, we don't need a recovery point */
+       
+               mfsprg  r6,1                                                    /* Get the current act */ 
+               addi    r1,r1,FM_SIZE+16
+               lwz             r10,ACT_THREAD(r6)
+               li              r4,0
+               lwz             r0,FM_LR_SAVE(r1)
+               stw             r4,THREAD_RECOVER(r10)                  /* Clear recovery */
+               mtlr    r0
+               li              r3,EFAULT                                                       ; Indicate error (EFAULT) 
+               blr
+
+.L_copyinout_trivial:
+       /* The copyin/out was for either 0 bytes or a negative
+        * number of bytes, return an appropriate value (0 == SUCCESS).
+        * cr0 still contains result of comparison of len with 0.
+        */
+       li      r3,     0
+       beq+    cr0,    .L_copyinout_negative
+       li      r3,     1
+.L_copyinout_negative:
+
+       /* unwind the stack */
+       addi    r1,     r1,     FM_SIZE+16
+       lwz     r0,     FM_LR_SAVE(r1)
+       mtlr    r0
+
+       blr
+
+.L_call_copyin_multiple:
+
+       /* unwind the stack */
+       addi    r1,     r1,     FM_SIZE+16
+       lwz     r0,     FM_LR_SAVE(r1)
+       mtlr    r0
+
+       b       EXT(copyin_multiple)                            /* not a call - a jump! */
 
-//<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
 /*
  * int
- * copyinstr(src, dst, maxcount, count)
+ * copyout(src, dst, count)
+ *     vm_offset_t     src;
+ *     vm_offset_t     dst;
+ *     int             count;
+ *
+ */
+
+ENTRY2(copyout, copyoutmsg, TAG_NO_FRAME_USED)
+
+/* Preamble allowing us to call a sub-function */
+
+               mflr    r0
+               stw             r0,FM_LR_SAVE(r1)
+               stwu    r1,-(FM_SIZE+16)(r1)
+               
+#if 0
+               stw             r3,FM_SIZE+0(r1)                                /* (TEST/DEBUG) */
+               stw             r4,FM_SIZE+4(r1)                                /* (TEST/DEBUG) */
+               stw             r5,FM_SIZE+8(r1)                                /* (TEST/DEBUG) */
+               mr              r6,r0                                                   /* (TEST/DEBUG) */
+               
+               bl              EXT(tracecopyout)                               /* (TEST/DEBUG) */
+               
+               lwz             r3,FM_SIZE+0(r1)                                /* (TEST/DEBUG) */
+               lwz             r4,FM_SIZE+4(r1)                                /* (TEST/DEBUG) */
+               lwz             r5,FM_SIZE+8(r1)                                /* (TEST/DEBUG) */
+#endif
+       
+               cmpli   cr0,r5,0
+               ble-    cr0,.L_copyinout_trivial
+/* we know we have a valid copyout to do now */
+/* Set up thread_recover in case we hit an illegal address */
+               
+
+               mfsprg  r8,1                                                    /* Get the current act */
+               lwz             r10,ACT_THREAD(r8)
+               lis             r11,HIGH_ADDR(.L_copyinout_error)
+               lwz             r8,ACT_VMMAP(r8)
+               rlwinm  r12,r4,6,26,29                                  ; Get index to the segment slot
+               ori             r11,r11,LOW_ADDR(.L_copyinout_error)
+               add             r9,r4,r5                                                /* Get the end of the destination */
+               lwz             r8,VMMAP_PMAP(r8)
+               subi    r9,r9,1                                                 /* Make sure we don't go too far */
+               add             r8,r8,r12                                               ; Start indexing to the segment value
+               stw             r11,THREAD_RECOVER(r10)
+               xor             r9,r9,r4                                                /* Smoosh 'em together */
+               lwz             r8,PMAP_SEGS(r8)                                ; Get the source SR value
+               rlwinm. r9,r9,0,1,3                                             /* Top nybble equal? */
+               mtsr    SR_COPYIN,r8
+               isync
+       
+       
+/* For optimisation, we check if the copyout lies on a segment
+ * boundary. If it doesn't, we can use a simple copy. If it
+ * does, we split it into two separate copies in some C code.
+ */
+       
+               bne-    .L_call_copyout_multiple                /* Nope, we went past the segment boundary... */
+
+               rlwinm  r4,r4,0,4,31
+               oris    r4,r4,(SR_COPYIN_NUM << (28-16))        /* Set the copyin segment as the source */
+       
+               bl      EXT(bcopy)
+               
+/* Now that copyout is done, we don't need a recovery point */
+               mfsprg  r6,1                                                    /* Get the current act */
+               addi    r1,r1,FM_SIZE+16
+               lwz             r10,ACT_THREAD(r6)
+               li              r3,0
+               lwz             r0,FM_LR_SAVE(r1)
+               stw             r3,THREAD_RECOVER(r10)                  /* Clear recovery */
+               mtlr    r0
+               blr
+
+.L_call_copyout_multiple:
+       /* unwind the stack */
+       addi    r1,     r1,     FM_SIZE+16
+       lwz     r0,     FM_LR_SAVE(r1)
+       mtlr    r0
+
+       b       EXT(copyout_multiple)                                   /* not a call - a jump! */
+
+/*
+ * boolean_t
+ * copyinstr(src, dst, count, maxcount)
  *     vm_offset_t     src;
  *     vm_offset_t     dst;
  *     vm_size_t       maxcount; 
  *     vm_size_t*      count;
  *
  * Set *count to the number of bytes copied
+ * 
  * If dst == NULL, don't copy, just count bytes.
  * Only currently called from klcopyinstr. 
  */
 
 ENTRY(copyinstr, TAG_NO_FRAME_USED)
-        mfcr   r2                                                              // we use nonvolatile cr3
-        cmplwi r4,0                                                    // dst==NULL?
-        li             r0,0
-        crset  kkString                                                // flag as a string op
-        mr             r10,r3                                                  // for copyin, source ptr (r3) is in user space
-        crmove kkNull,cr0_eq                                   // remember if (dst==NULL)
-        stw            r0,0(r6)                                                // initialize #bytes moved
-        crset  kkIn                                                    // flag as copyin (rather than copyout)
-        b              copyJoin1                                               // skip over the "crclr kkNull"
-
-
-//<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-/*
- * int
- * copyout(src, dst, count)
- *     vm_offset_t     src;
- *     vm_offset_t     dst;
- *     size_t          count;
- */
 
-                       .align  5
-                       .globl  EXT(copyout)
-                       .globl  EXT(copyoutmsg)
-
-LEXT(copyout)
-LEXT(copyoutmsg)
-
-#if INSTRUMENT
-                       mfspr   r12,pmc1                                                ; INSTRUMENT - saveinstr[12] - Take stamp at copyout
-                       stw             r12,0x6100+(12*16)+0x0(0)               ; INSTRUMENT - Save it
-                       mfspr   r12,pmc2                                                ; INSTRUMENT - Get stamp
-                       stw             r12,0x6100+(12*16)+0x4(0)               ; INSTRUMENT - Save it
-                       mfspr   r12,pmc3                                                ; INSTRUMENT - Get stamp
-                       stw             r12,0x6100+(12*16)+0x8(0)               ; INSTRUMENT - Save it
-                       mfspr   r12,pmc4                                                ; INSTRUMENT - Get stamp
-                       stw             r12,0x6100+(12*16)+0xC(0)               ; INSTRUMENT - Save it
-#endif                 
-        mfcr   r2                                                              // save caller's CR
-        crclr  kkString                                                // not a string version
-        mr             r10,r4                                                  // dest (r4) is user-space ptr
-        crclr  kkIn                                                    // flag as copyout
-        b              copyJoin
-        
-
-//<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-/*
- * int
- * copyin(src, dst, count)
- *     vm_offset_t     src;
- *     vm_offset_t     dst;
- *     size_t          count;
+/* Preamble allowing us to call a sub-function */
+               mflr    r0
+               stw             r0,FM_LR_SAVE(r1)
+               stwu    r1,-(FM_SIZE+16)(r1)
+
+#if 0
+               stw             r3,FM_SIZE+0(r1)                                /* (TEST/DEBUG) */
+               stw             r4,FM_SIZE+4(r1)                                /* (TEST/DEBUG) */
+               stw             r5,FM_SIZE+8(r1)                                /* (TEST/DEBUG) */
+               stw             r6,FM_SIZE+12(r1)                               /* (TEST/DEBUG) */
+               mr              r7,r0                                                   /* (TEST/DEBUG) */
+               
+               bl              EXT(tracecopystr)                               /* (TEST/DEBUG) */
+               
+               lwz             r3,FM_SIZE+0(r1)                                /* (TEST/DEBUG) */
+               lwz             r4,FM_SIZE+4(r1)                                /* (TEST/DEBUG) */
+               lwz             r5,FM_SIZE+8(r1)                                /* (TEST/DEBUG) */
+               stw             r6,FM_SIZE+12(r1)                               /* (TEST/DEBUG) */
+#endif
+                               
+               cmpli   cr0,r5,0
+               ble-    cr0,.L_copyinout_trivial
+
+/* we know we have a valid copyin to do now */
+/* Set up thread_recover in case we hit an illegal address */
+               
+               li              r0,0                                                    
+               mfsprg  r8,1                                                    /* Get the current act */
+               lwz             r10,ACT_THREAD(r8)
+               stw             r0,0(r6)                                                /* Clear result length */
+               lis             r11,HIGH_ADDR(.L_copyinout_error)
+               lwz             r8,ACT_VMMAP(r8)                                ; Get the map for this activation
+               rlwinm  r12,r3,6,26,29                                  ; Get index to the segment slot
+               lwz             r8,VMMAP_PMAP(r8)
+               ori             r11,r11,LOW_ADDR(.L_copyinout_error)
+               add             r8,r8,r12                                               ; Start indexing to the segment value
+               stw             r11,THREAD_RECOVER(r10)
+               rlwinm  r3,r3,0,4,31
+               lwz             r7,PMAP_SEGS(r8)                                ; Get the source SR value
+               oris    r3,r3,(SR_COPYIN_NUM << (28-16))        /* Set the copyin segment as the source */
+
+/* Copy byte by byte for now - TODO NMGS speed this up with
+ * some clever (but fairly standard) logic for word copies.
+ * We don't use a copyinstr_multiple since copyinstr is called
+ * with INT_MAX in the linux server. Eugh.
  */
 
+               li              r9,0                                                    /* Clear byte counter */
 
-                       .align  5
-                       .globl  EXT(copyin)
-                       .globl  EXT(copyinmsg)
-
-LEXT(copyin)
-LEXT(copyinmsg)
-
-        mfcr   r2                                                              // save caller's CR
-        crclr  kkString                                                // not a string version
-        mr             r10,r3                                                  // source (r3) is user-space ptr in copyin
-        crset  kkIn                                                    // flag as copyin
-        
-        
-// Common code to handle setup for all the copy variants:
-//             r2 = caller's CR, since we use cr3
-//   r3-r6 = parameters
-//        r10 = user-space ptr (r3 if copyin, r4 if copyout)
-//     cr3 = kkIn, kkString, kkNull flags
-
-copyJoin:
-        crclr  kkNull                                                  // (dst==NULL) convention not used with this call
-copyJoin1:                                                                             // enter from copyinstr with kkNull set
-               mflr    r0                                                              // get return address
-        cmplwi r5,0                                                    // buffer length 0?
-        lis            r9,0x1000                                               // r9 <- 0x10000000 (256MB)
-               stw             r0,FM_LR_SAVE(r1)                               // save return
-        cmplw  cr1,r5,r9                                               // buffer length > 256MB ?
-        mfsprg r8,2                                                    // get the features
-        beq--  copyinout_0                                             // 0 length is degenerate case
-               stwu    r1,-kkFrameSize(r1)                             // set up stack frame
-        stw            r2,kkCR(r1)                                             // save caller's CR since we use cr3
-        mtcrf  0x02,r8                                                 // move pf64Bit to cr6
-        stw            r3,kkSource(r1)                                 // save args across MapUserAddressSpace
-        stw            r4,kkDest(r1)
-        stw            r5,kkBufSize(r1)
-        crmove kk64bit,pf64Bitb                                // remember if this is a 64-bit processor
-        stw            r6,kkCountPtr(r1)
-        stw            r31,kkR31Save(r1)                               // we use r31 globally for mapped user ptr
-        li             r31,0                                                   // no mapped ptr yet
-        
-        
-// Handle buffer length > 256MB.  This is an error (ENAMETOOLONG) on copyin and copyout.
-// The string ops are passed -1 lengths by some BSD callers, so for them we silently clamp
-// the buffer length to 256MB.  This isn't an issue if the string is less than 256MB
-// (as most are!), but if they are >256MB we eventually return ENAMETOOLONG.  This restriction
-// is due to MapUserAddressSpace; we don't want to consume more than two segments for
-// the mapping. 
-
-        ble++  cr1,copyin0                                             // skip if buffer length <= 256MB
-        bf             kkString,copyinout_too_big              // error if not string op
-        mr             r5,r9                                                   // silently clamp buffer length to 256MB
-        stw            r9,kkBufSize(r1)                                // update saved copy too
-
-
-// Set up thread_recover in case we hit an illegal address.
-
-copyin0:
-               mfsprg  r8,1                                                    /* Get the current act */ 
-               lis             r2,hi16(copyinout_error)
-               lwz             r7,ACT_THREAD(r8)
-               ori             r2,r2,lo16(copyinout_error)
-               lwz             r3,ACT_VMMAP(r8)                                // r3 <- vm_map virtual address
-               stw             r2,THREAD_RECOVER(r7)
-
-
-// Map user segment into kernel map, turn on 64-bit mode.
-//             r3 = vm map
-//             r5 = buffer length
-//        r10 = user space ptr (r3 if copyin, r4 if copyout)
-        
-               mr              r6,r5                                                   // Set length to map
-               li              r4,0                                                    // Note: we only do this 32-bit for now
-        mr             r5,r10                                                  // arg2 <- user space ptr
-#if INSTRUMENT
-                       mfspr   r12,pmc1                                                ; INSTRUMENT - saveinstr[13] - Take stamp before mapuseraddressspace
-                       stw             r12,0x6100+(13*16)+0x0(0)               ; INSTRUMENT - Save it
-                       mfspr   r12,pmc2                                                ; INSTRUMENT - Get stamp
-                       stw             r12,0x6100+(13*16)+0x4(0)               ; INSTRUMENT - Save it
-                       mfspr   r12,pmc3                                                ; INSTRUMENT - Get stamp
-                       stw             r12,0x6100+(13*16)+0x8(0)               ; INSTRUMENT - Save it
-                       mfspr   r12,pmc4                                                ; INSTRUMENT - Get stamp
-                       stw             r12,0x6100+(13*16)+0xC(0)               ; INSTRUMENT - Save it
-#endif                 
-        bl             EXT(MapUserAddressSpace)                // set r3 <- address in kernel map of user operand
-#if INSTRUMENT
-                       mfspr   r12,pmc1                                                ; INSTRUMENT - saveinstr[14] - Take stamp after mapuseraddressspace
-                       stw             r12,0x6100+(14*16)+0x0(0)               ; INSTRUMENT - Save it
-                       mfspr   r12,pmc2                                                ; INSTRUMENT - Get stamp
-                       stw             r12,0x6100+(14*16)+0x4(0)               ; INSTRUMENT - Save it
-                       mfspr   r12,pmc3                                                ; INSTRUMENT - Get stamp
-                       stw             r12,0x6100+(14*16)+0x8(0)               ; INSTRUMENT - Save it
-                       mfspr   r12,pmc4                                                ; INSTRUMENT - Get stamp
-                       stw             r12,0x6100+(14*16)+0xC(0)               ; INSTRUMENT - Save it
-#endif                 
-               or.             r0,r3,r4                                                // Did we fail the mapping?
-        mr             r31,r4                                                  // r31 <- mapped ptr into user space (may be 64-bit)
-        beq--  copyinout_error                                 // was 0, so there was an error making the mapping
-        bf--   kk64bit,copyin1                                 // skip if a 32-bit processor
-               rldimi  r31,r3,32,0                                             // slam high-order bits into mapped ptr
-        mfmsr  r4                                                              // if 64-bit, turn on SF so we can use returned ptr
-        li             r0,1
-        rldimi r4,r0,63,MSR_SF_BIT                             // light bit 0
-        mtmsrd r4                                                              // turn on 64-bit mode
-        isync                                                                  // wait for mode to change
-        
-        
-// Load r3-r5, substituting mapped ptr as appropriate.
-
-copyin1:
-        lwz            r5,kkBufSize(r1)                                // restore length to copy
-        bf             kkIn,copyin2                                    // skip if copyout
-        lwz            r4,kkDest(r1)                                   // copyin: source is mapped, dest is r4 at entry
-        mr             r3,r31                                                  // source is mapped ptr
-        b              copyin3
-copyin2:                                                                               // handle copyout
-        lwz            r3,kkSource(r1)                                 // source is kernel buffer (r3 at entry)
-        mr             r4,r31                                                  // dest is mapped ptr into user space
-        
-        
-// Finally, all set up to copy:
-//             r3 = source ptr (mapped if copyin)
-//             r4 = dest ptr (mapped if copyout)
-//             r5 = length
-//        r31 = mapped ptr returned by MapUserAddressSpace
-//        cr3 = kkIn, kkString, kk64bit, and kkNull flags
-
-copyin3:
-        bt             kkString,copyString                             // handle copyinstr and copyoutstr
-        bl             EXT(bcopy)                                              // copyin and copyout: let bcopy do the work
-        li             r3,0                                                    // return success
-        
-        
-// Main exit point for copyin, copyout, copyinstr, and copyoutstr.  Also reached
-// from error recovery if we get a DSI accessing user space.  Clear recovery ptr, 
-// and pop off frame.  Note that we have kept
-// the mapped ptr into user space in r31, as a reg64_t type (ie, a 64-bit ptr on
-// 64-bit machines.)  We must unpack r31 into an addr64_t in (r3,r4) before passing
-// it to ReleaseUserAddressSpace.
-//             r3 = 0, EFAULT, or ENAMETOOLONG
-
-copyinx: 
-        lwz            r2,kkCR(r1)                                             // get callers cr3
-               mfsprg  r6,1                                                    // Get the current act 
-               lwz             r10,ACT_THREAD(r6)
+/* If the destination is NULL, don't do writes,
+ * just count bytes. We set CR7 outside the loop to save time
+ */
+               cmpwi   cr7,r4,0                                                /* Is the destination null? */
                
-        bf--   kk64bit,copyinx1                                // skip if 32-bit processor
-        mfmsr  r12
-        rldicl r12,r12,0,MSR_SF_BIT+1                  // if 64-bit processor, turn 64-bit mode off
-        mtmsrd r12                                                             // turn SF off and EE back on
-        isync                                                                  // wait for the mode to change
-copyinx1:
-        lwz            r31,kkR31Save(r1)                               // restore callers r31
-        addi   r1,r1,kkFrameSize                               // pop off our stack frame
-               lwz             r0,FM_LR_SAVE(r1)
-               li              r4,0
-               stw             r4,THREAD_RECOVER(r10)                  // Clear recovery
-               mtlr    r0
-        mtcrf  0x10,r2                                                 // restore cr3
-               blr
+nxtseg:        mtsr    SR_COPYIN,r7                                    /* Set the source SR */
+               isync
 
+.L_copyinstr_loop:
+               lbz             r0,0(r3)                                                /* Get the source */
+               addic.  r5,r5,-1                                                /* Have we gone far enough? */
+               addi    r3,r3,1                                                 /* Bump source pointer */
+               
+               cmpwi   cr1,r0,0                                                /* Did we hit a null? */
 
-/* We get here via the exception handler if an illegal
- * user memory reference was made.  This error handler is used by
- * copyin, copyout, copyinstr, and copyoutstr.  Registers are as
- * they were at point of fault, so for example cr3 flags are valid.
- */
+               beq             cr7,.L_copyinstr_no_store               /* If we are just counting, skip the store... */
+       
+               stb             r0,0(r4)                                                /* Move to sink */
+               addi    r4,r4,1                                                 /* Advance sink pointer */
+
+.L_copyinstr_no_store:
 
-copyinout_error:
-        li             r3,EFAULT                                               // return error
-        b              copyinx
-
-copyinout_0:                                                                   // degenerate case: 0-length copy
-               mtcrf   0x10,r2                                                 // restore cr3
-        li             r3,0                                                    // return success
-        blr
-        
-copyinout_too_big:                                                             // degenerate case
-        mtcrf  0x10,r2                                                 // restore cr3
-        lwz            r1,0(r1)                                                // pop off stack frame
-        li             r3,ENAMETOOLONG
-        blr
-        
-
-//<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-// Handle copyinstr and copyoutstr.  At this point the stack frame is set up,
-// the recovery ptr is set, the user's buffer is mapped, we're in 64-bit mode
-// if necessary, and:
-//             r3 = source ptr, mapped if copyinstr
-//             r4 = dest ptr, mapped if copyoutstr
-//             r5 = buffer length
-//        r31 = mapped ptr returned by MapUserAddressSpace
-//     cr3 = kkIn, kkString, kkNull, and kk64bit flags
-// We do word copies unless the buffer is very short, then use a byte copy loop
-// for the leftovers if necessary.
-
-copyString:
-        li             r12,0                                                   // Set header bytes count to zero
-        cmplwi cr1,r5,20                                               // is buffer very short?
-        mtctr  r5                                                              // assuming short, set up loop count for bytes
-        blt            cr1,copyinstr8                                  // too short for word loop
-        andi.  r12,r3,0x3                                              // is source ptr word aligned?
-        bne            copyinstr11                                             //  bytes loop
-copyinstr1:
-        srwi   r6,r5,2                                                 // get #words in buffer
-        mtctr  r6                                                              // set up word loop count
-        lis            r10,hi16(0xFEFEFEFF)                    // load magic constants into r10 and r11
-        lis            r11,hi16(0x80808080)
-        ori            r10,r10,lo16(0xFEFEFEFF)
-        ori            r11,r11,lo16(0x80808080)
-        bf             kkNull,copyinstr6                               // enter loop that copies
-        b              copyinstr5                                              // use loop that just counts
-        
-        
-// Word loop(s).  They do a word-parallel search for 0s, using the following
-// inobvious but very efficient test:
-//             y =  data + 0xFEFEFEFF
-//             z = ~data & 0x80808080
-// If (y & z)==0, then all bytes in dataword are nonzero.  We need two copies of
-// this loop, since if we test kkNull in the loop then it becomes 9 words long.
-
-        .align 5                                                               // align inner loops for speed
-copyinstr5:                                                                            // version that counts but does not copy
-        lwz            r8,0(r3)                                                // get next word of source
-        addi   r3,r3,4                                                 // increment source ptr
-        add            r9,r10,r8                                               // r9 =  data + 0xFEFEFEFF
-        andc   r7,r11,r8                                               // r7 = ~data & 0x80808080
-        and.   r7,r9,r7                                                // r7 = r9 & r7
-        bdnzt  cr0_eq,copyinstr5                               // if r7==0, then all bytes are nonzero
-
-        b              copyinstr7
-
-        .align 5                                                               // align inner loops for speed
-copyinstr6:                                                                            // version that counts and copies
-        lwz            r8,0(r3)                                                // get next word of source
-        addi   r3,r3,4                                                 // increment source ptr
-        addi   r4,r4,4                                                 // increment dest ptr while we wait for data
-        add            r9,r10,r8                                               // r9 =  data + 0xFEFEFEFF
-        andc   r7,r11,r8                                               // r7 = ~data & 0x80808080
-        and.   r7,r9,r7                                                // r7 = r9 & r7
-        stw            r8,-4(r4)                                               // pack all 4 bytes into buffer
-        bdnzt  cr0_eq,copyinstr6                               // if r7==0, then all bytes are nonzero
-
-
-// Either 0 found or buffer filled.  The above algorithm has mapped nonzero bytes to 0
-// and 0 bytes to 0x80 with one exception: 0x01 bytes preceeding the first 0 are also
-// mapped to 0x80.  We must mask out these false hits before searching for an 0x80 byte.
-
-copyinstr7:
-        crnot  kkZero,cr0_eq                                   // 0 found iff cr0_eq is off
-        mfctr  r6                                                              // get #words remaining in buffer
-        rlwinm r2,r8,7,0,31                                    // move 0x01 bits to 0x80 position
-        slwi   r6,r6,2                                                 // convert to #bytes remaining
-        andc   r7,r7,r2                                                // turn off false hits from 0x0100 worst case
-        rlwimi r6,r5,0,30,31                                   // add in odd bytes leftover in buffer
-        srwi   r7,r7,8                                                 // we want to count the 0 as a byte xferred
-        addi   r6,r6,4                                                 // don't count last word xferred (yet)
-        cntlzw r7,r7                                                   // now we can find the 0 byte (ie, the 0x80)
-        srwi   r7,r7,3                                                 // convert 8,16,24,32 to 1,2,3,4
-        sub.   r6,r6,r7                                                // account for nonzero bytes in last word
-        bt++   kkZero,copyinstr10                              // 0 found, so done
-        
-        beq            copyinstr10                                             // r6==0, so buffer truly full
-        mtctr  r6                                                              // 0 not found, loop over r6 bytes
-        b              copyinstr8                                              // enter byte loop for last 1-3 leftover bytes
-        
-
-// Byte loop.  This is used for very small buffers and for the odd bytes left over
-// after searching and copying words at a time.
-    
-        .align 5                                                               // align inner loops for speed
-copyinstr8:                                                                            // loop over bytes of source
-        lbz            r0,0(r3)                                                // get next byte of source
-        addi   r3,r3,1
-        addi   r4,r4,1                                                 // increment dest addr whether we store or not
-        cmpwi  r0,0                                                    // the 0?
-        bt--   kkNull,copyinstr9                               // don't store (was copyinstr with NULL ptr)
-        stb            r0,-1(r4)
-copyinstr9:
-        bdnzf  cr0_eq,copyinstr8                               // loop if byte not 0 and more room in buffer
-        
-        mfctr  r6                                                              // get #bytes left in buffer
-        crmove kkZero,cr0_eq                                   // remember if 0 found or buffer filled
-
-        
-// Buffer filled or 0 found.  Unwind and return.
-//     r5 = kkBufSize, ie buffer length
-//  r6 = untransferred bytes remaining in buffer
-// r31 = mapped ptr returned by MapUserAddressSpace
-// cr3 = kkZero set iff 0 found
-
-copyinstr10:
-        lwz            r9,kkCountPtr(r1)                               // get ptr to place to store count of bytes moved
-        sub            r2,r5,r6                                                // get #bytes we moved, counting the 0 iff any
-        add            r2,r2,r12                                               // add the header bytes count
-        li             r3,0                                                    // assume 0 return status
-        stw            r2,0(r9)                                                // store #bytes moved
-        bt++   kkZero,copyinx                                  // we did find the 0 so return 0
-        li             r3,ENAMETOOLONG                                 // buffer filled
-        b              copyinx                                                 // join main exit routine
-
-// Byte loop.  This is used on the header bytes for unaligned source 
-    
-        .align 5                                                               // align inner loops for speed
-copyinstr11:
-        li             r10,4                                                   // load word size
-        sub            r12,r10,r12                                             // set the header bytes count
-        mtctr  r12                                                             // set up bytes loop count
-copyinstr12:                                                                   // loop over bytes of source
-        lbz            r0,0(r3)                                                // get next byte of source
-        addi   r3,r3,1
-        addi   r4,r4,1                                                 // increment dest addr whether we store or not
-        cmpwi  r0,0                                                    // the 0?
-        bt--   kkNull,copyinstr13                              // don't store (was copyinstr with NULL ptr)
-        stb            r0,-1(r4)
-copyinstr13:
-        bdnzf  cr0_eq,copyinstr12                              // loop if byte not 0 and more room in buffer
-        sub            r5,r5,r12                                               // substract the bytes copied
-        bne            cr0_eq,copyinstr1                               // branch to word loop
-
-        mr             r5,r12                                                  // Get the header bytes count
-        li             r12,0                                                   // Clear the header bytes count
-        mfctr  r6                                                              // get #bytes left in buffer
-        crmove kkZero,cr0_eq                                   // remember if 0 found or buffer filled
-        b              copyinstr10
+               addi    r9,r9,1                                                 /* Count the character */
+               beq-    cr1,.L_copyinstr_done                   /* We're done if we did a null... */
+               beq-    cr0,L_copyinstr_toobig                  /* Also if we maxed the count... */
+       
+/* Check to see if the copyin pointer has moved out of the
+ * copyin segment, if it has we must remap.
+ */
 
+               rlwinm. r0,r3,0,4,31                                    /* Did we wrap around to 0? */
+               bne+    cr0,.L_copyinstr_loop                   /* Nope... */
+
+               lwz             r7,PMAP_SEGS+4(r8)                              ; Get the next source SR value
+               addi    r8,r8,4                                                 ; Point to the next segment
+               oris    r3,r0,(SR_COPYIN_NUM << (28-16))        /* Reset the segment number */
+               b               nxtseg                                                  /* Keep going... */
+       
+L_copyinstr_toobig:
+               li              r3,ENAMETOOLONG
+               b               L_copyinstr_return
+.L_copyinstr_done:
+               li              r3,0                                                    /* Normal return */
+L_copyinstr_return:
+               li              r4,0                                                    /* to clear thread_recover */
+               stw             r9,0(r6)                                                /* Set how many bytes we did */
+               stw             r4,THREAD_RECOVER(r10)                  /* Clear recovery exit */
+
+               addi    r1,     r1,     FM_SIZE+16
+               lwz             r0,     FM_LR_SAVE(r1)
+               mtlr    r0
+               blr
index 4403d34cd93a59a464e1289647a65819ade98798..2c7da0d119db0f37535fe91471a15197f4a2839f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
diff --git a/osfmk/ppc/net_filter.c b/osfmk/ppc/net_filter.c
new file mode 100644 (file)
index 0000000..3f9225a
--- /dev/null
@@ -0,0 +1,750 @@
+/*
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*
+ * @OSF_COPYRIGHT@
+ * 
+ */
+
+
+#if NET_FILTER_COMPILER
+
+
+#define USE_EXTRA_REGS 0
+
+#define REG_ZERO       0       /* Register we keep equal to 0. */
+#define REG_DATAADDR   3       /* Address of packet data, and filter return. */
+#define REG_DATALEN    4       /* Length of packet data in two-byte units. */
+#define REG_HDRADDR    5       /* Address of header data. */
+#define REG_RET                3       /* Where to put return value. */
+
+/* Originally we dealt in virtual register numbers which were essentially
+   indexes into this array, and only converted to machine register numbers
+   when emitting instructions.  But that meant a lot of conversions, so
+   instead we deal with machine register numbers all along, even though this
+   means wasting slots in the regs[] array.  */
+const unsigned char scratchregs[] = {
+    6, 7, 8, 9, 10, 11, 12,
+#if USE_EXTRA_REGS     /* Callee-saves regs available if we save them. */
+#define INITIAL_NSCRATCHREGS 8 /* Number of registers above. */
+    #error not yet written
+#endif
+};
+#define NSCRATCHREGS (sizeof scratchregs / sizeof scratchregs[0])
+#define NREGS 32
+#define NO_REG 1       /* This is the stack pointer!  Flag value.  */
+
+#define MAX_LI         0x7fff  /* Max unsigned value in an LI. */
+
+#define BCLR(cond)     ((19 << 26) | (cond) | (16 << 1))
+#define BLR()          BCLR(COND_ALWAYS)
+#define BC(cond, off)  ((16 << 26) | (cond) | ((off) << 2))
+#define COND(BO, BI)   (((BO) << (16 + 5)) | ((BI) << 16))
+#define COND_ALWAYS    COND(COND_IF_ALWAYS, 0)
+#define COND_EQ                COND(COND_IF_TRUE, COND_BIT(0, BIT_EQ))
+#define COND_NE                COND(COND_IF_FALSE, COND_BIT(0, BIT_EQ))
+#define COND_LE                COND(COND_IF_FALSE, COND_BIT(0, BIT_GT))
+#define COND_GE                COND(COND_IF_FALSE, COND_BIT(0, BIT_LT))
+#define COND_BIT(crf, bit) \
+                       ((crf) * 4 + (bit))
+#define BIT_EQ         2
+#define BIT_GT         1
+#define BIT_LT         0
+#define COND_IF_FALSE  0x04
+#define COND_IF_TRUE   0x0c
+#define COND_IF_ALWAYS 0x14
+
+/* For arithmetical instructions, a is the dest and b is the source;
+   for logical instructions, a is the source and b is the dest.  Ho hum.  */
+#define IMMED(opcode, a, b, imm) \
+                       (((opcode) << 26) | ((a) << 21) | ((b) << 16) | \
+                        ((imm) & 0xffff))
+#define ADDI(dst, src, imm) \
+                       IMMED(14, dst, src, imm)
+#define ADDIC(dst, src, imm) \
+                       IMMED(12, dst, src, imm)
+#define SUBFIC(dst, src, imm) \
+                       IMMED(8, dst, src, imm)
+#define LI(dst, imm)   ADDI(dst, 0, (imm))
+#define ANDI(dst, src, imm) \
+                       IMMED(28, src, dst, imm)
+#define ORI(dst, src, imm) \
+                       IMMED(24, src, dst, imm)
+#define XORI(dst, src, imm) \
+                       IMMED(26, src, dst, imm)
+
+#define CMPL(lhs, rhs) ((31 << 26) | ((lhs) << 16) | ((rhs) << 11) | (32 << 1))
+#define CMPLI(lhs, imm)        ((10 << 26) | ((lhs) << 16) | ((imm) & 0xffff))
+
+#define INTEGER_OP(opcode, a, b, c) \
+                       ((31 << 26) | ((a) << 21) | ((b) << 16) | \
+                        ((c) << 11) | ((opcode) << 1))
+#define ARITH_OP(opcode, dst, lhs, rhs) \
+                       INTEGER_OP(opcode, dst, lhs, rhs)
+#define ADD(dst, lhs, rhs) \
+                       ARITH_OP(OP_ADD, dst, lhs, rhs)
+#define ADDE(dst, lhs, rhs) \
+                       ARITH_OP(OP_ADDE, dst, lhs, rhs)
+#define SUBF(dst, lhs, rhs) \
+                       ARITH_OP(OP_SUBF, dst, lhs, rhs)
+#define SUBFC(dst, lhs, rhs) \
+                       ARITH_OP(OP_SUBFC, dst, lhs, rhs)
+#define SUBFE(dst, lhs, rhs) \
+                       ARITH_OP(OP_SUBFE, dst, lhs, rhs)
+#define LOGIC_OP(opcode, dst, lhs, rhs) \
+                       INTEGER_OP(opcode, lhs, dst, rhs)
+#define OR(dst, lhs, rhs) \
+                       LOGIC_OP(OP_OR, dst, lhs, rhs)
+#define XOR(dst, lhs, rhs) \
+                       LOGIC_OP(OP_XOR, dst, lhs, rhs)
+#define OP_ADD                 266
+#define OP_ADDE                138
+#define OP_AND         28
+#define OP_OR          444
+#define OP_SRW         536
+#define OP_SUBF                40
+#define OP_SUBFC       8
+#define OP_SUBFE       136
+#define OP_XOR         316
+#define MR(dst, src)   OR(dst, src, src)
+
+#define LHZ(dst, base, offset) \
+                       ((40 << 26) | ((dst) << 21) | ((base) << 16) | \
+                        ((offset) & 0xffff))
+#define LHZX(dst, base, index) \
+                       INTEGER_OP(279, dst, base, index)
+#define MFCR(dst)      INTEGER_OP(19, dst, 0, 0)
+
+#define RLWINM(dst, src, shiftimm, mbegin, mend) \
+                       ((21 << 26) | ((src) << 21) | ((dst) << 16) | \
+                        ((shiftimm) << 11) | ((mbegin) << 6) | ((mend) << 1))
+#define RLWNM(dst, src, shiftreg, mbegin, mend) \
+                       ((23 << 26) | ((src) << 21) | ((dst) << 16) | \
+                        ((shiftreg) << 11) | ((mbegin) << 6) | ((mend) << 1))
+
+/* Every NETF_arg generates at most four instructions (4 for PUSHIND).
+   Every NETF_op generates at most 3 instructions (3 for EQ and NEQ).  */
+#define MAX_INSTR_PER_ARG 4
+#define MAX_INSTR_PER_OP  3
+#define MAX_INSTR_PER_ITEM (MAX_INSTR_PER_ARG + MAX_INSTR_PER_OP)
+int junk_filter[MAX_INSTR_PER_ITEM];
+
+enum {NF_LITERAL, NF_HEADER, NF_DATA};
+struct common {        /* Keeps track of values we might want to avoid reloading. */
+    char type; /* NF_LITERAL: immediate; NF_HEADER: header word;
+                  NF_DATA: data word. */
+    char nuses;        /* Number of remaining uses for this value. */
+    unsigned char reg;
+               /* Register this value is currently in, or NO_REG if none. */
+    unsigned short value;
+               /* Immediate value or header or data offset. */
+};
+struct reg {   /* Keeps track of the current contents of registers. */
+    unsigned char commoni;
+                       /* Index in common[] of the contained value. */
+#define NOT_COMMON_VALUE NET_MAX_FILTER        /* When not a common[] value. */
+    unsigned char stacktimes;
+                       /* Number of times register appears in stack. */
+};
+struct local { /* Gather local arrays so we could kalloc() if needed.  */
+    struct common common[NET_MAX_FILTER];      /* Potentially common values. */
+    struct reg regs[NREGS];                    /* Register statuses. */
+    unsigned char commonpos[NET_MAX_FILTER];   /* Index in common[] for the
+                                                  value loaded in each filter
+                                                  command. */
+    unsigned char stackregs[NET_FILTER_STACK_DEPTH];
+                                               /* Registers making up the
+                                                  stack. */
+#if USE_EXTRA_REGS
+    unsigned char maxreg;
+#endif
+};
+
+int allocate_register(struct local *s, int commoni);
+int compile_preamble(int *instructions, struct local *s);
+
+/* Compile a packet filter into POWERPC machine code.  We do everything in
+   the 7 caller-saves registers listed in scratchregs[], except when
+   USE_EXTRA_REGS is defined, in which case we may also allocate callee-
+   saves registers if needed.  (Not yet implemented on PPC.)
+
+   Rather than maintaining an explicit stack in memory, we allocate registers
+   dynamically to correspond to stack elements -- we can do this because we
+   know the state of the stack at every point in the filter program.  We also
+   attempt to keep around in registers values (immediates, or header or data
+   words) that are used later on, to avoid having to load them again.
+   Since there are only 7 registers being used, we might be forced to reload
+   a value that we could have kept if we had more.  We might even be unable
+   to contain the stack in the registers, in which case we return failure and
+   cause the filter to be interpreted by net_do_filter().  But for all current
+   filters I looked at, 7 registers is enough even to avoid reloads.  When
+   USE_EXTRA_REGS is defined there are about 28 available registers, which is
+   plenty.
+
+   We depend heavily on NET_MAX_FILTER and NET_FILTER_STACK_DEPTH being
+   small.  We keep indexes to arrays sized by them in char-sized fields,
+   originally because we tried allocating these arrays on the stack.
+   Even then we overflowed the small (4K) kernel stack, so we were forced
+   to allocate the arrays dynamically, which is the reason for the existence
+   of `struct local'.
+
+   We also depend on the filter being logically correct, for instance not
+   being longer than NET_MAX_FILTER or underflowing its stack.  This is
+   supposed to have been checked by parse_net_filter() before the filter
+   is compiled.
+
+   We are supposed to return 1 (TRUE) if the filter accepts the packet
+   and 0 (FALSE) otherwise.  In fact, we may return any non-zero value
+   for true, which is sufficient for our caller and convenient for us.
+
+   There are lots and lots of optimisations that we could do but don't.
+   This is supposedly a *micro*-kernel, after all.  Here are some things
+   that could be added without too much headache:
+   - Using the condition register.  We go to a lot of trouble to generate
+     integer truth values for EQ etc, but most of the time those values
+     are just ANDed or ORed together or used as arguments to COR etc.  So
+     we could compute the comparison values directly into CR bits and
+     operate on them using the CR logical instructions without (most of
+     the time) ever having to generate integer equivalents.
+   - More registers.  We could note the last uses of r3, r4, and
+     r5, and convert them to general registers after those uses.  But if
+     register shortage turns out to be a problem it is probably best just
+     to define USE_EXTRA_REGS and have done with it.
+   - Minimising range checks.  Every time we refer to a word in the data
+     part, we generate code to ensure that it is within bounds.  But often
+     the truth of these tests is implied by earlier tests.  Instead, at the
+     start of the filter and after every COR or CNAND we could insert
+     a single check when that is necessary.  (After CAND and CNOR we don't
+     need to check since if they terminate it will be to return FALSE
+     anyway so all we'd do would be to return it prematurely.)
+   - Remembering immediate values.  Instead of generating code as soon as we
+     see a PUSHLIT, we could remember that value and only generate code when
+     it is used.  This would enable us to generate certain shorter
+     instructions (like addi) that incorporate the immediate value instead
+     of ever putting it in a register.
+ */
+
+filter_fct_t
+net_filter_alloc(filter_t *filter, unsigned int size, unsigned int *lenp)
+{
+    struct local *s;
+    int len, oldi, i, j, t, ncommon, sp;
+    int type, value, arg, op, reg, reg1, dst, commoni;
+    int returnfalseoffset;
+    int *instructions, *instp, *returnfalse;
+#if USE_EXTRA_REGS
+    int oldmaxreg;
+#endif
+    boolean_t compiling;
+
+#define SCHAR_MAX 127  /* machine/machlimits->h, anyone? */
+    assert(NET_MAX_FILTER <= SCHAR_MAX);
+    assert(NET_FILTER_STACK_DEPTH <= SCHAR_MAX);
+    assert(NREGS <= SCHAR_MAX);
+
+    assert(size < NET_MAX_FILTER);
+
+    s = (struct local *) kalloc(sizeof *s);
+
+#if USE_EXTRA_REGS
+    s->maxreg = INITIAL_NSCRATCHREGS;
+#endif
+    len = 0;
+    compiling = FALSE;
+    returnfalse = junk_filter;
+
+    /* This loop runs at least twice, once with compiling==FALSE to determine
+       the length of the instructions we will compile, and once with
+       compiling==TRUE to compile them.  The code generated on the two passes
+       must be the same.  In the USE_EXTRA_REGS case, the loop can be re-run
+       an extra time while !compiling, if we decide to use the callee-saves
+       registers.  This is because we may be able to generate better code with
+       the help of these registers than before.  */
+    while (1) {
+
+       /* Identify values that we can potentially preserve in a register to
+          avoid having to reload them.  All immediate values and references to
+          known offsets in the header or data are candidates.  The results of
+          this loop are the same on every run, so with a bit of work we
+          could run it just once; but this is not a time-critical
+          application.  */
+       ncommon = 0;
+       for (i = 0; i < size; i++) {
+           oldi = i;
+           arg = NETF_ARG(filter[i]);
+           if (arg == NETF_PUSHLIT) {
+               type = NF_LITERAL;
+               value = filter[++i];
+           } else if (arg >= NETF_PUSHSTK) {
+               continue;
+           } else if (arg >= NETF_PUSHHDR) {
+               type = NF_HEADER;
+               value = arg - NETF_PUSHHDR;
+           } else if (arg >= NETF_PUSHWORD) {
+               type = NF_DATA;
+               value = arg - NETF_PUSHWORD;
+           } else {
+               continue;
+           }
+           for (j = 0; j < ncommon; j++) {
+               if (s->common[j].type == type && s->common[j].value == value) {
+                   s->common[j].nuses++;
+                   break;
+               }
+           }
+           if (j == ncommon) {
+               s->common[j].type = type;
+               s->common[j].value = value;
+               s->common[j].nuses = 1;
+               ncommon++;
+           }
+           s->commonpos[oldi] = j;
+       }
+
+#if USE_EXTRA_REGS
+       oldmaxreg = s->maxreg;
+#endif
+
+       /* Initially, no registers hold common values or are on the stack.  */
+       for (i = 0; i < ncommon; i++)
+           s->common[i].reg = NO_REG;
+       for (i = 0; i < NSCRATCHREGS; i++) {
+           s->regs[scratchregs[i]].commoni = NOT_COMMON_VALUE;
+           s->regs[scratchregs[i]].stacktimes = 0;
+       }
+
+       /* Now read through the filter and generate code. */
+       sp = -1;        /* sp points to top element */
+       for (i = 0; i < size; i++) {
+           if (!compiling)
+               instp = junk_filter;
+
+           assert(sp >= -1);
+           assert(sp < NET_FILTER_STACK_DEPTH - 1);
+           commoni = s->commonpos[i];
+           arg = NETF_ARG(filter[i]);
+           op = NETF_OP(filter[i]);
+
+           /* Generate code to get the required value into a register and
+              set `reg' to the number of this register. */
+           switch (arg) {
+           case NETF_PUSHLIT:
+               value = filter[++i];
+               reg = s->common[commoni].reg;
+               if (reg == NO_REG) {
+                   if ((reg = allocate_register(s, commoni)) == NO_REG)
+                       goto fail;
+                   assert(value >= 0); /* Comes from unsigned short. */
+                   *instp++ = ORI(reg, REG_ZERO, value);
+               }
+               s->common[commoni].nuses--;
+               break;
+           case NETF_NOPUSH:
+               reg = s->stackregs[sp--];
+               s->regs[reg].stacktimes--;
+               break;
+           case NETF_PUSHZERO:
+               reg = REG_ZERO;
+               break;
+           case NETF_PUSHIND:
+           case NETF_PUSHHDRIND:
+               reg1 = s->stackregs[sp--];
+               s->regs[reg1].stacktimes--;
+               if (arg == NETF_PUSHIND)
+                   *instp++ = CMPL(reg1, REG_DATALEN);
+               else
+                   *instp++ = CMPLI(reg1,
+                                    NET_HDW_HDR_MAX/sizeof (unsigned short));
+               *instp = BC(COND_GE, returnfalse - instp);
+               instp++;
+               if ((reg = allocate_register(s, -1)) == NO_REG)
+                   goto fail;
+               *instp++ = ADD(reg, reg1, reg1);
+               *instp++ = LHZX(reg, (arg == NETF_PUSHIND) ?
+                                       REG_DATAADDR : REG_HDRADDR, reg);
+               break;
+           default:
+               if (arg >= NETF_PUSHSTK)
+                   reg = s->stackregs[sp - (arg - NETF_PUSHSTK)];
+               else if (arg >= NETF_PUSHWORD) {
+                   assert(2 * (NETF_PUSHHDR - NETF_PUSHWORD) <= MAX_LI);
+                   assert(NETF_PUSHSTK - NETF_PUSHHDR <= MAX_LI);
+                   reg = s->common[commoni].reg;
+                   if (reg == NO_REG) {
+                       if ((reg = allocate_register(s, commoni)) == NO_REG)
+                           goto fail;
+                       if (arg < NETF_PUSHHDR) {
+                           value = arg - NETF_PUSHWORD;
+                           *instp++ = CMPLI(REG_DATALEN, value);
+                           *instp = BC(COND_LE, returnfalse - instp);
+                           instp++;
+                           reg1 = REG_DATAADDR;
+                       } else {
+                           value = arg - NETF_PUSHHDR;
+                           reg1 = REG_HDRADDR;
+                       }
+                       *instp++ = LHZ(reg, reg1, 2 * value);
+                   }
+                   s->common[commoni].nuses--;
+               }
+           }
+
+           /* Now generate code to do `op' on `reg1' (lhs) and `reg' (rhs). */
+           if (op != NETF_NOP) {
+               reg1 = s->stackregs[sp--];
+               s->regs[reg1].stacktimes--;
+           }
+           switch (op) {
+           case NETF_OP(NETF_CAND):
+           case NETF_OP(NETF_COR):
+           case NETF_OP(NETF_CNAND):
+           case NETF_OP(NETF_CNOR):
+               dst = -1;
+           case NETF_OP(NETF_NOP):
+               break;
+           default:
+               /* Allocate a register to put the result in. */
+               if ((dst = allocate_register(s, -1)) == NO_REG)
+                   goto fail;
+           }
+           switch (op) {
+           case NETF_OP(NETF_NOP):
+               dst = reg;
+               break;
+           case NETF_OP(NETF_EQ):
+           case NETF_OP(NETF_NEQ):
+               /* We arrange for the truth value to end up in the carry
+                  flag and then put it in the destination register by
+                  adding-with-carry zero to itself.  To set the carry, we
+                  first make a value `x' that is zero if the values are
+                  equal; this is either their XOR, or, if we know the
+                  rhs is 0, the lhs.  Then to set the carry only when
+                  x==0 we do `subfic dst,x,0' (subtract x from 0, setting
+                  carry as not-borrow, so set only if x==0); to set it when
+                  x!=0 we do `addic dst,x,-1' (add -1 to x setting carry,
+                  so set unless x==0).  We're only interested in the carry
+                  from these operations, not dst.
+                  We don't test if reg1==REG_ZERO since in practice you
+                  write NETF_PUSHLIT|NETF_EQ; the other order is eccentric
+                  so you get an extra instruction, tough.  */
+               if (reg == REG_ZERO)
+                   t = reg1;
+               else {
+                   *instp++ = XOR(dst, reg1, reg);
+                   t = dst;
+               }
+               *instp++ = (op == NETF_OP(NETF_EQ)) ?
+                           SUBFIC(dst, t, 0) : ADDIC(dst, t, -1);
+               *instp++ = ADDE(dst, REG_ZERO, REG_ZERO);
+               break;
+           case NETF_OP(NETF_LT):
+               /* LT and GT take advantage of the fact that all numbers are
+                  16-bit quantities, so the sign bit after a subtraction
+                  is a reliable indication of the relative magnitudes of
+                  the operands.  */
+               *instp++ = SUBF(dst, reg, reg1);        /* dst = reg1 - reg */
+               *instp++ = RLWINM(dst, dst, 1, 31, 31); /* sign bit */
+               break;
+           case NETF_OP(NETF_GT):
+               *instp++ = SUBF(dst, reg1, reg);        /* dst = reg - reg1 */
+               *instp++ = RLWINM(dst, dst, 1, 31, 31); /* sign bit */
+               break;
+           case NETF_OP(NETF_LE):
+               /* LE and GE use the carry (= not-borrow) flag.  When doing
+                  a - b, there is a borrow if b > a, so carry if b <= a. */
+               *instp++ = SUBFC(dst, reg1, reg);       /* dst = reg - reg1 */
+               *instp++ = ADDE(dst, REG_ZERO, REG_ZERO);/* ca if reg1 <= reg */
+               break;
+           case NETF_OP(NETF_GE):
+               *instp++ = SUBFC(dst, reg, reg1);       /* dst = reg1 - reg */
+               *instp++ = ADDE(dst, REG_ZERO, REG_ZERO);/* ca if reg <= reg1 */
+               break;
+           case NETF_OP(NETF_AND):
+               j = OP_AND;
+               goto logical;
+           case NETF_OP(NETF_OR):
+               j = OP_OR;
+               goto logical;
+           case NETF_OP(NETF_XOR):
+               j = OP_XOR;
+               goto logical;
+           case NETF_OP(NETF_RSH):
+               j = OP_SRW;
+logical:
+               *instp++ = LOGIC_OP(j, dst, reg1, reg);
+               break;
+           case NETF_OP(NETF_ADD):
+               j = OP_ADD;
+               goto arithmetical;
+           case NETF_OP(NETF_SUB):
+               j = OP_SUBF;    /* First reg subtracted from second. */
+arithmetical:
+               *instp++ = ARITH_OP(j, dst, reg, reg1);
+               *instp++ = ANDI(dst, dst, 0xffff);
+               break;
+           case NETF_OP(NETF_LSH):
+               *instp++ = RLWNM(dst, reg1, reg, 16, 31);
+               break;
+           case NETF_OP(NETF_COR):
+           case NETF_OP(NETF_CNAND):
+               *instp++ = CMPL(reg1, reg);
+               *instp++ = BCLR((op == NETF_OP(NETF_COR)) ? COND_EQ : COND_NE);
+               break;
+           case NETF_OP(NETF_CAND):
+           case NETF_OP(NETF_CNOR):
+               *instp++ = CMPL(reg1, reg);
+               *instp = BC((op == NETF_OP(NETF_CAND)) ? COND_NE : COND_EQ,
+                           returnfalse - instp);
+               instp++;
+               break;
+           default:
+               printf("op == 0x%x\n", op);
+               panic("net_filter_alloc: bad op");
+               /* Should have been caught by parse_net_filter(). */
+           }
+           /* If the op generated a result, push it on the stack. */
+           if (dst >= 0) {
+               s->stackregs[++sp] = dst;
+               s->regs[dst].stacktimes++;
+           }
+           if (!compiling) {
+               assert(instp - junk_filter <= MAX_INSTR_PER_ITEM);
+               len += instp - junk_filter;
+           }
+       }
+       if (compiling) {
+           /* If the stack contains any values, we are supposed to return 0 or
+              1 according as the top-of-stack is zero or not.  Since the only
+              place we are called requires just zero-false/nonzero-true, we
+              simply copy the value into r3.  If the stack is empty, we
+              leave the pointer value r3 intact to return TRUE.  */
+           if (sp >= 0)
+               *instp++ = MR(REG_RET, s->stackregs[sp]);
+           *instp++ = BLR();
+           /* Branch here to return false.  We could avoid adding these
+              instructions if they are not used, but practically every
+              filter does use them (for failure values when trying to
+              access values beyond the header or data length) so it's
+              not worth the effort.  */
+           assert(instp == returnfalse);
+           *instp++ = LI(REG_RET, 0);
+           *instp++ = BLR();
+           break;
+       } else {
+           len += 1 + (sp >= 0);
+                       /* For the reach-the-end return instruction(s).  */
+#if USE_EXTRA_REGS
+           if (s->maxreg > oldmaxreg) {
+               len = 0;
+               continue;
+           }
+#endif
+           len += compile_preamble(NULL, s);
+           returnfalseoffset = len;
+           len += 2;   /* For the return-false instructions.  */
+       }
+       if ((instructions = (int *) kalloc(len * sizeof (int))) == NULL)
+           return NULL;
+       returnfalse = instructions + returnfalseoffset;
+       instp = instructions;
+       instp += compile_preamble(instp, s);
+       compiling = TRUE;
+    }
+
+    assert(instp - instructions == len);
+    *lenp = len * sizeof (int);
+    {
+       kern_return_t kr;
+       vm_machine_attribute_val_t val = MATTR_VAL_CACHE_SYNC;
+
+       kr = pmap_attribute(kernel_pmap, (vm_offset_t) instructions,
+                           len * sizeof (int), MATTR_CACHE, &val);
+       if (kr != KERN_SUCCESS) {
+           printf("net_filter_alloc: pmap_attribute -> 0x%x\n", kr);
+           return NULL;
+       }
+    }
+    kfree((vm_offset_t) s, sizeof *s);
+    return (filter_fct_t) instructions;
+fail:
+    assert(!compiling);
+    kfree((vm_offset_t) s, sizeof *s);
+    printf("net_filter_alloc: failed to compile (filter too complex)\n");
+    printf("-- will work, but more slowly; consider enabling USE_EXTRA_REGS\n");
+    return NULL;
+}
+
+
+/* Allocate a register.  Registers that are already being used to make up
+   the virtual stack are ineligible.  Among the others, we choose the one
+   whose value has the least number of subsequent uses (ideally, and
+   usually, 0) of the common value it already holds.  If commoni is >=
+   0, it is the index in common[] of the value we are going to put in
+   the allocated register, so we can update the various data structures
+   appropriately.  */
+int
+allocate_register(struct local *s, int commoni)
+{
+    int i, reg, bestreg, nuses, bestregnuses, maxreg;
+
+    bestreg = NO_REG;
+#if USE_EXTRA_REGS
+    maxreg = s->maxreg;
+#else
+    maxreg = NSCRATCHREGS;
+#endif
+    while (1) {
+       bestregnuses = NOT_COMMON_VALUE;
+       for (i = 0; i < maxreg; i++) {
+           reg = scratchregs[i];
+           if (s->regs[reg].stacktimes == 0) {
+               nuses = (s->regs[reg].commoni == NOT_COMMON_VALUE) ?
+                       0 : s->common[s->regs[reg].commoni].nuses;
+               if (nuses < bestregnuses) {
+                   bestreg = reg;
+                   bestregnuses = nuses;
+               }
+           }
+       }
+       if (bestreg != NO_REG)
+           break;
+#if USE_EXTRA_REGS
+       if (maxreg == NSCRATCHREGS)
+           return NO_REG;
+       s->maxreg = ++maxreg;
+#else
+       return NO_REG;
+#endif
+    }
+    if (bestregnuses > 0)
+       printf("net_filter_alloc: forced to reallocate r%d\n", bestreg);
+       /* With USE_EXTRA_REGS, we could push up the number of registers
+          here to have one extra available for common values, but it's usually
+          not worth the overhead of the extra save-and-restore in the preamble.
+          Anyway, this never happens with typical filters.  */
+    if (s->regs[bestreg].commoni != NOT_COMMON_VALUE)
+       s->common[s->regs[bestreg].commoni].reg = NO_REG;
+    if (commoni >= 0) {
+       s->regs[bestreg].commoni = commoni;
+       s->common[commoni].reg = bestreg;
+    } else
+       s->regs[bestreg].commoni = NOT_COMMON_VALUE;
+    return bestreg;
+}
+
+
+#define FIXED_PREAMBLE_INSTRUCTIONS 1
+
+int
+compile_preamble(int *instructions, struct local *s)
+{
+    int *instp;
+    int len = FIXED_PREAMBLE_INSTRUCTIONS;
+#if USE_EXTRA_REGS
+#error this hp code must be ported to the ppc
+    int extra_regs, i, j, t, disp;
+
+    extra_regs = s->maxreg - INITIAL_NSCRATCHREGS;
+    if (extra_regs > 0) {
+       len = extra_regs * 2 + 4;
+       /* stw rp | (n-1) * stw | bl | stw | ldw rp | (n-1) * ldw | bv | ldw */
+    } else
+       return 0;
+#endif
+    if (instructions == NULL)
+       return len;
+    instp = instructions;
+
+    *instp++ = LI(REG_ZERO, 0);
+    assert(instp - instructions == FIXED_PREAMBLE_INSTRUCTIONS);
+
+#if USE_EXTRA_REGS
+#error this hp code must be ported to the ppc
+    /* Generate a wrapper function to save the callee-saves registers
+       before invoking the filter code we have generated.  It would be
+       marginally better to have the filter branch directly to the
+       postamble code on return, but the difference is trivial and it
+       is easier to have it always branch to (rp).  */
+#define FRAME_SIZE 128 /* This is plenty without being excessive. */
+    *instp++ = STW_NEG(REG_RTN, 20, REG_SP);           /* stw rp,-20(sp) */
+    i = INITIAL_NSCRATCHREGS;
+    t = STWM(scratchregs[i], FRAME_SIZE, REG_SP);      /* stwm r3,128(sp) */
+    j = FRAME_SIZE;
+    while (++i < s->maxreg) {
+       *instp++ = t;
+       j -= sizeof (int);
+       t = STW_NEG(scratchregs[i], j, REG_SP);         /* stw r4,-124(sp) &c */
+    }
+    disp = extra_regs + 2;     /* n * ldw | bv | ldw rp */
+    *instp++ = BL(disp, REG_RTN);                      /* bl filter,rp */
+    *instp++ = t;                                      /* stw in delay slot */
+    *instp++ = LDW_NEG(FRAME_SIZE + 20, REG_SP, REG_RTN);
+                                                       /* ldw -148(sp),rp */
+    while (--i > INITIAL_NSCRATCHREGS) {
+       *instp++ = LDW_NEG(j, REG_SP, scratchregs[i]);  /* ldw -124(sp),r4 &c */
+       j += sizeof (int);
+    }
+    *instp++ = BV(0, REG_RTN);                         /* bv (rp) */
+    *instp++ = LDWM_NEG(FRAME_SIZE, REG_SP, scratchregs[i]);
+                                                       /* ldwm -128(sp),r3
+                                                          in delay slot */
+#endif
+
+    assert(instp - instructions == len);
+    return len;
+}
+
+void
+net_filter_free(filter_fct_t fp, unsigned int len)
+{
+    kfree((vm_offset_t) fp, len);
+}
+
+#else  /* NET_FILTER_COMPILER */
+
+/*
+ *     Compilation of a source network filter into ppc instructions
+ *     - a small version that doesnt do anything, but doesn't take
+ *     up any space either. Note that if using a single mklinux server
+ *     with ethertalk enabled (standard situation), the filter passes
+ *     everything through so no need to compile one. If running multi
+ *      servers then there is more of a need. Ethertalk (in linux server)
+ *      should really have a packet filter, but at time of writing
+ *     it does not.
+ */
+filter_fct_t
+net_filter_alloc(
+       filter_t        *fpstart,
+       unsigned int    fplen,
+       unsigned int    *len)
+{
+       *len = 0;
+       return ((filter_fct_t)0);
+}
+
+void
+net_filter_free(
+       filter_fct_t    fp,
+       unsigned int    len)
+{
+       assert(fp == (filter_fct_t)0 && len == 0);
+}
+#endif /* NET_FILTER_COMPILER */
index c68ff182b8975221829aa7d6aaae51a1aec66974..0bec494ffe8931733b13923a2a877c2a6e8d4813 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
diff --git a/osfmk/ppc/notify_interrupt.c b/osfmk/ppc/notify_interrupt.c
new file mode 100644 (file)
index 0000000..4e1c4ef
--- /dev/null
@@ -0,0 +1,209 @@
+/*
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+#include <mach/kern_return.h>
+#include <kern/thread.h>
+#include <ppc/exception.h>
+#include <kern/ipc_tt.h>
+#include <ipc/ipc_port.h>
+#include <ppc/atomic_switch.h>
+#include <kern/thread_act.h>
+
+int    debugNotify = 0;
+
+/*
+** Function:   NotifyInterruption
+**
+** Inputs:     port                    - mach_port for main thread
+**             ppcInterrupHandler      - interrupt handler to execute
+**             interruptStatePtr       - current interrupt state
+**             emulatorDescriptor      - where in emulator to notify
+**             originalPC              - where the emulator was executing
+**             originalR2              - new R2
+**
+** Outputs:
+**
+** Notes:
+**
+*/
+
+unsigned long
+syscall_notify_interrupt(mach_port_t, UInt32, UInt32 *, EmulatorDescriptor *,
+                               void ** , void **, void *);
+
+unsigned long
+syscall_notify_interrupt(      mach_port_t             port_thread,
+                               UInt32                  ppcInterruptHandler,
+                               UInt32 *                interruptStatePtr,
+                               EmulatorDescriptor *    emulatorDescriptor,
+                               void **                 originalPC,
+                               void **                 originalR2,
+                               void                    *othread )
+{
+    kern_return_t      result; 
+    struct ppc_saved_state     *mainPCB;
+    thread_t           thread, nthread;
+    thread_act_t       act;
+    UInt32             interruptState, currentState, postIntMask;
+    extern thread_act_t port_name_to_act(mach_port_t);
+    boolean_t          isSelf, runningInKernel;
+       static unsigned long    sequence =0;
+
+#define        COPYIN_INTSTATE() { \
+       (void) copyin((char *) interruptStatePtr, (char *)&interruptState, sizeof(interruptState)); \
+       if (emulatorDescriptor) \
+               (void) copyin((char *) &emulatorDescriptor->postIntMask, (char *)&postIntMask, sizeof(postIntMask));  }
+#define        COPYOUT_INTSTATE() (void) copyout((char *) &interruptState, (char *)interruptStatePtr, sizeof(interruptState))
+
+
+    act = port_name_to_act(port_thread);
+
+   
+    if (act == THR_ACT_NULL) 
+       return port_thread;
+
+    runningInKernel = (act->mact.ksp == 0);
+    isSelf = (current_act() == act);
+
+    if (!isSelf) {
+       /* First.. suspend the thread */
+           result = thread_suspend(act);
+       
+           if (result) {
+               act_deallocate(act);
+               return port_thread;
+          }
+       
+           /* Now try to find and wait for any pending activitations
+            * to complete.. (the following is an expansion of 
+            * thread_set_state())
+            */
+       
+           thread = act_lock_thread(act);
+           if (!act->active) {
+               act_unlock_thread(act);
+               act_deallocate(act);
+               return port_thread;
+          }
+       
+          thread_hold(act);
+       
+          while (1) {
+               if (!thread || act != thread->top_act)
+                       break;
+       
+               act_unlock_thread(act);
+               (void) thread_stop_wait(thread);
+               nthread = act_lock_thread(act);
+               if (nthread == thread)
+                       break;
+               thread_unstop(thread);
+               thread = nthread;
+          }
+       
+       }
+
+       COPYIN_INTSTATE()
+       if (isSelf)
+               currentState = kOutsideMain;
+       else
+               currentState = (interruptState & kInterruptStateMask) >> kInterruptStateShift; 
+
+    if (debugNotify > 5) {
+       printf("\nNotifyInterruption: %X, %X, %X, %X, %X, %X\n",
+               port_thread, ppcInterruptHandler, interruptStatePtr,
+               emulatorDescriptor, originalPC, originalR2 );
+    }
+    mainPCB = USER_REGS(act);
+
+    switch (currentState)
+    {
+    case kNotifyPending:
+    case kInUninitialized:
+       if (debugNotify > 2)
+               printf("NotifyInterrupt: kInUninitialized\n");
+       break;
+               
+    case kInPseudoKernel:
+    case kOutsideMain:
+       if (debugNotify > 2)
+               printf("NotifyInterrupt: kInPseudoKernel/kOutsideMain\n");
+       interruptState = interruptState
+               | ((postIntMask >> kCR2ToBackupShift) & kBackupCR2Mask);
+       COPYOUT_INTSTATE();
+       break;
+               
+    case kInSystemContext:
+       if (debugNotify > 2) 
+               printf("kInSystemContext: old CR %x, postIntMask %x, new CR %x\n",
+               mainPCB->cr, postIntMask, mainPCB->cr | postIntMask);
+       mainPCB->cr |= postIntMask;
+       break;
+               
+    case kInAlternateContext:
+       if (debugNotify > 2)
+       printf("kInAlternateContext: IN InterruptState %x, postIntMask %x\n",
+                       interruptState, postIntMask);
+       interruptState = interruptState | ((postIntMask >> kCR2ToBackupShift) & kBackupCR2Mask);
+       interruptState = (interruptState & ~kInterruptStateMask);
+
+       if (runningInKernel)
+               interruptState |= (kNotifyPending << kInterruptStateShift);
+       else
+               interruptState |= (kInPseudoKernel << kInterruptStateShift);
+               
+       (void) copyout((char *)&mainPCB->srr0, (char *)originalPC, sizeof(originalPC));
+       (void) copyout((char *)&mainPCB->r2, (char *)originalR2, sizeof(originalR2));
+       COPYOUT_INTSTATE();
+       if (debugNotify > 2)
+       printf("kInAlternateContext: Out interruptState %x, Old PC %x, New %x, R2 %x\n",
+               interruptState, mainPCB->srr0, ppcInterruptHandler, mainPCB->r2);
+
+       mainPCB->srr0 = ppcInterruptHandler;
+       break;
+               
+    case kInExceptionHandler:
+       if (debugNotify > 2)
+               printf("NotifyInterrupt: kInExceptionHandler\n");
+       interruptState = interruptState | ((postIntMask >> kCR2ToBackupShift) & kBackupCR2Mask);
+       COPYOUT_INTSTATE();
+       break;
+               
+    default:
+       if (debugNotify)
+               printf("NotifyInterrupt: default ");
+               printf("Interruption while running in unknown state\n");
+               printf("interruptState = 0x%X\n",currentState);
+       break;
+    }
+
+       if (!isSelf) {
+               if (thread && act == thread->top_act)
+                       thread_unstop(thread);
+               thread_release(act);
+               act_unlock_thread(act);
+               thread_resume(act);
+       }
+
+    act_deallocate(act);
+
+   return port_thread;
+}
index 8354f64191e3c7df9dc7cc67fb4e0274562b4a13..493c9f7f7ee0ad41ad139d434daa52e073e6fd34 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -131,26 +128,30 @@ machine_kernel_stack_init(
        void            (*start_pos)(thread_t))
 {
     vm_offset_t        stack;
-    unsigned int                       *kss, *stck;
+    unsigned int                       *kss;
        struct savearea                 *sv;
 
     assert(thread->top_act->mact.pcb);
     assert(thread->kernel_stack);
     stack = thread->kernel_stack;
 
+#if    MACH_ASSERT
+    if (watchacts & WA_PCB)
+               printf("machine_kernel_stack_init(thr=%x,stk=%x,start_pos=%x)\n", thread,stack,start_pos);
+#endif /* MACH_ASSERT */
+       
        kss = (unsigned int *)STACK_IKS(stack);
        sv = thread->top_act->mact.pcb;                                         /* This for the sake of C */
 
-       sv->save_lr = (uint64_t) start_pos;                                     /* Set up the execution address */
-       sv->save_srr0 = (uint64_t) start_pos;                           /* Here too */
+       sv->save_lr = (unsigned int) start_pos;                         /* Set up the execution address */
+       sv->save_srr0 = (unsigned int) start_pos;                       /* Here too */
        sv->save_srr1  = MSR_SUPERVISOR_INT_OFF;                        /* Set the normal running MSR */
-       stck = (unsigned int *)((unsigned int)kss - KF_SIZE);   /* Point to the top frame */
-       sv->save_r1 = (uint64_t)stck;                                           /* Point to the top frame on the stack */
+       sv->save_r1 = (vm_offset_t) ((int)kss - KF_SIZE);       /* Point to the top frame on the stack */
        sv->save_fpscr = 0;                                                                     /* Clear all floating point exceptions */
        sv->save_vrsave = 0;                                                            /* Set the vector save state */
        sv->save_vscr[3] = 0x00010000;                                          /* Supress java mode */
 
-       *stck = 0;                                                                                      /* Zero the frame backpointer */
+       *((int *)sv->save_r1) = 0;                                                      /* Zero the frame backpointer */
        thread->top_act->mact.ksp = 0;                                          /* Show that the kernel stack is in use already */
 
 }
@@ -170,8 +171,7 @@ switch_context(
        register struct thread_shuttle* retval;
        pmap_t  new_pmap;
        facility_context *fowner;
-       struct per_proc_info *ppinfo;
-       
+       int     my_cpu;
        
 #if    MACH_LDEBUG || MACH_KDB
        log_thread_action("switch", 
@@ -180,10 +180,11 @@ switch_context(
                          (long)__builtin_return_address(0));
 #endif
 
-       ppinfo = getPerProc();                                                          /* Get our processor block */
-
-       ppinfo->old_thread = (unsigned int)old;
-       ppinfo->cpu_flags &= ~traceBE;                                           /* disable branch tracing if on */
+       my_cpu = cpu_number();
+       per_proc_info[my_cpu].old_thread = (unsigned int)old;
+       per_proc_info[my_cpu].cpu_flags &= ~traceBE;  /* disable branch tracing if on */
+       assert(old_act->kernel_loaded ||
+              active_stacks[my_cpu] == old_act->thread->kernel_stack);
               
        check_simple_locks();
 
@@ -192,13 +193,13 @@ switch_context(
         * so that it can be found by the other if needed
         */
        if(real_ncpus > 1) {                                                            /* This is potentially slow, so only do when actually SMP */
-               fowner = ppinfo->FPU_owner;                                             /* Cache this because it may change */
+               fowner = per_proc_info[my_cpu].FPU_owner;       /* Cache this because it may change */
                if(fowner) {                                                                    /* Is there any live context? */
                        if(fowner->facAct == old->top_act) {            /* Is it for us? */
                                fpu_save(fowner);                                               /* Yes, save it */
                        }
                }
-               fowner = ppinfo->VMX_owner;                                             /* Cache this because it may change */
+               fowner = per_proc_info[my_cpu].VMX_owner;       /* Cache this because it may change */
                if(fowner) {                                                                    /* Is there any live context? */
                        if(fowner->facAct == old->top_act) {            /* Is it for us? */
                                vec_save(fowner);                                               /* Yes, save it */
@@ -206,13 +207,20 @@ switch_context(
                }
        }
 
+#if DEBUG
+       if (watchacts & WA_PCB) {
+               printf("switch_context(0x%08x, 0x%x, 0x%08x)\n",
+                      old,continuation,new);
+       }
+#endif /* DEBUG */
+
        /*
         * If old thread is running VM, save per proc userProtKey and FamVMmode spcFlags bits in the thread spcFlags
         * This bits can be modified in the per proc without updating the thread spcFlags
         */
        if(old_act->mact.specFlags & runningVM) {
                old_act->mact.specFlags &=  ~(userProtKey|FamVMmode);
-               old_act->mact.specFlags |= (ppinfo->spcFlags) & (userProtKey|FamVMmode);
+               old_act->mact.specFlags |= (per_proc_info[my_cpu].spcFlags) & (userProtKey|FamVMmode);
        }
 
        /*
@@ -224,9 +232,8 @@ switch_context(
 
        if(new_act->mact.specFlags & runningVM) {                       /* Is the new guy running a VM? */
                pmap_switch(new_act->mact.vmmCEntry->vmmPmap);  /* Switch to the VM's pmap */
-               ppinfo->VMMareaPhys = new_act->mact.vmmCEntry->vmmContextPhys;
-               ppinfo->VMMXAFlgs = new_act->mact.vmmCEntry->vmmXAFlgs;
-               ppinfo->FAMintercept = new_act->mact.vmmCEntry->vmmFAMintercept;
+               per_proc_info[my_cpu].VMMareaPhys = (vm_offset_t)new_act->mact.vmmCEntry->vmmContextPhys;
+               per_proc_info[my_cpu].FAMintercept = new_act->mact.vmmCEntry->vmmFAMintercept;
        }
        else {                                                                                          /* otherwise, we use the task's pmap */
                new_pmap = new_act->task->map->pmap;
@@ -235,25 +242,14 @@ switch_context(
                }
        }
 
-       if(old_act->mact.cioSpace != invalSpace) {                      /* Does our old guy have an active copyin/out? */
-               old_act->mact.cioSpace |= cioSwitchAway;                /* Show we switched away from this guy */
-               hw_blow_seg(copyIOaddr);                                                /* Blow off the first segment */
-               hw_blow_seg(copyIOaddr + 0x10000000ULL);                /* Blow off the second segment */
-       }
-
        KERNEL_DEBUG_CONSTANT(MACHDBG_CODE(DBG_MACH_SCHED,MACH_SCHED) | DBG_FUNC_NONE,
                     (int)old, (int)new, old->sched_pri, new->sched_pri, 0);
 
-/*     *********** SWITCH HERE **************/
        retval = Switch_context(old, continuation, new);
        assert(retval != (struct thread_shuttle*)NULL);
-/*     *********** SWITCH HERE **************/
-
 
-       if (branch_tracing_enabled()) {
-               ppinfo = getPerProc();                                                  /* Get our processor block */
-               ppinfo->cpu_flags |= traceBE;                                   /* restore branch tracing */
-       }
+       if (branch_tracing_enabled())
+         per_proc_info[my_cpu].cpu_flags |= traceBE;  /* restore branch tracing */
 
        /* We've returned from having switched context, so we should be
         * back in the original context.
@@ -272,6 +268,11 @@ thread_set_syscall_return(
        kern_return_t   retval)
 {
 
+#if    MACH_ASSERT
+       if (watchacts & WA_PCB)
+               printf("thread_set_syscall_return(thr=%x,retval=%d)\n", thread,retval);
+#endif /* MACH_ASSERT */
+
         thread->top_act->mact.pcb->save_r3 = retval;
 }
 
@@ -289,6 +290,11 @@ thread_machine_create(
        unsigned int    *CIsTooLimited, i;
 
 
+#if    MACH_ASSERT
+    if (watchacts & WA_PCB)
+       printf("thread_machine_create(thr=%x,thr_act=%x,st=%x)\n", thread, thr_act, start_pos);
+#endif /* MACH_ASSERT */
+
        hw_atomic_add(&saveanchor.savetarget, 4);                               /* Account for the number of saveareas we think we "need"
                                                                                                                           for this activation */
        assert(thr_act->mact.pcb == (savearea *)0);                             /* Make sure there was no previous savearea */
@@ -300,12 +306,15 @@ thread_machine_create(
        sv->save_hdr.save_prev = 0;                                                             /* Clear the back pointer */
        sv->save_hdr.save_flags = (sv->save_hdr.save_flags & ~SAVtype) | (SAVgeneral << SAVtypeshft);   /* Mark as in use */
        sv->save_hdr.save_act = thr_act;                                                /* Set who owns it */
+       sv->save_vscr[3] = 0x00010000;                                                  /* Supress java mode */
        thr_act->mact.pcb = sv;                                                                 /* Point to the save area */
        thr_act->mact.curctx = &thr_act->mact.facctx;                   /* Initialize facility context */
        thr_act->mact.facctx.facAct = thr_act;                                  /* Initialize facility context pointer to activation */
-       thr_act->mact.cioSpace = invalSpace;                                    /* Initialize copyin/out space to invalid */
-       thr_act->mact.preemption_count = 0;                                             /* Initialize preemption counter */
 
+#if    MACH_ASSERT
+       if (watchacts & WA_PCB)
+               printf("pcb_init(%x) pcb=%x\n", thr_act, sv);
+#endif /* MACH_ASSERT */
        /*
         * User threads will pull their context from the pcb when first
         * returning to user mode, so fill in all the necessary values.
@@ -313,14 +322,13 @@ thread_machine_create(
         * at the base of the kernel stack (see stack_attach()).
         */
 
-       sv->save_srr1 = (uint64_t)MSR_EXPORT_MASK_SET;                  /* Set the default user MSR */
-       sv->save_fpscr = 0;                                                                             /* Clear all floating point exceptions */
-       sv->save_vrsave = 0;                                                                    /* Set the vector save state */
-       sv->save_vscr[0] = 0x00000000;                                  
-       sv->save_vscr[1] = 0x00000000;                                  
-       sv->save_vscr[2] = 0x00000000;                                  
-       sv->save_vscr[3] = 0x00010000;                                                  /* Disable java mode and clear saturated */
+       sv->save_srr1 = MSR_EXPORT_MASK_SET;                                    /* Set the default user MSR */
        
+       CIsTooLimited = (unsigned int *)(&sv->save_sr0);                /* Make a pointer 'cause C can't cast on the left */
+       for(i=0; i<16; i++) {                                                                   /* Initialize all SRs */
+               CIsTooLimited[i] = SEG_REG_PROT | (i << 20) | thr_act->task->map->pmap->space;  /* Set the SR value */
+       }
+
     return(KERN_SUCCESS);
 }
 
@@ -369,22 +377,19 @@ machine_switch_act(
 {
        pmap_t          new_pmap;
        facility_context *fowner;
-       struct per_proc_info *ppinfo;
-       
-       ppinfo = getPerProc();                                                          /* Get our processor block */
 
        /* Our context might wake up on another processor, so we must
         * not keep hot state in our FPU, it must go back to the pcb
         * so that it can be found by the other if needed
         */
        if(real_ncpus > 1) {                                                            /* This is potentially slow, so only do when actually SMP */
-               fowner = ppinfo->FPU_owner;                                             /* Cache this because it may change */
+               fowner = per_proc_info[cpu_number()].FPU_owner; /* Cache this because it may change */
                if(fowner) {                                                                    /* Is there any live context? */
                        if(fowner->facAct == old) {                                     /* Is it for us? */
                                fpu_save(fowner);                                               /* Yes, save it */
                        }
                }
-               fowner = ppinfo->VMX_owner;                                             /* Cache this because it may change */
+               fowner = per_proc_info[cpu_number()].VMX_owner; /* Cache this because it may change */
                if(fowner) {                                                                    /* Is there any live context? */
                        if(fowner->facAct == old) {                                     /* Is it for us? */
                                vec_save(fowner);                                               /* Yes, save it */
@@ -392,8 +397,6 @@ machine_switch_act(
                }
        }
 
-       old->mact.cioSpace |= cioSwitchAway;                            /* Show we switched away from this guy */
-
        active_stacks[cpu] = thread->kernel_stack;
 
        ast_context(new, cpu);
@@ -403,8 +406,8 @@ machine_switch_act(
         * Change space if needed
         */
 
-       if(new->mact.specFlags & runningVM) {                           /* Is the new guy running a VM? */
-               pmap_switch(new->mact.vmmCEntry->vmmPmap);              /* Switch to the VM's pmap */
+       if(new->mact.specFlags & runningVM) {                   /* Is the new guy running a VM? */
+               pmap_switch(new->mact.vmmCEntry->vmmPmap);      /* Switch to the VM's pmap */
        }
        else {                                                                                          /* otherwise, we use the task's pmap */
                new_pmap = new->task->map->pmap;
@@ -413,14 +416,13 @@ machine_switch_act(
                }
        }
 
-
 }
 
 void
 pcb_user_to_kernel(thread_act_t act)
 {
 
-       return;                                                                                         /* Not needed, I hope... */
+       return;                                                                                                 /* Not needed, I hope... */
 }
 
 
@@ -435,8 +437,8 @@ void
 act_machine_sv_free(thread_act_t act)
 {
        register savearea *pcb, *userpcb;
-       register savearea_vec *vsv, *vpst, *vsvt;
-       register savearea_fpu *fsv, *fpst, *fsvt;
+       register savearea_vec *vsv, *vpsv;
+       register savearea_fpu *fsv, *fpsv;
        register savearea *svp;
        register int i;
 
@@ -448,68 +450,40 @@ act_machine_sv_free(thread_act_t act)
  *
  *     Walk through and release all floating point and vector contexts that are not
  *     user state.  We will also blow away live context if it belongs to non-user state.
- *     Note that the level can not change while we are in this code.  Nor can another
- *     context be pushed on the stack.
- *
- *     We do nothing here if the current level is user.  Otherwise,
- *     the live context is cleared.  Then we find the user saved context.
- *     Next,  we take the sync lock (to keep us from munging things in *_switch).
- *     The level is set to 0 and all stacked context other than user is dequeued.
- *     Then we unlock.  Next, all of the old kernel contexts are released.
  *
  */
  
        if(act->mact.curctx->VMXlevel) {                                                /* Is the current level user state? */
-               
                toss_live_vec(act->mact.curctx);                                        /* Dump live vectors if is not user */
+               act->mact.curctx->VMXlevel = 0;                                         /* Mark as user state */
+       }
 
-               vsv = act->mact.curctx->VMXsave;                                        /* Get the top vector savearea */
-               
-               while(vsv && vsv->save_hdr.save_level) vsv = (savearea_vec *)vsv->save_hdr.save_prev;   /* Find user context if any */
-       
-               if(!hw_lock_to((hw_lock_t)&act->mact.curctx->VMXsync, LockTimeOut)) {   /* Get the sync lock */ 
-                       panic("act_machine_sv_free - timeout getting VMX sync lock\n"); /* Tell all and die */
-               }
-               
-               vsvt = act->mact.curctx->VMXsave;                                       /* Get the top of the chain */
-               act->mact.curctx->VMXsave = vsv;                                        /* Point to the user context */
-               act->mact.curctx->VMXlevel = 0;                                         /* Set the level to user */
-               hw_lock_unlock((hw_lock_t)&act->mact.curctx->VMXsync);  /* Unlock */
-               
-               while(vsvt) {                                                                           /* Clear any VMX saved state */
-                       if (vsvt == vsv) break;                                                 /* Done when hit user if any */
-                       vpst = vsvt;                                                                    /* Remember so we can toss this */
-                       vsvt = (savearea_vec *)vsvt->save_hdr.save_prev;        /* Get one underneath our's */          
-                       save_ret((savearea *)vpst);                                             /* Release it */
-               }
-               
+       vsv = act->mact.curctx->VMXsave;                                                /* Get the top vector savearea */
+       
+       while(vsv) {                                                                                    /* Any VMX saved state? */
+               vpsv = vsv;                                                                                     /* Remember so we can toss this */
+               if (!vsv->save_hdr.save_level) break;                           /* Done when hit user if any */
+               vsv = (savearea_vec *)vsv->save_hdr.save_prev;          /* Get one underneath our's */          
+               save_ret((savearea *)vpsv);                                                     /* Release it */
        }
+       
+       act->mact.curctx->VMXsave = vsv;                                                /* Queue the user context to the top */
  
        if(act->mact.curctx->FPUlevel) {                                                /* Is the current level user state? */
-               
-               toss_live_fpu(act->mact.curctx);                                        /* Dump live floats if is not user */
+               toss_live_fpu(act->mact.curctx);                                        /* Dump live float if is not user */
+               act->mact.curctx->FPUlevel = 0;                                         /* Mark as user state */
+       }
 
-               fsv = act->mact.curctx->FPUsave;                                        /* Get the top floats savearea */
-               
-               while(fsv && fsv->save_hdr.save_level) fsv = (savearea_fpu *)fsv->save_hdr.save_prev;   /* Find user context if any */
+       fsv = act->mact.curctx->FPUsave;                                                /* Get the top float savearea */
        
-               if(!hw_lock_to((hw_lock_t)&act->mact.curctx->FPUsync, LockTimeOut)) {   /* Get the sync lock */ 
-                       panic("act_machine_sv_free - timeout getting FPU sync lock\n"); /* Tell all and die */
-               }
-               
-               fsvt = act->mact.curctx->FPUsave;                                       /* Get the top of the chain */
-               act->mact.curctx->FPUsave = fsv;                                        /* Point to the user context */
-               act->mact.curctx->FPUlevel = 0;                                         /* Set the level to user */
-               hw_lock_unlock((hw_lock_t)&act->mact.curctx->FPUsync);  /* Unlock */
-               
-               while(fsvt) {                                                                           /* Clear any VMX saved state */
-                       if (fsvt == fsv) break;                                                 /* Done when hit user if any */
-                       fpst = fsvt;                                                                    /* Remember so we can toss this */
-                       fsvt = (savearea_fpu *)fsvt->save_hdr.save_prev;        /* Get one underneath our's */          
-                       save_ret((savearea *)fpst);                                             /* Release it */
-               }
-               
+       while(fsv) {                                                                                    /* Any float saved state? */
+               fpsv = fsv;                                                                                     /* Remember so we can toss this */
+               if (!fsv->save_hdr.save_level) break;                           /* Done when hit user if any */
+               fsv = (savearea_fpu *)fsv->save_hdr.save_prev;          /* Get one underneath our's */          
+               save_ret((savearea *)fpsv);                                                     /* Release it */
        }
+       
+       act->mact.curctx->FPUsave = fsv;                                                /* Queue the user context to the top */
 
 /*
  * free all regular saveareas except a user savearea, if any
@@ -562,6 +536,11 @@ act_machine_destroy(thread_act_t act)
        register savearea *svp;
        register int i;
 
+#if    MACH_ASSERT
+       if (watchacts & WA_PCB)
+               printf("act_machine_destroy(0x%x)\n", act);
+#endif /* MACH_ASSERT */
+
 /*
  *     This function will release all context.
  */
@@ -628,6 +607,10 @@ act_machine_create(task_t task, thread_act_t thr_act)
 
 void act_machine_init()
 {
+#if    MACH_ASSERT
+    if (watchacts & WA_PCB)
+       printf("act_machine_init()\n");
+#endif /* MACH_ASSERT */
 
     /* Good to verify these once */
     assert( THREAD_MACHINE_STATE_MAX <= THREAD_STATE_MAX );
@@ -648,6 +631,14 @@ act_machine_return(int code)
 {
     thread_act_t thr_act = current_act();
 
+#if    MACH_ASSERT
+    if (watchacts & WA_EXIT)
+       printf("act_machine_return(0x%x) cur_act=%x(%d) thr=%x(%d)\n",
+              code, thr_act, thr_act->ref_count,
+              thr_act->thread, thr_act->thread->ref_count);
+#endif /* MACH_ASSERT */
+
+
        /*
         * This code is called with nothing locked.
         * It also returns with nothing locked, if it returns.
@@ -815,8 +806,6 @@ stack_handoff(thread_t old,
        pmap_t new_pmap;
        facility_context *fowner;
        int     my_cpu;
-       mapping *mp;
-       struct per_proc_info *ppinfo;
        
        assert(new->top_act);
        assert(old->top_act);
@@ -830,18 +819,16 @@ stack_handoff(thread_t old,
                new->stack_privilege = stack;
        }
 
-       ppinfo = getPerProc();                                                          /* Get our processor block */
-
-       ppinfo->cpu_flags &= ~traceBE;                                          /* Turn off special branch trace */
+       per_proc_info[my_cpu].cpu_flags &= ~traceBE;
 
        if(real_ncpus > 1) {                                                            /* This is potentially slow, so only do when actually SMP */
-               fowner = ppinfo->FPU_owner;                                             /* Cache this because it may change */
+               fowner = per_proc_info[my_cpu].FPU_owner;       /* Cache this because it may change */
                if(fowner) {                                                                    /* Is there any live context? */
                        if(fowner->facAct == old->top_act) {            /* Is it for us? */
                                fpu_save(fowner);                                               /* Yes, save it */
                        }
                }
-               fowner = ppinfo->VMX_owner;                                             /* Cache this because it may change */
+               fowner = per_proc_info[my_cpu].VMX_owner;       /* Cache this because it may change */
                if(fowner) {                                                                    /* Is there any live context? */
                        if(fowner->facAct == old->top_act) {            /* Is it for us? */
                                vec_save(fowner);                                               /* Yes, save it */
@@ -854,7 +841,7 @@ stack_handoff(thread_t old,
         */
        if(old->top_act->mact.specFlags & runningVM) {                  /* Is the current thread running a VM? */
                old->top_act->mact.specFlags &= ~(userProtKey|FamVMmode);
-               old->top_act->mact.specFlags |= (ppinfo->spcFlags) & (userProtKey|FamVMmode);
+               old->top_act->mact.specFlags |= (per_proc_info[my_cpu].spcFlags) & (userProtKey|FamVMmode);
        }
 
        KERNEL_DEBUG_CONSTANT(MACHDBG_CODE(DBG_MACH_SCHED,MACH_STACK_HANDOFF) | DBG_FUNC_NONE,
@@ -863,9 +850,8 @@ stack_handoff(thread_t old,
 
        if(new->top_act->mact.specFlags & runningVM) {  /* Is the new guy running a VM? */
                pmap_switch(new->top_act->mact.vmmCEntry->vmmPmap);     /* Switch to the VM's pmap */
-               ppinfo->VMMareaPhys = new->top_act->mact.vmmCEntry->vmmContextPhys;
-               ppinfo->VMMXAFlgs = new->top_act->mact.vmmCEntry->vmmXAFlgs;
-               ppinfo->FAMintercept = new->top_act->mact.vmmCEntry->vmmFAMintercept;
+               per_proc_info[my_cpu].VMMareaPhys = (vm_offset_t)new->top_act->mact.vmmCEntry->vmmContextPhys;
+               per_proc_info[my_cpu].FAMintercept = new->top_act->mact.vmmCEntry->vmmFAMintercept;
        }
        else {                                                                                  /* otherwise, we use the task's pmap */
                new_pmap = new->top_act->task->map->pmap;
@@ -876,19 +862,15 @@ stack_handoff(thread_t old,
 
        thread_machine_set_current(new);
        active_stacks[my_cpu] = new->kernel_stack;
-       ppinfo->Uassist = new->top_act->mact.cthread_self;
+       per_proc_info[my_cpu].Uassist = new->top_act->mact.cthread_self;
 
-       ppinfo->ppbbTaskEnv = new->top_act->mact.bbTaskEnv;
-       ppinfo->spcFlags = new->top_act->mact.specFlags;
-       
-       old->top_act->mact.cioSpace |= cioSwitchAway;   /* Show we switched away from this guy */
-       mp = (mapping *)&ppinfo->ppCIOmp;
-       mp->mpSpace = invalSpace;                                               /* Since we can't handoff in the middle of copy in/out, just invalidate */
+       per_proc_info[my_cpu].ppbbTaskEnv = new->top_act->mact.bbTaskEnv;
+       per_proc_info[my_cpu].spcFlags = new->top_act->mact.specFlags;
 
        if (branch_tracing_enabled()) 
-               ppinfo->cpu_flags |= traceBE;
+               per_proc_info[my_cpu].cpu_flags |= traceBE;
     
-       if(trcWork.traceMask) dbgTrace(0x12345678, (unsigned int)old->top_act, (unsigned int)new->top_act, 0);  /* Cut trace entry if tracing */    
+       if(trcWork.traceMask) dbgTrace(0x12345678, (unsigned int)old->top_act, (unsigned int)new->top_act);     /* Cut trace entry if tracing */    
     
   return;
 }
index 9205cae2f7446056da75de708f59c47ef5c0fa9e..58deccbb73ecca0e9340fae902ac23169f09c8c8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -99,7 +96,6 @@
 #include <kern/simple_lock.h>
 #include <mach/vm_attributes.h>
 #include <mach/vm_param.h>
-#include <vm/vm_kern.h>
 #include <kern/spl.h>
 
 #include <kern/misc_protos.h>
 #include <vm/vm_page.h>
 
 #include <ppc/pmap.h>
+#include <ppc/pmap_internals.h>
 #include <ppc/mem.h>
 #include <ppc/mappings.h>
 
 #include <ppc/Firmware.h>
 #include <ppc/savearea.h>
 #include <ppc/exception.h>
-#include <ppc/low_trace.h>
 #include <ddb/db_output.h>
 
+#if    DB_MACHINE_COMMANDS
+/* optionally enable traces of pmap operations in post-mortem trace table */
+/* #define PMAP_LOWTRACE 1 */
+#define PMAP_LOWTRACE 0
+#else  /* DB_MACHINE_COMMANDS */
+/* Can not trace even if we wanted to */
+#define PMAP_LOWTRACE 0
+#endif /* DB_MACHINE_COMMANDS */
+
+#define PERFTIMES 0
+
+#if PERFTIMES && DEBUG
+#define debugLog2(a, b, c) dbgLog2(a, b, c)
+#else
+#define debugLog2(a, b, c)
+#endif
+
 extern unsigned int    avail_remaining;
 extern unsigned int    mappingdeb0;
 extern struct  Saveanchor saveanchor;                                          /* Aliged savearea anchor */
 extern int             real_ncpus;                                                                     /* Number of actual CPUs */
-unsigned int   debugbackpocket;                                                        /* (TEST/DEBUG) */
+unsigned int debugbackpocket;                                                          /* (TEST/DEBUG) */
 
+vm_offset_t            avail_next;
 vm_offset_t            first_free_virt;
 int            current_free_region;                                            /* Used in pmap_next_page */
 
-pmapTransTab *pmapTrans;                                                                       /* Point to the hash to pmap translations */
-struct phys_entry *phys_table;
-
 /* forward */
 void pmap_activate(pmap_t pmap, thread_t th, int which_cpu);
 void pmap_deactivate(pmap_t pmap, thread_t th, int which_cpu);
@@ -142,20 +153,28 @@ void copy_to_phys(vm_offset_t sva, vm_offset_t dpa, int bytecount);
 int pmap_list_resident_pages(pmap_t pmap, vm_offset_t *listp, int space);
 #endif
 
+#if DEBUG
+#define PDB_USER       0x01    /* exported functions */
+#define PDB_MAPPING    0x02    /* low-level mapping routines */
+#define PDB_ENTER      0x04    /* pmap_enter specifics */
+#define PDB_COPY       0x08    /* copy page debugging */
+#define PDB_ZERO       0x10    /* zero page debugging */
+#define PDB_WIRED      0x20    /* things concerning wired entries */
+#define PDB_PTEG       0x40    /* PTEG overflows */
+#define PDB_LOCK       0x100   /* locks */
+#define PDB_IO         0x200   /* Improper use of WIMG_IO checks - PCI machines */
+
+int pmdebug=0;
+#endif
+
 /*  NOTE:  kernel_pmap_store must be in V=R storage and aligned!!!!!!!!!!!!!! */
 
 extern struct pmap     kernel_pmap_store;
 pmap_t         kernel_pmap;                    /* Pointer to kernel pmap and anchor for in-use pmaps */                
-addr64_t       kernel_pmap_phys;               /* Pointer to kernel pmap and anchor for in-use pmaps, physical address */              
 pmap_t         cursor_pmap;                    /* Pointer to last pmap allocated or previous if removed from in-use list */
-pmap_t         sharedPmap;                             /* Pointer to common pmap for 64-bit address spaces */
 struct zone    *pmap_zone;                             /* zone of pmap structures */
 boolean_t      pmap_initialized = FALSE;
 
-int ppc_max_pmaps;                                     /* Maximum number of concurrent address spaces allowed. This is machine dependent */    
-addr64_t vm_max_address;                       /* Maximum effective address supported */
-addr64_t vm_max_physical;                      /* Maximum physical address supported */
-
 /*
  * Physical-to-virtual translations are handled by inverted page table
  * structures, phys_tables.  Multiple mappings of a single page are handled
@@ -163,6 +182,11 @@ addr64_t vm_max_physical;                  /* Maximum physical address supported */
  * for phys_tables of the physical memory we know about, but more may be
  * added as it is discovered (eg. by drivers).
  */
+struct phys_entry *phys_table;         /* For debugging */
+
+lock_t pmap_system_lock;
+
+decl_simple_lock_data(,tlb_system_lock)
 
 /*
  *     free pmap list. caches the first free_pmap_max pmaps that are freed up
@@ -176,34 +200,121 @@ decl_simple_lock_data(,free_pmap_lock)
  * Function to get index into phys_table for a given physical address
  */
 
-struct phys_entry *pmap_find_physentry(ppnum_t pa)
+struct phys_entry *pmap_find_physentry(vm_offset_t pa)
 {
        int i;
-       unsigned int entry;
+       struct phys_entry *entry;
 
-       for (i = pmap_mem_regions_count - 1; i >= 0; i--) {
-               if (pa < pmap_mem_regions[i].mrStart) continue; /* See if we fit in this region */
-               if (pa > pmap_mem_regions[i].mrEnd) continue;   /* Check the end too */
+       for (i = pmap_mem_regions_count-1; i >= 0; i--) {
+               if (pa < pmap_mem_regions[i].start)
+                       continue;
+               if (pa >= pmap_mem_regions[i].end)
+                       return PHYS_NULL;
                
-               entry = (unsigned int)pmap_mem_regions[i].mrPhysTab + ((pa - pmap_mem_regions[i].mrStart) * sizeof(phys_entry));
-               return (struct phys_entry *)entry;
+               entry = &pmap_mem_regions[i].phys_table[(pa - pmap_mem_regions[i].start) >> PPC_PGSHIFT];
+               __asm__ volatile("dcbt 0,%0" : : "r" (entry));  /* We will use this in a little bit */
+               return entry;
        }
-//     kprintf("DEBUG - pmap_find_physentry: page 0x%08X not found\n", pa);
-       return 0;
+       kprintf("DEBUG : pmap_find_physentry 0x%08x out of range\n",pa);
+       return PHYS_NULL;
 }
 
 /*
  * kern_return_t
  * pmap_add_physical_memory(vm_offset_t spa, vm_offset_t epa,
  *                          boolean_t available, unsigned int attr)
- *
- *     THIS IS NOT SUPPORTED
+ *     Allocate some extra physentries for the physical addresses given,
+ *     specifying some default attribute that on the powerpc specifies
+ *      the default cachability for any mappings using these addresses
+ *     If the memory is marked as available, it is added to the general
+ *     VM pool, otherwise it is not (it is reserved for card IO etc).
  */
 kern_return_t pmap_add_physical_memory(vm_offset_t spa, vm_offset_t epa,
                                       boolean_t available, unsigned int attr)
 {
+       int i,j;
+       spl_t s;
+
+       /* Only map whole pages */
        
        panic("Forget it! You can't map no more memory, you greedy puke!\n");
+
+       spa = trunc_page(spa);
+       epa = round_page(epa);
+
+       /* First check that the region doesn't already exist */
+
+       assert (epa >= spa);
+       for (i = 0; i < pmap_mem_regions_count; i++) {
+               /* If we're below the next region, then no conflict */
+               if (epa < pmap_mem_regions[i].start)
+                       break;
+               if (spa < pmap_mem_regions[i].end) {
+#if DEBUG
+                       kprintf("pmap_add_physical_memory(0x%08x,0x%08x,0x%08x) - memory already present\n",spa,epa,attr);
+#endif /* DEBUG */
+                       return KERN_NO_SPACE;
+               }
+       }
+
+#if DEBUG
+       kprintf("pmap_add_physical_memory; region insert spot: %d out of %d\n", i, pmap_mem_regions_count);     /* (TEST/DEBUG) */
+#endif
+
+       /* Check that we've got enough space for another region */
+       if (pmap_mem_regions_count == PMAP_MEM_REGION_MAX)
+               return KERN_RESOURCE_SHORTAGE;
+
+       /* Once here, i points to the mem_region above ours in physical mem */
+
+       /* allocate a new phys_table for this new region */
+#if DEBUG
+       kprintf("pmap_add_physical_memory; kalloc\n");  /* (TEST/DEBUG) */
+#endif
+
+       phys_table =  (struct phys_entry *)
+               kalloc(sizeof(struct phys_entry) * atop(epa-spa));
+#if DEBUG
+       kprintf("pmap_add_physical_memory; new phys_table: %08X\n", phys_table);        /* (TEST/DEBUG) */
+#endif
+
+       /* Initialise the new phys_table entries */
+       for (j = 0; j < atop(epa-spa); j++) {
+               
+               phys_table[j].phys_link = MAPPING_NULL;
+               
+               mapping_phys_init(&phys_table[j], spa+(j*PAGE_SIZE), attr);     /* Initialize the hardware specific portions */
+
+       }
+       s = splhigh();
+       
+       /* Move all the phys_table entries up some to make room in
+        * the ordered list.
+        */
+       for (j = pmap_mem_regions_count; j > i ; j--)
+               pmap_mem_regions[j] = pmap_mem_regions[j-1];
+
+       /* Insert a new entry with some memory to back it */
+
+       pmap_mem_regions[i].start            = spa;
+       pmap_mem_regions[i].end           = epa;
+       pmap_mem_regions[i].phys_table    = phys_table;
+
+       pmap_mem_regions_count++;
+       splx(s);
+       
+#if DEBUG
+       for(i=0; i<pmap_mem_regions_count; i++) {                       /* (TEST/DEBUG) */
+               kprintf("region %d: %08X %08X %08X\n", i, pmap_mem_regions[i].start,
+                       pmap_mem_regions[i].end, pmap_mem_regions[i].phys_table);       /* (TEST/DEBUG) */
+       }
+#endif
+
+       if (available) {
+               kprintf("warning : pmap_add_physical_mem() "
+                      "available not yet supported\n");
+       }
+
        return KERN_SUCCESS;
 }
 
@@ -220,10 +331,7 @@ kern_return_t pmap_add_physical_memory(vm_offset_t spa, vm_offset_t epa,
  *     Pages with a contiguous virtual address range, the same protection, and attributes.
  *     therefore, we map it with a single block.
  *
- *     Note that this call will only map into 32-bit space
- *
  */
-
 vm_offset_t
 pmap_map(
        vm_offset_t va,
@@ -232,18 +340,71 @@ pmap_map(
        vm_prot_t prot)
 {
 
-       addr64_t colladr;
+
+       if (spa == epa)
+               return(va);
+
+       assert(epa > spa);
+       debugLog2(40, va, spa);                                                         /* Log pmap_map call */
+
+       pmap_map_block(kernel_pmap, va, spa, epa - spa, prot, PTE_WIMG_DEFAULT, blkPerm);       /* Set up a permanent block mapped area */
+
+       debugLog2(41, epa, prot);                                                       /* Log pmap_map call */
+
+       return(va);
+}
+
+/*
+ * pmap_map_bd(va, spa, epa, prot)
+ *     Back-door routine for mapping kernel VM at initialisation.
+ *     Used for mapping memory outside the known physical memory
+ *      space, with caching disabled. Designed for use by device probes.
+ * 
+ *     A virtual address range starting at "va" is mapped to the physical
+ *     address range "spa" to "epa" with machine independent protection
+ *     "prot".
+ *
+ *     "va", "spa", and "epa" are byte addresses and must be on machine
+ *     independent page boundaries.
+ *
+ * WARNING: The current version of memcpy() can use the dcbz instruction
+ * on the destination addresses.  This will cause an alignment exception
+ * and consequent overhead if the destination is caching-disabled.  So
+ * avoid memcpy()ing into the memory mapped by this function.
+ *
+ * also, many other pmap_ routines will misbehave if you try and change
+ * protections or remove these mappings, they are designed to be permanent.
+ *
+ * These areas will be added to the autogen list, if possible.  Existing translations
+ * are overridden and their mapping stuctures are released.  This takes place in
+ * the autogen_map function.
+ *
+ * Locking:
+ *     this routine is called only during system initialization when only
+ *     one processor is active, so no need to take locks...
+ */
+vm_offset_t
+pmap_map_bd(
+       vm_offset_t va,
+       vm_offset_t spa,
+       vm_offset_t epa,
+       vm_prot_t prot)
+{
+       register struct mapping *mp;
+       register struct phys_entry      *pp;
        
-       if (spa == epa) return(va);
+
+       if (spa == epa)
+               return(va);
 
        assert(epa > spa);
 
-       colladr = mapping_make(kernel_pmap, (addr64_t)va, (ppnum_t)(spa >> 12), (mmFlgBlock | mmFlgPerm), (epa - spa) >> 12, prot & VM_PROT_ALL);
+       debugLog2(42, va, epa);                                                         /* Log pmap_map_bd call */
+
+       pmap_map_block(kernel_pmap, va, spa, epa - spa, prot, PTE_WIMG_IO, blkPerm);    /* Set up autogen area */
+
+       debugLog2(43, epa, prot);                                                       /* Log pmap_map_bd exit */
 
-       if(colladr) {                                                                                   /* Was something already mapped in the range? */
-               panic("pmap_map: attempt to map previously mapped range - va = %08X, pa = %08X, epa = %08X, collision = %016llX\n",
-                       va, spa, epa, colladr);
-       }                               
        return(va);
 }
 
@@ -253,203 +414,303 @@ pmap_map(
  *     Called with mapping done by BATs. Page_size must already be set.
  *
  *     Parameters:
- *     msize:  Total memory present
+ *     mem_size:       Total memory present
  *     first_avail:    First virtual address available
- *     kmapsize:       Size of kernel text and data
+ *     first_phys_avail:       First physical address available
  */
 void
-pmap_bootstrap(uint64_t msize, vm_offset_t *first_avail, unsigned int kmapsize)
+pmap_bootstrap(unsigned int mem_size, vm_offset_t *first_avail, vm_offset_t *first_phys_avail, unsigned int kmapsize)
 {
        register struct mapping *mp;
        vm_offset_t     addr;
        vm_size_t               size;
-       int                     i, num, j, rsize, mapsize, vmpagesz, vmmapsz, bank, nbits;
-       uint64_t                tmemsize;
-       uint_t                  htslop;
-       vm_offset_t             first_used_addr, PCAsize;
-       struct phys_entry *phys_table;
+       int                     i, num, j, rsize, mapsize, vmpagesz, vmmapsz;
+       unsigned int     mask;
+       vm_offset_t             first_used_addr;
+       PCA                             *pcaptr;
 
-       *first_avail = round_page_32(*first_avail);                             /* Make sure we start out on a page boundary */
-       vm_last_addr = VM_MAX_KERNEL_ADDRESS;                                   /* Set the highest address know to VM */
+       *first_avail = round_page(*first_avail);
+       
+#if DEBUG
+       kprintf("first_avail=%08X; first_phys_avail=%08X; avail_remaining=%d\n", 
+               *first_avail, *first_phys_avail, avail_remaining);
+#endif
+
+       assert(PAGE_SIZE == PPC_PGBYTES);
 
        /*
         * Initialize kernel pmap
         */
        kernel_pmap = &kernel_pmap_store;
-       kernel_pmap_phys = (addr64_t)&kernel_pmap_store;
        cursor_pmap = &kernel_pmap_store;
 
+       lock_init(&pmap_system_lock,
+                 FALSE,                /* NOT a sleep lock */
+                 ETAP_VM_PMAP_SYS,
+                 ETAP_VM_PMAP_SYS_I);
+
        simple_lock_init(&kernel_pmap->lock, ETAP_VM_PMAP_KERNEL);
 
        kernel_pmap->pmap_link.next = (queue_t)kernel_pmap;             /* Set up anchor forward */
        kernel_pmap->pmap_link.prev = (queue_t)kernel_pmap;             /* Set up anchor reverse */
        kernel_pmap->ref_count = 1;
-       kernel_pmap->pmapFlags = pmapKeyDef;                                    /* Set the default keys */
-       kernel_pmap->pmapCCtl = pmapCCtlVal;                                    /* Initialize cache control */
        kernel_pmap->space = PPC_SID_KERNEL;
-       kernel_pmap->pmapvr = 0;                                                                /* Virtual = Real  */
+       kernel_pmap->pmapvr = 0;                                                /* Virtual = Real  */
+       kernel_pmap->bmaps = 0;                                                 /* No block pages just yet */
+       for(i=0; i < 128; i++) {                                                /* Clear usage slots */
+               kernel_pmap->pmapUsage[i] = 0;
+       }
+       for(i=0; i < 16; i++) {                                                 /* Initialize for laughs */
+               kernel_pmap->pmapSegs[i] = SEG_REG_PROT | (i << 20) | PPC_SID_KERNEL;
+       }
 
-/*
- *     The hash table wants to have one pteg for every 2 physical pages.
- *     We will allocate this in physical RAM, outside of kernel virtual memory,
- *     at the top of the highest bank that will contain it.
- *     Note that "bank" doesn't refer to a physical memory slot here, it is a range of
- *     physically contiguous memory.
- *
- *     The PCA will go there as well, immediately before the hash table.
- */
-       nbits = cntlzw(((msize << 1) - 1) >> 32);                               /* Get first bit in upper half */
-       if(nbits == 32) nbits = nbits + cntlzw((uint_t)((msize << 1) - 1));     /* If upper half was empty, find bit in bottom half */
-       tmemsize = 0x8000000000000000ULL >> nbits;                                      /* Get memory size rounded up to power of 2 */
-       
-       if(tmemsize > 0x0000002000000000ULL) tmemsize = 0x0000002000000000ULL;  /* Make sure we don't make an unsupported hash table size */
+       /*
+        * Allocate: (from first_avail up)
+        *      Aligned to its own size:
+        *       hash table (for mem size 2**x, allocate 2**(x-10) entries)
+        *       mapping table (same size and immediatly following hash table)
+        */
+       /* hash_table_size must be a power of 2, recommended sizes are
+        * taken from PPC601 User Manual, table 6-19. We take the next
+        * highest size if mem_size is not a power of two.
+        * TODO NMGS make this configurable at boot time.
+        */
 
-       hash_table_size = (uint_t)(tmemsize >> 13) * per_proc_info[0].pf.pfPTEG;        /* Get provisional hash_table_size */
-       if(hash_table_size < (256 * 1024)) hash_table_size = (256 * 1024);      /* Make sure we are at least minimum size */    
+       num = sizeof(pte_t) * (mem_size >> 10);
 
-       while(1) {                                                                                              /* Try to fit hash table in PCA into contiguous memory */
+       for (hash_table_size = 64 * 1024;       /* minimum size = 64Kbytes */
+            hash_table_size < num; 
+            hash_table_size *= 2)
+               continue;
 
-               if(hash_table_size < (256 * 1024)) {                            /* Have we dropped too short? This should never, ever happen */
-                       panic("pmap_bootstrap: Can't find space for hash table\n");     /* This will never print, system isn't up far enough... */
-               }
+       if (num > (sizeof(pte_t) * 524288))
+               hash_table_size = hash_table_size/2; /* reduce by half above 512MB */
 
-               PCAsize = (hash_table_size / per_proc_info[0].pf.pfPTEG) * sizeof(PCA); /* Get total size of PCA table */
-               PCAsize = round_page_32(PCAsize);                                       /* Make sure it is at least a page long */
-       
-               for(bank = pmap_mem_regions_count - 1; bank >= 0; bank--) {     /* Search backwards through banks */
-                       
-                       hash_table_base = ((addr64_t)pmap_mem_regions[bank].mrEnd << 12) - hash_table_size + PAGE_SIZE; /* Get tenative address */
-                       
-                       htslop = hash_table_base & (hash_table_size - 1);       /* Get the extra that we will round down when we align */
-                       hash_table_base = hash_table_base & -(addr64_t)hash_table_size; /* Round down to correct boundary */
-                       
-                       if((hash_table_base - round_page_32(PCAsize)) >= ((addr64_t)pmap_mem_regions[bank].mrStart << 12)) break;       /* Leave if we fit */
-               }
-               
-               if(bank >= 0) break;                                                            /* We are done if we found a suitable bank */
-               
-               hash_table_size = hash_table_size >> 1;                         /* Try the next size down */
-       }
+       /* Scale to within any physical memory layout constraints */
+       do {
+               num = atop(mem_size);   /* num now holds mem_size in pages */
 
-       if(htslop) {                                                                                    /* If there was slop (i.e., wasted pages for alignment) add a new region */
-               for(i = pmap_mem_regions_count - 1; i >= bank; i--) {   /* Copy from end to our bank, including our bank */
-                       pmap_mem_regions[i + 1].mrStart  = pmap_mem_regions[i].mrStart; /* Set the start of the bank */
-                       pmap_mem_regions[i + 1].mrAStart = pmap_mem_regions[i].mrAStart;        /* Set the start of allocatable area */
-                       pmap_mem_regions[i + 1].mrEnd    = pmap_mem_regions[i].mrEnd;   /* Set the end address of bank */
-                       pmap_mem_regions[i + 1].mrAEnd   = pmap_mem_regions[i].mrAEnd;  /* Set the end address of allocatable area */
-               }
-               
-               pmap_mem_regions[i + 1].mrStart  = (hash_table_base + hash_table_size) >> 12;   /* Set the start of the next bank to the start of the slop area */
-               pmap_mem_regions[i + 1].mrAStart = (hash_table_base + hash_table_size) >> 12;   /* Set the start of allocatable area to the start of the slop area */
-               pmap_mem_regions[i].mrEnd        = (hash_table_base + hash_table_size - 4096) >> 12;    /* Set the end of our bank to the end of the hash table */
-               
-       }               
-       
-       pmap_mem_regions[bank].mrAEnd = (hash_table_base - PCAsize - 4096) >> 12;       /* Set the maximum allocatable in this bank */
-       
-       hw_hash_init();                                                                                 /* Initiaize the hash table and PCA */
-       hw_setup_trans();                                                                               /* Set up hardware registers needed for translation */
-       
-/*
- *     The hash table is now all initialized and so is the PCA.  Go on to do the rest of it.
- *     This allocation is from the bottom up.
- */    
-       
-       num = atop_64(msize);                                                                           /* Get number of pages in all of memory */
+               /* size of all structures that we're going to allocate */
 
-/* Figure out how much we need to allocate */
+               size = (vm_size_t) (
+                       (InitialSaveBloks * PAGE_SIZE) +        /* Allow space for the initial context saveareas */
+                       ((InitialSaveBloks / 2) * PAGE_SIZE) +  /* For backpocket saveareas */
+                       hash_table_size +                                       /* For hash table */
+                       hash_table_size +                                       /* For PTEG allocation table */
+                       (num * sizeof(struct phys_entry))       /* For the physical entries */
+                       );
 
-       size = (vm_size_t) (
-               (InitialSaveBloks * PAGE_SIZE) +                                        /* Allow space for the initial context saveareas */
-               (BackPocketSaveBloks * PAGE_SIZE) +                                     /* For backpocket saveareas */
-               trcWork.traceSize +                                                             /* Size of trace table */
-               ((((1 << maxAdrSpb) * sizeof(pmapTransTab)) + 4095) & -4096) +  /* Size of pmap translate table */
-               (((num * sizeof(struct phys_entry)) + 4095) & -4096)    /* For the physical entries */
-       );
+               mapsize = size = round_page(size);              /* Get size of area to map that we just calculated */
+               mapsize = mapsize + kmapsize;                   /* Account for the kernel text size */
+
+               vmpagesz = round_page(num * sizeof(struct vm_page));    /* Allow for all vm_pages needed to map physical mem */
+               vmmapsz = round_page((num / 8) * sizeof(struct vm_map_entry));  /* Allow for vm_maps */
+               
+               mapsize = mapsize + vmpagesz + vmmapsz; /* Add the VM system estimates into the grand total */
+
+               mapsize = mapsize + (4 * 1024 * 1024);  /* Allow for 4 meg of extra mappings */
+               mapsize = ((mapsize / PAGE_SIZE) + MAPPERBLOK - 1) / MAPPERBLOK;        /* Get number of blocks of mappings we need */
+               mapsize = mapsize + ((mapsize  + MAPPERBLOK - 1) / MAPPERBLOK); /* Account for the mappings themselves */
+
+#if DEBUG
+               kprintf("pmap_bootstrap: initial vm_pages     = %08X\n", vmpagesz);
+               kprintf("pmap_bootstrap: initial vm_maps      = %08X\n", vmmapsz);
+               kprintf("pmap_bootstrap: size before mappings = %08X\n", size);
+               kprintf("pmap_bootstrap: kernel map size      = %08X\n", kmapsize);
+               kprintf("pmap_bootstrap: mapping blocks rqrd  = %08X\n", mapsize);
+#endif
+               
+               size = size + (mapsize * PAGE_SIZE);    /* Get the true size we need */
 
-       mapsize = size = round_page_32(size);                                           /* Get size of area to map that we just calculated */
-       mapsize = mapsize + kmapsize;                                                   /* Account for the kernel text size */
+               /* hash table must be aligned to its size */
 
-       vmpagesz = round_page_32(num * sizeof(struct vm_page)); /* Allow for all vm_pages needed to map physical mem */
-       vmmapsz = round_page_32((num / 8) * sizeof(struct vm_map_entry));       /* Allow for vm_maps */
-       
-       mapsize = mapsize + vmpagesz + vmmapsz;                                 /* Add the VM system estimates into the grand total */
+               addr = (*first_avail +
+                       (hash_table_size-1)) & ~(hash_table_size-1);
 
-       mapsize = mapsize + (4 * 1024 * 1024);                                  /* Allow for 4 meg of extra mappings */
-       mapsize = ((mapsize / PAGE_SIZE) + MAPPERBLOK - 1) / MAPPERBLOK;        /* Get number of blocks of mappings we need */
-       mapsize = mapsize + ((mapsize  + MAPPERBLOK - 1) / MAPPERBLOK); /* Account for the mappings themselves */
+               if (addr + size > pmap_mem_regions[0].end) {
+                       hash_table_size /= 2;
+               } else {
+                       break;
+               }
+               /* If we have had to shrink hash table to too small, panic */
+               if (hash_table_size == 32 * 1024)
+                       panic("cannot lay out pmap memory map correctly");
+       } while (1);
+       
+#if DEBUG
+       kprintf("hash table size=%08X, total size of area=%08X, addr=%08X\n", 
+               hash_table_size, size, addr);
+#endif
+       if (round_page(*first_phys_avail) < trunc_page(addr)) {
+               /* We are stepping over at least one page here, so
+                * add this region to the free regions so that it can
+                * be allocated by pmap_steal
+                */
+               free_regions[free_regions_count].start = round_page(*first_phys_avail);
+               free_regions[free_regions_count].end = trunc_page(addr);
+
+               avail_remaining += (free_regions[free_regions_count].end -
+                                   free_regions[free_regions_count].start) /
+                                           PPC_PGBYTES;
+#if DEBUG
+               kprintf("ADDED FREE REGION from 0x%08x to 0x%08x, avail_remaining = %d\n",
+                       free_regions[free_regions_count].start,free_regions[free_regions_count].end, 
+                       avail_remaining);
+#endif /* DEBUG */
+               free_regions_count++;
+       }
 
-       size = size + (mapsize * PAGE_SIZE);                                    /* Get the true size we need */
+       /* Zero everything - this also invalidates the hash table entries */
+       bzero((char *)addr, size);
 
-       /* hash table must be aligned to its size */
+       /* Set up some pointers to our new structures */
 
-       addr = *first_avail;                                                                    /* Set the address to start allocations */
-       first_used_addr = addr;                                                                 /* Remember where we started */
+       /* from here,  addr points to the next free address */
+       
+       first_used_addr = addr; /* remember where we started */
 
-       bzero((char *)addr, size);                                                              /* Clear everything that we are allocating */
+       /* Set up hash table address and dma buffer address, keeping
+        * alignment. These mappings are all 1-1,  so dma_r == dma_v
+        * 
+        * If hash_table_size == dma_buffer_alignment, then put hash_table
+        * first, since dma_buffer_size may be smaller than alignment, but
+        * hash table alignment==hash_table_size.
+        */
+       hash_table_base = addr;
+               
+       addr += hash_table_size;
+       addr += hash_table_size;                                                        /* Add another for the PTEG Control Area */
+       assert((hash_table_base & (hash_table_size-1)) == 0);
 
-       savearea_init(addr);                                                                    /* Initialize the savearea chains and data */
+       pcaptr = (PCA *)(hash_table_base+hash_table_size);      /* Point to the PCA table */
+       mapCtl.mapcflush.pcaptr = pcaptr;
+       
+       for(i=0; i < (hash_table_size/64) ; i++) {                      /* For all of PTEG control areas: */
+               pcaptr[i].flgs.PCAalflgs.PCAfree=0xFF;                  /* Mark all slots free */
+               pcaptr[i].flgs.PCAalflgs.PCAsteal=0x01;                 /* Initialize steal position */
+       }
+       
+       savearea_init(&addr);                                                           /* Initialize the savearea chains and data */
+       /* phys_table is static to help debugging,
+        * this variable is no longer actually used
+        * outside of this scope
+        */
 
-       addr = (vm_offset_t)((unsigned int)addr + ((InitialSaveBloks + BackPocketSaveBloks) * PAGE_SIZE));      /* Point past saveareas */
+       phys_table = (struct phys_entry *) addr;
 
-       trcWork.traceCurr = (unsigned int)addr;                                 /* Set first trace slot to use */
-       trcWork.traceStart = (unsigned int)addr;                                /* Set start of trace table */
-       trcWork.traceEnd = (unsigned int)addr + trcWork.traceSize;              /* Set end of trace table */
+#if DEBUG
+       kprintf("hash_table_base                 =%08X\n", hash_table_base);
+       kprintf("phys_table                      =%08X\n", phys_table);
+       kprintf("pmap_mem_regions_count          =%08X\n", pmap_mem_regions_count);
+#endif
 
-       addr = (vm_offset_t)trcWork.traceEnd;                                   /* Set next allocatable location */
+       for (i = 0; i < pmap_mem_regions_count; i++) {
                
-       pmapTrans = (pmapTransTab *)addr;                                               /* Point to the pmap to hash translation table */
+               pmap_mem_regions[i].phys_table = phys_table;
+               rsize = (pmap_mem_regions[i].end - (unsigned int)pmap_mem_regions[i].start)/PAGE_SIZE;
                
-       pmapTrans[PPC_SID_KERNEL].pmapPAddr = (addr64_t)kernel_pmap;    /* Initialize the kernel pmap in the translate table */
-       pmapTrans[PPC_SID_KERNEL].pmapVAddr = kernel_pmap;              /* Initialize the kernel pmap in the translate table */
+#if DEBUG
+               kprintf("Initializing physical table for region %d\n", i);
+               kprintf("   table=%08X, size=%08X, start=%08X, end=%08X\n",
+                       phys_table, rsize, pmap_mem_regions[i].start, 
+                       (unsigned int)pmap_mem_regions[i].end);
+#endif         
                
-       addr += ((((1 << maxAdrSpb) * sizeof(pmapTransTab)) + 4095) & -4096);   /* Point past pmap translate table */
+               for (j = 0; j < rsize; j++) {
+                       phys_table[j].phys_link = MAPPING_NULL;
+                       mapping_phys_init(&phys_table[j], (unsigned int)pmap_mem_regions[i].start+(j*PAGE_SIZE), 
+                               PTE_WIMG_DEFAULT);                                              /* Initializes hw specific storage attributes */
+               }
+               phys_table = phys_table +
+                       atop(pmap_mem_regions[i].end - pmap_mem_regions[i].start);
+       }
 
-/*     NOTE: the phys_table must be within the first 2GB of physical RAM. This makes sure we only need to do 32-bit arithmetic */
+       /* restore phys_table for debug */
+       phys_table = (struct phys_entry *) addr;
 
-       phys_table = (struct phys_entry *) addr;                                /* Get pointer to physical table */
+       addr += sizeof(struct phys_entry) * num;
+       
+       simple_lock_init(&tlb_system_lock, ETAP_VM_PMAP_TLB);
 
-       for (bank = 0; bank < pmap_mem_regions_count; bank++) { /* Set pointer and initialize all banks of ram */
-               
-               pmap_mem_regions[bank].mrPhysTab = phys_table;          /* Set pointer to the physical table for this bank */
-               
-               phys_table = phys_table + (pmap_mem_regions[bank].mrEnd - pmap_mem_regions[bank].mrStart + 1);  /* Point to the next */
-       }
+       /* Initialise the registers necessary for supporting the hashtable */
+#if DEBUG
+       kprintf("*** hash_table_init: base=%08X, size=%08X\n", hash_table_base, hash_table_size);
+#endif
 
-       addr += (((num * sizeof(struct phys_entry)) + 4095) & -4096);   /* Step on past the physical entries */
-       
+       hash_table_init(hash_table_base, hash_table_size);
+                       
 /*
  *             Remaining space is for mapping entries.  Tell the initializer routine that
  *             the mapping system can't release this block because it's permanently assigned
  */
 
-       mapping_init();                                                                                 /* Initialize the mapping tables */
+       mapping_init();                                                                 /* Initialize the mapping tables */
 
        for(i = addr; i < first_used_addr + size; i += PAGE_SIZE) {     /* Add initial mapping blocks */
-               mapping_free_init(i, 1, 0);                                                     /* Pass block address and say that this one is not releasable */
+               mapping_free_init(i, 1, 0);                                     /* Pass block address and say that this one is not releasable */
        }
-       mapCtl.mapcmin = MAPPERBLOK;                                                    /* Make sure we only adjust one at a time */
+       mapCtl.mapcmin = MAPPERBLOK;                                    /* Make sure we only adjust one at a time */
+
+#if DEBUG
+
+       kprintf("mapping kernel memory from 0x%08x to 0x%08x, to address 0x%08x\n",
+                first_used_addr, round_page(first_used_addr+size),
+                first_used_addr);
+#endif /* DEBUG */
 
        /* Map V=R the page tables */
        pmap_map(first_used_addr, first_used_addr,
-                round_page_32(first_used_addr + size), VM_PROT_READ | VM_PROT_WRITE);
+                round_page(first_used_addr+size), VM_PROT_READ | VM_PROT_WRITE);
+
+#if DEBUG
 
-       *first_avail = round_page_32(first_used_addr + size);           /* Set next available page */
-       first_free_virt = *first_avail;                                                 /* Ditto */
+       for(i=first_used_addr; i < round_page(first_used_addr+size); i+=PAGE_SIZE) {    /* Step through all these mappings */
+               if(i != (j = kvtophys(i))) {                                                    /* Verify that the mapping was made V=R */
+                       kprintf("*** V=R mapping failed to verify: V=%08X; R=%08X\n", i, j);
+               }
+       }
+#endif
+
+       *first_avail = round_page(first_used_addr + size);
+       first_free_virt = round_page(first_used_addr + size);
 
        /* All the rest of memory is free - add it to the free
         * regions so that it can be allocated by pmap_steal
         */
+       free_regions[free_regions_count].start = *first_avail;
+       free_regions[free_regions_count].end = pmap_mem_regions[0].end;
 
-       pmap_mem_regions[0].mrAStart = (*first_avail >> 12);    /* Set up the free area to start allocations (always in the first bank) */
+       avail_remaining += (free_regions[free_regions_count].end -
+                           free_regions[free_regions_count].start) /
+                                   PPC_PGBYTES;
 
-       current_free_region = 0;                                                                /* Set that we will start allocating in bank 0 */
-       avail_remaining = 0;                                                                    /* Clear free page count */
-       for(bank = 0; bank < pmap_mem_regions_count; bank++) {  /* Total up all of the pages in the system that are available */
-               avail_remaining += (pmap_mem_regions[bank].mrAEnd - pmap_mem_regions[bank].mrAStart) + 1;       /* Add in allocatable pages in this bank */
-       }
+#if DEBUG
+       kprintf("ADDED FREE REGION from 0x%08x to 0x%08x, avail_remaining = %d\n",
+               free_regions[free_regions_count].start,free_regions[free_regions_count].end, 
+               avail_remaining);
+#endif /* DEBUG */
+
+       free_regions_count++;
 
+       current_free_region = 0;
+
+       avail_next = free_regions[current_free_region].start;
+       
+#if DEBUG
+       kprintf("Number of free regions=%d\n",free_regions_count);      /* (TEST/DEBUG) */
+       kprintf("Current free region=%d\n",current_free_region);        /* (TEST/DEBUG) */
+       for(i=0;i<free_regions_count; i++) {                                    /* (TEST/DEBUG) */
+               kprintf("Free region %3d - from %08X to %08X\n", i, free_regions[i].start,
+                       free_regions[i].end);                                                   /* (TEST/DEBUG) */
+       }
+       for (i = 0; i < pmap_mem_regions_count; i++) {                  /* (TEST/DEBUG) */
+               kprintf("PMAP region %3d - from %08X to %08X; phys=%08X\n", i,  /* (TEST/DEBUG) */
+                       pmap_mem_regions[i].start,                                              /* (TEST/DEBUG) */
+                       pmap_mem_regions[i].end,                                                /* (TEST/DEBUG) */
+                       pmap_mem_regions[i].phys_table);                                /* (TEST/DEBUG) */
+       }
+#endif
 
 }
 
@@ -469,7 +730,6 @@ void
 pmap_init(void)
 {
 
-       addr64_t cva;
 
        pmap_zone = zinit(pmapSize, 400 * pmapSize, 4096, "pmap");
 #if    ZONE_DEBUG
@@ -484,7 +744,6 @@ pmap_init(void)
        free_pmap_list = 0;                                     /* Set that there are no free pmaps */
        free_pmap_count = 0;
        simple_lock_init(&free_pmap_lock, ETAP_VM_PMAP_CACHE);
-       
 }
 
 unsigned int pmap_free_pages(void)
@@ -492,32 +751,63 @@ unsigned int pmap_free_pages(void)
        return avail_remaining;
 }
 
-/*
- *     This function allocates physical pages.
- */
-
-/* Non-optimal, but only used for virtual memory startup.
- * Allocate memory from a table of free physical addresses
- * If there are no more free entries, too bad. 
- */
-
-boolean_t pmap_next_page(ppnum_t *addrp)
+boolean_t pmap_next_page(vm_offset_t *addrp)
 {
-               int i;
+       /* Non optimal, but only used for virtual memory startup.
+     * Allocate memory from a table of free physical addresses
+        * If there are no more free entries, too bad. We have two
+        * tables to look through, free_regions[] which holds free
+        * regions from inside pmap_mem_regions[0], and the others...
+        * pmap_mem_regions[1..]
+     */
+        
+       /* current_free_region indicates the next free entry,
+        * if it's less than free_regions_count, then we're still
+        * in free_regions, otherwise we're in pmap_mem_regions
+        */
 
-       if(current_free_region >= pmap_mem_regions_count) return FALSE; /* Return failure if we have used everything... */
-       
-       for(i = current_free_region; i < pmap_mem_regions_count; i++) { /* Find the next bank with free pages */
-               if(pmap_mem_regions[i].mrAStart <= pmap_mem_regions[i].mrAEnd) break;   /* Found one */
+       if (current_free_region >= free_regions_count) {
+               /* We're into the pmap_mem_regions, handle this
+                * separately to free_regions
+                */
+
+               int current_pmap_mem_region = current_free_region -
+                                        free_regions_count + 1;
+               if (current_pmap_mem_region > pmap_mem_regions_count)
+                       return FALSE;
+               *addrp = avail_next;
+               avail_next += PAGE_SIZE;
+               avail_remaining--;
+               if (avail_next >= pmap_mem_regions[current_pmap_mem_region].end) {
+                       current_free_region++;
+                       current_pmap_mem_region++;
+                       avail_next = pmap_mem_regions[current_pmap_mem_region].start;
+#if DEBUG
+                       kprintf("pmap_next_page : next region start=0x%08x\n",avail_next);
+#endif /* DEBUG */
+               }
+               return TRUE;
        }
        
-       current_free_region = i;                                                                                /* Set our current bank */
-       if(i >= pmap_mem_regions_count) return FALSE;                                   /* Couldn't find a free page */
-
-       *addrp = pmap_mem_regions[i].mrAStart;                                  /* Allocate the page */
-       pmap_mem_regions[i].mrAStart = pmap_mem_regions[i].mrAStart + 1;        /* Set the next one to go */
-       avail_remaining--;                                                                                              /* Drop free count */
-
+       /* We're in the free_regions, allocate next page and increment
+        * counters
+        */
+       *addrp = avail_next;
+
+       avail_next += PAGE_SIZE;
+       avail_remaining--;
+
+       if (avail_next >= free_regions[current_free_region].end) {
+               current_free_region++;
+               if (current_free_region < free_regions_count)
+                       avail_next = free_regions[current_free_region].start;
+               else
+                       avail_next = pmap_mem_regions[current_free_region -
+                                                free_regions_count + 1].start;
+#if DEBUG
+               kprintf("pmap_next_page : next region start=0x%08x\n",avail_next);
+#endif 
+       }
        return TRUE;
 }
 
@@ -525,8 +815,8 @@ void pmap_virtual_space(
        vm_offset_t *startp,
        vm_offset_t *endp)
 {
-       *startp = round_page_32(first_free_virt);
-       *endp   = vm_last_addr;
+       *startp = round_page(first_free_virt);
+       *endp   = VM_MAX_KERNEL_ADDRESS;
 }
 
 /*
@@ -552,8 +842,17 @@ pmap_create(vm_size_t size)
 {
        pmap_t pmap, ckpmap, fore, aft;
        int s, i;
-       unsigned int currSID, hspace;
-       addr64_t physpmap;
+       space_t sid;
+       unsigned int currSID;
+
+#if PMAP_LOWTRACE
+       dbgTrace(0xF1D00001, size, 0);                  /* (TEST/DEBUG) */
+#endif
+
+#if DEBUG
+       if (pmdebug & PDB_USER)
+               kprintf("pmap_create(size=%x)%c", size, size ? '\n' : ' ');
+#endif
 
        /*
         * A software use-only map doesn't even need a pmap structure.
@@ -569,70 +868,76 @@ pmap_create(vm_size_t size)
        s = splhigh();
        simple_lock(&free_pmap_lock);
        
-       if(free_pmap_list) {                                                    /* Any free? */
-               pmap = free_pmap_list;                                          /* Yes, allocate it */
-               free_pmap_list = (pmap_t)pmap->freepmap;        /* Dequeue this one (we chain free ones through freepmap) */
+       if(free_pmap_list) {                                    /* Any free? */
+               pmap = free_pmap_list;                          /* Yes, allocate it */
+               free_pmap_list = (pmap_t)pmap->bmaps;   /* Dequeue this one (we chain free ones through bmaps) */
                free_pmap_count--;
        }
        else {
-               simple_unlock(&free_pmap_lock);                         /* Unlock just in case */
+               simple_unlock(&free_pmap_lock);         /* Unlock just in case */
                splx(s);
 
-               pmap = (pmap_t) zalloc(pmap_zone);                      /* Get one */
+               pmap = (pmap_t) zalloc(pmap_zone);      /* Get one */
                if (pmap == PMAP_NULL) return(PMAP_NULL);       /* Handle out-of-memory condition */
                
-               bzero((char *)pmap, pmapSize);                          /* Clean up the pmap */
+               bzero((char *)pmap, pmapSize);          /* Clean up the pmap */
                
                s = splhigh();
-               simple_lock(&free_pmap_lock);                           /* Lock it back up      */
+               simple_lock(&free_pmap_lock);           /* Lock it back up      */
                
-               ckpmap = cursor_pmap;                                           /* Get starting point for free ID search */
-               currSID = ckpmap->spaceNum;                                     /* Get the actual space ID number */
+               ckpmap = cursor_pmap;                           /* Get starting point for free ID search */
+               currSID = ckpmap->spaceNum;                     /* Get the actual space ID number */
 
-               while(1) {                                                                      /* Keep trying until something happens */
+               while(1) {                                                      /* Keep trying until something happens */
                
-                       currSID = (currSID + 1) & (maxAdrSp - 1);       /* Get the next in the sequence */
-                       if(((currSID * incrVSID) & (maxAdrSp - 1)) == invalSpace) continue;     /* Skip the space we have reserved */
+                       currSID = (currSID + 1) & SID_MAX;      /* Get the next in the sequence */
                        ckpmap = (pmap_t)ckpmap->pmap_link.next;        /* On to the next in-use pmap */
        
                        if(ckpmap->spaceNum != currSID) break;  /* If we are out of sequence, this is free */
                        
-                       if(ckpmap == cursor_pmap) {                             /* See if we have 2^20 already allocated */
-                               panic("pmap_create: Maximum number (%d) active address spaces reached\n", maxAdrSp);    /* Die pig dog */
+                       if(ckpmap == cursor_pmap) {             /* See if we have 2^20 already allocated */
+                               panic("pmap_create: Maximum number (2^20) active address spaces reached\n");    /* Die pig dog */
                        }
                }
 
-               pmap->space = (currSID * incrVSID) & (maxAdrSp - 1);    /* Calculate the actual VSID */
-               pmap->spaceNum = currSID;                                       /* Set the space ID number */
+               pmap->space = (currSID * incrVSID) & SID_MAX;   /* Calculate the actual VSID */
+               pmap->spaceNum = currSID;                       /* Set the space ID number */
+
 /*
  *             Now we link into the chain just before the out of sequence guy.
  */
 
-               fore = (pmap_t)ckpmap->pmap_link.prev;          /* Get the current's previous */
-               pmap->pmap_link.next = (queue_t)ckpmap;         /* My next points to the current */
-               fore->pmap_link.next = (queue_t)pmap;           /* Current's previous's next points to me */
-               pmap->pmap_link.prev = (queue_t)fore;           /* My prev points to what the current pointed to */
-               ckpmap->pmap_link.prev = (queue_t)pmap;         /* Current's prev points to me */
+               fore = (pmap_t)ckpmap->pmap_link.prev;  /* Get the current's previous */
+               pmap->pmap_link.next = (queue_t)ckpmap; /* My next points to the current */
+               fore->pmap_link.next = (queue_t)pmap;   /* Current's previous's next points to me */
+               pmap->pmap_link.prev = (queue_t)fore;   /* My prev points to what the current pointed to */
+               ckpmap->pmap_link.prev = (queue_t)pmap; /* Current's prev points to me */
 
                simple_lock_init(&pmap->lock, ETAP_VM_PMAP);
-               
-               physpmap = ((addr64_t)pmap_find_phys(kernel_pmap, (addr64_t)pmap) << 12) | (addr64_t)((unsigned int)pmap & 0xFFF);      /* Get the physical address of the pmap */
-               
-               pmap->pmapvr = (addr64_t)((unsigned int)pmap) ^ physpmap;       /* Make V to R translation mask */
-               
-               pmapTrans[pmap->space].pmapPAddr = physpmap;    /* Set translate table physical to point to us */
-               pmapTrans[pmap->space].pmapVAddr = pmap;        /* Set translate table virtual to point to us */
-               
+               pmap->pmapvr = (unsigned int)pmap ^ (unsigned int)pmap_extract(kernel_pmap, (vm_offset_t)pmap); /* Get physical pointer to the pmap and make mask */
        }
-
-       pmap->pmapFlags = pmapKeyDef;                                   /* Set default key */
-       pmap->pmapCCtl = pmapCCtlVal;                                   /* Initialize cache control */
        pmap->ref_count = 1;
        pmap->stats.resident_count = 0;
        pmap->stats.wired_count = 0;
-       pmap->pmapSCSubTag = 0x0000000000000000ULL;             /* Make sure this is clean an tidy */
-       simple_unlock(&free_pmap_lock);
+       pmap->bmaps = 0;                                                /* Clear block map pointer to 0 */
+       pmap->vflags = 0;                                               /* Mark all alternates invalid for now */
+       for(i=0; i < 128; i++) {                                /* Clean out usage slots */
+               pmap->pmapUsage[i] = 0;
+       }
+       for(i=0; i < 16; i++) {                                 /* Initialize for laughs */
+               pmap->pmapSegs[i] = SEG_REG_PROT | (i << 20) | pmap->space;
+       }
+       
+#if PMAP_LOWTRACE
+       dbgTrace(0xF1D00002, (unsigned int)pmap, (unsigned int)pmap->space);    /* (TEST/DEBUG) */
+#endif
+
+#if DEBUG
+       if (pmdebug & PDB_USER)
+               kprintf("-> %x, space id = %d\n", pmap, pmap->space);
+#endif
 
+       simple_unlock(&free_pmap_lock);
        splx(s);
        return(pmap);
 }
@@ -652,6 +957,15 @@ pmap_destroy(pmap_t pmap)
        spl_t s;
        pmap_t fore, aft;
 
+#if PMAP_LOWTRACE
+       dbgTrace(0xF1D00003, (unsigned int)pmap, 0);                    /* (TEST/DEBUG) */
+#endif
+
+#if DEBUG
+       if (pmdebug & PDB_USER)
+               kprintf("pmap_destroy(pmap=%x)\n", pmap);
+#endif
+
        if (pmap == PMAP_NULL)
                return;
 
@@ -666,7 +980,7 @@ pmap_destroy(pmap_t pmap)
                panic("PMAP_DESTROY: pmap not empty");
 #else
        if(pmap->stats.resident_count != 0) {
-               pmap_remove(pmap, 0, 0xFFFFFFFFFFFFF000ULL);
+               pmap_remove(pmap, 0, 0xFFFFF000);
        }
 #endif
 
@@ -680,9 +994,9 @@ pmap_destroy(pmap_t pmap)
         */
        simple_lock(&free_pmap_lock);
        
-       if (free_pmap_count <= free_pmap_max) {         /* Do we have enough spares? */
+       if (free_pmap_count <= free_pmap_max) {                                 /* Do we have enough spares? */
                
-               pmap->freepmap = (struct blokmap *)free_pmap_list;      /* Queue in front */
+               pmap->bmaps = (struct blokmap *)free_pmap_list;         /* Queue in front */
                free_pmap_list = pmap;
                free_pmap_count++;
                simple_unlock(&free_pmap_lock);
@@ -694,8 +1008,6 @@ pmap_destroy(pmap_t pmap)
                fore->pmap_link.next = pmap->pmap_link.next;    /* My previous's next is my next */
                aft->pmap_link.prev = pmap->pmap_link.prev;             /* My next's previous is my previous */ 
                simple_unlock(&free_pmap_lock);
-               pmapTrans[pmap->space].pmapPAddr = -1;                  /* Invalidate the translate table physical */
-               pmapTrans[pmap->space].pmapVAddr = -1;                  /* Invalidate the translate table virtual */
                zfree(pmap_zone, (vm_offset_t) pmap);
        }
        splx(s);
@@ -710,6 +1022,15 @@ pmap_reference(pmap_t pmap)
 {
        spl_t s;
 
+#if PMAP_LOWTRACE
+       dbgTrace(0xF1D00004, (unsigned int)pmap, 0);                    /* (TEST/DEBUG) */
+#endif
+
+#if DEBUG
+       if (pmdebug & PDB_USER)
+               kprintf("pmap_reference(pmap=%x)\n", pmap);
+#endif
+
        if (pmap != PMAP_NULL) hw_atomic_add(&pmap->ref_count, 1);      /* Bump the count */
 }
 
@@ -724,36 +1045,20 @@ void pmap_remove_some_phys(
             vm_offset_t pa)
 {
        register struct phys_entry      *pp;
-       register struct mapping         *mp;
-       unsigned int pindex;
+       register struct mapping         *mp, *mpv;
 
-       if (pmap == PMAP_NULL) {                                        /* This should never be called with a null pmap */
-               panic("pmap_remove_some_phys: null pmap\n");
-       }
 
-       pp = mapping_phys_lookup(pa, &pindex);          /* Get physical entry */
-       if (pp == 0) return;                                            /* Leave if not in physical RAM */
+       if (pmap == PMAP_NULL) return;                          /* Do nothing if no pmap */
 
-       while(1) {                                                                      /* Keep going until we toss all pages from this pmap */
-               if (pmap->pmapFlags & pmapVMhost) {
-                       mp = hw_purge_phys(pp);                         /* Toss a map */
-                       if(!mp ) return;                                        
-                       if((unsigned int)mp & mapRetCode) {             /* Was there a failure? */
-                               panic("pmap_remove_some_phys: hw_purge_phys failed - pp = %08X, pmap = %08X, code = %08X\n",
-                                       pp, pmap, mp);
-                       }
-               } else { 
-                       mp = hw_purge_space(pp, pmap);                  /* Toss a map */
-                       if(!mp ) return;                                        
-                       if((unsigned int)mp & mapRetCode) {             /* Was there a failure? */
-                               panic("pmap_remove_some_phys: hw_purge_pmap failed - pp = %08X, pmap = %08X, code = %08X\n",
-                                       pp, pmap, mp);
-                       }
-               }
-               mapping_free(mp);                                               /* Toss the mapping */
-       }
+       pp = pmap_find_physentry(pa);                           /* Get the physent for this page */
+       if (pp == PHYS_NULL) return;                            /* Leave if not in physical RAM */
 
-       return;                                                                         /* Leave... */
+       if (pmap->vflags & pmapVMhost)
+               mapping_purge(pp);
+       else
+               mapping_purge_pmap(pp, pmap);   
+
+       return;                                                 /* Leave... */
 }
 
 /*
@@ -769,13 +1074,25 @@ void pmap_remove_some_phys(
 void
 pmap_remove(
            pmap_t pmap,
-           addr64_t sva,
-           addr64_t eva)
+           vm_offset_t sva,
+           vm_offset_t eva)
 {
-       addr64_t                va, endva;
+       spl_t                   spl;
+       struct mapping  *mp, *blm;
+       vm_offset_t             lpage;
+
+#if PMAP_LOWTRACE
+       dbgTrace(0xF1D00005, (unsigned int)pmap, sva|((eva-sva)>>12));  /* (TEST/DEBUG) */
+#endif
 
-       if (pmap == PMAP_NULL) return;                                  /* Leave if software pmap */
+#if DEBUG
+       if (pmdebug & PDB_USER)
+               kprintf("pmap_remove(pmap=%x, sva=%x, eva=%x)\n",
+                      pmap, sva, eva);
+#endif
 
+       if (pmap == PMAP_NULL)
+               return;
 
        /* It is just possible that eva might have wrapped around to zero,
         * and sometimes we get asked to liberate something of size zero
@@ -784,17 +1101,49 @@ pmap_remove(
        assert(eva >= sva);
 
        /* If these are not page aligned the loop might not terminate */
-       assert((sva == trunc_page_64(sva)) && (eva == trunc_page_64(eva)));
+       assert((sva == trunc_page(sva)) && (eva == trunc_page(eva)));
+
+       /* We liberate addresses from high to low, since the stack grows
+        * down. This means that we won't need to test addresses below
+        * the limit of stack growth
+        */
+
+       debugLog2(44, sva, eva);                                        /* Log pmap_map call */
+       
+       sva = trunc_page(sva);                                          /* Make it clean */
+       lpage = trunc_page(eva) - PAGE_SIZE;            /* Point to the last page contained in the range */
+
+/*
+ *     Here we will remove all of the block mappings that overlap this range.
+ *     hw_rem_blk removes one mapping in the range and returns.  If it returns
+ *     0, there are no blocks in the range.
+ */
+
+       while(mp = (mapping *)hw_rem_blk(pmap, sva, lpage)) {   /* Keep going until no more */
+               if((unsigned int)mp & 1) {                                                      /* Make sure we don't unmap a permanent one */
+                       blm = (struct mapping  *)hw_cpv((mapping *)((unsigned int)mp & 0xFFFFFFFC));            /* Get virtual address */
+                       panic("mapping_remove: attempt to unmap a permanent mapping - pmap = %08X, va = %08X, mapping = %08X\n",
+                               pmap, sva, blm);
+               }
+               if (!((unsigned int)mp & 2))
+                       mapping_free(hw_cpv(mp));                                                       /* Release it */
+       }
+       while (pmap->stats.resident_count && (eva > sva)) {
 
-       va = sva & -4096LL;                                                     /* Round start down to a page */
-       endva = eva & -4096LL;                                          /* Round end down to a page */
+               eva -= PAGE_SIZE;                                               /* Back up a page */
 
-       while(1) {                                                                      /* Go until we finish the range */
-               va = mapping_remove(pmap, va);                  /* Remove the mapping and see what's next */
-               va = va & -4096LL;                                              /* Make sure the "not found" indication is clear */
-               if((va == 0) || (va >= endva)) break;   /* End loop if we finish range or run off the end */
+#if 1
+               if((0x00008000 >> (sva >> 28)) & pmap->vflags)
+                  panic("pmap_remove: attempt to remove nested vaddr; pmap = %08X, vaddr = %08X\n", pmap, sva);        /* (TEST/DEBUG) panic */
+#endif
+               if(!(pmap->pmapUsage[(eva >> pmapUsageShft) & pmapUsageMask])) {        /* See if this chunk has anything in it */
+                       eva = eva & (-pmapUsageSize);           /* Back up into the previous slot */
+                       continue;                                                       /* Check the next... */
+               }
+               mapping_remove(pmap, eva);                              /* Remove the mapping for this address */
        }
 
+       debugLog2(45, 0, 0);                                            /* Log pmap_map call */
 }
 
 /*
@@ -806,15 +1155,24 @@ pmap_remove(
  */
 void
 pmap_page_protect(
-       ppnum_t pa,
+       vm_offset_t pa,
        vm_prot_t prot)
 {
        register struct phys_entry      *pp;
        boolean_t                       remove;
-       unsigned int            pindex;
-       mapping                         *mp;
 
 
+#if PMAP_LOWTRACE
+       dbgTrace(0xF1D00006, (unsigned int)pa, (unsigned int)prot);     /* (TEST/DEBUG) */
+#endif
+
+#if DEBUG
+       if (pmdebug & PDB_USER)
+               kprintf("pmap_page_protect(pa=%x, prot=%x)\n", pa, prot);
+#endif
+
+       debugLog2(46, pa, prot);                                        /* Log pmap_page_protect call */
+
        switch (prot) {
                case VM_PROT_READ:
                case VM_PROT_READ|VM_PROT_EXECUTE:
@@ -827,31 +1185,23 @@ pmap_page_protect(
                        break;
        }
 
-
-       pp = mapping_phys_lookup(pa, &pindex);  /* Get physical entry */
-       if (pp == 0) return;                                            /* Leave if not in physical RAM */
+       pp = pmap_find_physentry(pa);                           /* Get the physent for this page */
+       if (pp == PHYS_NULL) return;                            /* Leave if not in physical RAM */
 
        if (remove) {                                                           /* If the protection was set to none, we'll remove all mappings */
-               
-               while(1) {                                                              /* Keep going until we toss all pages from this physical page */
-                       mp = hw_purge_phys(pp);                         /* Toss a map */
-                       if(!mp ) return;                                        
-                       if((unsigned int)mp & mapRetCode) {     /* Was there a failure? */
-                               panic("pmap_page_protect: hw_purge_phys failed - pp = %08X, code = %08X\n",
-                                       pp, mp);
-                       }
-                       mapping_free(mp);                                       /* Toss the mapping */
-               }
+               mapping_purge(pp);                                              /* Get rid of them all */
 
+               debugLog2(47, 0, 0);                                    /* Log pmap_map call */
                return;                                                                 /* Leave... */
        }
+       
+       /*      When we get here, it means that we are to change the protection for a 
+        *      physical page.  
+        */
+        
+       mapping_protect_phys(pp, prot, 0);                      /* Change protection of all mappings to page. */
 
-/*     When we get here, it means that we are to change the protection for a 
- *     physical page.  
- */
-       mapping_protect_phys(pa, prot & VM_PROT_ALL);   /* Change protection of all mappings to page. */
-
+       debugLog2(47, 1, 0);                                            /* Log pmap_map call */
 }
 
 /*
@@ -870,24 +1220,54 @@ void pmap_protect(
             vm_offset_t eva,
             vm_prot_t prot)
 {
+       spl_t                                           spl;
+       register struct phys_entry      *pp;
+       register struct mapping         *mp, *mpv;
+
+#if PMAP_LOWTRACE
+       dbgTrace(0xF1D00008, (unsigned int)pmap, (unsigned int)(sva|((eva-sva)>>12)));  /* (TEST/DEBUG) */
+#endif
 
-       addr64_t va, endva, nextva;
+#if DEBUG
+       if (pmdebug & PDB_USER)
+               kprintf("pmap_protect(pmap=%x, sva=%x, eva=%x, prot=%x)\n", pmap, sva, eva, prot);
+       
+       assert(sva < eva);
+#endif
 
        if (pmap == PMAP_NULL) return;                          /* Do nothing if no pmap */
 
+       debugLog2(48, sva, eva);                                        /* Log pmap_map call */
+
        if (prot == VM_PROT_NONE) {                                     /* Should we kill the address range?? */
-               pmap_remove(pmap, (addr64_t)sva, (addr64_t)eva);        /* Yeah, dump 'em */
+               pmap_remove(pmap, sva, eva);                    /* Yeah, dump 'em */
+
+               debugLog2(49, prot, 0);                                                         /* Log pmap_map call */
+
                return;                                                                 /* Leave... */
        }
 
-       va = sva & -4096LL;                                                     /* Round start down to a page */
-       endva = eva & -4096LL;                                          /* Round end down to a page */
+       sva = trunc_page(sva);                                          /* Start up a page boundary */
+       
+       while(sva < eva) {                                                      /* Step through */
+
+               if(!(pmap->pmapUsage[(sva >> pmapUsageShft) & pmapUsageMask])) {        /* See if this chunk has anything in it */
+                       sva = (sva + pmapUsageSize) &(-pmapUsageSize);  /* Jump up into the next slot if nothing here */
+                       if(!sva) break;                                         /* We tried to wrap, kill loop... */
+                       continue;                                                       /* Check the next... */
+               }
+
+#if 1
+               if((0x00008000 >> (sva >> 28)) & pmap->vflags)
+                  panic("pmap_protect: attempt to protect nested vaddr; pmap = %08X, vaddr = %08X\n", pmap, sva);      /* (TEST/DEBUG) panic */
+#endif
 
-       while(1) {                                                                      /* Go until we finish the range */
-               (void)mapping_protect(pmap, va, prot & VM_PROT_ALL, &va);       /* Change the protection and see what's next */
-               if((va == 0) || (va >= endva)) break;   /* End loop if we finish range or run off the end */
+               mapping_protect(pmap, sva, prot);               /* Change the protection on the page */
+               sva += PAGE_SIZE;                                               /* On to the next page */
        }
 
+       debugLog2(49, prot, 1);                                         /* Log pmap_map call */
+       return;                                                                         /* Leave... */
 }
 
 
@@ -906,104 +1286,61 @@ void pmap_protect(
  *     insert this page into the given map NOW.
  */
 void
-pmap_enter(pmap_t pmap, vm_offset_t va, ppnum_t pa, vm_prot_t prot, 
+pmap_enter(pmap_t pmap, vm_offset_t va, vm_offset_t pa, vm_prot_t prot, 
                unsigned int flags, boolean_t wired)
 {
+       spl_t                           spl;
+       struct mapping          *mp;
+       struct phys_entry       *pp;
        int                                     memattr;
-       pmap_t                          opmap;
-       unsigned int            mflags;
-       addr64_t                        colva;
        
-       if (pmap == PMAP_NULL) return;                                  /* Leave if software pmap */
+#if PMAP_LOWTRACE
+       dbgTrace(0xF1D00009, (unsigned int)pmap, (unsigned int)va);     /* (TEST/DEBUG) */
+       dbgTrace(0xF1D04009, (unsigned int)pa, (unsigned int)prot);     /* (TEST/DEBUG) */
+#endif         
+       
+       if (pmap == PMAP_NULL) return;                                  /* If they gave us no pmap, just leave... */
 
-       disable_preemption();                                                   /* Don't change threads */
+       debugLog2(50, va, pa);                                                  /* Log pmap_map call */
 
-       mflags = 0;                                                                             /* Make sure this is initialized to nothing special */
-       if(!(flags & VM_WIMG_USE_DEFAULT)) {                    /* Are they supplying the attributes? */
-               mflags = mmFlgUseAttr | (flags & VM_MEM_GUARDED) | ((flags & VM_MEM_NOT_CACHEABLE) >> 1);       /* Convert to our mapping_make flags */
-       }
-       
-/*
- *     It is possible to hang here if another processor is remapping any pages we collide with and are removing
- */ 
+       pp = pmap_find_physentry(pa);                                   /* Get the physent for this physical page */
 
-       while(1) {                                                                              /* Keep trying the enter until it goes in */
-       
-               colva = mapping_make(pmap, va, pa, mflags, 1, prot & VM_PROT_ALL);      /* Enter the mapping into the pmap */
-               
-               if(!colva) break;                                                       /* If there were no collisions, we are done... */
-               
-               mapping_remove(pmap, colva);                            /* Remove the mapping that collided */
-       }
+       if((0x00008000 >> (va >> 28)) & pmap->vflags)
+          panic("pmap_enter: attempt to map into nested vaddr; pmap = %08X, vaddr = %08X\n", pmap, va);        /* (TEST/DEBUG) panic */
 
-       enable_preemption();                                                    /* Thread change ok */
+       spl=splhigh();                                                                  /* Have to disallow interrupts between the
+                                                                                                          time we possibly clear a mapping and the time
+                                                                                                          we get it remapped again.  An I/O SLIH could
+                                                                                                          try to drive an IOR using the page before
+                                                                                                          we get it mapped (Dude! This was a tough 
+                                                                                                          bug!!!!) */
 
-}
-
-/*
- *             Enters translations for odd-sized V=F blocks.
- *
- *             The higher level VM map should be locked to insure that we don't have a
- *             double diddle here.
- *
- *             We panic if we get a block that overlaps with another. We do not merge adjacent
- *             blocks because removing any address within a block removes the entire block and if
- *             would really mess things up if we trashed too much.
- *
- *             Once a block is mapped, it is unmutable, that is, protection, catch mode, etc. can
- *             not be changed.  The block must be unmapped and then remapped with the new stuff.
- *             We also do not keep track of reference or change flags.
- *
- *             Note that pmap_map_block_rc is the same but doesn't panic if collision.
- *
- */
-void pmap_map_block(pmap_t pmap, addr64_t va, ppnum_t pa, vm_size_t size, vm_prot_t prot, int attr, unsigned int flags) {      /* Map an autogenned block */
+       mapping_remove(pmap, va);                                               /* Remove any other mapping at this address */
 
-       int                                     memattr;
-       unsigned int            mflags;
-       addr64_t                        colva;
-
-       
-       if (pmap == PMAP_NULL) {                                                /* Did they give us a pmap? */
-               panic("pmap_map_block: null pmap\n");           /* No, like that's dumb... */
-       }
-
-//     kprintf("pmap_map_block: (%08X) va = %016llX, pa = %08X, size = %08X, prot = %08X, attr = %08X, flags = %08X\n",        /* (BRINGUP) */
-//             current_act(), va, pa, size, prot, attr, flags);        /* (BRINGUP) */
-
-
-       mflags = mmFlgBlock | mmFlgUseAttr | (attr & VM_MEM_GUARDED) | ((attr & VM_MEM_NOT_CACHEABLE) >> 1);    /* Convert to our mapping_make flags */
-       if(flags) mflags |= mmFlgPerm;                                  /* Mark permanent if requested */
-       
-       colva = mapping_make(pmap, va, pa, mflags, (size >> 12), prot); /* Enter the mapping into the pmap */
-       
-       if(colva) {                                                                             /* If there was a collision, panic */
-               panic("pmap_map_block: collision at %016llX, pmap = %08X\n", colva, pmap);
+       if(flags & VM_WIMG_USE_DEFAULT) {
+           if(pp) {
+                       /* Set attr to the phys default */
+                       memattr = ((pp->pte1&0x00000078) >> 3); 
+               } else {
+                       memattr = PTE_WIMG_UNCACHED_COHERENT_GUARDED;
+               }
+       } else {
+               memattr = flags & VM_WIMG_MASK;
        }
        
-       return;                                                                                 /* Return */
-}
 
-int pmap_map_block_rc(pmap_t pmap, addr64_t va, ppnum_t pa, vm_size_t size, vm_prot_t prot, int attr, unsigned int flags) {    /* Map an autogenned block */
+       /* Make the address mapping */
+       mp=mapping_make(pmap, pp, va, pa, prot, memattr, 0);    
 
-       int                                     memattr;
-       unsigned int            mflags;
-       addr64_t                        colva;
+       splx(spl);                                                                              /* I'm not busy no more - come what may */
 
-       
-       if (pmap == PMAP_NULL) {                                                /* Did they give us a pmap? */
-               panic("pmap_map_block_rc: null pmap\n");        /* No, like that's dumb... */
-       }
+       debugLog2(51, prot, 0);                                                 /* Log pmap_map call */
+
+#if    DEBUG
+       if (pmdebug & (PDB_USER|PDB_ENTER))
+               kprintf("leaving pmap_enter\n");
+#endif
 
-       mflags = mmFlgBlock | mmFlgUseAttr | (attr & VM_MEM_GUARDED) | ((attr & VM_MEM_NOT_CACHEABLE) >> 1);    /* Convert to our mapping_make flags */
-       if(flags) mflags |= mmFlgPerm;                                  /* Mark permanent if requested */
-       
-       colva = mapping_make(pmap, va, pa, mflags, (size >> 12), prot); /* Enter the mapping into the pmap */
-       
-       if(colva) return 0;                                                             /* If there was a collision, fail */
-       
-       return 1;                                                                               /* Return true of we worked */
 }
 
 /*
@@ -1011,90 +1348,101 @@ int pmap_map_block_rc(pmap_t pmap, addr64_t va, ppnum_t pa, vm_size_t size, vm_p
  *     returns the physical address corrsponding to the 
  *     virtual address specified by pmap and va if the
  *     virtual address is mapped and 0 if it is not.
- *     Note: we assume nothing is ever mapped to phys 0.
- *
- *     NOTE: This call always will fail for physical addresses greater than 0xFFFFF000.
  */
 vm_offset_t pmap_extract(pmap_t pmap, vm_offset_t va) {
 
        spl_t                                   spl;
-       register struct mapping *mp;
+       register struct mapping *mp, *mpv;
        register vm_offset_t    pa;
-       addr64_t                                nextva;
-       ppnum_t                                 ppoffset;
-       unsigned int                    gva;
+       unsigned int                    seg;
+       pmap_t                                  actpmap;
 
-#ifdef BOGUSCOMPAT
-       panic("pmap_extract: THIS CALL IS BOGUS. NEVER USE IT EVER. So there...\n");    /* Don't use this */
-#else
 
-       gva = (unsigned int)va;                                                 /* Make sure we don't have a sign */
+#if PMAP_LOWTRACE
+       dbgTrace(0xF1D0000B, (unsigned int)pmap, (unsigned int)va);     /* (TEST/DEBUG) */
+#endif
+#if DEBUG
+       if (pmdebug & PDB_USER)
+               kprintf("pmap_extract(pmap=%x, va=%x)\n", pmap, va);
+#endif
 
-       spl = splhigh();                                                                /* We can't allow any loss of control here */
-       
-       mp = mapping_find(pmap, (addr64_t)gva, &nextva,1);      /* Find the mapping for this address */
-       
-       if(!mp) {                                                                               /* Is the page mapped? */
-               splx(spl);                                                                      /* Enable interrupts */
-               return 0;                                                                       /* Pass back 0 if not found */
-       }
+       seg = va >> 28;                                                                 /* Isolate segment */
+       if((0x00008000 >> seg) & pmap->vflags) actpmap = pmap->pmapPmaps[seg];  /* Set nested pmap if there is one */
+       else actpmap = pmap;                                                    /* Otherwise use the one passed in */
 
-       ppoffset = (ppnum_t)(((gva & -4096LL) - (mp->mpVAddr & -4096LL)) >> 12);        /* Get offset from va to base va */
-       
-       
-       pa = mp->mpPAddr + ppoffset;                                    /* Remember ppage because mapping may vanish after drop call */
-                       
-       mapping_drop_busy(mp);                                                  /* We have everything we need from the mapping */
-       splx(spl);                                                                              /* Restore 'rupts */
+       pa = (vm_offset_t) 0;                                                   /* Clear this to 0 */ 
 
-       if(pa > maxPPage32) return 0;                                   /* Force large addresses to fail */
-       
-       pa = (pa << 12) | (va & 0xFFF);                                 /* Convert physical page number to address */
-       
-#endif
-       return pa;                                                                              /* Return physical address or 0 */
-}
+       debugLog2(52, actpmap->space, va);                                      /* Log pmap_map call */
 
-/*
- * ppnum_t pmap_find_phys(pmap, addr64_t va)
- *     returns the physical page corrsponding to the 
- *     virtual address specified by pmap and va if the
- *     virtual address is mapped and 0 if it is not.
- *     Note: we assume nothing is ever mapped to phys 0.
- *
- */
-ppnum_t pmap_find_phys(pmap_t pmap, addr64_t va) {
+       spl = splhigh();                                                                /* We can't allow any loss of control here */
 
-       spl_t                                   spl;
-       register struct mapping *mp;
-       ppnum_t                                 pa, ppoffset;
-       addr64_t                                nextva, curva;
+       if(mp=hw_lock_phys_vir(actpmap->space, va)) {   /* Find the mapping for this vaddr and lock physent */  
+               if((unsigned int)mp&1) {                                        /* Did the lock on the phys entry time out? */
+                       panic("pmap_extract: timeout obtaining lock on physical entry\n");      /* Scream bloody murder! */
+                       splx(spl);                                                              /* Interruptions are cool now */
+                       return 0;
+               }
 
-       spl = splhigh();                                                                /* We can't allow any loss of control here */
-       
-       mp = mapping_find(pmap, va, &nextva, 1);                /* Find the mapping for this address */
-       
-       if(!mp) {                                                                               /* Is the page mapped? */
-               splx(spl);                                                                      /* Enable interrupts */
-               return 0;                                                                       /* Pass back 0 if not found */
-       }
-               
-       
-       ppoffset = (ppnum_t)(((va & -4096LL) - (mp->mpVAddr & -4096LL)) >> 12); /* Get offset from va to base va */
-       
-       pa = mp->mpPAddr + ppoffset;                                    /* Get the actual physical address */
+               mpv = hw_cpv(mp);                                                       /* Get virtual address of mapping */
+               pa = (vm_offset_t)((mpv->PTEr & -PAGE_SIZE) | ((unsigned int)va & (PAGE_SIZE-1)));      /* Build the physical address */
+               if(mpv->physent) hw_unlock_bit((unsigned int *)&mpv->physent->phys_link, PHYS_LOCK);    /* Unlock the physical entry */
+               splx(spl);                                                                      /* Interruptions are cool now */
 
-       mapping_drop_busy(mp);                                                  /* We have everything we need from the mapping */
+               debugLog2(53, pa, 0);                                           /* Log pmap_map call */
 
+               return pa;                                                                      /* Return the physical address... */
+       }
+
+       pa = hw_cvp_blk(pmap, va);                                              /* Try to convert odd-sized page (returns 0 if not found) */
+                                                                                                       /* Note no nested pmaps here */
        splx(spl);                                                                              /* Restore 'rupts */
+       debugLog2(53, pa, 0);                                                   /* Log pmap_map call */
        return pa;                                                                              /* Return physical address or 0 */
 }
 
+/*
+ *     pmap_attribute_cache_sync
+ *     Handle the machine attribute calls which involve sync the prcessor
+ *     cache.
+ */
+kern_return_t
+pmap_attribute_cache_sync(address, size, attribute, value)
+       vm_offset_t     address;
+       vm_size_t       size;
+       vm_machine_attribute_t  attribute;
+       vm_machine_attribute_val_t* value;      
+{
+       while(size) {
+               switch (*value) {                                       /* What type was that again? */
+                       case MATTR_VAL_CACHE_SYNC:                      /* It is sync I+D caches */
+                               sync_cache(address, PAGE_SIZE);         /* Sync up dem caches */
+                               break;                                  /* Done with this one here... */
+                                               
+                       case MATTR_VAL_CACHE_FLUSH:                     /* It is flush from all caches */
+                               flush_dcache(address, PAGE_SIZE, TRUE); /* Flush out the data cache */
+                               invalidate_icache(address, 
+                                               PAGE_SIZE, TRUE);       /* Flush out the instruction cache */
+                               break;                                  /* Done with this one here... */
+                               
+                       case MATTR_VAL_DCACHE_FLUSH:                    /* It is flush from data cache(s) */
+                               flush_dcache(address, PAGE_SIZE, TRUE); /* Flush out the data cache */
+                               break;                                  /* Done with this one here... */
+
+                       case MATTR_VAL_ICACHE_FLUSH:                    /* It is flush from instr cache(s) */
+                               invalidate_icache(address, 
+                                               PAGE_SIZE, TRUE);       /* Flush out the instruction cache */
+                               break;                                  /* Done with this one here... */
+               }
+               size -= PAGE_SIZE;
+       }
+       return KERN_SUCCESS;;
+}
+       
 
 /*
  *     pmap_attributes:
  *
- *     Set/Get special memory attributes; not implemented.
+ *     Set/Get special memory attributes; Set is not implemented.
  *
  *     Note: 'VAL_GET_INFO' is used to return info about a page.
  *       If less than 1 page is specified, return the physical page
@@ -1103,7 +1451,6 @@ ppnum_t pmap_find_phys(pmap_t pmap, addr64_t va) {
  *       of resident pages and the number of shared (more than
  *       one mapping) pages in the range;
  *
- *
  */
 kern_return_t
 pmap_attribute(pmap, address, size, attribute, value)
@@ -1113,50 +1460,181 @@ pmap_attribute(pmap, address, size, attribute, value)
        vm_machine_attribute_t  attribute;
        vm_machine_attribute_val_t* value;      
 {
-       
-       return KERN_INVALID_ARGUMENT;
-
-}
+       spl_t                   s;
+       vm_offset_t     sva, eva;
+       vm_offset_t             pa;
+       kern_return_t   ret;
+       register struct mapping *mp, *mpv;
+       register struct phys_entry *pp;
+       int                     total, seg;
+       pmap_t                  actpmap;
+
+       if (attribute != MATTR_CACHE)
+               return KERN_INVALID_ARGUMENT;
+
+       /* We can't get the caching attribute for more than one page
+        * at a time
+        */
+       if ((*value == MATTR_VAL_GET) &&
+           (trunc_page(address) != trunc_page(address+size-1)))
+               return KERN_INVALID_ARGUMENT;
 
+       if (pmap == PMAP_NULL)
+               return KERN_SUCCESS;
+
+       sva = trunc_page(address);
+       eva = round_page(address + size);
+       ret = KERN_SUCCESS;
+
+       debugLog2(54, address, attribute);                                              /* Log pmap_map call */
+
+       switch (*value) {
+               case MATTR_VAL_CACHE_SYNC:                                                      /* sync I+D caches */
+               case MATTR_VAL_CACHE_FLUSH:                                                     /* flush from all caches */
+               case MATTR_VAL_DCACHE_FLUSH:                                            /* flush from data cache(s) */
+               case MATTR_VAL_ICACHE_FLUSH:                                            /* flush from instr cache(s) */
+                       sva = trunc_page(sva);
+                       s = splhigh();
+
+                       while (sva < eva) {     
+                               seg = sva >> 28;                                                        /* Isolate segment */
+                               if((0x00008000 >> seg) & pmap->vflags) actpmap = pmap->pmapPmaps[seg];  /* Set nested pmap if there is one */
+                               else actpmap = pmap;                                            /* Otherwise use the one passed in */
+                       
 /*
- * pmap_attribute_cache_sync(vm_offset_t pa)
- * 
- * Invalidates all of the instruction cache on a physical page and
- * pushes any dirty data from the data cache for the same physical page
+ *                             Note: the following should work ok with nested pmaps because there are not overlayed mappings 
  */
-kern_return_t pmap_attribute_cache_sync(ppnum_t pp, vm_size_t size,
-                               vm_machine_attribute_t  attribute,
-                               vm_machine_attribute_val_t* value) {
-       
-       spl_t s;
-       unsigned int i, npages;
-       
-       npages = round_page_32(size) >> 12;                     /* Get the number of pages to do */
+                               if(!(actpmap->pmapUsage[(sva >> pmapUsageShft) & pmapUsageMask])) {     /* See if this chunk has anything in it */
+                                       sva = (sva + pmapUsageSize) & (-pmapUsageSize); /* Jump up into the next slot if nothing here */
+                                       if(!sva) break;                                                 /* We tried to wrap, kill loop... */
+                                       continue;                                                               /* Check the next... */
+                               }
+
+                               if(!(mp = hw_lock_phys_vir(actpmap->space, sva))) {     /* Find the mapping for this vaddr and lock physent */
+                                       sva += PAGE_SIZE;                                               /* Point to the next page */
+                                       continue;                                                               /* Skip if the page is not mapped... */
+                               }
+
+                               if((unsigned int)mp&1) {                                        /* Did the lock on the phys entry time out? */
+                                       panic("pmap_attribute: timeout obtaining lock on physical entry\n");    /* Scream bloody murder! */
+                                       continue;
+                               }
+                               
+                               mpv = hw_cpv(mp);                                                       /* Get virtual address of mapping */
+                               if((unsigned int)mpv->physent) {                        /* Is there a physical entry? */
+                                       pa = (vm_offset_t)mpv->physent->pte1 & -PAGE_SIZE;      /* Yes, get the physical address from there */
+                               } 
+                               else {
+                                       pa = (vm_offset_t)(mpv->PTEr & PAGE_SIZE);      /* Otherwise from the mapping */
+                               }
+
+                               switch (*value) {                                                       /* What type was that again? */
+                                       case MATTR_VAL_CACHE_SYNC:                              /* It is sync I+D caches */
+                                               sync_cache(pa, PAGE_SIZE);                      /* Sync up dem caches */
+                                               break;                                                          /* Done with this one here... */
+                                       
+                                       case MATTR_VAL_CACHE_FLUSH:                             /* It is flush from all caches */
+                                               flush_dcache(pa, PAGE_SIZE, TRUE);      /* Flush out the data cache */
+                                               invalidate_icache(pa, PAGE_SIZE, TRUE); /* Flush out the instruction cache */
+                                               break;                                                          /* Done with this one here... */
+                                       
+                                       case MATTR_VAL_DCACHE_FLUSH:                    /* It is flush from data cache(s) */
+                                               flush_dcache(pa, PAGE_SIZE, TRUE);      /* Flush out the data cache */
+                                               break;                                                          /* Done with this one here... */
+
+                                       case MATTR_VAL_ICACHE_FLUSH:                    /* It is flush from instr cache(s) */
+                                               invalidate_icache(pa, PAGE_SIZE, TRUE); /* Flush out the instruction cache */
+                                               break;                                                          /* Done with this one here... */
+                               }
+                               if(mpv->physent) hw_unlock_bit((unsigned int *)&mpv->physent->phys_link, PHYS_LOCK);    /* Unlock the physical entry if it exists*/
+                               
+                               sva += PAGE_SIZE;                                                       /* Point to the next page */
+                       }
+                       splx(s);
+                       break;
+
+               case MATTR_VAL_GET_INFO:                                                        /* Get info */
+                       total = 0;
+                       s = splhigh();                                                                  /* Lock 'em out */
+               
+                       if (size <= PAGE_SIZE) {                                                /* Do they want just one page */
+                               seg = sva >> 28;                                                        /* Isolate segment */
+                               if((0x00008000 >> seg) & pmap->vflags) actpmap = pmap->pmapPmaps[seg];  /* Set nested pmap if there is one */
+                               else actpmap = pmap;                                            /* Otherwise use the one passed in */
+                               if(!(mp = hw_lock_phys_vir(actpmap->space, sva))) {     /* Find the mapping for this vaddr and lock physent */
+                                       *value = 0;                                                             /* Return nothing if no mapping */
+                               }
+                               else {
+                                       if((unsigned int)mp&1) {                                /* Did the lock on the phys entry time out? */
+                                               panic("pmap_attribute: timeout obtaining lock on physical entry\n");    /* Scream bloody murder! */
+                                       }
+                                       mpv = hw_cpv(mp);                                               /* Get virtual address of mapping */
+                                       if(pp = mpv->physent) {                                 /* Check for a physical entry */
+                                               total = 0;                                                      /* Clear the count */
+                                               for (mpv = (mapping *)hw_cpv((mapping *)((unsigned int)pp->phys_link & ~PHYS_FLAGS)); mpv != NULL; mpv = hw_cpv(mp->next)) total++;     /* Count the mapping */
+                                               *value = (vm_machine_attribute_val_t) ((pp->pte1 & -PAGE_SIZE) | total);        /* Pass back the physical address and the count of mappings */
+                                               hw_unlock_bit((unsigned int *)&pp->phys_link, PHYS_LOCK);       /* Clear the physical entry lock */
+                                       }
+                                       else {                                                                  /* This is the case for an I/O mapped area */
+                                               *value = (vm_machine_attribute_val_t) ((mpv->PTEr & -PAGE_SIZE) | 1);   /* Pass back the physical address and the count of mappings */
+                                       }
+                               }
+                       }
+                       else {
+                               total = 0;
+                               while (sva < eva) {
+                                       seg = sva >> 28;                                                /* Isolate segment */
+                                       if((0x00008000 >> seg) & pmap->vflags) actpmap = pmap->pmapPmaps[seg];  /* Set nested pmap if there is one */
+                                       else actpmap = pmap;                                    /* Otherwise use the one passed in */
+                                       
+                                       if(!(actpmap->pmapUsage[(sva >> pmapUsageShft) & pmapUsageMask])) {     /* See if this chunk has anything in it */
+                                               sva = (sva + pmapUsageSize) & (-pmapUsageSize); /* Jump up into the next slot if nothing here */
+                                               if(!sva) break;                                         /* We tried to wrap, kill loop... */
+                                               continue;                                                       /* Check the next... */
+                                       }
+                                       if(mp = hw_lock_phys_vir(actpmap->space, sva)) {        /* Find the mapping for this vaddr and lock physent */
+                                               if((unsigned int)mp&1) {                        /* Did the lock on the phys entry time out? */
+                                                       panic("pmap_attribute: timeout obtaining lock on physical entry\n");    /* Scream bloody murder! */
+                                                       continue;
+                                               }
+                                               mpv = hw_cpv(mp);                                       /* Get virtual address of mapping */
+                                               total += 65536 + (mpv->physent && ((mapping *)((unsigned int)mpv->physent->phys_link & -32))->next);    /* Count the "resident" and shared pages */
+                                               hw_unlock_bit((unsigned int *)&mpv->physent->phys_link, PHYS_LOCK);     /* Clear the physical entry lock */
+                                       }
+                                       sva += PAGE_SIZE;
+                               }
+                               *value = total;
+                       }
+                       splx(s);
+                       break;
        
-       for(i = 0; i < npages; i++) {                           /* Do all requested pages */
-               s = splhigh();                                                  /* No interruptions here */
-               sync_ppage(pp + i);                                             /* Go flush data cache and invalidate icache */
-               splx(s);                                                                /* Allow interruptions */
+               case MATTR_VAL_GET:             /* return current value */
+               case MATTR_VAL_OFF:             /* turn attribute off */
+               case MATTR_VAL_ON:              /* turn attribute on */
+               default:
+                       ret = KERN_INVALID_ARGUMENT;
+                       break;
        }
-       
-       return KERN_SUCCESS;
+
+       debugLog2(55, 0, 0);                                    /* Log pmap_map call */
+
+       return ret;
 }
 
 /*
- * pmap_sync_caches_phys(ppnum_t pa)
+ * pmap_sync_caches_phys(vm_offset_t pa)
  * 
  * Invalidates all of the instruction cache on a physical page and
  * pushes any dirty data from the data cache for the same physical page
  */
  
-void pmap_sync_caches_phys(ppnum_t pa) {
+void pmap_sync_caches_phys(vm_offset_t pa) {
        
        spl_t s;
-       
-       s = splhigh();                                                          /* No interruptions here */
-       sync_ppage(pa);                                                         /* Sync up dem caches */
-       splx(s);                                                                        /* Allow interruptions */
+
+       s = splhigh();                                          /* No interruptions here */
+       sync_cache(trunc_page(pa), PAGE_SIZE);                  /* Sync up dem caches */
+       splx(s);                                                        /* Allow interruptions */
        return;
 }
 
@@ -1200,6 +1678,69 @@ pmap_deactivate(
        return;
 }
 
+#if DEBUG
+
+/*
+ * pmap_zero_page
+ * pmap_copy page
+ * 
+ * are implemented in movc.s, these
+ * are just wrappers to help debugging
+ */
+
+extern void pmap_zero_page_assembler(vm_offset_t p);
+extern void pmap_copy_page_assembler(vm_offset_t src, vm_offset_t dst);
+
+/*
+ * pmap_zero_page(pa)
+ *
+ * pmap_zero_page zeros the specified (machine independent) page pa.
+ */
+void
+pmap_zero_page(
+       vm_offset_t p)
+{
+       register struct mapping *mp;
+       register struct phys_entry *pp;
+
+       if (pmdebug & (PDB_USER|PDB_ZERO))
+               kprintf("pmap_zero_page(pa=%x)\n", p);
+
+       /*
+        * XXX can these happen?
+        */
+       if (pmap_find_physentry(p) == PHYS_NULL)
+               panic("zero_page: physaddr out of range");
+
+       pmap_zero_page_assembler(p);
+}
+
+/*
+ * pmap_copy_page(src, dst)
+ *
+ * pmap_copy_page copies the specified (machine independent)
+ * page from physical address src to physical address dst.
+ *
+ * We need to invalidate the cache for address dst before
+ * we do the copy. Apparently there won't be any mappings
+ * to the dst address normally.
+ */
+void
+pmap_copy_page(
+       vm_offset_t src,
+       vm_offset_t dst)
+{
+       register struct phys_entry *pp;
+
+       if (pmdebug & (PDB_USER|PDB_COPY))
+               kprintf("pmap_copy_page(spa=%x, dpa=%x)\n", src, dst);
+       if (pmdebug & PDB_COPY)
+               kprintf("pmap_copy_page: phys_copy(%x, %x, %x)\n",
+                      src, dst, PAGE_SIZE);
+
+       pmap_copy_page_assembler(src, dst);
+}
+#endif /* DEBUG */
 
 /*
  * pmap_pageable(pmap, s, e, pageable)
@@ -1229,7 +1770,7 @@ pmap_pageable(
 }
 /*
  *     Routine:        pmap_change_wiring
- *     NOT USED ANYMORE.
+ *     NOTE USED ANYMORE.
  */
 void
 pmap_change_wiring(
@@ -1246,8 +1787,6 @@ pmap_change_wiring(
  *     virtual address range determined by [s, e] and pmap,
  *     s and e must be on machine independent page boundaries and
  *     s must be less than or equal to e.
- *
- *  Note that this function will not descend nested pmaps.
  */
 void
 pmap_modify_pages(
@@ -1257,41 +1796,38 @@ pmap_modify_pages(
 {
        spl_t           spl;
        mapping         *mp;
-       ppnum_t         pa;
-       addr64_t                va, endva, nextva;
-       unsigned int    saveflags;
 
-       if (pmap == PMAP_NULL) return;                                  /* If no pmap, can't do it... */
-       
-       va = sva & -4096;                                                               /* Round to page */
-       endva = eva & -4096;                                                    /* Round to page */
+#if PMAP_LOWTRACE
+       dbgTrace(0xF1D00010, (unsigned int)pmap, (unsigned int)(sva|((eva-sva)>>12)));  /* (TEST/DEBUG) */
+#endif
+
+#if DEBUG
+       if (pmdebug & PDB_USER) kprintf("pmap_modify_pages(pmap=%x, sva=%x, eva=%x)\n", pmap, sva, eva);
+#endif
 
-       while (va < endva) {                                                    /* Walk through all pages */
+       if (pmap == PMAP_NULL) return;                                          /* If no pmap, can't do it... */
 
-               spl = splhigh();                                                        /* We can't allow any loss of control here */
-       
-               mp = mapping_find(pmap, (addr64_t)va, &va, 0);  /* Find the mapping for this address */
-               
-               if(!mp) {                                                                       /* Is the page mapped? */
-                       splx(spl);                                                              /* Page not mapped, restore interruptions */
-                       if((va == 0) || (va >= endva)) break;   /* We are done if there are no more or we hit the end... */
-                       continue;                                                               /* We are not done and there is more to check... */
+       debugLog2(56, sva, eva);                                                        /* Log pmap_map call */
+
+       spl=splhigh();                                                                          /* Don't bother me */
+
+       for ( ; sva < eva; sva += PAGE_SIZE) {                          /* Cycle through the whole range */     
+               mp = hw_lock_phys_vir(pmap->space, sva);                /* Lock the physical entry for this mapping */
+               if(mp) {                                                                                /* Did we find one? */
+                       if((unsigned int)mp&1) {                                        /* Did the lock on the phys entry time out? */
+                               panic("pmap_modify_pages: timeout obtaining lock on physical entry\n"); /* Scream bloody murder! */
+                               continue;
+                       }
+                       mp = hw_cpv(mp);                                                        /* Convert to virtual addressing */                             
+                       if(!mp->physent) continue;                                      /* No physical entry means an I/O page, we can't set attributes */
+                       mapping_set_mod(mp->physent);                           /* Set the modfied bit for this page */
+                       hw_unlock_bit((unsigned int *)&mp->physent->phys_link, PHYS_LOCK);      /* Unlock the physical entry */
                }
-               
-               saveflags = mp->mpFlags;                                        /* Remember the flags */
-               pa = mp->mpPAddr;                                                       /* Remember ppage because mapping may vanish after drop call */
-       
-               mapping_drop_busy(mp);                                          /* We have everything we need from the mapping */
-       
-               splx(spl);                                                                      /* Restore 'rupts */
-       
-               if(saveflags & (mpNest | mpBlock)) continue;    /* Can't mess around with these guys... */      
-               
-               mapping_set_mod(pa);                                            /* Set the modfied bit for this page */
-               
-               if(va == 0) break;                                                      /* We hit the end of the pmap, might as well leave now... */
        }
-       return;                                                                                 /* Leave... */
+       splx(spl);                                                                                      /* Restore the interrupt level */
+
+       debugLog2(57, 0, 0);                                                            /* Log pmap_map call */
+       return;                                                                                         /* Leave... */
 }
 
 /*
@@ -1304,9 +1840,36 @@ pmap_modify_pages(
 void
 pmap_clear_modify(vm_offset_t pa)
 {
+       register struct phys_entry      *pp;
+       spl_t           spl;
 
-       mapping_clr_mod((ppnum_t)pa);                           /* Clear all change bits for physical page */
+#if PMAP_LOWTRACE
+       dbgTrace(0xF1D00011, (unsigned int)pa, 0);                      /* (TEST/DEBUG) */
+#endif
+#if DEBUG
+       if (pmdebug & PDB_USER)
+               kprintf("pmap_clear_modify(pa=%x)\n", pa);
+#endif
+
+       pp = pmap_find_physentry(pa);                                           /* Find the physent for this page */
+       if (pp == PHYS_NULL) return;                                            /* If there isn't one, just leave... */
+
+       debugLog2(58, pa, 0);                                   /* Log pmap_map call */
+
+       spl=splhigh();                                                                          /* Don't bother me */
 
+       if(!hw_lock_bit((unsigned int *)&pp->phys_link, PHYS_LOCK, LockTimeOut)) {      /* Try to get the lock on the physical entry */
+               panic("pmap_clear_modify: Timeout getting lock on physent at %08X\n", pp);      /* Arrrgghhhh! */
+               splx(spl);                                                                              /* Restore 'rupts */
+               return;                                                                                 /* Should die before here */
+       }
+
+       mapping_clr_mod(pp);                                                            /* Clear all change bits for physical page */
+
+       hw_unlock_bit((unsigned int *)&pp->phys_link, PHYS_LOCK);       /* Unlock the physical entry */
+       splx(spl);                                                                                      /* Restore the interrupt level */
+
+       debugLog2(59, 0, 0);                                    /* Log pmap_map call */
 }
 
 /*
@@ -1317,8 +1880,40 @@ pmap_clear_modify(vm_offset_t pa)
 boolean_t
 pmap_is_modified(register vm_offset_t pa)
 {
-       return mapping_tst_mod((ppnum_t)pa);    /* Check for modified */
+       register struct phys_entry      *pp;
+       spl_t           spl;
+       boolean_t       ret;
+
+
+#if PMAP_LOWTRACE
+       dbgTrace(0xF1D00012, (unsigned int)pa, 0);                      /* (TEST/DEBUG) */
+#endif
+#if DEBUG
+       if (pmdebug & PDB_USER)
+               kprintf("pmap_is_modified(pa=%x)\n", pa);
+#endif
+
+       pp = pmap_find_physentry(pa);                                           /* Find the physent for this page */
+       if (pp == PHYS_NULL) return(FALSE);                                     /* Just indicate not set... */
+       
+       debugLog2(60, pa, 0);                                   /* Log pmap_map call */
+
+       spl=splhigh();                                                                          /* Don't bother me */
+
+       if(!hw_lock_bit((unsigned int *)&pp->phys_link, PHYS_LOCK, LockTimeOut)) {      /* Try to get the lock on the physical entry */
+               panic("pmap_is_modified: Timeout getting lock on physent at %08X\n", pp);       /* Arrrgghhhh! */
+               splx(spl);                                                                              /* Restore 'rupts */
+               return 0;                                                                               /* Should die before here */
+       }
+       
+       ret = mapping_tst_mod(pp);                                                      /* Check for modified */
        
+       hw_unlock_bit((unsigned int *)&pp->phys_link, PHYS_LOCK);       /* Unlock the physical entry */
+       splx(spl);                                                                                      /* Restore the interrupt level */
+       
+       debugLog2(61, ret, 0);                                  /* Log pmap_map call */
+
+       return ret;                                                                             
 }
 
 /*
@@ -1330,7 +1925,29 @@ pmap_is_modified(register vm_offset_t pa)
 void
 pmap_clear_reference(vm_offset_t pa)
 {
-       mapping_clr_ref((ppnum_t)pa);                   /* Check for modified */
+       register struct phys_entry      *pp;
+       spl_t           spl;
+
+
+#if PMAP_LOWTRACE
+       dbgTrace(0xF1D00013, (unsigned int)pa, 0);                              /* (TEST/DEBUG) */
+#endif
+#if DEBUG
+       if (pmdebug & PDB_USER)
+               kprintf("pmap_clear_reference(pa=%x)\n", pa);
+#endif
+
+       pp = pmap_find_physentry(pa);                                                   /* Find the physent for this page */
+       if (pp == PHYS_NULL) return;                                                    /* If there isn't one, just leave... */
+
+       debugLog2(62, pa, 0);                                   /* Log pmap_map call */
+
+       spl=splhigh();                                                                                  /* Don't bother me */
+       mapping_clr_ref(pp);                                                                    /* Clear all reference bits for physical page */
+       splx(spl);                                                                                              /* Restore the interrupt level */
+
+       debugLog2(63, 0, 0);                                    /* Log pmap_map call */
+
 }
 
 /*
@@ -1341,27 +1958,40 @@ pmap_clear_reference(vm_offset_t pa)
 boolean_t
 pmap_is_referenced(vm_offset_t pa)
 {
-       return mapping_tst_ref((ppnum_t)pa);    /* Check for referenced */
-}
+       register struct phys_entry      *pp;
+       spl_t           spl;
+       boolean_t       ret;
 
-/*
- * pmap_canExecute(ppnum_t pa)
- *  returns 1 if instructions can execute
- *  returns 0 if know not (i.e. guarded and/or non-executable set)
- *  returns -1 if we don't know (i.e., the page is no RAM)
- */
-int
-pmap_canExecute(ppnum_t pa)
-{              
-       phys_entry *physent;
-       unsigned int pindex;
 
-       physent = mapping_phys_lookup(pa, &pindex);                             /* Get physical entry */
+#if PMAP_LOWTRACE
+       dbgTrace(0xF1D00014, (unsigned int)pa, 0);                      /* (TEST/DEBUG) */
+#endif
+#if DEBUG
+       if (pmdebug & PDB_USER)
+               kprintf("pmap_is_referenced(pa=%x)\n", pa);
+#endif
+
+       pp = pmap_find_physentry(pa);                                           /* Find the physent for this page */
+       if (pp == PHYS_NULL) return(FALSE);                                     /* Just indicate not set... */
+       
+       debugLog2(64, pa, 0);                                   /* Log pmap_map call */
+
+       spl=splhigh();                                                                          /* Don't bother me */
 
-       if(!physent) return -1;                                                                 /* If there is no physical entry, we don't know... */
+       if(!hw_lock_bit((unsigned int *)&pp->phys_link, PHYS_LOCK, LockTimeOut)) {      /* Try to get the lock on the physical entry */
+               panic("pmap_is_referenced: Timeout getting lock on physent at %08X\n", pp);     /* Arrrgghhhh! */
+               splx(spl);                                                                              /* Restore 'rupts */
+               return 0;                                                                               /* Should die before here */
+       }
+       
+       ret = mapping_tst_ref(pp);                                                      /* Check for referenced */
+       
+       hw_unlock_bit((unsigned int *)&pp->phys_link, PHYS_LOCK);       /* Unlock the physical entry */
+       splx(spl);                                                                                      /* Restore the interrupt level */
+       
+       debugLog2(65, ret, 0);                                  /* Log pmap_map call */
 
-       if((physent->ppLink & (ppN | ppG))) return 0;                   /* If we are marked non-executable or guarded, say we can not execute */
-       return 1;                                                                                               /* Good to go... */
+       return ret;                                                                             
 }
 
 #if    MACH_VM_DEBUG
@@ -1389,15 +2019,25 @@ pmap_copy_part_page(
 {
        register struct phys_entry *pp_src, *pp_dst;
        spl_t   s;
-       addr64_t fsrc, fdst;
 
-       assert(((dst <<12) & PAGE_MASK+dst_offset+len) <= PAGE_SIZE);
-       assert(((src <<12) & PAGE_MASK+src_offset+len) <= PAGE_SIZE);
 
-       fsrc = ((addr64_t)src << 12) + src_offset;
-       fdst = ((addr64_t)dst << 12) + dst_offset;
+#if PMAP_LOWTRACE
+       dbgTrace(0xF1D00019, (unsigned int)src+src_offset, (unsigned int)dst+dst_offset);       /* (TEST/DEBUG) */
+       dbgTrace(0xF1D04019, (unsigned int)len, 0);                     /* (TEST/DEBUG) */
+#endif
+       s = splhigh();
+
+        assert(((dst & PAGE_MASK)+dst_offset+len) <= PAGE_SIZE);
+        assert(((src & PAGE_MASK)+src_offset+len) <= PAGE_SIZE);
+
+       /*
+        * Since the source and destination are physical addresses, 
+        * turn off data translation to perform a  bcopy() in bcopy_phys().
+        */
+       phys_copy((vm_offset_t) src+src_offset,
+                 (vm_offset_t) dst+dst_offset, len);
 
-       phys_copy(fsrc, fdst, len);                                                             /* Copy the stuff physically */
+       splx(s);
 }
 
 void
@@ -1409,16 +2049,24 @@ pmap_zero_part_page(
     panic("pmap_zero_part_page");
 }
 
-boolean_t pmap_verify_free(ppnum_t pa) {
+boolean_t pmap_verify_free(vm_offset_t pa) {
 
        struct phys_entry       *pp;
-       unsigned int pindex;
 
-       pp = mapping_phys_lookup(pa, &pindex);  /* Get physical entry */
-       if (pp == 0) return FALSE;                                      /* If there isn't one, show no mapping... */
+#if PMAP_LOWTRACE
+       dbgTrace(0xF1D00007, (unsigned int)pa, 0);                              /* (TEST/DEBUG) */
+#endif
+
+#if DEBUG
+       if (pmdebug & PDB_USER)
+               kprintf("pmap_verify_free(pa=%x)\n", pa);
+#endif
+
+       if (!pmap_initialized) return(TRUE);
 
-       if(pp->ppLink & ~(ppLock | ppN | ppFlags)) return TRUE; /* We have at least one mapping */
-       return FALSE;                                                           /* No mappings */
+       pp = pmap_find_physentry(pa);                                                   /* Look up the physical entry */
+       if (pp == PHYS_NULL) return FALSE;                                              /* If there isn't one, show no mapping... */
+       return ((mapping *)((unsigned int)pp->phys_link & ~PHYS_FLAGS) == MAPPING_NULL);        /* Otherwise, return TRUE if mapping exists... */
 }
 
 
@@ -1428,9 +2076,13 @@ void pmap_switch(pmap_t map)
 {
        unsigned int i;
 
+#if DEBUG
+       if (watchacts & WA_PCB) {
+               kprintf("Switching to map at 0x%08x, space=%d\n",
+                      map,map->space);
+       }
+#endif /* DEBUG */
 
-       hw_blow_seg(copyIOaddr);                                        /* Blow off the first segment */
-       hw_blow_seg(copyIOaddr + 0x10000000ULL);        /* Blow off the second segment */
 
 /* when changing to kernel space, don't bother
  * doing anything, the kernel is mapped from here already.
@@ -1444,117 +2096,113 @@ void pmap_switch(pmap_t map)
 }
 
 /*
- *     kern_return_t pmap_nest(grand, subord, vstart, size)
+ *     kern_return_t pmap_nest(grand, subord, vaddr, size)
  *
  *     grand  = the pmap that we will nest subord into
  *     subord = the pmap that goes into the grand
- *     vstart  = start of range in pmap to be inserted
- *     nstart  = start of range in pmap nested pmap
- *     size   = Size of nest area (up to 16TB)
+ *     vaddr  = start of range in pmap to be inserted
+ *     size   = size of range in pmap to be inserted
  *
  *     Inserts a pmap into another.  This is used to implement shared segments.
  *     On the current PPC processors, this is limited to segment (256MB) aligned
  *     segment sized ranges.
- *
- *     We actually kinda allow recursive nests.  The gating factor is that we do not allow 
- *     nesting on top of something that is already mapped, i.e., the range must be empty.
- *
- *     
- *
- *     Note that we depend upon higher level VM locks to insure that things don't change while
- *     we are doing this.  For example, VM should not be doing any pmap enters while it is nesting
- *     or do 2 nests at once.
  */
 
-kern_return_t pmap_nest(pmap_t grand, pmap_t subord, addr64_t vstart, addr64_t nstart, uint64_t size) {
-               
-       addr64_t nextva, vend, colladdr;
-       unsigned int msize;
-       int i, nlists, asize;
-       spl_t   s;
-       mapping *mp;
-       
-       
-       if(size & 0x0FFFFFFFULL) return KERN_INVALID_VALUE;     /* We can only do this for multiples of 256MB */
-       if((size >> 28) > 65536)  return KERN_INVALID_VALUE;    /* Max size we can nest is 16TB */
-       if(vstart & 0x0FFFFFFFULL) return KERN_INVALID_VALUE;   /* We can only do this aligned to 256MB */
-       if(nstart & 0x0FFFFFFFULL) return KERN_INVALID_VALUE;   /* We can only do this aligned to 256MB */
+kern_return_t pmap_nest(pmap_t grand, pmap_t subord, vm_offset_t vaddr, vm_size_t size) {
+                       
+       unsigned int oflags, seg, grandr;
+       int i;
        
-       if(size == 0) {                                                         /*      Is the size valid? */
-               panic("pmap_nest: size is invalid - %016llX\n", size);
+       if(size != 0x10000000) return KERN_INVALID_VALUE;       /* We can only do this for 256MB for now */
+       if(vaddr & 0x0FFFFFFF) return KERN_INVALID_VALUE;       /* We can only do this aligned to 256MB */
+
+       while(1) {                                                                      /* Test and set the subordinate flag */
+               oflags = subord->vflags & ~pmapAltSeg;  /* Get old unset value */
+               if(subord->vflags & pmapAltSeg) {               /* Are trying to nest one already nested? */
+                       panic("pmap_nest: Attempt to nest an already nested pmap\n");
+               }
+               if(hw_compare_and_store(oflags, oflags | pmapSubord, &subord->vflags)) break;   /* Done if we got it set */
        }
        
-       msize = (size >> 28) - 1;                                                       /* Change size to blocks of 256MB */
-       
-       nlists = mapSetLists(grand);                                            /* Set number of lists this will be on */
+       simple_lock(&grand->lock);                                      /* Lock the superior pmap */
 
-       mp = mapping_alloc(nlists);                                                     /* Get a spare mapping block */
+       if(grand->vflags & pmapSubord) {                        /* Are we only one level deep? */
+               simple_unlock(&grand->lock);                    /* Unlock the superior pmap */
+               panic("pmap_nest: Attempt to nest into subordinate pmap\n");
+               return KERN_FAILURE;                                    /* Shame on you */
+       }
+
+       seg = vaddr >> 28;                                                      /* Isolate the segment number */
+       if((0x00008000 >> seg) & grand->vflags) {       /* See if it is already in use */
+               simple_unlock(&grand->lock);                    /* Unlock the superior pmap */
+               panic("pmap_nest: Attempt to nest into already nested segment\n");
+               return KERN_FAILURE;                                    /* Shame on you */
+       }
        
-       mp->mpFlags = 0x01000000 | mpNest | nlists;                     /* Set the flags. Make sure busy count is 1 */
-       mp->mpSpace = subord->space;                                            /* Set the address space/pmap lookup ID */
-       mp->mpBSize = msize;                                                            /* Set the size */
-       mp->mpPte = 0;                                                                          /* Set the PTE invalid */
-       mp->mpPAddr = 0;                                                                        /* Set the physical page number */
-       mp->mpVAddr = vstart;                                                           /* Set the address */
-       mp->mpNestReloc = nstart - vstart;                                      /* Set grand to nested vaddr relocation value */
+       grand->pmapPmaps[seg] = subord;                         /* Set the pointer to the subordinate */
+       grand->pmapSegs[seg] = SEG_REG_PROT | (seg << 20) | subord->space;              /* Set the vsid to the subordinate's vsid */
+       grand->vflags |= (0x00008000 >> seg);           /* Set in-use bit */
+
+       grandr = (unsigned int)grand ^ grand->pmapvr;   /* Get real address of the grand pmap */
        
-       colladdr = hw_add_map(grand, mp);                                       /* Go add the mapping to the pmap */
+       simple_unlock(&grand->lock);                            /* Unlock the grand pmap */
        
-       if(colladdr) {                                                                          /* Did it collide? */
-               vend = vstart + size - 4096;                                    /* Point to the last page we would cover in nest */     
-               panic("pmap_nest: attempt to nest into a non-empty range - pmap = %08X, start = %016llX, end = %016llX\n",
-                       grand, vstart, vend);
+
+/*
+ *     Note that the following will force the segment registers to be reloaded following
+ *     the next interrupt on all processors if they are using the pmap we just changed.
+ *
+ */
+
+
+       for(i=0; i < real_ncpus; i++) {                                                 /* Cycle through processors */
+               (void)hw_compare_and_store((unsigned int)grandr, 0, &per_proc_info[i].Lastpmap);        /* Clear if ours */
        }
-       
-       return KERN_SUCCESS;
+               
+       return KERN_SUCCESS;                                            /* Bye, bye, butterfly... */
 }
 
+
 /*
- *     kern_return_t pmap_unnest(grand, vaddr)
+ *     kern_return_t pmap_unnest(grand, vaddr, size)
  *
  *     grand  = the pmap that we will nest subord into
- *     vaddr  = start of range in pmap to be unnested
+ *     vaddr  = start of range in pmap to be inserted
+ *     size   = size of range in pmap to be inserted
  *
  *     Removes a pmap from another.  This is used to implement shared segments.
  *     On the current PPC processors, this is limited to segment (256MB) aligned
  *     segment sized ranges.
  */
 
-kern_return_t pmap_unnest(pmap_t grand, addr64_t vaddr) {
+kern_return_t pmap_unnest(pmap_t grand, vm_offset_t vaddr, vm_size_t size) {
                        
        unsigned int oflags, seg, grandr, tstamp;
        int i, tcpu, mycpu;
-       addr64_t nextva;
-       spl_t s;
-       mapping *mp;
                
-       s = splhigh();                                                                          /* Make sure interruptions are disabled */
-
-       mp = mapping_find(grand, vaddr, &nextva, 0);            /* Find the nested map */
-
-       if(((unsigned int)mp & mapRetCode) != mapRtOK) {        /* See if it was even nested */
-               panic("pmap_unnest: Attempt to unnest an unnested segment - va = %016llX\n", vaddr);
-       }
-
-       if(!(mp->mpFlags & mpNest)) {                                           /* Did we find something other than a nest? */
-               panic("pmap_unnest: Attempt to unnest something that is not a nest - va = %016llX\n", vaddr);
+       if(size != 0x10000000) return KERN_INVALID_VALUE;       /* We can only do this for 256MB for now */
+       if(vaddr & 0x0FFFFFFF) return KERN_INVALID_VALUE;       /* We can only do this aligned to 256MB */
+
+       simple_lock(&grand->lock);                                      /* Lock the superior pmap */
+       disable_preemption();                                           /* It's all for me! */
+
+       seg = vaddr >> 28;                                                      /* Isolate the segment number */
+       if(!((0x00008000 >> seg) & grand->vflags)) {    /* See if it is already in use */
+               enable_preemption();                                    /* Ok, your turn */
+               simple_unlock(&grand->lock);                    /* Unlock the superior pmap */
+               panic("pmap_unnest: Attempt to unnest an unnested segment\n");
+               return KERN_FAILURE;                                    /* Shame on you */
        }
        
-       if(mp->mpVAddr != vaddr) {                                                      /* Make sure the address is the same */
-               panic("pmap_unnest: Attempt to unnest something that is not at start of nest - va = %016llX\n", vaddr);
-       }
+       grand->pmapPmaps[seg] = (pmap_t)0;                      /* Clear the pointer to the subordinate */
+       grand->pmapSegs[seg] = grand->space;            /* Set the pointer to the subordinate's vsid */
+       grand->pmapSegs[seg] = SEG_REG_PROT | (seg << 20) | grand->space;               /* Set the vsid to the grand's vsid */
+       grand->vflags &= ~(0x00008000 >> seg);          /* Clear in-use bit */
 
-       (void)hw_atomic_or(&mp->mpFlags, mpRemovable);          /* Show that this mapping is now removable */
+       grandr = (unsigned int)grand ^ grand->pmapvr;   /* Get real address of the grand pmap */
        
-       mapping_drop_busy(mp);                                                          /* Go ahead and relase the mapping now */
+       simple_unlock(&grand->lock);                            /* Unlock the superior pmap */
 
-       disable_preemption();                                                           /* It's all for me! */
-       splx(s);                                                                                        /* Restore 'rupts */
-               
-       (void)mapping_remove(grand, vaddr);                                     /* Toss the nested pmap mapping */
-       
-       invalidateSegs(grand);                                                          /* Invalidate the pmap segment cache */
-       
 /*
  *     Note that the following will force the segment registers to be reloaded 
  *     on all processors (if they are using the pmap we just changed) before returning.
@@ -1570,233 +2218,72 @@ kern_return_t pmap_unnest(pmap_t grand, addr64_t vaddr) {
  */
 
 
-       mycpu = cpu_number();                                                           /* Who am I? Am I just a dream? */
-       for(i=0; i < real_ncpus; i++) {                                         /* Cycle through processors */
-               if((unsigned int)grand == per_proc_info[i].ppUserPmapVirt) {    /* Is this guy using the changed pmap? */
-                       
-                       per_proc_info[i].ppInvSeg = 1;                          /* Show that we need to invalidate the segments */
-                       
-                       if(i == mycpu) continue;                                        /* Don't diddle ourselves */
-               
-                       tstamp = per_proc_info[i].ruptStamp[1];         /* Save the processor's last interrupt time stamp */
+       mycpu = cpu_number();                                           /* Who am I? Am I just a dream? */
+       for(i=0; i < real_ncpus; i++) {                         /* Cycle through processors */
+               if(hw_compare_and_store((unsigned int)grandr, 0, &per_proc_info[i].Lastpmap)) { /* Clear if ours and kick the other guy if he was using it */
+                       if(i == mycpu) continue;                                /* Don't diddle ourselves */
+                       tstamp = per_proc_info[i].ruptStamp[1]; /* Save the processor's last interrupt time stamp */
                        if(cpu_signal(i, SIGPwake, 0, 0) != KERN_SUCCESS) {     /* Make sure we see the pmap change */
                                continue;
                        }
-                       
                        if(!hw_cpu_wcng(&per_proc_info[i].ruptStamp[1], tstamp, LockTimeOut)) { /* Wait for the other processors to enter debug */
                                panic("pmap_unnest: Other processor (%d) did not see interruption request\n", i);
                        }
                }
        }
 
-       enable_preemption();                                                            /* Others can run now */
-       return KERN_SUCCESS;                                                            /* Bye, bye, butterfly... */
+       enable_preemption();                                            /* Others can run now */
+       return KERN_SUCCESS;                                            /* Bye, bye, butterfly... */
 }
 
 
-/*
- *     void MapUserAddressSpaceInit(void)
- *
- *     Initialized anything we need to in order to map user address space slices into
- *     the kernel.  Primarily used for copy in/out.
- *
- *     Currently we only support one 512MB slot for this purpose.  There are two special
- *     mappings defined for the purpose: the special pmap nest, and linkage mapping.
- *
- *     The special pmap nest (which is allocated in this function) is used as a place holder
- *     in the kernel's pmap search list. It is 512MB long and covers the address range
- *     starting at copyIOaddr.  It points to no actual memory and when the fault handler 
- *     hits in it, it knows to look in the per_proc and start using the linkage
- *     mapping contained therin.
- *
- *     The linkage mapping is used to glue the user address space slice into the 
- *     kernel.  It contains the relocation information used to transform the faulting
- *     kernel address into the user address space.  It also provides the link to the
- *     user's pmap.  This is pointed to by the per_proc and is switched in and out
- *     whenever there is a context switch.
- *
- */
-
-void MapUserAddressSpaceInit(void) {
-               
-       addr64_t colladdr;
-       int nlists, asize;
-       mapping *mp;
-       
-       nlists = mapSetLists(kernel_pmap);                                      /* Set number of lists this will be on */
-       
-       mp = mapping_alloc(nlists);                                                     /* Get a spare mapping block */
-       
-       mp->mpFlags = 0x01000000 |mpNest | mpSpecial | nlists;  /* Set the flags. Make sure busy count is 1 */
-       mp->mpSpace = kernel_pmap->space;                                       /* Set the address space/pmap lookup ID */
-       mp->mpBSize = 1;                                                                        /* Set the size to 2 segments */
-       mp->mpPte = 0;                                                                          /* Means nothing */
-       mp->mpPAddr = 0;                                                                        /* Means nothing */
-       mp->mpVAddr = copyIOaddr;                                                       /* Set the address range we cover */
-       mp->mpNestReloc = 0;                                                            /* Means nothing */
-       
-       colladdr = hw_add_map(kernel_pmap, mp);                         /* Go add the mapping to the pmap */
-       
-       if(colladdr) {                                                                          /* Did it collide? */
-               panic("MapUserAddressSpaceInit: MapUserAddressSpace range already mapped\n");
-       }
-       
-       return;
-}
-
-/*
- *     addr64_t MapUserAddressSpace(vm_map_t map, vm_offset_t va, size)
- *
- *     map  = the vm_map that we are mapping into the kernel
- *     va = start of the address range we are mapping
- *     size  = size of the range.  No greater than 256MB and not 0.
- *     Note that we do not test validty, we chose to trust our fellows...
- *
- *     Maps a slice of a user address space into a predefined kernel range
- *     on a per-thread basis.  In the future, the restriction of a predefined
- *     range will be loosened.
- *
- *     Builds the proper linkage map to map the user range
- *  We will round this down to the previous segment boundary and calculate
- *     the relocation to the kernel slot
- *
- *     We always make a segment table entry here if we need to.  This is mainly because of
- *     copyin/out and if we don't, there will be multiple segment faults for
- *     each system call.  I have seen upwards of 30000 per second.
- *
- *     We do check, however, to see if the slice is already mapped and if so,
- *     we just exit.  This is done for performance reasons.  It was found that 
- *     there was a considerable boost in copyin/out performance if we did not
- *     invalidate the segment at ReleaseUserAddressSpace time, so we dumped the
- *     restriction that you had to bracket MapUserAddressSpace.  Further, there 
- *     is a yet further boost if you didn't need to map it each time.  The theory
- *     behind this is that many times copies are to or from the same segment and
- *     done multiple times within the same system call.  To take advantage of that,
- *     we check cioSpace and cioRelo to see if we've already got it.  
- *
- *     We also need to half-invalidate the slice when we context switch or go
- *     back to user state.  A half-invalidate does not clear the actual mapping,
- *     but it does force the MapUserAddressSpace function to reload the segment
- *     register/SLBE.  If this is not done, we can end up some pretty severe
- *     performance penalties. If we map a slice, and the cached space/relocation is
- *     the same, we won't reload the segment registers.  Howver, since we ran someone else,
- *     our SR is cleared and we will take a fault.  This is reasonable if we block
- *     while copying (e.g., we took a page fault), but it is not reasonable when we 
- *     just start.  For this reason, we half-invalidate to make sure that the SR is
- *     explicitly reloaded.
- *      
- *     Note that we do not go to the trouble of making a pmap segment cache
- *     entry for these guys because they are very short term -- 99.99% of the time
- *     they will be unmapped before the next context switch.
- *
- */
+void pmap_ver(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) {
 
-addr64_t MapUserAddressSpace(vm_map_t map, addr64_t va, unsigned int size) {
-               
-       addr64_t baddrs, reladd;
-       thread_act_t act;
-       mapping *mp;
-       struct per_proc_info *perproc;
+       int cnt, i, j, k;
+       vm_offset_t xx;
        
-       baddrs = va & 0xFFFFFFFFF0000000ULL;                            /* Isolate the segment */
-       act = current_act();                                                            /* Remember our activation */
+       if(!pmap) return;
 
-       reladd = baddrs - copyIOaddr;                                           /* Get the relocation from user to kernel */
+       sva = trunc_page(sva);
+       eva = trunc_page(eva);
        
-       if((act->mact.cioSpace == map->pmap->space) && (act->mact.cioRelo == reladd)) { /* Already mapped? */
-               return ((va & 0x0FFFFFFFULL) | copyIOaddr);             /* Pass back the kernel address we are to use */
+       for(i = 0; i < (pmapUsageMask + 1); i++) {      /* Step through them all */
+               if((pmap->pmapUsage[i]) > 8192) {               /* See if this is a sane number */
+                       panic("pmap_ver: pmapUsage slot for %08X has invalid count (%d) for pmap %08X\n",
+                               i * pmapUsageSize, pmap->pmapUsage[i], pmap);
+               }
        }
-
-       disable_preemption();                                                           /* Don't move... */     
-       perproc = getPerProc();                                                         /* Get our per_proc_block */
-       
-       mp = (mapping *)&perproc->ppCIOmp;                                      /* Make up for C */
-       act->mact.cioRelo = reladd;                                                     /* Relocation from user to kernel */
-       mp->mpNestReloc = reladd;                                                       /* Relocation from user to kernel */
-       
-       act->mact.cioSpace = map->pmap->space;                          /* Set the address space/pmap lookup ID */
-       mp->mpSpace = map->pmap->space;                                         /* Set the address space/pmap lookup ID */
-       
-/*
- *     Here we make an assumption that we are going to be using the base pmap's address space.
- *     If we are wrong, and that would be very, very, very rare, the fault handler will fix us up.
- */ 
-
-       hw_map_seg(map->pmap,  copyIOaddr, baddrs);                     /* Make the entry for the first segment */
-
-       enable_preemption();                                                            /* Let's move */
-       return ((va & 0x0FFFFFFFULL) | copyIOaddr);                     /* Pass back the kernel address we are to use */
-}
-
-/*
- *     void ReleaseUserAddressMapping(addr64_t kva)
- *
- *     kva = kernel address of the user copy in/out slice
- *
- */
-
-void ReleaseUserAddressSpace(addr64_t kva) {
-               
-       int i;
-       addr64_t nextva, vend, kaddr, baddrs;
-       unsigned int msize;
-       thread_act_t act;
-       mapping *mp;
-       
-       if(kva == 0) return;                                                            /* Handle a 0 */
+       j = 0;
+       while(1) {                                                                      /* Try multiple times */
+               cnt = 0;
+               for(i = 0; i < (pmapUsageMask + 1); i++) {      /* Step through them all */
+                       cnt = cnt + pmap->pmapUsage[i];                 /* Sum all slots */
+               }
+               if(cnt == pmap->stats.resident_count) break;    /* We're ok if we match... */
                
-       disable_preemption();                                                           /* Don't move... */
-       
-       act = current_act();                                                            /* Remember our activation */
-
-       if(act->mact.cioSpace == invalSpace) {                          /* We only support one at a time */
-               panic("ReleaseUserAddressMapping: attempt release undefined copy in/out user address space slice\n");
+               j++;
+               for(i = 0; i < 100000; i++) {
+                       k = j + i;
+               }
+               if(j >= 10) {
+                       panic("pmap_ver: pmapUsage total (%d) does not match resident count (%d) for pmap %08X\n",
+                               cnt, pmap->stats.resident_count, pmap);
+               }
        }
-
-       act->mact.cioSpace = invalSpace;                                        /* Invalidate space */
-       mp = (mapping *)&per_proc_info[cpu_number()].ppCIOmp;   /* Make up for C */
-       mp->mpSpace = invalSpace;                                                       /* Trash it in the per_proc as well */
-       
-       hw_blow_seg(copyIOaddr);                                                        /* Blow off the first segment */
-       hw_blow_seg(copyIOaddr + 0x10000000ULL);                        /* Blow off the second segment */
        
-       enable_preemption();                                                            /* Let's move */
-       
-       return;                                                                                         /* Let's leave */
-}
-
-
-
-/*
- *     kern_return_t pmap_boot_map(size)
- *
- *     size   = size of virtual address range to be mapped
- *
- *     This function is used to assign a range of virtual addresses before VM in 
- *     initialized.  It starts at VM_MAX_KERNEL_ADDRESS and works downward.
- *     The variable vm_last_addr contains the current highest possible VM
- *     assignable address.  It is a panic to attempt to call this after VM has
- *     started up.  The only problem is, is that we may not have the serial or
- *     framebuffer mapped, so we'll never know we died.........
- */
-
-vm_offset_t pmap_boot_map(vm_size_t size) {
-                       
-       if(kernel_map != VM_MAP_NULL) {                         /* Has VM already started? */
-               panic("pmap_boot_map: VM started\n");
+       for(xx = sva; xx < eva; xx += PAGE_SIZE) {      /* See if any slots not clear */
+               if(pmap_extract(pmap, xx)) {
+                       panic("pmap_ver: range (%08X to %08X) not empty at %08X for pmap %08X\n",
+                               sva, eva, xx, pmap);
+               }
        }
-       
-       size = round_page_32(size);                                     /* Make sure this is in pages */
-       vm_last_addr = vm_last_addr - size;                     /* Allocate the memory */
-       return (vm_last_addr + 1);                                      /* Return the vaddr we just allocated */
-
 }
 
 
-
 /* temporary workaround */
 boolean_t
 coredumpok(vm_map_t map, vm_offset_t va)
 {
   return TRUE;
 }
+
index 1958a3fbd3b2308a85233c06099de9fa4ab5c7f3..44bac791821923750584a5cefa85ab7c6cbde473 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #include <kern/queue.h>
 #include <vm/pmap.h>
 
-#define maxPPage32 0x000FFFFF                  /* Maximum page number in 32-bit machines */
-
-typedef uint32_t shexlock;
-
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
-
-struct sgc {
-       uint64_t        sgcESID;                                /* ESID portion of segment cache */
-#define sgcESmsk       0xFFFFFFFFF0000000ULL   /* ESID portion of segment register cache */
-       uint64_t        sgcVSID;                                /* VSID portion of segment cache */
-#define sgcVSmsk       0xFFFFFFFFFFFFF000ULL   /* VSID mask */
-#define sgcVSKeys      0x0000000000000C00ULL   /* Protection keys */
-#define sgcVSKeyUsr    53                                      /* User protection key */
-#define sgcVSNoEx      0x0000000000000200ULL   /* No execute */
-};
-#pragma pack()
-
-typedef struct sgc sgc;
-
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
 struct pmap {
-       queue_head_t    pmap_link;                      /* MUST BE FIRST */
-       addr64_t                pmapvr;                         /* Virtual to real conversion mask */
-       shexlock                pmapSXlk;                       /* Shared/Exclusive lock for mapping changes */
-       unsigned int    space;                          /* space for this pmap */
-#define invalSpace 0x00000001                  /* Predefined always invalid space */
-       int                             ref_count;                      /* reference count */
-       unsigned int    pmapFlags;                      /* Flags */
-#define pmapKeys       0x00000007                      /* Keys and no execute bit to use with this pmap */
-#define pmapKeyDef     0x00000006                      /* Default keys - Sup = 1, user = 1, no ex = 0 */
-#define pmapVMhost     0x00000010                      /* pmap with Virtual Machines attached to it */
-       unsigned int    spaceNum;                       /* Space number */
-       unsigned int    pmapCCtl;                       /* Cache control */
-#define pmapCCtlVal    0xFFFF0000                      /* Valid entries */
-#define pmapCCtlLck    0x00008000                      /* Lock bit */
-#define pmapCCtlLckb   16                              /* Lock bit */
-#define pmapCCtlGen    0x00007FFF                      /* Generation number */
-
-#define pmapSegCacheCnt 16                             /* Maximum number of cache entries */
-#define pmapSegCacheUse        16                              /* Number of cache entries to use */
-
-       struct pmap             *freepmap;                      /* Free pmaps */
-
-       unsigned int    pmapRsv1[3];
-/*                                                                                     0x038 */
-       uint64_t                pmapSCSubTag;           /* Segment cache sub-tags. This is a 16 entry 4 bit array */
-/*                                                                                     0x040 */
-       sgc                     pmapSegCache[pmapSegCacheCnt];  /* SLD values cached for quick load */
-
-/*                                                                                     0x140 */        
-/* if fanout is 4, then shift is 1, if fanout is 8 shift is 2, etc */
-#define        kSkipListFanoutShift    1
-/* with n lists, we can handle (fanout**n) pages optimally */
-#define        kSkipListMaxLists               12    
-    unsigned char      pmapCurLists;           /*  0x140 - max #lists any mapping in this pmap currently has */
-    unsigned char      pmapRsv2[3];
-    uint32_t           pmapRandNum;            /* 0x144 - used by mapSetLists() as a random number generator */
-    addr64_t           pmapSkipLists[kSkipListMaxLists];       /* 0x148 - the list headers */
-/* following statistics conditionally gathered */
-    uint64_t           pmapSearchVisits;       /* 0x1A8 - nodes visited searching pmaps */
-    uint32_t           pmapSearchCnt;          /* 0x1B0 - number of calls to mapSearch or mapSearchFull */
-
-       unsigned int    pmapRsv3[3];
-
-/*                                                                                     0x1C0 */        
-
-       struct pmap_statistics  stats;          /* statistics */
-       decl_simple_lock_data(,lock)            /* lock on map */
+       queue_head_t    pmap_link;              /* MUST BE FIRST */
+       unsigned int    pmapvr;                 /* Virtual to real conversion mask */
+       space_t                 space;                  /* space for this pmap */
+#define BMAPLOCK 0x00000001
+       struct blokmap  *bmaps;                 /* Physical pointer to odd-size page maps */
+       int                             ref_count;              /* reference count */
+       unsigned int    vflags;                 /* Alternate map validity flags */
+#define pmapBatVal  0xFF000000
+#define pmapBatDVal 0xF0000000
+#define pmapBatIVal 0x0F000000
+#define pmapFlags   0x00FF0000
+#define pmapSubord  0x00800000
+#define pmapVMhost  0x00400000
+#define pmapAltSeg     0x0000FFFF
+       unsigned int    spaceNum;               /* Space number */
+/*     PPC line boundary here - 020 */
+       unsigned int    pmapSegs[16];   /* Contents of segment register if different than base space */
+/*     PPC line boundary here - 060 */
+       struct pmap             *pmapPmaps[16]; /* Pointer to next lower level of pmaps */
+/*     PPC line boundary here - 0A0 */
+/*     Note: this must start on a word boundary */
+       unsigned short  pmapUsage[128]; /* Count of pages mapped into 32mb (8192 page) slots */
+#define pmapUsageShft 25
+#define pmapUsageMask 0x0000007F
+#define pmapUsageSize (32*1024*1024)
+       
+/*     PPC line boundary here - 1A0 */
+       struct pmap_statistics  stats;  /* statistics */
+       decl_simple_lock_data(,lock)    /* lock on map */
        
 /* Need to pad out to a power of 2 - right now it is 512 bytes */
 #define pmapSize 512
 };
-#pragma pack()
-
-#pragma pack(4)
-struct pmapTransTab {
-       addr64_t                pmapPAddr;                      /* Physcial address of pmap */
-       unsigned int    pmapVAddr;                      /* Virtual address of pmap */
-};
-#pragma pack()                                                 /* Make sure the structure stays as we defined it */
-
-typedef struct pmapTransTab pmapTransTab;
 
 #define PMAP_NULL  ((pmap_t) 0)
 
 extern pmap_t  kernel_pmap;                    /* The kernel's map */
 extern pmap_t  cursor_pmap;                    /* The pmap to start allocations with */
-extern pmap_t  sharedPmap;
-extern unsigned int sharedPage;
-extern int ppc_max_adrsp;                              /* Maximum number of concurrent address spaces allowed. */      
-extern addr64_t vm_max_address;                        /* Maximum effective address supported */
-extern addr64_t vm_max_physical;               /* Maximum physical address supported */
-extern pmapTransTab *pmapTrans;                        /* Space to pmap translate table */
+
 #define        PMAP_SWITCH_USER(th, map, my_cpu) th->map = map;        
 
 #define PMAP_ACTIVATE(pmap, th, cpu)
@@ -159,13 +103,10 @@ extern pmapTransTab *pmapTrans;                   /* Space to pmap translate table */
 #define PMAP_CONTEXT(pmap,th)
 
 #define pmap_kernel_va(VA)     \
-       (((VA) >= VM_MIN_KERNEL_ADDRESS) && ((VA) <= vm_last_addr))
+       (((VA) >= VM_MIN_KERNEL_ADDRESS) && ((VA) <= VM_MAX_KERNEL_ADDRESS))
 
 #define        PPC_SID_KERNEL  0       /* Must change KERNEL_SEG_REG0_VALUE if !0 */
-
-#define maxAdrSp 16384
-#define maxAdrSpb 14
-#define copyIOaddr 0x00000000E0000000ULL
+#define SID_MAX        ((1<<20) - 1)   /* Space ID=20 bits, segment_id=SID + 4 bits */
 
 #define pmap_kernel()                  (kernel_pmap)
 #define        pmap_resident_count(pmap)       ((pmap)->stats.resident_count)
@@ -173,6 +114,9 @@ extern pmapTransTab *pmapTrans;                     /* Space to pmap translate table */
 #define pmap_copy(dpmap,spmap,da,len,sa)
 #define        pmap_update()
 
+#define pmap_phys_address(x)   ((x) << PPC_PGSHIFT)
+#define pmap_phys_to_frame(x)  ((x) >> PPC_PGSHIFT)
+
 #define PMAP_DEFAULT_CACHE     0
 #define PMAP_INHIBIT_CACHE     1
 #define PMAP_GUARDED_CACHE     2
@@ -180,17 +124,14 @@ extern pmapTransTab *pmapTrans;                   /* Space to pmap translate table */
 #define PMAP_NO_GUARD_CACHE    8
 
 /* corresponds to cached, coherent, not writethru, not guarded */
-#define VM_WIMG_DEFAULT                (VM_MEM_COHERENT)
-#define        VM_WIMG_COPYBACK        (VM_MEM_COHERENT)
-#define VM_WIMG_IO             (VM_MEM_COHERENT |      \
-                               VM_MEM_NOT_CACHEABLE | VM_MEM_GUARDED)
-#define VM_WIMG_WTHRU          (VM_MEM_WRITE_THROUGH | VM_MEM_COHERENT | VM_MEM_GUARDED)
-/* write combining mode, aka store gather */
-#define VM_WIMG_WCOMB          (VM_MEM_NOT_CACHEABLE | VM_MEM_COHERENT) 
+#define VM_WIMG_DEFAULT                VM_MEM_COHERENT
+#define VM_WIMG_IO             VM_MEM_COHERENT |       \
+                               VM_MEM_NOT_CACHEABLE | VM_MEM_GUARDED
 
 /* 
  * prototypes.
  */
+extern void            ppc_protection_init(void);
 extern vm_offset_t phystokv(vm_offset_t pa);                                   /* Get kernel virtual address from physical */
 extern vm_offset_t kvtophys(vm_offset_t va);                                   /* Get physical address from kernel virtual */
 extern vm_offset_t     pmap_map(vm_offset_t va,
@@ -201,9 +142,18 @@ extern kern_return_t    pmap_add_physical_memory(vm_offset_t spa,
                                                 vm_offset_t epa,
                                                 boolean_t available,
                                                 unsigned int attr);
-extern void            pmap_bootstrap(uint64_t msize,
+extern vm_offset_t     pmap_map_bd(vm_offset_t va,
+                                   vm_offset_t spa,
+                                   vm_offset_t epa,
+                                   vm_prot_t prot);
+extern void            pmap_bootstrap(unsigned int mem_size,
                                       vm_offset_t *first_avail,
-                                      unsigned int kmapsize);
+                                      vm_offset_t *first_phys_avail, unsigned int kmapsize);
+extern void            pmap_block_map(vm_offset_t pa,
+                                      vm_size_t size,
+                                      vm_prot_t prot,
+                                      int entry, 
+                                      int dtlb);
 extern void            pmap_switch(pmap_t);
 
 extern vm_offset_t pmap_extract(pmap_t pmap,
@@ -211,29 +161,23 @@ extern vm_offset_t pmap_extract(pmap_t pmap,
 
 extern void pmap_remove_all(vm_offset_t pa);
 
-extern boolean_t pmap_verify_free(ppnum_t pa);
+extern boolean_t pmap_verify_free(vm_offset_t pa);
 extern void sync_cache(vm_offset_t pa, unsigned length);
-extern void sync_cache64(addr64_t pa, unsigned length);
-extern void sync_ppage(ppnum_t pa);
-extern void    sync_cache_virtual(vm_offset_t va, unsigned length);
 extern void flush_dcache(vm_offset_t va, unsigned length, boolean_t phys);
-extern void flush_dcache64(addr64_t va, unsigned length, boolean_t phys);
 extern void invalidate_dcache(vm_offset_t va, unsigned length, boolean_t phys);
-extern void invalidate_dcache64(addr64_t va, unsigned length, boolean_t phys);
 extern void invalidate_icache(vm_offset_t va, unsigned length, boolean_t phys);
-extern void invalidate_icache64(addr64_t va, unsigned length, boolean_t phys);
-extern void pmap_sync_caches_phys(ppnum_t pa);
-extern void pmap_map_block(pmap_t pmap, addr64_t va, ppnum_t pa, vm_size_t size, vm_prot_t prot, int attr, unsigned int flags);
-extern int pmap_map_block_rc(pmap_t pmap, addr64_t va, ppnum_t pa, vm_size_t size, vm_prot_t prot, int attr, unsigned int flags);
-
-extern kern_return_t pmap_nest(pmap_t grand, pmap_t subord, addr64_t vstart, addr64_t nstart, uint64_t size);
-extern ppnum_t pmap_find_phys(pmap_t pmap, addr64_t va);
-extern addr64_t MapUserAddressSpace(vm_map_t map, addr64_t va, unsigned int size);
-extern void ReleaseUserAddressSpace(addr64_t kva);
-extern kern_return_t pmap_attribute_cache_sync(ppnum_t pp, vm_size_t size,
-                               vm_machine_attribute_t  attribute,
-                               vm_machine_attribute_val_t* value);
-extern int pmap_canExecute(ppnum_t pa);
+extern void pmap_sync_caches_phys(vm_offset_t pa);
+extern void invalidate_cache_for_io(vm_offset_t va, unsigned length, boolean_t phys);
+extern void pmap_map_block(pmap_t pmap, vm_offset_t va, vm_offset_t pa, vm_size_t size,
+        vm_prot_t prot, int attr, unsigned int flags); /* Map a block */
+extern kern_return_t pmap_map_block_opt(vm_map_t map, vm_offset_t *va, 
+     vm_offset_t pa, vm_size_t size, vm_prot_t prot, int attr);        /* Map a block allocating an optimal virtual address */
+extern kern_return_t vm_map_block(vm_map_t map, vm_offset_t *va, vm_offset_t *bnd, vm_offset_t pa, 
+       vm_size_t size, vm_prot_t prot);
+
+extern kern_return_t pmap_nest(pmap_t grand, pmap_t subord, vm_offset_t vaddr, vm_size_t size);
+
+extern void pmap_ver(pmap_t pmap, vm_offset_t sva, vm_offset_t eva);
 
 #endif /* _PPC_PMAP_H_ */
 
diff --git a/osfmk/ppc/pmap_internals.h b/osfmk/ppc/pmap_internals.h
new file mode 100644 (file)
index 0000000..88f6cf2
--- /dev/null
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ *
+ * @APPLE_LICENSE_HEADER_START@
+ * 
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ * 
+ * @APPLE_LICENSE_HEADER_END@
+ */
+/*
+ * @OSF_COPYRIGHT@
+ */
+
+/* Things that don't need to be exported from pmap. Putting
+ * them here and not in pmap.h avoids major recompiles when
+ * modifying something either here or in proc_reg.h
+ */
+
+#ifndef _PMAP_INTERNALS_H_
+#define _PMAP_INTERNALS_H_
+
+/*
+ *     Definition of the flags in the low 5 bits of the phys_link field of the phys_entry
+ */
+#define PHYS_LOCK      0x00000001
+#define PHYS_FLAGS     0x0000001F
+
+#ifndef ASSEMBLER
+
+#include <cpus.h>
+#include <mach_ldebug.h>
+#include <debug.h>
+
+#include <mach/vm_types.h>
+#include <mach/machine/vm_types.h>
+#include <mach/vm_prot.h>
+#include <mach/vm_statistics.h>
+#include <kern/assert.h>
+#include <kern/cpu_number.h>
+#include <kern/lock.h>
+#include <kern/queue.h>
+#include <ppc/proc_reg.h>
+
+
+/* Page table entries are stored in groups (PTEGS) in a hash table */
+
+#if __PPC__
+#if _BIG_ENDIAN == 0
+error - bitfield structures are not checked for bit ordering in words
+#endif /* _BIG_ENDIAN */
+#endif /* __PPC__ */
+
+/*
+ * Don't change these structures unless you change the assembly code
+ */
+
+struct phys_entry {
+       struct mapping  *phys_link;             /* MUST BE FIRST - chain of mappings and flags in the low 5 bits, see above */
+       unsigned int    pte1;                   /* referenced/changed/wimg - info update atomically */
+};
+
+#define PHYS_NULL      ((struct phys_entry *)0)
+
+/* Memory may be non-contiguous. This data structure contains info
+ * for mapping this non-contiguous space into the contiguous
+ * physical->virtual mapping tables. An array of this type is
+ * provided to the pmap system at bootstrap by ppc_vm_init.
+ *
+ * NB : regions must be in order in this structure.
+ */
+
+typedef struct mem_region {
+       vm_offset_t start;      /* Address of base of region */
+       struct phys_entry *phys_table; /* base of region's table */
+       unsigned int end;       /* End address+1 */
+} mem_region_t;
+
+/* PMAP_MEM_REGION_MAX has a PowerMac dependancy - at least the value of
+ * kMaxRAMBanks in ppc/POWERMAC/nkinfo.h
+ */
+#define PMAP_MEM_REGION_MAX 26
+
+extern mem_region_t pmap_mem_regions[PMAP_MEM_REGION_MAX];
+extern int          pmap_mem_regions_count;
+
+/* keep track of free regions of physical memory so that we can offer
+ * them up via pmap_next_page later on
+ */
+
+#define FREE_REGION_MAX 8
+extern mem_region_t free_regions[FREE_REGION_MAX];
+extern int          free_regions_count;
+
+/* Prototypes */
+
+struct phys_entry *pmap_find_physentry(vm_offset_t pa);
+
+
+#if    DEBUG
+extern int pmdebug;
+#define PDB_LOCK       0x100
+#define LOCKPRINTF(args)       if (pmdebug & PDB_LOCK) printf args; else
+#else  /* DEBUG */
+#define LOCKPRINTF(args)
+#endif /* DEBUG */
+
+extern vm_offset_t     hash_table_base;
+extern unsigned int    hash_table_size;
+
+#endif
+#endif /* _PMAP_INTERNALS_H_ */
index 688f81bbcd9a12f238cc3f040814cb7c9cef58f2..a3976c9eaaf81529b145d2f021daabd425593014 100644 (file)
@@ -36,8 +36,6 @@ in 010011ddd00sss000000000000000000 mcrf $crf($d),$crf($s)
 in 010011cccccccccc000000000010000l $br($c,0,$l,lr,0)
 in 010011dddddaaaaabbbbb0oooo000010 cr$crop($o) $crb($d),$crb($a),$crb($b)
 in 01001100000000000000000001100100 rfi
-in 01001100000000000000000000100100 rfid
-in 01001100000000000000001000100100 hrfid
 in 01001100000000000000000100101100 isync
 in 010011cccccccccc000001000010000l $br($c,0,$l,ctr,0)
 in 010111dddddaaaaabbbbbffffftttttr rlwnm{|.}[$r] \
@@ -45,7 +43,7 @@ in 010111dddddaaaaabbbbbffffftttttr rlwnm{|.}[$r] \
 in 0101xxdddddaaaaasssssffffftttttr rl{wimi|winm|?|?}[$x]{|.}[$r] \
                                    $reg($a),$reg($d),$dec($s),$dec($f),$dec($t)
 in 011110dddddaaaaasssssffffff0xxSr rld{icl|icr|ic|imi}[$x]{|.}[$r] \
-                                   $reg($a),$reg($d),$dec($[Ssssss]),$dec($f)
+                                   $reg($a),$reg($d),$dec($[sssssS]),$dec($f)
 in 011110dddddaaaaabbbbbffffff100xr rldc{l|r}[$x]{|.}[$r] \
                                    $reg($a),$reg($d),$reg($b),$dec($f)
 in 011111ddd0laaaaabbbbb0000u000000 cmp{|l}[$u] \
@@ -58,7 +56,6 @@ in 011111dddddaaaaabbbbb000u0010w1r mulh{d|w}[$w]{u|}[$u]{|.}[$r] \
 in 011111dddddaaaaabbbbbott0001010r add{c|e||?}[$t]{|o}[$o]{|.}[$r] \
                                    $reg($d),$reg($a),$reg($b)
 in 011111ddddd0000000000000m0100110 mf{cr|msr}[$m] $reg($d)
-in 011111ddddd0ffffffff000000100110 mfcr $hex($f),$reg($d)
 in 011111dddddaaaaabbbbb000w0101000 l{w|d}[$w]arx $reg($d),$reg0($a),$reg($b)
 in 011111dddddaaaaabbbbb0000u101010 ld{|u}[$u]x $reg($d),$reg0($a),$reg($b)
 in 011111dddddaaaaabbbbb0ooou101110 $ldst($o){|u}[$u]x \
@@ -75,7 +72,6 @@ in 011111dddddaaaaabbbbb0001111100r nor{|.}[$r] $reg($a),$reg($d),$reg($b)
 in 011111dddddaaaaabbbbbo01z001000r subf{|z}[$z]e{|o}[$o]{|.}[$r] \
                                    $reg($d),$reg($a)
 in 011111ddddd0ffffffff000100100m00 mt{crf $hex($f),|msr}[$m] $reg($d)
-in 011111ddddd000000000000101100100 mtmsrd $reg($d)
 in 011111sssssaaaaabbbbb0010u101010 std{|u}[$u]x $reg($s),$reg0($a),$reg($b)
 in 011111sssssaaaaabbbbb001w0101101 st{w|d}[$w]cx. $reg($s),$reg0($a),$reg($b)
 in 011111dddddaaaaa00000o011001010r addze{|o}[$o]{|.}[$r] $reg($d),$reg($a)
@@ -101,9 +97,6 @@ in 011111dddddaaaaabbbbbo111u010w1r div{d|w}[$w]{u|}[$u]{|o}[$o]{|.}[$r] \
 in 01111100000aaaaabbbbb01110101100 dcbi $reg0($a),$reg($b)
 in 011111sssssaaaaabbbbb0111011100r nand{|.}[$r] $reg($a),$reg($s),$reg($b)
 in 01111100000000000000001111100100 slbia
-in 011111ddddd00000bbbbb01100100100 slbmte $reg($d),$reg($b)
-in 011111ddddd00000bbbbb11010100110 slbmfev $reg($d),$reg($b)
-in 011111ddddd00000bbbbb11100100110 slbmfee $reg($d),$reg($b)
 in 011111ddd00000000000010000000000 mcrxr $crf($d)
 in 011111dddddaaaaabbbbb10000101010 lswx $reg($d),$reg0($a),$reg($b)
 in 011111dddddaaaaabbbbb1w000101100 l{w|h}[$w]brx $reg($d),$reg0($a),$reg($b)
@@ -115,17 +108,15 @@ in 011111sssssaaaaabbbbb1000011011r srd{|.}[$r] $reg($a),$reg($s),$reg($b)
 in 01111100000000000000010001101100 tlbsync
 in 011111ddddd0rrrr0000010010101100 mfsr $reg($d),$dec($r)
 in 011111dddddaaaaannnnn10010101010 lswi $reg($d),$reg0($a),$dec($n)
-in 011111000ll000000000010010101100 {sync|?|ptesync|?}[$l]
+in 01111100000000000000010010101100 sync
 in 011111ddddd00000bbbbb10100100110 mfsrin $reg($d),$reg($b)
 in 011111sssssaaaaabbbbb10100101010 stswx $reg($s),$reg0($a),$reg($b)
 in 011111sssssaaaaabbbbb1w100101100 st{w|h}[$w]brx $reg($s),$reg0($a),$reg($b)
 in 011111sssssaaaaabbbbb101du101110 stf{s|d}[$d]{|u}[$u]x \
                                    $fr($s),{$reg0($a)|$reg($a)}[$u],$reg($b)
 in 011111sssssaaaaannnnn10110101010 stswi $reg($s),$reg0($a),$dec($n)
-in 011111dddddaaaaasssss1100111000r srawi{|.}[$r] $reg($a),$reg($d),$dec($s)
-in 011111dddddaaaaasssss110011101Sr sradi{|.}[$r] $reg($a),$reg($d),$dec($[Ssssss])
+in 011111dddddaaaaasssss1100111000r srawi{|.}[$r] $reg($a),$reg($s),$dec($s)
 in 01111100000000000000011010101100 eieio
-in 00000000000000000000001000000000 attn
 in 011111sssssaaaaa00000111xx11010r exts{h|b|w|?}[$x]{|.}[$r] $reg($a),$reg($s)
 in 01111100000aaaaabbbbb11110101100 icbi $reg0($a),$reg($b)
 in 011111sssssaaaaabbbbb11110101110 stfiwx $fr($s),$reg0($a),$reg($b)
@@ -205,11 +196,6 @@ spr 1000n11111 hid$dec($n)
 spr 1001011111 iabr
 spr 1010111111 dabr
 spr 1111111111 pir
-spr 0000110000 hspr0
-spr 0000110001 hspr1
-spr 0000110110 hdec0
-spr 0000111010 hsrr0
-spr 0000111011 hsrr1
 spr xxxxxxxxxx ?
 
 reg0 00000 0
index 7c3f7a70dbc157b7ce1ee7c68e5ae261523c455a..e52131729d99de7cbed2846a03ca57c0838f7b9b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -27,7 +24,6 @@
  */
 
 #include <debug.h>
-#include <mach_ldebug.h>
 #include <mach_kdb.h>
 #include <mach_kdp.h>
 
 #include <ppc/low_trace.h>
 #include <ppc/Diagnostics.h>
 #include <ppc/mem.h>
-#include <ppc/mappings.h>
 
 #include <pexpert/pexpert.h>
 
+extern const char version[];
+extern const char version_variant[];
+
 extern unsigned int intstack_top_ss;   /* declared in start.s */
-extern unsigned int debstackptr;               /* declared in start.s */
+extern unsigned int debstackptr;       /* declared in start.s */
 extern unsigned int debstack_top_ss;   /* declared in start.s */
 
+extern void thandler(void);     /* trap handler */
+extern void ihandler(void);     /* interrupt handler */
+extern void shandler(void);     /* syscall handler */
+extern void chandler(void);     /* system choke */
+extern void fpu_switch(void);   /* fp handler */
+extern void vec_switch(void);   /* vector handler */
+extern void atomic_switch_trap(void);   /* fast path atomic thread switch */
+
+void (*exception_handlers[])(void) = {
+       thandler,       /* 0x000   INVALID EXCEPTION (T_IN_VAIN) */
+       thandler,       /* 0x100   System reset (T_RESET) */
+       thandler,       /* 0x200   Machine check (T_MACHINE_CHECK) */
+       thandler,       /* 0x300   Data access (T_DATA_ACCESS) */
+       thandler,       /* 0x400   Instruction access (T_INSTRUCTION_ACCESS) */
+       ihandler,       /* 0x500   External interrupt (T_INTERRUPT) */
+       thandler,       /* 0x600   Alignment (T_ALIGNMENT) */
+       thandler,       /* 0x700   fp exc, ill/priv instr, trap  (T_PROGRAM) */
+       fpu_switch,     /* 0x800   Floating point disabled (T_FP_UNAVAILABLE) */
+       ihandler,       /* 0x900   Decrementer (T_DECREMENTER) */
+       thandler,       /* 0xA00   I/O controller interface (T_IO_ERROR) */
+       thandler,       /* 0xB00   INVALID EXCEPTION (T_RESERVED) */
+       shandler,       /* 0xC00   System call exception (T_SYSTEM_CALL) */
+       thandler,       /* 0xD00   Trace (T_TRACE) */
+       thandler,       /* 0xE00   FP assist (T_FP_ASSIST) */
+       thandler,       /* 0xF00   Performance monitor (T_PERF_MON) */
+       vec_switch,     /* 0xF20   VMX (T_VMX) */
+       thandler,       /* 0x1000  INVALID EXCEPTION (T_INVALID_EXCP0) */
+       thandler,       /* 0x1100  INVALID EXCEPTION (T_INVALID_EXCP1) */
+       thandler,       /* 0x1200  INVALID EXCEPTION (T_INVALID_EXCP2) */
+       thandler,       /* 0x1300  instruction breakpoint (T_INSTRUCTION_BKPT) */
+       ihandler,       /* 0x1400  system management (T_SYSTEM_MANAGEMENT) */
+       thandler,       /* 0x1600  Altivec Assist (T_ALTIVEC_ASSIST) */
+       ihandler,       /* 0x1700  Thermal interruption (T_THERMAL) */
+       thandler,       /* 0x1800  INVALID EXCEPTION (T_INVALID_EXCP5) */
+       thandler,       /* 0x1900  INVALID EXCEPTION (T_INVALID_EXCP6) */
+       thandler,       /* 0x1A00  INVALID EXCEPTION (T_INVALID_EXCP7) */
+       thandler,       /* 0x1B00  INVALID EXCEPTION (T_INVALID_EXCP8) */
+       thandler,       /* 0x1C00  INVALID EXCEPTION (T_INVALID_EXCP9) */
+       thandler,       /* 0x1D00  INVALID EXCEPTION (T_INVALID_EXCP10) */
+       thandler,       /* 0x1E00  INVALID EXCEPTION (T_INVALID_EXCP11) */
+       thandler,       /* 0x1F00  INVALID EXCEPTION (T_INVALID_EXCP12) */
+       thandler,       /* 0x1F00  INVALID EXCEPTION (T_INVALID_EXCP13) */
+       thandler,       /* 0x2000  Run Mode/Trace (T_RUNMODE_TRACE) */
+
+       ihandler,       /* Software  Signal processor (T_SIGP) */
+       thandler,       /* Software  Preemption (T_PREEMPT) */
+       ihandler,       /* Software  INVALID EXCEPTION (T_CSWITCH) */ 
+       ihandler,       /* Software  Shutdown Context (T_SHUTDOWN) */
+       chandler        /* Software  System choke (crash) (T_CHOKE) */
+};
+
 int pc_trace_buf[1024] = {0};
 int pc_trace_cnt = 1024;
 
-extern unsigned int extPatchMCK;
-extern unsigned int extPatch32;
-extern unsigned int hwulckPatch_isync;
-extern unsigned int hwulckPatch_eieio;
-extern unsigned int hwulckbPatch_isync;
-extern unsigned int hwulckbPatch_eieio;
-extern unsigned int mulckPatch_isync;
-extern unsigned int mulckPatch_eieio;
-extern unsigned int sulckPatch_isync;
-extern unsigned int sulckPatch_eieio;
-extern unsigned int retfsectPatch_eieio;
-extern unsigned int retfsectPatch_isync;
-
-int forcenap = 0;
-
-patch_entry_t patch_table[PATCH_TABLE_SIZE] = {
-       &extPatch32,                    0x60000000, PATCH_FEATURE,              PatchExt32,
-       &extPatchMCK,                   0x60000000, PATCH_PROCESSOR,    CPU_SUBTYPE_POWERPC_970,
-       &hwulckPatch_isync,             0x60000000, PATCH_FEATURE,              PatchLwsync,
-       &hwulckPatch_eieio,             0x7c2004ac, PATCH_FEATURE,              PatchLwsync,
-       &hwulckbPatch_isync,            0x60000000, PATCH_FEATURE,              PatchLwsync,
-       &hwulckbPatch_eieio,            0x7c2004ac, PATCH_FEATURE,              PatchLwsync,
-       &mulckPatch_isync,              0x60000000, PATCH_FEATURE,              PatchLwsync,
-       &mulckPatch_eieio,              0x7c2004ac, PATCH_FEATURE,              PatchLwsync,
-       &sulckPatch_isync,              0x60000000, PATCH_FEATURE,              PatchLwsync,
-       &sulckPatch_eieio,              0x7c2004ac, PATCH_FEATURE,              PatchLwsync,
-#if    !MACH_LDEBUG
-       &retfsectPatch_isync,   0x60000000, PATCH_FEATURE,              PatchLwsync,
-       &retfsectPatch_eieio,   0x7c2004ac, PATCH_FEATURE,              PatchLwsync
-#else
-       0,                                              0,                      PATCH_INVALID,          0,
-       0,                                              0,                      PATCH_INVALID,          0
-#endif
-       };
-
 void ppc_init(boot_args *args)
 {
        int i;
@@ -99,11 +113,9 @@ void ppc_init(boot_args *args)
        char *str;
        unsigned long   addr, videoAddr;
        unsigned int    maxmem;
-       uint64_t                xmaxmem;
        unsigned int    cputrace;
-       unsigned int    novmx;
+       bat_t               bat;
        extern vm_offset_t static_memory_end;
-       mapping *mp;
        
        /*
         * Setup per_proc info for first cpu.
@@ -122,11 +134,7 @@ void ppc_init(boot_args *args)
        set_machine_current_act(&pageout_act);
        pageout_thread.top_act = &pageout_act;
        pageout_act.thread = &pageout_thread;
-       pageout_act.mact.curctx = &pageout_act.mact.facctx;
-       pageout_act.mact.facctx.facAct = &pageout_act;
-       pageout_act.mact.cioSpace = invalSpace;                                 /* Initialize copyin/out space to invalid */
-       pageout_act.mact.preemption_count = 1;
-       per_proc_info[0].pp_preemption_count = -1;
+       per_proc_info[0].pp_preemption_count = 1;
        per_proc_info[0].pp_simple_lock_count = 0;
        per_proc_info[0].pp_interrupt_level = 0;
        per_proc_info[0].active_stacks = (unsigned int)
@@ -135,9 +143,6 @@ void ppc_init(boot_args *args)
                &need_ast[0];
        per_proc_info[0].FPU_owner = 0;
        per_proc_info[0].VMX_owner = 0;
-       mp = (mapping *)per_proc_info[0].ppCIOmp;
-       mp->mpFlags = 0x01000000 | mpSpecial | 1;
-       mp->mpSpace = invalSpace;
 
        machine_slot[0].is_cpu = TRUE;
 
@@ -151,24 +156,95 @@ void ppc_init(boot_args *args)
        master_cpu = 0;
        master_processor = cpu_to_processor(master_cpu);
 
-       static_memory_end = round_page_32(args->topOfKernelData);;
-      
-       PE_init_platform(FALSE, args);                          /* Get platform expert set up */
-
-       if (!PE_parse_boot_arg("novmx", &novmx)) novmx=0;       /* Special run without VMX? */
-       if(novmx) {                                                                     /* Yeah, turn it off */
-               for(i = 0; i < NCPUS; i++) {                    /* Cycle through all potential processors */
-                       per_proc_info[i].pf.Available &= ~pfAltivec;    /* Turn off Altivec available */
-               }
-               __asm__ volatile("mtsprg 2,%0" : : "r" (per_proc_info[0].pf.Available));        /* Set live value */
+       /* Set up segment registers as VM through space 0 */
+       for (i=0; i<=15; i++) {
+         isync();
+         mtsrin((KERNEL_SEG_REG0_VALUE | (i << 20)), i * 0x10000000);
+         sync();
        }
 
-       if (!PE_parse_boot_arg("fn", &forcenap)) forcenap = 0;  /* If force nap not set, make 0 */
-       else {
-               if(forcenap < 2) forcenap = forcenap + 1;                       /* Else set 1 for off, 2 for on */
-               else forcenap = 0;                                                                      /* Clear for error case */
+       static_memory_end = round_page(args->topOfKernelData);;
+        /* Get platform expert set up */
+       PE_init_platform(FALSE, args);
+
+
+       /* This is how the BATs get configured */
+       /* IBAT[0] maps Segment 0 1:1 */
+       /* DBAT[0] maps Segment 0 1:1 */
+       /* DBAT[2] maps the I/O Segment 1:1 */
+       /* DBAT[3] maps the Video Segment 1:1 */
+
+
+       /* Initialize shadow IBATs */
+       shadow_BAT.IBATs[0].upper=BAT_INVALID;
+       shadow_BAT.IBATs[0].lower=BAT_INVALID;
+       shadow_BAT.IBATs[1].upper=BAT_INVALID;
+       shadow_BAT.IBATs[1].lower=BAT_INVALID;
+       shadow_BAT.IBATs[2].upper=BAT_INVALID;
+       shadow_BAT.IBATs[2].lower=BAT_INVALID;
+       shadow_BAT.IBATs[3].upper=BAT_INVALID;
+       shadow_BAT.IBATs[3].lower=BAT_INVALID;
+
+       /* Initialize shadow DBATs */
+       shadow_BAT.DBATs[0].upper=BAT_INVALID;
+       shadow_BAT.DBATs[0].lower=BAT_INVALID;
+       shadow_BAT.DBATs[1].upper=BAT_INVALID;
+       shadow_BAT.DBATs[1].lower=BAT_INVALID;
+       shadow_BAT.DBATs[2].upper=BAT_INVALID;
+       shadow_BAT.DBATs[2].lower=BAT_INVALID;
+       shadow_BAT.DBATs[3].upper=BAT_INVALID;
+       shadow_BAT.DBATs[3].lower=BAT_INVALID;
+
+
+       /* If v_baseAddr is non zero, use DBAT3 to map the video segment */
+       videoAddr = args->Video.v_baseAddr & 0xF0000000;
+       if (videoAddr) {
+               /* start off specifying 1-1 mapping of video seg */
+               bat.upper.word       = videoAddr;
+               bat.lower.word       = videoAddr;
+               
+               bat.upper.bits.bl    = 0x7ff;   /* size = 256M */
+               bat.upper.bits.vs    = 1;
+               bat.upper.bits.vp    = 0;
+               
+               bat.lower.bits.wimg  = PTE_WIMG_IO;
+               bat.lower.bits.pp    = 2;       /* read/write access */
+                               
+               shadow_BAT.DBATs[3].upper = bat.upper.word;
+               shadow_BAT.DBATs[3].lower = bat.lower.word;
+               
+               sync();isync();
+               
+               mtdbatu(3, BAT_INVALID); /* invalidate old mapping */
+               mtdbatl(3, bat.lower.word);
+               mtdbatu(3, bat.upper.word);
+               sync();isync();
        }
        
+       /* Use DBAT2 to map the io segment */
+       addr = get_io_base_addr() & 0xF0000000;
+       if (addr != videoAddr) {
+               /* start off specifying 1-1 mapping of io seg */
+               bat.upper.word       = addr;
+               bat.lower.word       = addr;
+               
+               bat.upper.bits.bl    = 0x7ff;   /* size = 256M */
+               bat.upper.bits.vs    = 1;
+               bat.upper.bits.vp    = 0;
+               
+               bat.lower.bits.wimg  = PTE_WIMG_IO;
+               bat.lower.bits.pp    = 2;       /* read/write access */
+                               
+               shadow_BAT.DBATs[2].upper = bat.upper.word;
+               shadow_BAT.DBATs[2].lower = bat.lower.word;
+               
+               sync();isync();
+               mtdbatu(2, BAT_INVALID); /* invalidate old mapping */
+               mtdbatl(2, bat.lower.word);
+               mtdbatu(2, bat.upper.word);
+               sync();isync();
+       }
+
        if (!PE_parse_boot_arg("diag", &dgWork.dgFlags)) dgWork.dgFlags=0;      /* Set diagnostic flags */
        if(dgWork.dgFlags & enaExpTrace) trcWork.traceMask = 0xFFFFFFFF;        /* If tracing requested, enable it */
 
@@ -176,29 +252,54 @@ void ppc_init(boot_args *args)
                trcWork.traceMask = (trcWork.traceMask & 0xFFFFFFF0) | (cputrace & 0xF);        /* Limit to 4 */
        }
 
-       if(!PE_parse_boot_arg("tb", &trcWork.traceSize)) {      /* See if non-default trace buffer size */
-#if DEBUG
-               trcWork.traceSize = 32;                                 /* Default 32 page trace table for DEBUG */
-#else
-               trcWork.traceSize = 8;                                  /* Default 8 page trace table for RELEASE */
+#if 0
+       GratefulDebInit((bootBumbleC *)&(args->Video)); /* Initialize the GratefulDeb debugger */
 #endif
-       }
 
-       if(trcWork.traceSize < 1) trcWork.traceSize = 1;        /* Minimum size of 1 page */
-       if(trcWork.traceSize > 256) trcWork.traceSize = 256;    /* Maximum size of 256 pages */
-       trcWork.traceSize = trcWork.traceSize * 4096;   /* Change page count to size */
+       printf_init();                                          /* Init this in case we need debugger */
+       panic_init();                                           /* Init this in case we need debugger */
 
+       /* setup debugging output if one has been chosen */
+       PE_init_kprintf(FALSE);
+       kprintf("kprintf initialized\n");
+
+       /* create the console for verbose or pretty mode */
+       PE_create_console();
+
+       /* setup console output */
+       PE_init_printf(FALSE);
+
+       kprintf("version_variant = %s\n", version_variant);
+       kprintf("version         = %s\n", version);
+
+#if DEBUG
+       printf("\n\n\nThis program was compiled using gcc %d.%d for powerpc\n",
+              __GNUC__,__GNUC_MINOR__);
+
+       /* Processor version information */
+       {       
+               unsigned int pvr;
+               __asm__ ("mfpvr %0" : "=r" (pvr));
+               printf("processor version register : 0x%08x\n",pvr);
+       }
+       for (i = 0; i < kMaxDRAMBanks; i++) {
+               if (args->PhysicalDRAM[i].size) 
+                       printf("DRAM at 0x%08x size 0x%08x\n",
+                              args->PhysicalDRAM[i].base,
+                              args->PhysicalDRAM[i].size);
+       }
+#endif /* DEBUG */
+
+       /*   
+        * VM initialization, after this we're using page tables...
+        */
        if (!PE_parse_boot_arg("maxmem", &maxmem))
-               xmaxmem=0;
+               maxmem=0;
        else
-               xmaxmem = (uint64_t)maxmem * (1024 * 1024);
+               maxmem = maxmem * (1024 * 1024);
 
-/*   
- * VM initialization, after this we're using page tables...
- */
+       ppc_vm_init(maxmem, args);
 
-       ppc_vm_init(xmaxmem, args);
-       
        PE_init_platform(TRUE, args);
        
        machine_startup(args);
@@ -210,10 +311,23 @@ ppc_init_cpu(
        int i;
 
        if(!(proc_info->next_savearea))                 /* Do we have a savearea set up already? */
-               proc_info->next_savearea = (vm_offset_t)save_get_init();        /* Get a savearea  */
+               proc_info->next_savearea = (savearea *)save_get_init(); /* Get a savearea  */
        
        cpu_init();
-       
+
+       proc_info->pp_preemption_count = 1;
+       proc_info->pp_simple_lock_count = 0;
+       proc_info->pp_interrupt_level = 0;
+
+       proc_info->Lastpmap = 0;                                /* Clear last used space */
+
+       /* Set up segment registers as VM through space 0 */
+       for (i=0; i<=15; i++) {
+         isync();
+         mtsrin((KERNEL_SEG_REG0_VALUE | (i << 20)), i * 0x10000000);
+         sync();
+       }
+
        ppc_vm_cpu_init(proc_info);
 
        ml_thrm_init();                                                 /* Start thermal monitoring on this processor */
index 833cc3642f70ff0cedd8fd1a0deb718409b557fd..0fe096d900f4563920b9cb1aa578b37d7ff4e089 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #include <ppc/boot.h>
 #include <ppc/misc_protos.h>
 #include <ppc/pmap.h>
+#include <ppc/pmap_internals.h>
 #include <ppc/mem.h>
 #include <ppc/mappings.h>
 #include <ppc/exception.h>
 #include <ppc/mp.h>
-#include <ppc/lowglobals.h>
 
+#ifdef __MACHO__
 #include <mach-o/mach_header.h>
+#endif
 
-extern const char version[];
-extern const char version_variant[];
-
-extern unsigned int intstack[];                        /* declared in aligned_data.s */
-extern unsigned int intstack_top_ss;   /* declared in aligned_data.s */
+extern unsigned int intstack[];        /* declared in start.s */
+extern unsigned int intstack_top_ss;   /* declared in start.s */
 
-addr64_t hash_table_base;                              /* Hash table base */
-unsigned int hash_table_size;                  /* Hash table size */
-vm_offset_t taproot_addr;                              /* (BRINGUP) */
-unsigned int taproot_size;                             /* (BRINGUP) */
-unsigned int serialmode;                               /* Serial mode keyboard and console control */
-extern int disableConsoleOutput;
+vm_offset_t mem_size;  /* Size of actual physical memory present
+                                                  minus any performance buffer and possibly limited
+                                                  by mem_limit in bytes */
+vm_offset_t mem_actual;        /* The "One True" physical memory size 
+                                                  actually, it's the highest physical address + 1 */
+                                                 
 
-struct shadowBAT shadow_BAT;
+mem_region_t pmap_mem_regions[PMAP_MEM_REGION_MAX];
+int     pmap_mem_regions_count = 0;    /* No non-contiguous memory regions */
 
-/*
- *     NOTE: mem_size is bogus on large memory machines.  We will pin it to 0x80000000 if there is more than 2 GB
- *     This is left only for compatibility and max_mem should be used.
- */
-vm_offset_t mem_size;                                  /* Size of actual physical memory present
-                                                                                  minus any performance buffer and possibly limited
-                                                                                  by mem_limit in bytes */
-uint64_t       mem_actual;                                     /* The "One True" physical memory size 
-                                                                                  actually, it's the highest physical address + 1 */
-uint64_t       max_mem;                                        /* Size of physical memory (bytes), adjusted by maxmem */
-uint64_t       sane_size;                                      /* Memory size to use for defaults calculations */
-                                                 
+mem_region_t free_regions[FREE_REGION_MAX];
+int         free_regions_count;
 
-mem_region_t pmap_mem_regions[PMAP_MEM_REGION_MAX + 1];
-int     pmap_mem_regions_count = 0;            /* Assume no non-contiguous memory regions */
+#ifndef __MACHO__  
+extern unsigned long etext;
+#endif
 
 unsigned int avail_remaining = 0;
 vm_offset_t first_avail;
 vm_offset_t static_memory_end;
-addr64_t vm_last_addr = VM_MAX_KERNEL_ADDRESS; /* Highest kernel virtual address known to the VM system */
+extern vm_offset_t avail_next;
 
+#ifdef __MACHO__
 extern struct mach_header _mh_execute_header;
 vm_offset_t sectTEXTB;
 int sectSizeTEXT;
@@ -102,293 +91,230 @@ vm_offset_t sectKLDB;
 int sectSizeKLD;
 
 vm_offset_t end, etext, edata;
+#endif
 
 extern unsigned long exception_entry;
 extern unsigned long exception_end;
 
 
-void ppc_vm_init(uint64_t mem_limit, boot_args *args)
+void ppc_vm_init(unsigned int mem_limit, boot_args *args)
 {
        unsigned int htabmask;
-       unsigned int i, j, batsize, kmapsize, pvr;
-       vm_offset_t  addr, ioAddr, videoAddr;
+       unsigned int i, j, batsize, kmapsize;
+       vm_offset_t  addr;
        int boot_task_end_offset;
        const char *cpus;
        mapping         *mp;
+       vm_offset_t first_phys_avail;
        vm_offset_t             sizeadj, oldstart;
-       unsigned int *xtaproot, bank_shift;
-       uint64_t        cbsize, xhid0;
 
+       /* Now retrieve addresses for end, edata, and etext 
+        * from MACH-O headers.
+        */
+       sectTEXTB = (vm_offset_t)getsegdatafromheader(
+               &_mh_execute_header, "__TEXT", &sectSizeTEXT);
+       sectDATAB = (vm_offset_t)getsegdatafromheader(
+               &_mh_execute_header, "__DATA", &sectSizeDATA);
+       sectLINKB = (vm_offset_t)getsegdatafromheader(
+               &_mh_execute_header, "__LINKEDIT", &sectSizeLINK);
+       sectKLDB = (vm_offset_t)getsegdatafromheader(
+               &_mh_execute_header, "__KLD", &sectSizeKLD);
 
-/*
- *     Invalidate all shadow BATs
+       etext = (vm_offset_t) sectTEXTB + sectSizeTEXT;
+       edata = (vm_offset_t) sectDATAB + sectSizeDATA;
+       end = round_page(getlastaddr());                                        /* Force end to next page */
+#if DEBUG
+       kprintf("sectTEXT: %x, size: %x\n", sectTEXTB, sectSizeTEXT);
+       kprintf("sectDATA: %x, size: %x\n", sectDATAB, sectSizeDATA);
+       kprintf("sectLINK: %x, size: %x\n", sectLINKB, sectSizeLINK);
+       kprintf("sectKLD:  %x, size: %x\n", sectKLDB, sectSizeKLD);
+       kprintf("end: %x\n", end);
+#endif
+
+/* Stitch valid memory regions together - they may be contiguous
+ * even though they're not already glued together
  */
+       mem_actual = args->PhysicalDRAM[0].base + args->PhysicalDRAM[0].size;   /* Initialize to the first region size */
+       addr = 0;                                                                                       /* temp use as pointer to previous memory region... */
+       for (i = 1; i < kMaxDRAMBanks; i++) {
+               
+               if (args->PhysicalDRAM[i].size == 0) continue;  /* If region is empty, skip it */
+               
+               if((args->PhysicalDRAM[i].base + args->PhysicalDRAM[i].size) > mem_actual) {    /* New high? */
+                       mem_actual = args->PhysicalDRAM[i].base + args->PhysicalDRAM[i].size;   /* Take the high bid */
+               }
+               
+               if (args->PhysicalDRAM[i].base ==                               /* Does the end of the last hit the start of the next? */
+                 args->PhysicalDRAM[addr].base +
+                 args->PhysicalDRAM[addr].size) {
+                       kprintf("region 0x%08x size 0x%08x joining region 0x%08x size 0x%08x\n",
+                         args->PhysicalDRAM[addr].base, args->PhysicalDRAM[addr].size,
+                         args->PhysicalDRAM[i].base, args->PhysicalDRAM[i].size);
+                       
+                       args->PhysicalDRAM[addr].size += args->PhysicalDRAM[i].size;    /* Join them */
+                       args->PhysicalDRAM[i].size = 0;
+                       continue;
+               }
+               /* This is now last non-zero region to compare against */
+               addr = i;
+       }
 
-       /* Initialize shadow IBATs */
-       shadow_BAT.IBATs[0].upper=BAT_INVALID;
-       shadow_BAT.IBATs[0].lower=BAT_INVALID;
-       shadow_BAT.IBATs[1].upper=BAT_INVALID;
-       shadow_BAT.IBATs[1].lower=BAT_INVALID;
-       shadow_BAT.IBATs[2].upper=BAT_INVALID;
-       shadow_BAT.IBATs[2].lower=BAT_INVALID;
-       shadow_BAT.IBATs[3].upper=BAT_INVALID;
-       shadow_BAT.IBATs[3].lower=BAT_INVALID;
-
-       /* Initialize shadow DBATs */
-       shadow_BAT.DBATs[0].upper=BAT_INVALID;
-       shadow_BAT.DBATs[0].lower=BAT_INVALID;
-       shadow_BAT.DBATs[1].upper=BAT_INVALID;
-       shadow_BAT.DBATs[1].lower=BAT_INVALID;
-       shadow_BAT.DBATs[2].upper=BAT_INVALID;
-       shadow_BAT.DBATs[2].lower=BAT_INVALID;
-       shadow_BAT.DBATs[3].upper=BAT_INVALID;
-       shadow_BAT.DBATs[3].lower=BAT_INVALID;
-
-
-       /*
-        * Go through the list of memory regions passed in via the boot_args
+       /* Go through the list of memory regions passed in via the args
         * and copy valid entries into the pmap_mem_regions table, adding
         * further calculated entries.
-        *
-        * boot_args version 1 has address instead of page numbers
-        * in the PhysicalDRAM banks, set bank_shift accordingly.
         */
        
-       bank_shift = 0;
-       if (args->Version == kBootArgsVersion1) bank_shift = 12;
-       
        pmap_mem_regions_count = 0;
-       max_mem = 0;                                                                                                                    /* Will use to total memory found so far */
-       mem_actual = 0;                                                                                                                 /* Actual size of memory */
-       
-       if (mem_limit == 0) mem_limit = 0xFFFFFFFFFFFFFFFFULL;                                  /* If there is no set limit, use all */
-       
-       for (i = 0; i < kMaxDRAMBanks; i++) {                                                                   /* Look at all of the banks */
-               
-               cbsize = (uint64_t)args->PhysicalDRAM[i].size << (12 - bank_shift);     /* Remember current size */
-               
-               if (!cbsize) continue;                                                                                          /* Skip if the bank is empty */
-               
-               mem_actual = mem_actual + cbsize;                                                                       /* Get true memory size */
+       mem_size = 0;   /* Will use to total memory found so far */
 
-               if(mem_limit == 0) continue;                                                                            /* If we hit restriction, just keep counting */
+       for (i = 0; i < kMaxDRAMBanks; i++) {
+               if (args->PhysicalDRAM[i].size == 0)
+                       continue;
 
-               if (cbsize > mem_limit) cbsize = mem_limit;                                                     /* Trim to max allowed */
-               max_mem += cbsize;                                                                                                      /* Total up what we have so far */
-               mem_limit = mem_limit - cbsize;                                                                         /* Calculate amount left to do */
-               
-               pmap_mem_regions[pmap_mem_regions_count].mrStart  = args->PhysicalDRAM[i].base >> bank_shift;   /* Set the start of the bank */
-               pmap_mem_regions[pmap_mem_regions_count].mrAStart = pmap_mem_regions[pmap_mem_regions_count].mrStart;           /* Set the start of allocatable area */
-               pmap_mem_regions[pmap_mem_regions_count].mrEnd    = ((uint64_t)args->PhysicalDRAM[i].base >> bank_shift) + (cbsize >> 12) - 1;  /* Set the end address of bank */
-               pmap_mem_regions[pmap_mem_regions_count].mrAEnd   = pmap_mem_regions[pmap_mem_regions_count].mrEnd;     /* Set the end address of allocatable area */
+               /* The following should only happen if memory size has
+                  been artificially reduced with -m */
+               if (mem_limit > 0 &&
+                   mem_size + args->PhysicalDRAM[i].size > mem_limit)
+                       args->PhysicalDRAM[i].size = mem_limit - mem_size;
 
-               /* Regions must be provided in ascending order */
-               assert ((pmap_mem_regions_count == 0) ||
-                       pmap_mem_regions[pmap_mem_regions_count].mrStart >
-                       pmap_mem_regions[pmap_mem_regions_count-1].mrStart);
+               /* We've found a region, tally memory */
 
-               pmap_mem_regions_count++;                                                                                       /* Count this region */
-       }
-       
-       mem_size = (unsigned int)max_mem;                                                                               /* Get size of memory */
-       if(max_mem > 0x0000000080000000ULL) mem_size = 0x80000000;                              /* Pin at 2 GB */
+               pmap_mem_regions[pmap_mem_regions_count].start =
+                       args->PhysicalDRAM[i].base;
+               pmap_mem_regions[pmap_mem_regions_count].end =
+                       args->PhysicalDRAM[i].base +
+                       args->PhysicalDRAM[i].size;
 
-       sane_size = max_mem;                                                                                                    /* Calculate a sane value to use for init */
-       if(sane_size > (addr64_t)(VM_MAX_KERNEL_ADDRESS + 1)) 
-               sane_size = (addr64_t)(VM_MAX_KERNEL_ADDRESS + 1);                                      /* If flush with ram, use addressible portion */
+               /* Regions must be provided in ascending order */
+               assert ((pmap_mem_regions_count == 0) ||
+                       pmap_mem_regions[pmap_mem_regions_count].start >
+                       pmap_mem_regions[pmap_mem_regions_count-1].start);
+
+               if (pmap_mem_regions_count > 0) {               
+                       /* we add on any pages not in the first memory
+                        * region to the avail_remaining count. The first
+                        * memory region is used for mapping everything for
+                        * bootup and is taken care of specially.
+                        */
+                       avail_remaining +=
+                               args->PhysicalDRAM[i].size / PPC_PGBYTES;
+               }
+               
+               /* Keep track of how much memory we've found */
 
+               mem_size += args->PhysicalDRAM[i].size;
 
-/* 
- * Initialize the pmap system, using space above `first_avail'
- * for the necessary data structures.
- * NOTE : assume that we'll have enough space mapped in already
- */
+               /* incremement number of regions found */
+               pmap_mem_regions_count++;
+       }
 
-       first_avail = static_memory_end;
+       kprintf("mem_size: %d M\n",mem_size / (1024 * 1024));
 
-/* Now retrieve addresses for end, edata, and etext 
- * from MACH-O headers.
- */
-       sectTEXTB = (vm_offset_t)getsegdatafromheader(
-               &_mh_execute_header, "__TEXT", &sectSizeTEXT);
-       sectDATAB = (vm_offset_t)getsegdatafromheader(
-               &_mh_execute_header, "__DATA", &sectSizeDATA);
-       sectLINKB = (vm_offset_t)getsegdatafromheader(
-               &_mh_execute_header, "__LINKEDIT", &sectSizeLINK);
-       sectKLDB = (vm_offset_t)getsegdatafromheader(
-               &_mh_execute_header, "__KLD", &sectSizeKLD);
+       /* 
+        * Initialize the pmap system, using space above `first_avail'
+        * for the necessary data structures.
+        * NOTE : assume that we'll have enough space mapped in already
+        */
 
-       etext = (vm_offset_t) sectTEXTB + sectSizeTEXT;
-       edata = (vm_offset_t) sectDATAB + sectSizeDATA;
-       end = round_page_32(getlastaddr());                                     /* Force end to next page */
+       first_phys_avail = static_memory_end;
+       first_avail = adjust_bat_limit(first_phys_avail, 0, FALSE, FALSE);
        
-       kmapsize = (round_page_32(exception_end) - trunc_page_32(exception_entry)) +    /* Get size we will map later */
-               (round_page_32(sectTEXTB+sectSizeTEXT) - trunc_page_32(sectTEXTB)) +
-               (round_page_32(sectDATAB+sectSizeDATA) - trunc_page_32(sectDATAB)) +
-               (round_page_32(sectLINKB+sectSizeLINK) - trunc_page_32(sectLINKB)) +
-               (round_page_32(sectKLDB+sectSizeKLD) - trunc_page_32(sectKLDB)) +
-               (round_page_32(static_memory_end) - trunc_page_32(end));
-
-       pmap_bootstrap(max_mem, &first_avail, kmapsize);
-
-       pmap_map(trunc_page_32(exception_entry), trunc_page_32(exception_entry), 
-               round_page_32(exception_end), VM_PROT_READ|VM_PROT_EXECUTE);
+       kmapsize = (round_page(exception_end) - trunc_page(exception_entry)) +  /* Get size we will map later */
+               (round_page(sectTEXTB+sectSizeTEXT) - trunc_page(sectTEXTB)) +
+               (round_page(sectDATAB+sectSizeDATA) - trunc_page(sectDATAB)) +
+               (round_page(sectLINKB+sectSizeLINK) - trunc_page(sectLINKB)) +
+               (round_page(sectKLDB+sectSizeKLD) - trunc_page(sectKLDB)) +
+               (round_page(static_memory_end) - trunc_page(end));
 
-       pmap_map(trunc_page_32(sectTEXTB), trunc_page_32(sectTEXTB), 
-               round_page_32(sectTEXTB+sectSizeTEXT), VM_PROT_READ|VM_PROT_EXECUTE);
+       pmap_bootstrap(mem_size,&first_avail,&first_phys_avail, kmapsize);
 
-       pmap_map(trunc_page_32(sectDATAB), trunc_page_32(sectDATAB), 
-               round_page_32(sectDATAB+sectSizeDATA), VM_PROT_READ|VM_PROT_WRITE);
-
-/* The KLD and LINKEDIT segments are unloaded in toto after boot completes,
-* but via ml_static_mfree(), through IODTFreeLoaderInfo(). Hence, we have
-* to map both segments page-by-page.
-*/
-       
-       for (addr = trunc_page_32(sectKLDB);
-             addr < round_page_32(sectKLDB+sectSizeKLD);
+#ifdef __MACHO__
+#if DEBUG
+       kprintf("Mapping memory:\n");
+       kprintf("   exception vector: %08X, %08X - %08X\n", trunc_page(exception_entry), 
+               trunc_page(exception_entry), round_page(exception_end));
+       kprintf("          sectTEXTB: %08X, %08X - %08X\n", trunc_page(sectTEXTB), 
+               trunc_page(sectTEXTB), round_page(sectTEXTB+sectSizeTEXT));
+       kprintf("          sectDATAB: %08X, %08X - %08X\n", trunc_page(sectDATAB), 
+               trunc_page(sectDATAB), round_page(sectDATAB+sectSizeDATA));
+       kprintf("          sectLINKB: %08X, %08X - %08X\n", trunc_page(sectLINKB), 
+               trunc_page(sectLINKB), round_page(sectLINKB+sectSizeLINK));
+       kprintf("           sectKLDB: %08X, %08X - %08X\n", trunc_page(sectKLDB), 
+               trunc_page(sectKLDB), round_page(sectKLDB+sectSizeKLD));
+       kprintf("                end: %08X, %08X - %08X\n", trunc_page(end), 
+               trunc_page(end), static_memory_end);
+#endif /* DEBUG */
+       pmap_map(trunc_page(exception_entry), trunc_page(exception_entry), 
+               round_page(exception_end), VM_PROT_READ|VM_PROT_EXECUTE);
+       pmap_map(trunc_page(sectTEXTB), trunc_page(sectTEXTB), 
+               round_page(sectTEXTB+sectSizeTEXT), VM_PROT_READ|VM_PROT_EXECUTE);
+       pmap_map(trunc_page(sectDATAB), trunc_page(sectDATAB), 
+               round_page(sectDATAB+sectSizeDATA), VM_PROT_READ|VM_PROT_WRITE);
+
+
+       /* The KLD and LINKEDIT segments are unloaded in toto after boot completes,
+        * but via ml_static_mfree(), through IODTFreeLoaderInfo(). Hence, we have
+        * to map both segments page-by-page.
+        */
+       for (addr = trunc_page(sectKLDB);
+             addr < round_page(sectKLDB+sectSizeKLD);
              addr += PAGE_SIZE) {
 
-            pmap_enter(kernel_pmap, addr, addr>>12
+            pmap_enter(kernel_pmap, addr, addr, 
                        VM_PROT_READ|VM_PROT_WRITE, 
                        VM_WIMG_USE_DEFAULT, TRUE);
-
        }
 
-       for (addr = trunc_page_32(sectLINKB);
-             addr < round_page_32(sectLINKB+sectSizeLINK);
+       for (addr = trunc_page(sectLINKB);
+             addr < round_page(sectLINKB+sectSizeLINK);
              addr += PAGE_SIZE) {
 
-           pmap_enter(kernel_pmap, addr, addr>>12
+            pmap_enter(kernel_pmap, addr, addr
                        VM_PROT_READ|VM_PROT_WRITE, 
                        VM_WIMG_USE_DEFAULT, TRUE);
-
        }
 
-       pmap_enter(kernel_pmap, &sharedPage, (unsigned int)&sharedPage >> 12,   /* Make sure the sharedPage is mapped */
-               VM_PROT_READ|VM_PROT_WRITE, 
-               VM_WIMG_USE_DEFAULT, TRUE);
-
-       pmap_enter(kernel_pmap, &lowGlo, (unsigned int)&lowGlo >> 12,                   /* Make sure the low memory globals are mapped */
-               VM_PROT_READ|VM_PROT_WRITE, 
-               VM_WIMG_USE_DEFAULT, TRUE);
-               
 /*
  *     We need to map the remainder page-by-page because some of this will
  *     be released later, but not all.  Ergo, no block mapping here 
  */
-
-       for(addr = trunc_page_32(end); addr < round_page_32(static_memory_end); addr += PAGE_SIZE) {
-
-               pmap_enter(kernel_pmap, addr, addr>>12, 
+       for(addr = trunc_page(end); addr < round_page(static_memory_end); addr += PAGE_SIZE) {
+               pmap_enter(kernel_pmap, addr, addr, 
                        VM_PROT_READ|VM_PROT_WRITE, 
                        VM_WIMG_USE_DEFAULT, TRUE);
-
        }
+#endif /* __MACHO__ */
 
-       MapUserAddressSpaceInit();                      /* Go initialize copy in/out */
+#if DEBUG
+       for (i=0 ; i < free_regions_count; i++) {
+               kprintf("Free region start 0x%08x end 0x%08x\n",
+                      free_regions[i].start,free_regions[i].end);
+       }
+#endif
 
 /*
- *     At this point, there is enough mapped memory and all hw mapping structures are
- *     allocated and initialized.  Here is where we turn on translation for the
- *     VERY first time....
- *
- *     NOTE: Here is where our very first interruption will happen.
- *
+ *     Note: the shadow BAT registers were already loaded in ppc_init.c
  */
 
-       hw_start_trans();                                       /* Start translating */
-
-#if 0
-       GratefulDebInit((bootBumbleC *)&(args->Video)); /* Initialize the GratefulDeb debugger */
-#endif
 
-
-       printf_init();                                          /* Init this in case we need debugger */
-       panic_init();                                           /* Init this in case we need debugger */
-       PE_init_kprintf(TRUE);                          /* Note on PPC we only call this after VM is set up */
-
-       kprintf("kprintf initialized\n");
-
-       serialmode = 0;                                         /* Assume normal keyboard and console */
-       if(PE_parse_boot_arg("serial", &serialmode)) {          /* Do we want a serial keyboard and/or console? */
-               kprintf("Serial mode specified: %08X\n", serialmode);
-       }
-       if(serialmode & 1) {                            /* Start serial if requested */
-               (void)switch_to_serial_console();       /* Switch into serial mode */
-               disableConsoleOutput = FALSE;   /* Allow printfs to happen */
-       }
-       
-       kprintf("max_mem: %ld M\n", (unsigned long)(max_mem >> 20));
-       kprintf("version_variant = %s\n", version_variant);
-       kprintf("version         = %s\n\n", version);
-       __asm__ ("mfpvr %0" : "=r" (pvr));
-       kprintf("proc version    = %08x\n", pvr);
-       if(per_proc_info[0].pf.Available & pf64Bit) {   /* 64-bit processor? */
-               xhid0 = hid0get64();                    /* Get the hid0 */
-               if(xhid0 & (1ULL << (63 - 19))) kprintf("Time base is externally clocked\n");
-               else kprintf("Time base is internally clocked\n");
-       }
-
-
-       taproot_size = PE_init_taproot(&taproot_addr);  /* (BRINGUP) See if there is a taproot */
-       if(taproot_size) {                                      /* (BRINGUP) */
-               kprintf("TapRoot card configured to use vaddr = %08X, size = %08X\n", taproot_addr, taproot_size);
-               bcopy_nc((void *)version, (void *)(taproot_addr + 16), strlen(version));        /* (BRINGUP) Pass it our kernel version */
-               __asm__ volatile("eieio");              /* (BRINGUP) */
-               xtaproot = (unsigned int *)taproot_addr;        /* (BRINGUP) */
-               xtaproot[0] = 1;                                /* (BRINGUP) */
-               __asm__ volatile("eieio");              /* (BRINGUP) */
-       }
-
-       PE_create_console();                            /* create the console for verbose or pretty mode */
-
-       /* setup console output */
-       PE_init_printf(FALSE);
+       LoadIBATs((unsigned int *)&shadow_BAT.IBATs[0]);                /* Load up real IBATs from shadows */
+       LoadDBATs((unsigned int *)&shadow_BAT.DBATs[0]);                /* Load up real DBATs from shadows */
 
 #if DEBUG
-       printf("\n\n\nThis program was compiled using gcc %d.%d for powerpc\n",
-              __GNUC__,__GNUC_MINOR__);
-
-
-       /* Processor version information */
-       {       
-               unsigned int pvr;
-               __asm__ ("mfpvr %0" : "=r" (pvr));
-               printf("processor version register : %08X\n", pvr);
-       }
-
-       kprintf("Args at %08X\n", args);
-       for (i = 0; i < pmap_mem_regions_count; i++) {
-                       printf("DRAM at %08X size %08X\n",
-                              args->PhysicalDRAM[i].base,
-                              args->PhysicalDRAM[i].size);
-       }
-#endif /* DEBUG */
-
-#if DEBUG
-       kprintf("Mapped memory:\n");
-       kprintf("   exception vector: %08X, %08X - %08X\n", trunc_page_32(exception_entry), 
-               trunc_page_32(exception_entry), round_page_32(exception_end));
-       kprintf("          sectTEXTB: %08X, %08X - %08X\n", trunc_page_32(sectTEXTB), 
-               trunc_page_32(sectTEXTB), round_page_32(sectTEXTB+sectSizeTEXT));
-       kprintf("          sectDATAB: %08X, %08X - %08X\n", trunc_page_32(sectDATAB), 
-               trunc_page_32(sectDATAB), round_page_32(sectDATAB+sectSizeDATA));
-       kprintf("          sectLINKB: %08X, %08X - %08X\n", trunc_page_32(sectLINKB), 
-               trunc_page_32(sectLINKB), round_page_32(sectLINKB+sectSizeLINK));
-       kprintf("           sectKLDB: %08X, %08X - %08X\n", trunc_page_32(sectKLDB), 
-               trunc_page_32(sectKLDB), round_page_32(sectKLDB+sectSizeKLD));
-       kprintf("                end: %08X, %08X - %08X\n", trunc_page_32(end), 
-               trunc_page_32(end), static_memory_end);
-
+       for(i=0; i<4; i++) kprintf("DBAT%1d: %08X %08X\n", 
+               i, shadow_BAT.DBATs[i].upper, shadow_BAT.DBATs[i].lower);
+       for(i=0; i<4; i++) kprintf("IBAT%1d: %08X %08X\n", 
+               i, shadow_BAT.IBATs[i].upper, shadow_BAT.IBATs[i].lower);
 #endif
-
-       return;
 }
 
 void ppc_vm_cpu_init(
        struct per_proc_info *proc_info)
 {
-       hw_setup_trans();                                                                       /* Set up hardware needed for translation */
-       hw_start_trans();                                                                       /* Start translating */
+       hash_table_init(hash_table_base, hash_table_size);
+
+       LoadIBATs((unsigned int *)&shadow_BAT.IBATs[0]);
+       LoadDBATs((unsigned int *)&shadow_BAT.DBATs[0]);
+
+       sync();isync();
 }
index 5327ebe8d8ba7fd487a4061888e44569899434f4..87e0955a7030dc2cf4e1a1f870ca24377a8435c4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -55,8 +52,7 @@
 
 /* Defines for decoding the MSR bits */
 
-#define MSR_SF_BIT             0
-#define MSR_HV_BIT             3
+#define MSR_SF_BIT     0
 #define MSR_RES1_BIT   1
 #define MSR_RES2_BIT   2
 #define MSR_RES3_BIT   3
 #define SR_UNUSED_BY_KERN_NUM 13
 #define SR_COPYIN_NAME sr14
 #define SR_COPYIN_NUM  14
-#define BAT_INVALID 0
 
 
 /* DSISR bits on data access exceptions */
 
 #define DSISR_IO_BIT           0       /* NOT USED on 601 */
 #define DSISR_HASH_BIT         1
-#define DSISR_NOEX_BIT         3
 #define DSISR_PROT_BIT         4
 #define DSISR_IO_SPC_BIT       5
 #define DSISR_WRITE_BIT                6
 #define DSISR_WATCH_BIT                9
 #define DSISR_EIO_BIT          11
 
-#define dsiMiss                        0x40000000
-#define dsiMissb                       1
-#define dsiNoEx                                0x10000000
-#define dsiProt                                0x08000000
-#define dsiInvMode                     0x04000000
-#define dsiStore                       0x02000000
-#define dsiAC                          0x00400000
-#define dsiSeg                         0x00200000
-#define dsiValid                       0x5E600000
-#define dsiSpcNest                     0x00010000      /* Special nest - software flag */
-#define dsiSpcNestb                    15                      /* Special nest - software flag */
-#define dsiSoftware                    0x0000FFFF
-
 /* SRR1 bits on data/instruction translation exceptions */
 
 #define SRR1_TRANS_HASH_BIT    1
 #define SRR1_PRG_PRV_INS_BIT   13
 #define SRR1_PRG_TRAP_BIT      14
 
+/* BAT information */
+
+/* Constants used when setting mask values */
+
+#define BAT_INVALID 0
+
 /*
  * Virtual to physical mapping macros/structures.
  * IMPORTANT NOTE: there is one mapping per HW page, not per MACH page.
  */
 
+#define CACHE_LINE_SIZE        32
+#define CACHE_LINE_POW2 5
+#define cache_align(x) (((x) + CACHE_LINE_SIZE-1) & ~(CACHE_LINE_SIZE - 1))
+
 #define PTE1_WIMG_GUARD_BIT    28      /* Needed for assembler */
 #define PTE1_REFERENCED_BIT    23      /* ditto */
 #define PTE1_CHANGED_BIT       24
 #define PTE0_HASH_ID_BIT       25
 
-#define PTE_WIMG_CB_CACHED_COHERENT            0       /* cached, writeback, coherent (default) */
-#define PTE_WIMG_CB_CACHED_COHERENT_GUARDED    1       /* cached, writeback, coherent, guarded */
-#define PTE_WIMG_UNCACHED_COHERENT             2       /* uncached, coherentt */
-#define PTE_WIMG_UNCACHED_COHERENT_GUARDED     3       /* uncached, coherent, guarded */
+#define PTE_NULL ((pte_t*) NULL) /* No pte found/associated with this */
+#define PTE_EMPTY 0x7fffffbf    /* Value in the pte0.word of a free pte */
+
+#define PTE_WIMG_CB_CACHED                     0       /* cached, writeback */
+#define PTE_WIMG_CB_CACHED_GUARDED             1       /* cached, writeback, guarded */
+#define PTE_WIMG_CB_CACHED_COHERENT            2       /* cached, writeback, coherent (default) */
+#define PTE_WIMG_CB_CACHED_COHERENT_GUARDED    3       /* cached, writeback, coherent, guarded */
+#define PTE_WIMG_UNCACHED                      4       /* uncached */
+#define PTE_WIMG_UNCACHED_GUARDED              5       /* uncached, guarded */
+#define PTE_WIMG_UNCACHED_COHERENT             6       /* uncached, coherentt */
+#define PTE_WIMG_UNCACHED_COHERENT_GUARDED     7       /* uncached, coherent, guarded */
+#define PTE_WIMG_WT_CACHED                     8       /* cached, writethru */
+#define PTE_WIMG_WT_CACHED_GUARDED             9       /* cached, writethru, guarded */
+#define PTE_WIMG_WT_CACHED_COHERENT            10      /* cached, writethru, coherent */
+#define PTE_WIMG_WT_CACHED_COHERENT_GUARDED    11      /* cached, writethru, coherent, guarded */
 
 #define PTE_WIMG_DEFAULT       PTE_WIMG_CB_CACHED_COHERENT
 #define PTE_WIMG_IO            PTE_WIMG_UNCACHED_COHERENT_GUARDED
 #ifndef ASSEMBLER
 #ifdef __GNUC__
 
+#if _BIG_ENDIAN == 0
+#error - bitfield structures are not checked for bit ordering in words
+#endif /* _BIG_ENDIAN */
+
 /* Structures and types for machine registers */
 
+typedef union {
+       unsigned int word;
+       struct {
+               unsigned int htaborg    : 16;
+               unsigned int reserved   : 7;
+               unsigned int htabmask   : 9;
+       } bits;
+} sdr1_t;
+
+/* Block mapping registers.  These values are model dependent. 
+ * Eventually, we will need to up these to 64 bit values.
+ */
+
+#define blokValid 0x1FFE0000
+#define batMin 0x00020000
+#define batMax 0x10000000
+#define batICnt 4
+#define batDCnt 4
+
+/* BAT register structures.
+ * Not used for standard mappings, but may be used
+ * for mapping devices. Note that the 601 has a
+ * different BAT layout than the other PowerPC processors
+ */
+
+typedef union {
+       unsigned int word;
+       struct {
+               unsigned int blpi       : 15;
+               unsigned int reserved   : 10;
+               unsigned int wim        : 3;
+               unsigned int ks         : 1;
+               unsigned int ku         : 1;
+               unsigned int pp         : 2;
+       } bits;
+} bat601u_t;
+
+typedef union {
+       unsigned int word;
+       struct {
+               unsigned int pbn        : 15;
+               unsigned int reserved   : 10;
+               unsigned int valid      : 1;
+               unsigned int bsm        : 6;
+       } bits;
+} bat601l_t;
+
+typedef struct bat601_t {
+       bat601u_t       upper;
+       bat601l_t       lower;
+} bat601_t;
+
+typedef union {
+       unsigned int word;
+       struct {
+               unsigned int bepi       : 15;
+               unsigned int reserved   : 4;
+               unsigned int bl         : 11;
+               unsigned int vs         : 1;
+               unsigned int vp         : 1;
+       } bits;
+} batu_t;
+
+typedef union {
+       unsigned int word;
+       struct {
+               unsigned int brpn       : 15;
+               unsigned int reserved   : 10;
+               unsigned int wimg       : 4;
+               unsigned int reserved2  : 1;
+               unsigned int pp         : 2;
+       } bits;
+} batl_t;
+
+typedef struct bat_t {
+       batu_t  upper;
+       batl_t  lower;
+} bat_t;
+
+/* PTE entries
+ * Used extensively for standard mappings
+ */
+
+typedef        union {
+       unsigned int word;
+       struct {
+               unsigned int valid      : 1;
+               unsigned int segment_id : 24;
+               unsigned int hash_id    : 1;
+               unsigned int page_index : 6; /* Abbreviated */
+       } bits;
+       struct {
+               unsigned int valid      : 1;
+               unsigned int not_used   : 5;
+               unsigned int segment_id : 19; /* Least Sig 19 bits */
+               unsigned int hash_id    : 1;
+               unsigned int page_index : 6;
+       } hash_bits;
+} pte0_t;
+
+typedef        union {
+       unsigned int word;
+       struct {
+               unsigned int phys_page  : 20;
+               unsigned int reserved3  : 3;
+               unsigned int referenced : 1;
+               unsigned int changed    : 1;
+               unsigned int wimg       : 4;
+               unsigned int reserved1  : 1;
+               unsigned int protection : 2;
+       } bits;
+} pte1_t;
+
+typedef struct pte_t {
+       pte0_t pte0;
+       pte1_t pte1;
+} pte_t;
+
+/*
+ * A virtual address is decoded into various parts when looking for its PTE
+ */
+
+typedef struct va_full_t {
+       unsigned int seg_num    : 4;
+       unsigned int page_index : 16;
+       unsigned int byte_ofs   : 12;
+} va_full_t;
+
+typedef struct va_abbrev_t { /* use bits.abbrev for abbreviated page index */
+       unsigned int seg_num    : 4;
+       unsigned int page_index : 6;
+       unsigned int junk       : 10;
+       unsigned int byte_ofs   : 12;
+} va_abbrev_t;
+
+typedef union {
+       unsigned int word;
+       va_full_t    full;
+       va_abbrev_t  abbrev;
+} virtual_addr_t;
+
+/* A physical address can be split up into page and offset */
+
+typedef struct pa_t {
+       unsigned int page_no : 20;
+       unsigned int offset  : 12;
+} pa_t;
+
+typedef union {
+       unsigned int word;
+       pa_t         bits;
+} physical_addr_t;
 
 /*
  * C-helper inline functions for accessing machine registers follow.
  */
 
 
+#ifdef __ELF__
+#define        __CASMNL__      ";"
+#else
+#define        __CASMNL__ "@"
+#endif
+
+/* Return the current GOT pointer */
+
+extern unsigned int get_got(void);
+
+extern __inline__ unsigned int get_got(void)
+{
+        unsigned int result;
+#ifndef __ELF__
+        __asm__ volatile("mr %0,       r2" : "=r" (result));
+#else
+        __asm__ volatile("mr %0,       2" : "=r" (result));
+#endif
+        return result;
+}
+
 /*
  * Various memory/IO synchronisation instructions
  */
         __asm__ volatile("isync")
 
 
+/*
+ *             This guy will make sure all tlbs on all processors finish their tlbies
+ */
+#define tlbsync() \
+        __asm__ volatile("tlbsync")
+
+
+               /*      Invalidate TLB entry. Caution, requires context synchronization.
+               */
+extern void tlbie(unsigned int val);
+
+extern __inline__ void tlbie(unsigned int val)
+{
+        __asm__ volatile("tlbie %0" : : "r" (val));
+        return;
+}
+
+
+
 /*
  * Access to various system registers
  */
@@ -279,6 +477,54 @@ extern __inline__ unsigned int mfmsr(void)
         return result;
 }
 
+/* mtsr and mfsr must be macros since SR must be hardcoded */
+
+#if __ELF__
+#define mtsr(SR, REG)                                                       \
+       __asm__ volatile("sync" __CASMNL__ "mtsr %0, %1 " __CASMNL__ "isync" : : "i" (SR), "r" (REG));
+#define mfsr(REG, SR) \
+       __asm__ volatile("mfsr %0, %1" : "=r" (REG) : "i" (SR));
+#else
+#define mtsr(SR, REG)                                                       \
+       __asm__ volatile("sync" __CASMNL__ "mtsr sr%0, %1 " __CASMNL__ "isync" : : "i" (SR), "r" (REG)); 
+
+#define mfsr(REG, SR) \
+       __asm__ volatile("mfsr %0, sr%1" : "=r" (REG) : "i" (SR));
+#endif
+
+
+extern void mtsrin(unsigned int val, unsigned int reg);
+
+extern __inline__ void mtsrin(unsigned int val, unsigned int reg)
+{
+        __asm__ volatile("sync" __CASMNL__ "mtsrin %0, %1" __CASMNL__ " isync" : : "r" (val), "r" (reg));
+        return;
+}
+
+extern unsigned int mfsrin(unsigned int reg);
+
+extern __inline__ unsigned int mfsrin(unsigned int reg)
+{
+       unsigned int result;
+        __asm__ volatile("mfsrin %0, %1" : "=r" (result) : "r" (reg));
+        return result;
+}
+
+extern void mtsdr1(unsigned int val);
+
+extern __inline__ void mtsdr1(unsigned int val)
+{
+        __asm__ volatile("mtsdr1 %0" : : "r" (val));
+        return;
+}
+
+extern void mtdar(unsigned int val);
+
+extern __inline__ void mtdar(unsigned int val)
+{
+        __asm__ volatile("mtdar %0" : : "r" (val));
+        return;
+}
 
 extern unsigned int mfdar(void);
 
@@ -297,6 +543,23 @@ extern __inline__ void mtdec(unsigned int val)
         return;
 }
 
+extern int isync_mfdec(void);
+
+extern __inline__ int isync_mfdec(void)
+{
+        int result;
+        __asm__ volatile("isync" __CASMNL__ "mfdec %0" : "=r" (result));
+        return result;
+}
+
+/* Read and write the value from the real-time clock
+ * or time base registers. Note that you have to
+ * use the right ones depending upon being on
+ * 601 or 603/604. Care about carries between
+ * the words and using the right registers must be
+ * done by the calling function.
+ */
+
 extern void mttb(unsigned int val);
 
 extern __inline__ void mttb(unsigned int val)
@@ -331,6 +594,48 @@ extern __inline__ unsigned int mftbu(void)
         return result;
 }
 
+extern void mtrtcl(unsigned int val);
+
+extern __inline__ void mtrtcl(unsigned int val)
+{
+        __asm__ volatile("mtspr  21,%0" : : "r" (val));
+        return;
+}
+
+extern unsigned int mfrtcl(void);
+
+extern __inline__ unsigned int mfrtcl(void)
+{
+        unsigned int result;
+        __asm__ volatile("mfspr %0,5" : "=r" (result));
+        return result;
+}
+
+extern void mtrtcu(unsigned int val);
+
+extern __inline__ void mtrtcu(unsigned int val)
+{
+        __asm__ volatile("mtspr 20,%0" : : "r" (val));
+        return;
+}
+
+extern unsigned int mfrtcu(void);
+
+extern __inline__ unsigned int mfrtcu(void)
+{
+        unsigned int result;
+        __asm__ volatile("mfspr %0,4" : "=r" (result));
+        return result;
+}
+
+extern void mtl2cr(unsigned int val);
+
+extern __inline__ void mtl2cr(unsigned int val)
+{
+  __asm__ volatile("mtspr l2cr, %0" : : "r" (val));
+  return;
+}
+
 extern unsigned int mfl2cr(void);
 
 extern __inline__ unsigned int mfl2cr(void)
@@ -388,6 +693,18 @@ extern unsigned long   mfsda(void);
 
 /* macros since the argument n is a hard-coded constant */
 
+#define mtibatu(n, reg) __asm__ volatile("mtibatu " # n ", %0" : : "r" (reg))
+#define mtibatl(n, reg) __asm__ volatile("mtibatl " # n ", %0" : : "r" (reg))
+
+#define mtdbatu(n, reg) __asm__ volatile("mtdbatu " # n ", %0" : : "r" (reg))
+#define mtdbatl(n, reg) __asm__ volatile("mtdbatl " # n ", %0" : : "r" (reg))
+
+#define mfibatu(reg, n) __asm__ volatile("mfibatu %0, " # n : "=r" (reg))
+#define mfibatl(reg, n) __asm__ volatile("mfibatl %0, " # n : "=r" (reg))
+
+#define mfdbatu(reg, n) __asm__ volatile("mfdbatu %0, " # n : "=r" (reg))
+#define mfdbatl(reg, n) __asm__ volatile("mfdbatl %0, " # n : "=r" (reg))
+
 #define mtsprg(n, reg)  __asm__ volatile("mtsprg  " # n ", %0" : : "r" (reg))
 #define mfsprg(reg, n)  __asm__ volatile("mfsprg  %0, " # n : "=r" (reg))
 
index ae0df313a1d609fdc64d89310a4d95926f15158a..2df172cfb96a9682a62dabb08d8d5c5346768bb6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -44,7 +41,6 @@
 #include <kern/spl.h>
 
 #include <machine/mach_param.h>        /* HZ */
-#include <machine/commpage.h>
 #include <ppc/proc_reg.h>
 
 #include <pexpert/pexpert.h>
@@ -124,9 +120,6 @@ static boolean_t            rtclock_initialized;
 static uint64_t                        rtclock_tick_deadline[NCPUS];
 static uint64_t                        rtclock_tick_interval;
 
-static uint32_t                        rtclock_sec_divisor;
-static uint32_t                        rtclock_ns_per_tick;
-
 static void            timespec_to_absolutetime(
                                                        mach_timespec_t         timespec,
                                                        uint64_t                        *result);
@@ -188,9 +181,6 @@ timebase_callback(
        LOCK_RTC(s);
        rtclock.timebase_const.numer = numer;
        rtclock.timebase_const.denom = denom;
-    rtclock_sec_divisor = freq->timebase_num / freq->timebase_den;
-    rtclock_ns_per_tick = NSEC_PER_SEC / rtclock_sec_divisor;
-    commpage_set_timestamp(0,0,0,0);
        UNLOCK_RTC(s);
 }
 
@@ -568,62 +558,6 @@ calend_init(void)
        return (1);
 }
 
-/*
- * Get the current clock microtime and sync the timestamp
- * on the commpage.  Only called from ppc_gettimeofday(),
- * ie in response to a system call from user mode.
- */
-void
-clock_gettimeofday(
-       uint32_t                        *secp,
-       uint32_t                        *usecp)
-{
-       uint64_t                        now;
-    UnsignedWide               wide_now;
-       UnsignedWide            t64;
-       uint32_t                        t32;
-       uint32_t                        numer, denom;
-    uint32_t                   secs,usecs;
-    mach_timespec_t            curr_time;
-       spl_t                           s;
-
-       LOCK_RTC(s);
-       if (!rtclock.calend_is_set) {
-               UNLOCK_RTC(s);
-               return;
-       }
-
-       numer = rtclock.timebase_const.numer;
-       denom = rtclock.timebase_const.denom;
-
-       clock_get_uptime(&now);
-    wide_now = *((UnsignedWide*) &now);
-
-       umul_64by32(wide_now, numer, &t64, &t32);
-
-       udiv_96by32(t64, t32, denom, &t64, &t32);
-
-       udiv_96by32to32and32(t64, t32, NSEC_PER_SEC,
-                                                               &curr_time.tv_sec, &curr_time.tv_nsec);
-
-       ADD_MACH_TIMESPEC(&curr_time, &rtclock.calend_offset);
-    
-       secs = curr_time.tv_sec;
-       usecs = curr_time.tv_nsec / NSEC_PER_USEC;
-    *secp = secs;
-    *usecp = usecs;
-
-    t32 = curr_time.tv_nsec - (usecs * NSEC_PER_USEC);
-    t32 = t32 / rtclock_ns_per_tick;
-    now -= t32;
-
-    commpage_set_timestamp(now,secs,usecs,rtclock_sec_divisor);
-    
-       UNLOCK_RTC(s);
-
-       return;
-} 
-
 /*
  * Get the current clock time.
  */
@@ -661,7 +595,6 @@ calend_settime(
        rtclock.calend_offset = *new_time;
        SUB_MACH_TIMESPEC(&rtclock.calend_offset, &curr_time);
        rtclock.calend_is_set = TRUE;
-    commpage_set_timestamp(0,0,0,0);  /* disable timestamp */
        UNLOCK_RTC(s);
 
        PESetGMTTimeOfDay(new_time->tv_sec);
@@ -709,10 +642,8 @@ clock_adjust_calendar(
        spl_t           s;
 
        LOCK_RTC(s);
-       if (rtclock.calend_is_set) {
+       if (rtclock.calend_is_set)
                ADD_MACH_TIMESPEC_NSEC(&rtclock.calend_offset, nsec);
-        commpage_set_timestamp(0,0,0,0);  /* disable timestamp */
-    }
        UNLOCK_RTC(s);
 }
 
@@ -732,7 +663,6 @@ clock_initialize_calendar(void)
        rtclock.calend_offset.tv_nsec = 0;
        SUB_MACH_TIMESPEC(&rtclock.calend_offset, &curr_time);
        rtclock.calend_is_set = TRUE;
-    commpage_set_timestamp(0,0,0,0);  /* disable timestamp */
        UNLOCK_RTC(s);
 }
 
index af1ae6e7e3d4ad499d379e8b2e815ce9d8e122d0..1b59e82ccb8474cff0a8dd2a70a68529019526e8 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -47,6 +44,7 @@
 #include <ppc/proc_reg.h>
 #include <ppc/mem.h>
 #include <ppc/pmap.h>
+#include <ppc/pmap_internals.h>
 #include <ppc/Firmware.h>
 #include <ppc/mappings.h>
 #include <ppc/exception.h>
@@ -125,26 +123,25 @@ unsigned int      backchain = 0;                                                                  /* Debug flag */
  *             Allocate our initial context save areas.  As soon as we do this,
  *             we can take an interrupt. We do the saveareas here, 'cause they're guaranteed
  *             to be at least page aligned.
- *
- *             Note: these initial saveareas are all to be allocated from V=R, less than 4GB
- *             space.
  */
 
 
-void savearea_init(vm_offset_t addr) {
+void savearea_init(vm_offset_t *addrx) {
 
-       savearea_comm   *savec;
-       vm_offset_t     save;
+       savearea_comm   *savec, *savec2, *saveprev;
+       vm_offset_t             save, save2, addr;
        int i;
 
        
        saveanchor.savetarget   = InitialSaveTarget;            /* Initial target value */
        saveanchor.saveinuse    = 0;                                            /* Number of areas in use */
 
-       saveanchor.savefree    = 0;                                                     /* Remember the start of the free chain */
+       saveanchor.savefree = 0;                                                        /* Remember the start of the free chain */
        saveanchor.savefreecnt = 0;                                                     /* Remember the length */
-       saveanchor.savepoolfwd = (addr64_t)&saveanchor;         /* Remember pool forward */
-       saveanchor.savepoolbwd = (addr64_t)&saveanchor;         /* Remember pool backward */
+       saveanchor.savepoolfwd = (unsigned int *)&saveanchor;   /* Remember pool forward */
+       saveanchor.savepoolbwd = (unsigned int *)&saveanchor;   /* Remember pool backward */
+
+       addr = *addrx;                                                                          /* Make this easier for ourselves */
 
        save =  addr;                                                                           /* Point to the whole block of blocks */        
 
@@ -153,7 +150,7 @@ void savearea_init(vm_offset_t addr) {
  */
 
 
-       for(i=0; i < BackPocketSaveBloks; i++) {                        /* Initialize the back pocket saveareas */
+       for(i=0; i < 8; i++) {                                                          /* Initialize the back pocket saveareas */
 
                savec = (savearea_comm *)save;                                  /* Get the control area for this one */
 
@@ -161,7 +158,7 @@ void savearea_init(vm_offset_t addr) {
                savec->sac_vrswap = 0;                                                  /* V=R, so the translation factor is 0 */
                savec->sac_flags = sac_perm;                                    /* Mark it permanent */
                savec->sac_flags |= 0x0000EE00;                                 /* Debug eyecatcher */
-               save_queue((uint32_t)savec >> 12);                              /* Add page to savearea lists */
+               save_queue((savearea *)savec);                                  /* Add page to savearea lists */
                save += PAGE_SIZE;                                                              /* Jump up to the next one now */
        
        }
@@ -178,8 +175,8 @@ void savearea_init(vm_offset_t addr) {
        saveanchor.savefree = 0;                                                        /* Remember the start of the free chain */
        saveanchor.savefreecnt = 0;                                                     /* Remember the length */
        saveanchor.saveadjust = 0;                                                      /* Set none needed yet */
-       saveanchor.savepoolfwd = (addr64_t)&saveanchor;         /* Remember pool forward */
-       saveanchor.savepoolbwd = (addr64_t)&saveanchor;         /* Remember pool backward */
+       saveanchor.savepoolfwd = (unsigned int *)&saveanchor;   /* Remember pool forward */
+       saveanchor.savepoolbwd = (unsigned int *)&saveanchor;   /* Remember pool backward */
 
        for(i=0; i < InitialSaveBloks; i++) {                           /* Initialize the saveareas */
 
@@ -189,37 +186,40 @@ void savearea_init(vm_offset_t addr) {
                savec->sac_vrswap = 0;                                                  /* V=R, so the translation factor is 0 */
                savec->sac_flags = sac_perm;                                    /* Mark it permanent */
                savec->sac_flags |= 0x0000EE00;                                 /* Debug eyecatcher */
-               save_queue((uint32_t)savec >> 12);                              /* Add page to savearea lists */
+               save_queue((savearea *)savec);                                  /* Add page to savearea lists */
                save += PAGE_SIZE;                                                              /* Jump up to the next one now */
        
        }
 
+       *addrx = save;                                                                          /* Move the free storage lowwater mark */
+
 /*
  *     We now have a free list that has our initial number of entries  
  *     The local qfret lists is empty.  When we call save_get below it will see that
  *     the local list is empty and fill it for us.
  *
- *     It is ok to call save_get here because all initial saveareas are V=R in less
- *  than 4GB space, so 32-bit addressing is ok.
- *
+ *     It is ok to call save_get_phys here because even though if we are translation on, we are still V=R and
+ *     running with BAT registers so no interruptions.  Regular interruptions will be off.  Using save_get
+ *     would be wrong if the tracing was enabled--it would cause an exception.
  */
 
-/*
- * This will populate the local list  and get the first one for the system
- */    
-       per_proc_info[0].next_savearea = (vm_offset_t)save_get();
-
+       save2 = (vm_offset_t)save_get_phys();                           /* This will populate the local list  
+                                                                                                                  and get the first one for the system */
+       per_proc_info[0].next_savearea = (unsigned int)save2; /* Tell the exception handler about it */
+       
 /*
  *     The system is now able to take interruptions
  */
+       
        return;
+
 }
 
 
 
 
 /*
- *             Obtains a savearea.  If the free list needs size adjustment it happens here.
+ *             Returns a savearea.  If the free list needs size adjustment it happens here.
  *             Don't actually allocate the savearea until after the adjustment is done.
  */
 
@@ -267,10 +267,8 @@ void save_release(struct savearea *save) {                         /* Release a save area */
 
 void save_adjust(void) {
        
-       savearea_comm   *sctl, *sctlnext, *freepage;
+       savearea_comm   *sctl, *sctlnext, *freepool, *freepage, *realpage;
        kern_return_t ret;
-       uint64_t vtopmask;
-       ppnum_t physpage;
 
        if(saveanchor.saveadjust < 0)                                   {       /* Do we need to adjust down? */
                        
@@ -293,18 +291,15 @@ void save_adjust(void) {
                                panic("Whoops...  Not a bit of wired memory left for saveareas\n");
                        }
                        
-                       physpage = pmap_find_phys(kernel_pmap, (vm_offset_t)freepage);  /* Find physical page */
-                       if(!physpage) {                                                         /* See if we actually have this mapped*/
-                               panic("save_adjust: wired page not mapped - va = %08X\n", freepage);    /* Die */
-                       }
+                       realpage = (savearea_comm *)pmap_extract(kernel_pmap, (vm_offset_t)freepage);   /* Get the physical */
                        
                        bzero((void *)freepage, PAGE_SIZE);                     /* Clear it all to zeros */
                        freepage->sac_alloc = 0;                                        /* Mark all entries taken */
-                       freepage->sac_vrswap = ((uint64_t)physpage << 12) ^ (uint64_t)freepage; /* XOR to calculate conversion mask */
+                       freepage->sac_vrswap = (unsigned int)freepage ^ (unsigned int)realpage;         /* Form mask to convert V to R and vice versa */
        
                        freepage->sac_flags |= 0x0000EE00;                      /* Set debug eyecatcher */
                                                
-                       save_queue(physpage);                                           /* Add all saveareas on page to free list */
+                       save_queue((savearea *)realpage);                       /* Add all saveareas on page to free list */
                }
        }
 }
index 6710b8eb88c1ebf276fbac75dd2fc436a88ca831..554cd2bb8afe872f4adae9c41efb610727ffa945 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #ifdef __APPLE_API_PRIVATE
 
 #ifdef MACH_KERNEL_PRIVATE
-#include <stdint.h>
-#include <mach/vm_types.h>
-
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
+#include <mach/ppc/vm_types.h>
 typedef struct savearea_comm {
 
 /*
@@ -48,35 +42,32 @@ typedef struct savearea_comm {
  */
 
 
-/*     Keep the save_prev, sac_next, and sac_prev in these positions, some assembler code depends upon it to
+/*     Keep the save_prev, sac_next, and sac_prev in these positions, some assemble code depends upon it to
  *     match up with fields in saveanchor.
  */
-                                                /* offset 0x000 */
-       addr64_t                save_prev;                                      /* The address of the previous (or next) savearea */
-       addr64_t                sac_next;                                       /* Points to next savearea page that has a free slot  - real */
-       addr64_t                sac_prev;                                       /* Points to previous savearea page that has a free slot  - real */
+       struct savearea *save_prev;                                     /* The address of the previous (or next) savearea */
+       unsigned int    *sac_next;                                      /* Points to next savearea page that has a free slot  - real */
+       unsigned int    *sac_prev;                                      /* Points to previous savearea page that has a free slot  - real */
+       unsigned int    save_flags;                                     /* Various flags */
        unsigned int    save_level;                                     /* Context ID */
-       unsigned int    save_01C;
-
-                                                                                               /*       0x20 */
        unsigned int    save_time[2];                           /* Context save time - for debugging or performance */
        struct thread_activation        *save_act;              /* Associated activation  */
-    unsigned int       save_02c;
-       uint64_t                sac_vrswap;                                     /* XOR mask to swap V to R or vice versa */
-       unsigned int    save_flags;                                     /* Various flags */
-       unsigned int    sac_flags;                                      /* Various flags */
-    
-                                                /* offset 0x040 */
-       uint64_t                save_misc0;                                     /* Various stuff */
-       uint64_t                save_misc1;                                     /* Various stuff */
+
+/*                                                 0x20 */
+
+       unsigned int    sac_vrswap;                                     /* XOR mask to swap V to R or vice versa */
        unsigned int    sac_alloc;                                      /* Bitmap of allocated slots */
-    unsigned int       save_054;
-    unsigned int       save_misc2;
-    unsigned int       save_misc3;
+       unsigned int    sac_flags;                                      /* Various flags */
+       unsigned int    save_misc0;                                     /* Various stuff */
+       unsigned int    save_misc1;                                     /* Various stuff */
+       unsigned int    save_misc2;                                     /* Various stuff */
+       unsigned int    save_misc3;                                     /* Various stuff */
+       unsigned int    save_misc4;                                     /* Various stuff */
+
+       unsigned int    save_040[8];                            /* Fill 32 bytes */
 
                                                                                                /* offset 0x0060 */
 } savearea_comm;
-#pragma pack()
 #endif
 
 #ifdef BSD_KERNEL_PRIVATE
@@ -90,91 +81,107 @@ typedef struct savearea_comm {
  *     This type of savearea contains all of the general context.
  */
  
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
 typedef struct savearea {
 
        savearea_comm   save_hdr;                                       /* Stuff common to all saveareas */
 
        unsigned int    save_060[8];                            /* Fill 32 bytes */
-
-                                                /* offset 0x0080 */
-       uint64_t                save_r0;
-       uint64_t                save_r1;
-       uint64_t                save_r2;
-       uint64_t                save_r3;
-                                                /* offset 0x0A0 */
-       uint64_t                save_r4;
-       uint64_t                save_r5;
-       uint64_t                save_r6;
-       uint64_t                save_r7;
-                                                /* offset 0x0C0 */
-       uint64_t                save_r8;
-       uint64_t                save_r9;
-       uint64_t                save_r10;
-       uint64_t                save_r11;
-                                                /* offset 0x0E0 */
-       uint64_t                save_r12;
-       uint64_t                save_r13;
-       uint64_t                save_r14;
-       uint64_t                save_r15;
-                                                /* offset 0x100 */
-       uint64_t                save_r16;
-       uint64_t                save_r17;
-       uint64_t                save_r18;
-       uint64_t                save_r19;
-                                                /* offset 0x120 */
-       uint64_t                save_r20;
-       uint64_t                save_r21;
-       uint64_t                save_r22;
-       uint64_t                save_r23;
-                                                /* offset 0x140 */
-       uint64_t                save_r24;
-       uint64_t                save_r25;
-       uint64_t                save_r26;       
-       uint64_t                save_r27;
-                                                /* offset 0x160 */
-       uint64_t                save_r28;
-       uint64_t                save_r29;
-       uint64_t                save_r30;
-       uint64_t                save_r31;
-                                                /* offset 0x180 */
-       uint64_t                save_srr0;
-       uint64_t                save_srr1;
-       uint64_t                save_xer;
-       uint64_t                save_lr;
-                                                /* offset 0x1A0 */
-       uint64_t                save_ctr;
-       uint64_t                save_dar;
+                                                                                               /* offset 0x0080 */
+       unsigned int    save_r0;
+       unsigned int    save_r1;
+       unsigned int    save_r2;
+       unsigned int    save_r3;
+       unsigned int    save_r4;
+       unsigned int    save_r5;
+       unsigned int    save_r6;
+       unsigned int    save_r7;
+       
+                                                                                               /* offset 0x0A0 */
+       unsigned int    save_r8;
+       unsigned int    save_r9;
+       unsigned int    save_r10;
+       unsigned int    save_r11;
+       unsigned int    save_r12;
+       unsigned int    save_r13;
+       unsigned int    save_r14;
+       unsigned int    save_r15;
+       
+                                                                                               /* offset 0x0C0 */
+       unsigned int    save_r16;
+       unsigned int    save_r17;
+       unsigned int    save_r18;
+       unsigned int    save_r19;
+       unsigned int    save_r20;
+       unsigned int    save_r21;
+       unsigned int    save_r22;
+       unsigned int    save_r23;
+       
+                                                                                               /* offset 0x0E0 */
+       unsigned int    save_r24;
+       unsigned int    save_r25;
+       unsigned int    save_r26;       
+       unsigned int    save_r27;
+       unsigned int    save_r28;
+       unsigned int    save_r29;
+       unsigned int    save_r30;
+       unsigned int    save_r31;
+       
+                                                                                               /* offset 0x100 */
+       unsigned int    save_srr0;
+       unsigned int    save_srr1;
        unsigned int    save_cr;
+       unsigned int    save_xer;
+       unsigned int    save_lr;
+       unsigned int    save_ctr;
+       unsigned int    save_dar;
        unsigned int    save_dsisr;
-       unsigned int    save_exception; 
-       unsigned int    save_vrsave;
-                                                /* offset 0x1C0 */
-       unsigned int    save_vscr[4];
+                       
+
+                                                                                               /* offset 0x120 */
+       unsigned int    save_vscr[4];   
        unsigned int    save_fpscrpad;
        unsigned int    save_fpscr;
-    unsigned int       save_1d8[2];
-                                                /* offset 0x1E0 */
+       unsigned int    save_exception;
+       unsigned int    save_vrsave;
+
+                                                                                               /* offset 0x140 */
+       unsigned int    save_sr0;
+       unsigned int    save_sr1;
+       unsigned int    save_sr2;
+       unsigned int    save_sr3;
+       unsigned int    save_sr4;
+       unsigned int    save_sr5;
+       unsigned int    save_sr6;
+       unsigned int    save_sr7;
+
+                                                                                               /* offset 0x160 */
+       unsigned int    save_sr8;
+       unsigned int    save_sr9;
+       unsigned int    save_sr10;
+       unsigned int    save_sr11;
+       unsigned int    save_sr12;
+       unsigned int    save_sr13;
+       unsigned int    save_sr14;
+       unsigned int    save_sr15;
+
+                                                                                               /* offset 0x180 */
+       unsigned int    save_180[8];
+       unsigned int    save_1A0[8];
+       unsigned int    save_1C0[8];
        unsigned int    save_1E0[8];
-                                                /* offset 0x200 - keep on 128 byte bndry */
-    uint32_t        save_pmc[8]; 
-    uint64_t        save_mmcr0;                                        /* offset 0x220 */
-    uint64_t        save_mmcr1;
-    uint64_t        save_mmcr2;
-
-       unsigned int    save_238[2];
-                                                                                               /* offset 0x240 */
-       unsigned int    save_instr[16];                         /* Instrumentation */
+       unsigned int    save_200[8];
+       unsigned int    save_220[8];
+       unsigned int    save_240[8];
+       unsigned int    save_260[8];
+
                                                                                                /* offset 0x280 */
 } savearea;
-#pragma pack()
 
 
 /*
  *     This type of savearea contains all of the floating point context.
  */
  
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
 typedef struct savearea_fpu {
 
        savearea_comm   save_hdr;                                       /* Stuff common to all saveareas */
@@ -232,7 +239,6 @@ typedef struct savearea_fpu {
 
                                                                                                /* offset 0x280 */
 } savearea_fpu;
-#pragma pack()
 
        
 
@@ -240,7 +246,6 @@ typedef struct savearea_fpu {
  *     This type of savearea contains all of the vector context.
  */
  
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
 typedef struct savearea_vec {
 
        savearea_comm   save_hdr;                                       /* Stuff common to all saveareas */
@@ -284,12 +289,10 @@ typedef struct savearea_vec {
 
                                                                                                /* offset 0x280 */
 } savearea_vec;
-#pragma pack()
 #endif /* MACH_KERNEL_PRIVATE || BSD_KERNEL_PRIVATE */
 
 #ifdef MACH_KERNEL_PRIVATE
 
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
 struct Saveanchor {
 
 /*     
@@ -298,24 +301,20 @@ struct Saveanchor {
  *     updated with translation and interrupts disabled. This is because it is 
  *     locked during exception processing and if we were to take a PTE miss while the
  *     lock were held, well, that would be very bad now wouldn't it? 
- *  Note that the first 24 bytes must be the same format as a savearea header.
  */
 
-       unsigned int                    savelock;               /* 000 Lock word for savearea free list manipulation */
-    int                                                saveRSVD4;              /* 004 reserved */
-       addr64_t                                savepoolfwd;    /* 008 Forward anchor for the free pool */
-       addr64_t                                savepoolbwd;    /* 010 Backward anchor for the free pool */
-       volatile addr64_t               savefree;               /* 018 Anchor for the global free list */
-       volatile unsigned int   savefreecnt;    /* 020 Number of saveareas on global free list */
-       volatile int                    saveadjust;             /* 024 If 0 number of saveareas is ok, otherwise # to change (pos means grow, neg means shrink */
-       volatile int                    saveinuse;              /* 028 Number of areas in use counting those on the local free list */
-       volatile int                    savetarget;             /* 02C Number of savearea's needed */
-       int                                             savemaxcount;   /* 030 Maximum saveareas ever allocated */
-       unsigned int                    saveRSVD034[3]; /* 034 reserved */
-/*                                                                                        040 */
+       unsigned int    savelock;                               /* Lock word for savearea free list manipulation */
+       unsigned int    *savepoolfwd;                   /* Forward anchor for the free pool */
+       unsigned int    *savepoolbwd;                   /* Backward anchor for the free pool */
+       volatile unsigned int   savefree;               /* Anchor for the global free list */
+       volatile unsigned int   savefreecnt;    /* Number of saveareas on global free list */
+       volatile int    saveadjust;                             /* If 0 number of saveareas is ok, otherwise number to change (positive means grow, negative means shrink */
+       volatile int    saveinuse;                              /* Number of areas in use counting those on the local free list */
+       volatile int    savetarget;                             /* Number of savearea's needed */
+       int                             savemaxcount;                   /* Maximum saveareas ever allocated */
+
 
 };
-#pragma pack()
 
 
 #define sac_cnt                (4096 / sizeof(savearea))       /* Number of saveareas per page */
@@ -333,24 +332,20 @@ struct Saveanchor {
 #define InitialSaveAreas       (2 * FreeListMin)       /* The number of saveareas to make at boot time */
 #define InitialSaveTarget      FreeListMin             /* The number of saveareas for an initial target. This should be the minimum ever needed. */
 #define        InitialSaveBloks        (InitialSaveAreas + sac_cnt - 1) / sac_cnt      /* The number of savearea blocks to allocate at boot */
-#define BackPocketSaveBloks    8                               /* Number of pages of back pocket saveareas */
-
-void                   save_queue(ppnum_t);            /* Add a new savearea block to the free list */
-addr64_t               save_get_init(void);            /* special savearea-get for cpu initialization (returns physical address) */
-struct savearea        *save_get(void);                        /* Obtains a savearea from the free list (returns virtual address) */
-reg64_t                        save_get_phys_32(void);         /* Obtains a savearea from the free list (returns phys addr in r3) */
-reg64_t                        save_get_phys_64(void);         /* Obtains a savearea from the free list (returns phys addr in r3) */
-struct savearea        *save_alloc(void);                      /* Obtains a savearea and allocates blocks if needed */
-struct savearea        *save_cpv(addr64_t);            /* Converts a physical savearea address to virtual */
-void                   save_ret(struct savearea *);    /* Returns a savearea to the free list by virtual address */
-void                   save_ret_wMSR(struct savearea *, reg64_t);      /* returns a savearea and restores an MSR */
-void                   save_ret_phys(reg64_t);         /* Returns a savearea to the free list by physical address */
-void                   save_adjust(void);                      /* Adjust size of the global free list */
-struct savearea_comm   *save_trim_free(void);  /* Remove free pages from savearea pool */
-int                            save_recover(void);                     /* returns nonzero if we can recover enough from the free pool */
-void                   savearea_init(vm_offset_t addr);        /* Boot-time savearea initialization */
 
 
+void                   save_release(struct savearea *);        /* Release a save area  */
+struct savectl *save_dequeue(void);                    /* Find and dequeue one that is all empty */
+unsigned int   save_queue(struct savearea *);  /* Add a new savearea block to the free list */
+struct savearea        *save_get(void);                                /* Obtains a savearea from the free list (returns virtual address) */
+struct savearea        *save_get_phys(void);                   /* Obtains a savearea from the free list (returns physical address) */
+struct savearea        *save_alloc(void);                              /* Obtains a savearea and allocates blocks if needed */
+struct savearea        *save_cpv(struct savearea *);   /* Converts a physical savearea address to virtual */
+void                   save_ret(struct savearea *);    /* Returns a savearea to the free list */
+void                   save_ret_phys(struct savearea *);       /* Returns a savearea to the free list */
+void                   save_adjust(void);                              /* Adjust size of the global free list */
+struct savearea_comm   *save_trim_freet(void);                 /* Remove free pages from savearea pool */
+
 #endif /* MACH_KERNEL_PRIVATE */
 #endif /* __APPLE_API_PRIVATE */
 
@@ -360,9 +355,6 @@ void                        savearea_init(vm_offset_t addr);        /* Boot-time savearea initialization */
 #define SAVrststk      0x00010000                              /* Indicates that the current stack should be reset to empty */
 #define SAVsyscall     0x00020000                              /* Indicates that the savearea is associated with a syscall */
 #define SAVredrive     0x00040000                              /* Indicates that the low-level fault handler associated */
-#define SAVredriveb    13                                              /* Indicates that the low-level fault handler associated */
-#define        SAVinstrument 0x00080000                        /* Indicates that we should return instrumentation data */
-#define        SAVinstrumentb 12                                       /* Indicates that we should return instrumentation data */
 #define SAVtype                0x0000FF00                              /* Shows type of savearea */
 #define SAVtypeshft    8                                               /* Shift to position type */
 #define SAVempty       0x86                                    /* Savearea is on free list */
@@ -370,6 +362,4 @@ void                        savearea_init(vm_offset_t addr);        /* Boot-time savearea initialization */
 #define SAVfloat       0x02                                    /* Savearea contains floating point context */
 #define SAVvector      0x03                                    /* Savearea contains vector context */
 
-
-
 #endif /* _PPC_SAVEAREA_H_ */
index fe332b8640a3a557eec06398d02e581cccc8f513..d3891b01978e2c7649472cd064b95e29a7b6297a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #include <ppc/exception.h>
 #include <ppc/Performance.h>
 #include <ppc/exception.h>
+#include <ppc/pmap_internals.h>
 #include <ppc/savearea.h>
 #include <mach/ppc/vm_param.h>
        
                        .text
 
-/* Register usage conventions in this code:
- *     r9 = return address
- * r10 = per-proc ptr
- * r11 = MSR at entry
- * cr6 = feature flags (ie, pf64Bit)
- *
- * Because much of this code deals with physical addresses,
- * there are parallel paths for 32- and 64-bit machines.
- */
 /*
- * ***********************
- * * s a v e _ q u e u e *
- * ***********************
- *
- *     void save_queue(ppnum_t pagenum);
- *
  *                     This routine will add a savearea block to the free list.
+ *                     Note really well: we can take NO exceptions of any kind,
+ *                     including a PTE miss once the savearea lock is held. That's
+ *                     a guaranteed deadlock.  That means we must disable for interrutions
+ *                     and turn all translation off.
+ *
  *                     We also queue the block to the free pool list.  This is a
  *                     circular double linked list. Because this block has no free entries,
  *                     it gets queued to the end of the list
+ *
  */
+
                        .align  5
                        .globl  EXT(save_queue)
 
 LEXT(save_queue)
-            mflr       r9                                                      ; get return address
-            mr         r8,r3                                           ; move pagenum out of the way
-            bl         saveSetup                                       ; turn translation off, 64-bit on, load many regs
-            bf--       pf64Bitb,saveQueue32            ; skip if 32-bit processor
-            
-            sldi       r2,r8,12                                        ; r2 <-- phys address of page
-                       li              r8,sac_cnt                                      ; Get the number of saveareas per page
-                       mr              r4,r2                                           ; Point to start of chain
-                       li              r0,SAVempty                                     ; Get empty marker
 
-saveQueue64a:  
-            addic.     r8,r8,-1                                        ; Keep track of how many we did
-                       stb             r0,SAVflags+2(r4)                       ; Set empty
-                       addi    r7,r4,SAVsize                           ; Point to the next slot
-                       ble-    saveQueue64b                            ; We are done with the chain
-                       std             r7,SAVprev(r4)                          ; Set this chain
-                       mr              r4,r7                                           ; Step to the next
-                       b               saveQueue64a                            ; Fill the whole block...
-
-saveQueue64b:
-                       bl              savelock                                        ; Go lock the save anchor 
+                       mfsprg  r9,2                                            ; Get the feature flags
+                       mr              r11,r3                                          ; Save the block
+                       mtcrf   0x04,r9                                         ; Set the features                      
+                       mfmsr   r12                                                     ; Get the MSR
+                       rlwinm  r12,r12,0,MSR_FP_BIT+1,MSR_FP_BIT-1     ; Force floating point off
+                       rlwinm  r12,r12,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1   ; Force vectors off
+                       lis             r10,hi16(EXT(saveanchor))       ; Get the high part of the anchor
+                       andi.   r3,r12,0x7FCF                           ; Turn off all translation and rupts
+                       ori             r10,r10,lo16(EXT(saveanchor))   ; Bottom half of the anchor 
+
+                       bt              pfNoMSRirb,sqNoMSR                      ; No MSR...
+
+                       mtmsr   r3                                                      ; Translation and all off
+                       isync                                                           ; Toss prefetch
+                       b               sqNoMSRx
+                       
+sqNoMSR:       li              r0,loadMSR                                      ; Get the MSR setter SC
+                       sc                                                                      ; Set it
+sqNoMSRx:
+                       
+                       rlwinm. r3,r11,0,0,19                           ; (TEST/DEBUG)
+#if 0
+                       bne+    notrapit                                        ; (TEST/DEBUG)
+                       BREAKPOINT_TRAP                                         ; (TEST/DEBUG) 
+notrapit:                                                                              ; (TEST/DEBUG)
+#endif
 
-                       ld              r7,SVfree(0)                            ; Get the free save area list anchor 
-                       lwz             r6,SVfreecnt(0)                         ; Get the number of free saveareas
 
-                       std             r2,SVfree(0)                            ; Queue in the new one 
-                       addi    r6,r6,sac_cnt                           ; Count the ones we are linking in 
-                       std             r7,SAVprev(r4)                          ; Queue the old first one off of us
-                       stw             r6,SVfreecnt(0)                         ; Save the new count
-                       b               saveQueueExit
-
-            ; Handle 32-bit processor.
-            
-saveQueue32:            
-            slwi       r2,r8,12                                        ; r2 <-- phys address of page
                        li              r8,sac_cnt                                      ; Get the number of saveareas per page
-                       mr              r4,r                                          ; Point to start of chain
+                       mr              r4,r11                                          ; Point to start of chain
                        li              r0,SAVempty                                     ; Get empty marker
 
-saveQueue32a:  
-            addic.     r8,r8,-1                                        ; Keep track of how many we did
+sqchain:       addic.  r8,r8,-1                                        ; Keep track of how many we did
                        stb             r0,SAVflags+2(r4)                       ; Set empty
-                       addi    r7,r4,SAVsize                           ; Point to the next slot
-                       ble-    saveQueue32b                            ; We are done with the chain
-                       stw             r7,SAVprev+4(r4)                        ; Set this chain
-                       mr              r4,r7                                           ; Step to the next
-                       b               saveQueue32a                            ; Fill the whole block...
+                       addi    r9,r4,SAVsize                           ; Point to the next slot
+                       ble-    sqchaindn                                       ; We are done with the chain
+                       stw             r9,SAVprev(r4)                          ; Set this chain
+                       mr              r4,r9                                           ; Step to the next
+                       b               sqchain                                         ; Fill the whole block...
+
+                       .align  5
 
-saveQueue32b:
+sqchaindn:     mflr    r9                                                      ; Save the return address
                        bl              savelock                                        ; Go lock the save anchor 
 
-                       lwz             r7,SVfree+4(0)                          ; Get the free save area list anchor 
-                       lwz             r6,SVfreecnt(0)                         ; Get the number of free saveareas
+                       lwz             r7,SVfree(r10)                          ; Get the free save area list anchor 
+                       lwz             r6,SVfreecnt(r10)                       ; Get the number of free saveareas
 
-                       stw             r2,SVfree+4(0)                          ; Queue in the new one 
+                       stw             r11,SVfree(r10)                         ; Queue in the new one 
                        addi    r6,r6,sac_cnt                           ; Count the ones we are linking in 
-                       stw             r7,SAVprev+4(r4)                        ; Queue the old first one off of us
-                       stw             r6,SVfreecnt(0)                         ; Save the new count
-
-saveQueueExit:                                                                 ; join here from 64-bit path            
+                       stw             r7,SAVprev(r4)                          ; Queue the old first one off of us
+                       stw             r6,SVfreecnt(r10)                       ; Save the new count
+                       
                        bl              saveunlock                                      ; Unlock the list and set the adjust count
+                       
                        mtlr    r9                                                      ; Restore the return
+                       mtmsr   r12                                                     ; Restore interrupts and translation 
+                       isync                                                           ; Dump any speculations 
 
 #if FPVECDBG
-                       mfsprg  r2,1                                            ; (TEST/DEBUG)
+                       mfsprg  r2,0                                            ; (TEST/DEBUG)
+                       lwz             r2,next_savearea(r2)            ; (TEST/DEBUG)
                        mr.             r2,r2                                           ; (TEST/DEBUG)
-                       beq--   saveRestore                                     ; (TEST/DEBUG)
+                       beqlr-                                                          ; (TEST/DEBUG)
                        lis             r0,hi16(CutTrace)                       ; (TEST/DEBUG)
                        li              r2,0x2201                                       ; (TEST/DEBUG)
                        oris    r0,r0,lo16(CutTrace)            ; (TEST/DEBUG)
                        sc                                                                      ; (TEST/DEBUG)
 #endif
-            b          saveRestore                                     ; Restore interrupts and translation
+
+                       blr                                                                     ; Leave... 
 
 /*
- * *****************************
- * * s a v e _ g e t _ i n i t *
- * *****************************
+ *                     This routine will obtain a savearea.
+ *                     Note really well: we can take NO exceptions of any kind,
+ *                     including a PTE miss during this process. That's
+ *                     a guaranteed deadlock or screwup.  That means we must disable for interrutions
+ *                     and turn all translation off.
+ *
+ *                     We pass back the virtual address of the one we just obtained
+ *                     or a zero if none to allocate.
  *
- *     addr64_t  save_get_init(void);
+ *                     First we try the local list.  If that is below a threshold, we will
+ *                     lock the free list and replenish.
+ *
+ *                     If there are no saveareas in either list, we will install the 
+ *                     backpocket and choke.
+ *
+ *                     The save_get_phys call assumes that translation and interruptions are
+ *                     already off and that the returned address is physical.
  *
  *                     Note that save_get_init is used in initial processor startup only.  It
  *                     is used because translation is on, but no tables exist yet and we have
  *                     no V=R BAT registers that cover the entire physical memory.
+ *
+ *
+ *                     NOTE!!! NEVER USE R0, R2, or R12 IN HERE THAT WAY WE DON'T NEED A
+ *                     STACK FRAME IN FPU_SAVE, FPU_SWITCH, VEC_SAVE, OR VEC_SWITCH.
  */
                        .align  5
                        .globl  EXT(save_get_init)
 
 LEXT(save_get_init)
-            mflr       r9                                                      ; get return address
-            bl         saveSetup                                       ; turn translation off, 64-bit on, load many regs
-            bfl--      pf64Bitb,saveGet32                      ; Get r3 <- savearea, r5 <- page address (with SAC)
-            btl++      pf64Bitb,saveGet64                      ; get one on a 64-bit machine
-            bl         saveRestore                                     ; restore translation etc
-            mtlr       r9
-            
-            ; unpack the physaddr in r3 into a long long in (r3,r4)
-            
-            mr         r4,r3                                           ; copy low word of phys address to r4
-            li         r3,0                                            ; assume upper word was 0
-            bflr--     pf64Bitb                                        ; if 32-bit processor, return
-            srdi       r3,r4,32                                        ; unpack reg64_t to addr64_t on 64-bit machine
-            rlwinm     r4,r4,0,0,31
-            blr
-            
 
-/*
- * *******************
- * * s a v e _ g e t *
- * *******************
- *
- *     savearea *save_get(void);
- *
- *                     Allocate a savearea, returning a virtual address.  NOTE: we must preserve
- *                     r0, r2, and r12.  Our callers in cswtch.s depend on this.
- */
+                       mfsprg  r9,2                                            ; Get the feature flags
+                       mfmsr   r12                                                     ; Get the MSR 
+                       rlwinm  r12,r12,0,MSR_FP_BIT+1,MSR_FP_BIT-1     ; Force floating point off
+                       rlwinm  r12,r12,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1   ; Force vectors off
+                       mtcrf   0x04,r9                                         ; Set the features                      
+                       andi.   r3,r12,0x7FCF                           ; Turn off all translation and interrupts
+
+                       bt              pfNoMSRirb,sgiNoMSR                     ; No MSR...
+
+                       mtmsr   r3                                                      ; Translation and all off
+                       isync                                                           ; Toss prefetch
+                       b               sgiGetPhys                                      ; Go get the savearea...
+                       
+sgiNoMSR:      li              r0,loadMSR                                      ; Get the MSR setter SC
+                       sc                                                                      ; Set it
+
+sgiGetPhys:    mflr    r11                                                     ; Save R11 (save_get_phys does not use this one)
+                       bl              EXT(save_get_phys)                      ; Get a savearea
+                       mtlr    r11                                                     ; Restore return
+                       
+                       mtmsr   r12                                                     ; Restore translation and exceptions
+                       isync                                                           ; Make sure about it
+                       blr                                                                     ; Return...
                        .align  5
                        .globl  EXT(save_get)
 
 LEXT(save_get)
-            mflr       r9                                                      ; get return address
-            mr         r5,r0                                           ; copy regs before saveSetup nails them
-            bl         saveSetup                                       ; turn translation off, 64-bit on, load many regs
-            bf--       pf64Bitb,svgt1                          ; skip if 32-bit processor
-            
-            std                r5,tempr0(r10)                          ; save r0 in per-proc across call to saveGet64
-            std                r2,tempr2(r10)                          ; and r2
-            std                r12,tempr4(r10)                         ; and r12
-            bl         saveGet64                                       ; get r3 <- savearea, r5 <- page address (with SAC)
-            ld         r0,tempr0(r10)                          ; restore callers regs
-            ld         r2,tempr2(r10)
-            ld         r12,tempr4(r10)
-            b          svgt2
-            
-svgt1:                                                                                 ; handle 32-bit processor
-            stw                r5,tempr0+4(r10)                        ; save r0 in per-proc across call to saveGet32
-            stw                r2,tempr2+4(r10)                        ; and r2
-            stw                r12,tempr4+4(r10)                       ; and r12
-            bl         saveGet32                                       ; get r3 <- savearea, r5 <- page address (with SAC)
-            lwz                r0,tempr0+4(r10)                        ; restore callers regs
-            lwz                r2,tempr2+4(r10)
-            lwz                r12,tempr4+4(r10)
-            
-svgt2:
-                       lwz             r5,SACvrswap+4(r5)                      ; Get the virtual to real translation (only need low word)
-            mtlr       r9                                                      ; restore return address
-            xor                r3,r3,r5                                        ; convert physaddr to virtual
-            rlwinm     r3,r3,0,0,31                            ; 0 upper word if a 64-bit machine
+                       
+                       crclr   cr1_eq                                          ; Clear CR1_eq to indicate we want virtual address
+                       mfsprg  r9,2                                            ; Get the feature flags
+                       mfmsr   r11                                                     ; Get the MSR 
+                       rlwinm. r3,r11,0,MSR_EE_BIT,MSR_EE_BIT  ;       Are interrupts enabled here?
+                       beq+    sgnomess                                        ; Nope, do not mess with fp or vec...
+                       rlwinm  r11,r11,0,MSR_FP_BIT+1,MSR_FP_BIT-1     ; Force floating point off
+                       rlwinm  r11,r11,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1   ; Force vectors off
 
-#if FPVECDBG
-            mr         r6,r0                                           ; (TEST/DEBUG)
-            mr         r7,r2                                           ; (TEST/DEBUG)
-                       mfsprg  r2,1                                            ; (TEST/DEBUG)
-                       mr.             r2,r2                                           ; (TEST/DEBUG)
-                       beq--   svgDBBypass                                     ; (TEST/DEBUG)
-                       lis             r0,HIGH_ADDR(CutTrace)          ; (TEST/DEBUG)
-                       li              r2,0x2203                                       ; (TEST/DEBUG)
-                       oris    r0,r0,LOW_ADDR(CutTrace)        ; (TEST/DEBUG)
-                       sc                                                                      ; (TEST/DEBUG) 
-svgDBBypass:                                                                   ; (TEST/DEBUG)
-            mr         r0,r6                                           ; (TEST/DEBUG)
-            mr         r2,r7                                           ; (TEST/DEBUG) 
-#endif                 
-            b          saveRestore                                     ; restore MSR and return to our caller
-            
-            
-/*
- * ***********************************
- * * s a v e _ g e t _ p h y s _ 3 2 *
- * ***********************************
- *
- *     reg64_t save_get_phys(void);
- *
- *                     This is the entry normally called from lowmem_vectors.s with
- *                     translation and interrupts already off.
- *                     MUST NOT TOUCH CR7
- */
-                       .align  5
-                       .globl  EXT(save_get_phys_32)
+sgnomess:      mtcrf   0x04,r9                                         ; Set the features                      
+                       andi.   r3,r11,0x7FCF                           ; Turn off all translation and interrupts
 
-LEXT(save_get_phys_32)
-            mfsprg     r10,0                                           ; get the per-proc ptr
-                       b               saveGet32                                       ; Get r3 <- savearea, r5 <- page address (with SAC)
+                       bt              pfNoMSRirb,sgNoMSR                      ; No MSR...
 
+                       mtmsr   r3                                                      ; Translation and all off
+                       isync                                                           ; Toss prefetch
+                       b               csaveget
+                       
+sgNoMSR:       mr              r9,r0                                           ; Save this
+                       li              r0,loadMSR                                      ; Get the MSR setter SC
+                       sc                                                                      ; Set it
+                       mr              r0,r9                                           ; Restore it
 
-/*
- * ***********************************
- * * s a v e _ g e t _ p h y s _ 6 4 *
- * ***********************************
- *
- *     reg64_t save_get_phys_64(void);
- *
- *                     This is the entry normally called from lowmem_vectors.s with
- *                     translation and interrupts already off, and in 64-bit mode.
- *                     MUST NOT TOUCH CR7
- */
-                       .align  5
-                       .globl  EXT(save_get_phys_64)
+                       b               csaveget                                        ; Join the common...
 
-LEXT(save_get_phys_64)
-            mfsprg     r10,0                                           ; get the per-proc ptr
-                       b               saveGet64                                       ; Get r3 <- savearea, r5 <- page address (with SAC)
-            
+                       .align  5
+                       .globl  EXT(save_get_phys)
 
-/*
- * *********************
- * * s a v e G e t 6 4 *
- * *********************
- *
- *                     This is the internal routine to allocate a savearea on a 64-bit processor.  
- *                     Note that we must not take any exceptions of any kind, including PTE misses, as that
- *                     would deadlock trying to reenter this routine.  We pass back the 64-bit physical address.
- *                     First we try the local list.  If that is below a threshold, we try the global free list,
- *                     which requires taking a lock, and replenish.  If there are no saveareas in either list,
- *                     we will install the  backpocket and choke.  This routine assumes that the caller has
- *                     turned translation off, masked interrupts,  turned on 64-bit mode, and set up:
- *                             r10 = per-proc ptr
- *
- *                     We return:
- *                             r3 = 64-bit physical address of the savearea
- *                             r5 = 64-bit physical address of the page the savearea is in, with SAC
- *
- *                     We destroy:
- *                             r2-r8.
- *             
- *                     MUST NOT TOUCH CR7
- */
+LEXT(save_get_phys)
+                       
+                       crset   cr1_eq                                          ; Clear CR1_ne to indicate we want physical address
 
-saveGet64:            
-                       lwz             r8,lclfreecnt(r10)                      ; Get the count
-                       ld              r3,lclfree(r10)                         ; Get the start of local savearea list
+csaveget:      mfsprg  r9,0                                            ; Get the per proc
+                       lis             r10,hi16(EXT(saveanchor))       ; Get the high part of the anchor
+                       lwz             r8,lclfreecnt(r9)                       ; Get the count
+                       lwz             r3,lclfree(r9)                          ; Get the start of local savearea list
                        cmplwi  r8,LocalSaveMin                         ; Are we too low?
-                       ble--   saveGet64GetGlobal                      ; We are too low and need to grow list...
-
-            ; Get it from the per-processor local list.
-            
-saveGet64GetLocal:
-            li         r2,0x5555                                       ; get r2 <-- 0x55555555 55555555, our bugbug constant
-                       ld              r4,SAVprev(r3)                          ; Chain to the next one
-                       oris    r2,r2,0x5555
+                       ori             r10,r10,lo16(EXT(saveanchor))   ; Bottom half of the anchor 
+                       ble-    sglow                                           ; We are too low and need to grow list...
+                       
+sgreserve:     lis             r10,0x5555                                      ; Get top of empty indication
+                       li              r6,0                                            ; zero value
+                       lwz             r4,SAVprev(r3)                          ; Chain to the next one
+                       stw             r6,SAVflags(r3)                         ; Clear flags
+                       ori             r10,r10,0x5555                          ; And the bottom
                        subi    r8,r8,1                                         ; Back down count
-            rldimi     r2,r2,32,0
-
-                       std             r2,SAVprev(r3)                          ; bug next ptr
-                       stw             r2,SAVlevel(r3)                         ; bug context ID
-            li         r6,0
-                       std             r4,lclfree(r10)                         ; Unchain first savearea
-                       stw             r2,SAVact(r3)                           ; bug activation ptr
-                       rldicr  r5,r3,0,51                                      ; r5 <-- page ptr, where SAC is kept
-                       stw             r8,lclfreecnt(r10)                      ; Set new count
-                       stw             r6,SAVflags(r3)                         ; clear the flags
-
-            blr
-
-            ; Local list was low so replenish from global list.
-            ;   r7 = return address to caller of saveGet64
-            ;   r8 = lclfreecnt
-            ;  r10 = per-proc ptr
-            
-saveGet64GetGlobal:
-            mflr       r7                                                      ; save return adress
-                       subfic  r5,r8,LocalSaveTarget           ; Get the number of saveareas we need to grab to get to target
+                       stw             r10,SAVprev(r3)                         ; Trash this
+                       stw             r10,SAVlevel(r3)                        ; Trash this
+                       stw             r4,lclfree(r9)                          ; Unchain first savearea
+                       rlwinm  r5,r3,0,0,19                            ; Back up to first page where SAC is
+                       stw             r10,SAVact(r3)                          ; Trash this
+                       stw             r8,lclfreecnt(r9)                       ; Set new count
+                       
+                       btlr+   cr1_eq                                          ; Return now if physical request
+                       
+                       lwz             r5,SACvrswap(r5)                        ; Get the virtual to real translation
+                       
+                       mtmsr   r11                                                     ; Restore translation and exceptions
+                       isync                                                           ; Make sure about it
+       
+#if FPVECDBG
+;                      Note: we do not trace the physical request because this ususally comes from the
+;                      exception vector code
+
+                       mr              r6,r0                                           ; (TEST/DEBUG)
+                       mr              r7,r2                                           ; (TEST/DEBUG) 
+                       lis             r0,HIGH_ADDR(CutTrace)          ; (TEST/DEBUG)
+                       li              r2,0x2203                                       ; (TEST/DEBUG)
+                       oris    r0,r0,LOW_ADDR(CutTrace)        ; (TEST/DEBUG)
+                       sc                                                                      ; (TEST/DEBUG) 
+                       mr              r0,r6                                           ; (TEST/DEBUG)
+                       mr              r2,r7                                           ; (TEST/DEBUG)
+#endif                 
+                       
+                       xor             r3,r3,r5                                        ; Get the virtual address 
+                       blr                                                                     ; Leave...
+
+;
+;                      Here is the slow path which is executed when there are not enough in the local list
+;
+                                       
+                       .align  5
+                                               
+sglow:         mflr    r9                                                      ; Save the return
                        bl              savelock                                        ; Go lock up the anchor
+                       mtlr    r9                                                      ; Restore the return
                        
-                       lwz             r2,SVfreecnt(0)                         ; Get the number on this list
-                       ld              r8,SVfree(0)                            ; Get the head of the save area list 
+                       subfic  r5,r8,LocalSaveTarget           ; Get the number of saveareas we need to grab to get to target
+                       lwz             r9,SVfreecnt(r10)                       ; Get the number on this list
+                       lwz             r8,SVfree(r10)                          ; Get the head of the save area list 
                        
-                       sub             r3,r2,r5                                        ; Get number left after we swipe enough for local list
-                       sradi   r3,r3,63                                        ; Get 0 if enough or -1 if not
+                       sub             r3,r9,r5                                        ; Get number left after we swipe enough for local list
+                       srawi   r3,r3,31                                        ; Get 0 if enough or 0xFFFFFFFF if not
                        andc    r4,r5,r3                                        ; Get number to get if there are enough, 0 otherwise
-                       and             r5,r2,r3                                        ; Get 0 if there are enough, number on list otherwise
-                       or.             r5,r4,r5                                        ; r5 <- number we will move from global to local list
-                       beq--   saveGet64NoFree                         ; There are none to get...
+                       and             r5,r9,r3                                        ; Get 0 if there are enough, number on list otherwise
+                       or.             r5,r4,r5                                        ; Get the number we will move
+                       beq-    sgnofree                                        ; There are none to get...
                        
                        mtctr   r5                                                      ; Get loop count
                        mr              r6,r8                                           ; Remember the first in the list
+                       
+sgtrimf:       bdz             sgtfdone                                        ; Count down and branch when we hit 0...
+                       lwz             r8,SAVprev(r8)                          ; Get the next
+                       b               sgtrimf                                         ; Keep going...
 
-saveGet64c:
-            bdz                saveGet64d                                      ; Count down and branch when we hit 0...
-                       ld              r8,SAVprev(r8)                          ; Get the next
-                       b               saveGet64c                                      ; Keep going...
-
-saveGet64d:                    
-            ld         r3,SAVprev(r8)                          ; Get the next one
-                       lwz             r4,SVinuse(0)                           ; Get the in use count
-                       sub             r2,r2,r5                                        ; Count down what we stole
-                       std             r3,SVfree(0)                            ; Set the new first in list
+                       .align  5
+                       
+sgtfdone:      lwz             r7,SAVprev(r8)                          ; Get the next one
+                       lwz             r4,SVinuse(r10)                         ; Get the in use count
+                       sub             r9,r9,r5                                        ; Count down what we stole
+                       stw             r7,SVfree(r10)                          ; Set the new first in list
                        add             r4,r4,r5                                        ; Count the ones we just put in the local list as "in use"
-                       stw             r2,SVfreecnt(0)                         ; Set the new count
-                       stw             r4,SVinuse(0)                           ; Set the new in use count
+                       stw             r9,SVfreecnt(r10)                       ; Set the new count
+                       mfsprg  r9,0                                            ; Get the per proc
+                       stw             r4,SVinuse(r10)                         ; Set the new in use count
                        
-                       ld              r4,lclfree(r10)                         ; Get the old head of list
-                       lwz             r3,lclfreecnt(r10)                      ; Get the old count
-                       std             r6,lclfree(r10)                         ; Set the new head of the list
+                       lwz             r4,lclfree(r9)                          ; Get the old head of list
+                       lwz             r3,lclfreecnt(r9)                       ; Get the old count
+                       stw             r6,lclfree(r9)                          ; Set the new head of the list
                        add             r3,r3,r5                                        ; Get the new count
-                       std             r4,SAVprev(r8)                          ; Point to the old head
-                       stw             r3,lclfreecnt(r10)                      ; Set the new count
+                       stw             r4,SAVprev(r8)                          ; Point to the old head
+                       stw             r3,lclfreecnt(r9)                       ; Set the new count
 
+                       mflr    r9                                                      ; Save the return
                        bl              saveunlock                                      ; Update the adjust field and unlock
-            mtlr       r7                                                      ; restore return address
-                       b               saveGet64                                       ; Start over and finally allocate the savearea...
-                       
-            ; The local list is below the repopulate threshold and the global list is empty.
-            ; First we check if there are any left in the local list and if so, we allow
-            ; them to be allocated.  If not, we release the backpocket list and choke.  
-            ; There is nothing more that we can do at this point.  Hopefully we stay alive
-            ; long enough to grab some much-needed panic information.
-            ;   r7 = return address to caller of saveGet64 
-            ;  r10 = per-proc ptr
-
-saveGet64NoFree:                       
-                       lwz             r8,lclfreecnt(r10)                      ; Get the count
+                       mtlr    r9                                                      ; Restore return
+                       b               csaveget                                        ; Start over and finally allocate the savearea...
+                       
+;
+;                      The local list is below the repopulate threshold and the free list is empty.
+;                      First we check if there are any left in the local list and if so, we allow
+;                      them to be allocated.  If not, we release the backpocket list and choke.  
+;                      There is nothing more that we can do at this point.  Hopefully we stay alive
+;                      long enough to grab some much-needed panic information.
+;
+                       
+sgnofree:      mfsprg  r9,0                                            ; Get the per proc
+                       lwz             r8,lclfreecnt(r9)                       ; Get the count
+                       lwz             r3,lclfree(r9)                          ; Get the start of local savearea list
                        mr.             r8,r8                                           ; Are there any reserve to get?
-                       beq--   saveGet64Choke                          ; No, go choke and die...
+
+                       mflr    r9                                                      ; Save the return
+                       beq-    sgchoke                                         ; No, go choke and die...
                        bl              saveunlock                                      ; Update the adjust field and unlock
-                       ld              r3,lclfree(r10)                         ; Get the start of local savearea list
-                       lwz             r8,lclfreecnt(r10)                      ; Get the count
-            mtlr       r7                                                      ; restore return address
-                       b               saveGet64GetLocal                       ; We have some left, dip on in...
+                       mtlr    r9                                                      ; Restore return
+
+                       mfsprg  r9,0                                            ; Get the per proc again
+                       lwz             r3,lclfree(r9)                          ; Get the start of local savearea list
+                       lwz             r8,lclfreecnt(r9)                       ; Get the count
+                       b               sgreserve                                       ; We have some left, dip on in...
                        
+;
 ;                      We who are about to die salute you.  The savearea chain is messed up or
 ;                      empty.  Add in a few so we have enough to take down the system.
+;
 
-saveGet64Choke:
-            lis                r9,hi16(EXT(backpocket))        ; Get high order of back pocket
+sgchoke:       lis             r9,hi16(EXT(backpocket))        ; Get high order of back pocket
                        ori             r9,r9,lo16(EXT(backpocket))     ; and low part
                        
-                       lwz             r8,SVfreecnt-saveanchor(r9)     ; Get the new number of free elements
-                       ld              r7,SVfree-saveanchor(r9)        ; Get the head of the chain
-                       lwz             r6,SVinuse(0)                           ; Get total in the old list
+                       lwz             r8,SVfreecnt(r9)                        ; Get the new number of free elements
+                       lwz             r7,SVfree(r9)                           ; Get the head of the chain
+                       lwz             r6,SVinuse(r10)                         ; Get total in the old list
 
-                       stw             r8,SVfreecnt(0)                         ; Set the new number of free elements
+                       stw             r8,SVfreecnt(r10)                       ; Set the new number of free elements
                        add             r6,r6,r8                                        ; Add in the new ones
-                       std             r7,SVfree(0)                            ; Set the new head of the chain
-                       stw             r6,SVinuse(0)                           ; Set total in the new list
+                       stw             r7,SVfree(r10)                          ; Set the new head of the chain
+                       stw             r6,SVinuse(r10)                         ; Set total in the new list
 
-saveGetChokeJoin:                                                              ; join in the fun from 32-bit mode
                        lis             r0,hi16(Choke)                          ; Set choke firmware call
                        li              r7,0                                            ; Get a clear register to unlock
                        ori             r0,r0,lo16(Choke)                       ; Set the rest of the choke call
                        li              r3,failNoSavearea                       ; Set failure code
 
-                       eieio                                                           ; Make sure all is committed
-                       stw             r7,SVlock(0)                            ; Unlock the free list
+                       sync                                                            ; Make sure all is committed
+                       stw             r7,SVlock(r10)                          ; Unlock the free list
                        sc                                                                      ; System ABEND
 
 
+
 /*
- * *********************
- * * s a v e G e t 3 2 *
- * *********************
+ *                     This routine will return a savearea to the free list.
+ *                     Note really well: we can take NO exceptions of any kind,
+ *                     including a PTE miss once the savearea lock is held. That's
+ *                     a guaranteed deadlock.  That means we must disable for interrutions
+ *                     and turn all translation off.
+ *
+ *                     We take a virtual address for save_ret.  For save_ret_phys we
+ *                     assume we are already physical/interrupts off and the address is physical.
  *
- *                     This is the internal routine to allocate a savearea on a 32-bit processor.  
- *                     Note that we must not take any exceptions of any kind, including PTE misses, as that
- *                     would deadlock trying to reenter this routine.  We pass back the 32-bit physical address.
- *                     First we try the local list.  If that is below a threshold, we try the global free list,
- *                     which requires taking a lock, and replenish.  If there are no saveareas in either list,
- *                     we will install the  backpocket and choke.  This routine assumes that the caller has
- *                     turned translation off, masked interrupts, and set up:
- *                             r10 = per-proc ptr
+ *                     Here's a tricky bit, and important:
  *
- *                     We return:
- *                             r3 = 32-bit physical address of the savearea
- *                             r5 = 32-bit physical address of the page the savearea is in, with SAC
+ *                     When we trim the list, we NEVER trim the very first one.  This is because that is
+ *                     the very last one released and the exception exit code will release the savearea
+ *                     BEFORE it is done using it. Wouldn't be too good if another processor started
+ *                     using it, eh?  So for this case, we are safe so long as the savearea stays on
+ *                     the local list.  (Note: the exit routine needs to do this because it is in the 
+ *                     process of restoring all context and it needs to keep it until the last second.)
  *
- *                     We destroy:
- *                             r2-r8.
  */
 
-saveGet32:            
-                       lwz             r8,lclfreecnt(r10)                      ; Get the count
-                       lwz             r3,lclfree+4(r10)                       ; Get the start of local savearea list
-                       cmplwi  r8,LocalSaveMin                         ; Are we too low?
-                       ble-    saveGet32GetGlobal                      ; We are too low and need to grow list...
-
-            ; Get savearea from per-processor local list.
-            
-saveGet32GetLocal:
-            li         r2,0x5555                                       ; get r2 <-- 0x55555555, our bugbug constant
-                       lwz             r4,SAVprev+4(r3)                        ; Chain to the next one
-                       oris    r2,r2,0x5555
-                       subi    r8,r8,1                                         ; Back down count
+;
+;                      Note: when called from interrupt enabled code, we want to turn off vector and
+;                      floating point because we can not guarantee that the enablement will not change
+;                      while we hold a copy of the MSR.  We force it off so that the lazy switcher will
+;                      turn it back on if used.  However, we need to NOT change it save_ret or save_get
+;                      is called with interrupts disabled.  This is because both of these routine are
+;                      called from within the context switcher and changing the enablement would be
+;                      very, very bad..... (especially from within the lazt switcher)
+;
 
-                       stw             r2,SAVprev+4(r3)                        ; bug next ptr
-                       stw             r2,SAVlevel(r3)                         ; bug context ID
-            li         r6,0
-                       stw             r4,lclfree+4(r10)                       ; Unchain first savearea
-                       stw             r2,SAVact(r3)                           ; bug activation ptr
-                       rlwinm  r5,r3,0,0,19                            ; r5 <-- page ptr, where SAC is kept
-                       stw             r8,lclfreecnt(r10)                      ; Set new count
-                       stw             r6,SAVflags(r3)                         ; clear the flags
-
-            blr
-
-            ; Local list was low so replenish from global list.
-            ;   r7 = return address to caller of saveGet32
-            ;   r8 = lclfreecnt
-            ;  r10 = per-proc ptr
-            
-saveGet32GetGlobal:
-            mflr       r7                                                      ; save return adress
-                       subfic  r5,r8,LocalSaveTarget           ; Get the number of saveareas we need to grab to get to target
-                       bl              savelock                                        ; Go lock up the anchor
-                       
-                       lwz             r2,SVfreecnt(0)                         ; Get the number on this list
-                       lwz             r8,SVfree+4(0)                          ; Get the head of the save area list 
-                       
-                       sub             r3,r2,r5                                        ; Get number left after we swipe enough for local list
-                       srawi   r3,r3,31                                        ; Get 0 if enough or -1 if not
-                       andc    r4,r5,r3                                        ; Get number to get if there are enough, 0 otherwise
-                       and             r5,r2,r3                                        ; Get 0 if there are enough, number on list otherwise
-                       or.             r5,r4,r5                                        ; r5 <- number we will move from global to local list
-                       beq-    saveGet32NoFree                         ; There are none to get...
-                       
-                       mtctr   r5                                                      ; Get loop count
-                       mr              r6,r8                                           ; Remember the first in the list
+                       .align  5
+                       .globl  EXT(save_ret)
 
-saveGet32c:
-            bdz                saveGet32d                                      ; Count down and branch when we hit 0...
-                       lwz             r8,SAVprev+4(r8)                        ; Get the next
-                       b               saveGet32c                                      ; Keep going...
+LEXT(save_ret)
 
-saveGet32d:                    
-            lwz                r3,SAVprev+4(r8)                        ; Get the next one
-                       lwz             r4,SVinuse(0)                           ; Get the in use count
-                       sub             r2,r2,r5                                        ; Count down what we stole
-                       stw             r3,SVfree+4(0)                          ; Set the new first in list
-                       add             r4,r4,r5                                        ; Count the ones we just put in the local list as "in use"
-                       stw             r2,SVfreecnt(0)                         ; Set the new count
-                       stw             r4,SVinuse(0)                           ; Set the new in use count
-                       
-                       lwz             r4,lclfree+4(r10)                       ; Get the old head of list
-                       lwz             r3,lclfreecnt(r10)                      ; Get the old count
-                       stw             r6,lclfree+4(r10)                       ; Set the new head of the list
-                       add             r3,r3,r5                                        ; Get the new count
-                       stw             r4,SAVprev+4(r8)                        ; Point to the old head
-                       stw             r3,lclfreecnt(r10)                      ; Set the new count
+                       mfmsr   r12                                                     ; Get the MSR 
+                       rlwinm. r9,r12,0,MSR_EE_BIT,MSR_EE_BIT  ;       Are interrupts enabled here?
+                       beq+    EXT(save_ret_join)                      ; Nope, do not mess with fp or vec...
+                       rlwinm  r12,r12,0,MSR_FP_BIT+1,MSR_FP_BIT-1     ; Force floating point off
+                       rlwinm  r12,r12,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1   ; Force vectors off
 
-                       bl              saveunlock                                      ; Update the adjust field and unlock
-            mtlr       r7                                                      ; restore return address
-                       b               saveGet32                                       ; Start over and finally allocate the savearea...
-                       
-            ; The local list is below the repopulate threshold and the global list is empty.
-            ; First we check if there are any left in the local list and if so, we allow
-            ; them to be allocated.  If not, we release the backpocket list and choke.  
-            ; There is nothing more that we can do at this point.  Hopefully we stay alive
-            ; long enough to grab some much-needed panic information.
-            ;   r7 = return address to caller of saveGet32
-            ;  r10 = per-proc ptr
-
-saveGet32NoFree:                       
-                       lwz             r8,lclfreecnt(r10)                      ; Get the count
-                       mr.             r8,r8                                           ; Are there any reserve to get?
-                       beq-    saveGet32Choke                          ; No, go choke and die...
-                       bl              saveunlock                                      ; Update the adjust field and unlock
-                       lwz             r3,lclfree+4(r10)                       ; Get the start of local savearea list
-                       lwz             r8,lclfreecnt(r10)                      ; Get the count
-            mtlr       r7                                                      ; restore return address
-                       b               saveGet32GetLocal                       ; We have some left, dip on in...
-                       
-;                      We who are about to die salute you.  The savearea chain is messed up or
-;                      empty.  Add in a few so we have enough to take down the system.
+                       .globl  EXT(save_ret_join)
 
-saveGet32Choke:
-            lis                r9,hi16(EXT(backpocket))        ; Get high order of back pocket
-                       ori             r9,r9,lo16(EXT(backpocket))     ; and low part
-                       
-                       lwz             r8,SVfreecnt-saveanchor(r9)     ; Get the new number of free elements
-                       lwz             r7,SVfree+4-saveanchor(r9)      ; Get the head of the chain
-                       lwz             r6,SVinuse(0)                           ; Get total in the old list
+LEXT(save_ret_join)
+                       crclr   cr1_eq                                          ; Clear CR1_ne to indicate we have virtual address
+                       mfsprg  r9,2                                            ; Get the feature flags
+                       rlwinm  r6,r3,0,0,19                            ; Round back down to the savearea page block
+                       lwz             r5,SACvrswap(r6)                        ; Get the conversion to real
+                       mtcrf   0x04,r9                                         ; Set the features                      
+                       mfsprg  r9,0                                            ; Get the per proc
+                       xor             r8,r3,r5                                        ; Get the real address of the savearea
+                       andi.   r3,r12,0x7FCF                           ; Turn off all translation and rupts
 
-                       stw             r8,SVfreecnt(0)                         ; Set the new number of free elements
-                       add             r6,r6,r8                                        ; Add in the new ones (why?)
-                       stw             r7,SVfree+4(0)                          ; Set the new head of the chain
-                       stw             r6,SVinuse(0)                           ; Set total in the new list
-            
-            b          saveGetChokeJoin
+                       bt              pfNoMSRirb,srNoMSR                      ; No MSR...
 
+                       mtmsr   r3                                                      ; Translation and all off
+                       isync                                                           ; Toss prefetch
+                       b               srcommon
+                       
+                       .align  5
+                       
+srNoMSR:       li              r0,loadMSR                                      ; Get the MSR setter SC
+                       sc                                                                      ; Set it
+srNoMSRx:      b               srcommon                                        ; Join up below...
 
-/*
- * *******************
- * * s a v e _ r e t *
- * *******************
- *
- *     void    save_ret(struct savearea *);                            // normal call
- *     void    save_ret_wMSR(struct savearea *,reg64_t);       // passes MSR to restore as 2nd arg
- *
- *                     Return a savearea passed by virtual address to the free list.
- *                     Note really well: we can take NO exceptions of any kind,
- *                     including a PTE miss once the savearea lock is held. That's
- *                     a guaranteed deadlock.  That means we must disable for interrutions
- *                     and turn all translation off.
- */
-            .globl     EXT(save_ret_wMSR)                      ; alternate entry pt w MSR to restore in r4
-            
-LEXT(save_ret_wMSR)
-            crset      31                                                      ; set flag for save_ret_wMSR
-            b          svrt1                                           ; join common code
-            
-            .align     5
-            .globl     EXT(save_ret)
-            
-LEXT(save_ret)
-            crclr      31                                                      ; clear flag for save_ret_wMSR
-svrt1:                                                                                 ; join from save_ret_wMSR
-            mflr       r9                                                      ; get return address
-            rlwinm     r7,r3,0,0,19                            ; get virtual address of SAC area at start of page
-            mr         r8,r3                                           ; save virtual address
-            lwz                r5,SACvrswap+0(r7)                      ; get 64-bit converter from V to R
-            lwz                r6,SACvrswap+4(r7)                      ; both halves, though only bottom used on 32-bit machine
-#if FPVECDBG
-                       lis             r0,HIGH_ADDR(CutTrace)          ; (TEST/DEBUG)
-                       li              r2,0x2204                                       ; (TEST/DEBUG)
-                       oris    r0,r0,LOW_ADDR(CutTrace)        ; (TEST/DEBUG) 
-                       sc                                                                      ; (TEST/DEBUG) 
-#endif
-            bl         saveSetup                                       ; turn translation off, 64-bit on, load many regs
-            bf++       31,svrt3                                        ; skip if not save_ret_wMSR
-            mr         r11,r4                                          ; was save_ret_wMSR, so overwrite saved MSR
-svrt3:
-            bf--       pf64Bitb,svrt4                          ; skip if a 32-bit processor
-            
-            ; Handle 64-bit processor.
-            
-            rldimi     r6,r5,32,0                                      ; merge upper and lower halves of SACvrswap together
-            xor                r3,r8,r6                                        ; get r3 <- 64-bit physical address of this savearea
-            bl         saveRet64                                       ; return it
-            mtlr       r9                                                      ; restore return address
-            b          saveRestore64                           ; restore MSR
-            
-            ; Handle 32-bit processor.
-            
-svrt4:
-            xor                r3,r8,r6                                        ; get r3 <- 32-bit physical address of this savearea
-            bl         saveRet32                                       ; return it
-            mtlr       r9                                                      ; restore return address
-            b          saveRestore32                           ; restore MSR
 
-/*
- * *****************************
- * * s a v e _ r e t _ p h y s *
- * *****************************
- *
- *     void    save_ret_phys(reg64_t);
- *
- *                     Called from lowmem vectors to return (ie, free) a savearea by physical address.
- *                     Translation and interrupts are already off, and 64-bit mode is set if defined.
- *                     We can take _no_ exceptions of any kind in this code, including PTE miss, since
- *                     that would result in a deadlock.  We expect:
- *                             r3 = phys addr of savearea
- *                        msr = IR, DR, and EE off, SF on
- *             cr6 = pf64Bit flag
- *                     We destroy:
- *                             r0,r2-r10.
- */
                        .align  5
                        .globl  EXT(save_ret_phys)
 
 LEXT(save_ret_phys)
-            mfsprg     r10,0                                           ; get the per-proc ptr
-            bf--       pf64Bitb,saveRet32                      ; handle 32-bit machine
-            b          saveRet64                                       ; handle 64-bit machine
-            
 
-/*
- * *********************
- * * s a v e R e t 6 4 *
- * *********************
- *
- *                     This is the internal routine to free a savearea, passed by 64-bit physical
- *                     address.  We assume that IR, DR, and EE are all off, that SF is on, and:
- *                             r3 = phys address of the savearea
- *                        r10 = per-proc ptr
- *                     We destroy:
- *                             r0,r2-r8.
- */
-            .align     5
- saveRet64:
+                       mfsprg  r9,0                                            ; Get the per proc
+                       crset   cr1_eq                                          ; Clear CR1_ne to indicate we have physical address
+                       mr              r8,r3                                           ; Save the savearea address
+
+                       nop
+
+srcommon:      
                        li              r0,SAVempty                                     ; Get marker for free savearea
-                       lwz             r7,lclfreecnt(r10)                      ; Get the local count
-                       ld              r6,lclfree(r10)                         ; Get the old local header
+                       lwz             r7,lclfreecnt(r9)                       ; Get the local count
+                       lwz             r6,lclfree(r9)                          ; Get the old local header
                        addi    r7,r7,1                                         ; Pop up the free count
-                       std             r6,SAVprev(r3)                          ; Plant free chain pointer
+                       stw             r6,SAVprev(r8)                          ; Plant free chain pointer
                        cmplwi  r7,LocalSaveMax                         ; Has the list gotten too long?
-                       stb             r0,SAVflags+2(r3)                       ; Mark savearea free
-                       std             r3,lclfree(r10)                         ; Chain us on in
-                       stw             r7,lclfreecnt(r10)                      ; Bump up the count
-                       bltlr++                                                         ; List not too long, so done
+                       stb             r0,SAVflags+2(r8)                       ; Mark savearea free
+                       stw             r8,lclfree(r9)                          ; Chain us on in
+                       stw             r7,lclfreecnt(r9)                       ; Bump up the count
+                       bgt-    srtrim                                          ; List is too long, go trim it...
                        
-/*                     The local savearea chain has gotten too long.  Trim it down to the target.
- *                     Here's a tricky bit, and important:
- *
- *                     When we trim the list, we NEVER trim the very first one.  This is because that is
- *                     the very last one released and the exception exit code will release the savearea
- *                     BEFORE it is done using it. Wouldn't be too good if another processor started
- *                     using it, eh?  So for this case, we are safe so long as the savearea stays on
- *                     the local list.  (Note: the exit routine needs to do this because it is in the 
- *                     process of restoring all context and it needs to keep it until the last second.)
- */
+                       btlr    cr1_eq                                          ; Leave if we were a physical request...
+                       
+                       mtmsr   r12                                                     ; Restore translation and exceptions
+                       isync                                                           ; Make sure about it
+       
+#if FPVECDBG
+                       lis             r0,HIGH_ADDR(CutTrace)          ; (TEST/DEBUG)
+                       li              r2,0x2204                                       ; (TEST/DEBUG)
+                       mr              r3,r8                                           ; (TEST/DEBUG)
+                       oris    r0,r0,LOW_ADDR(CutTrace)        ; (TEST/DEBUG) 
+                       sc                                                                      ; (TEST/DEBUG) 
+#endif
+                       blr                                                                     ; Leave...
+
+;
+;                      The local savearea chain has gotten too long.  Trim it down to the target.
+;                      Note: never trim the first one, just skip over it.
+;
 
-            mflr       r0                                                      ; save return to caller of saveRet64
-                       mr              r2,r3                                           ; r2 <- 1st one on local list, which must not be trimmed
-                       ld              r3,SAVprev(r3)                          ; Skip over the first
+                       .align  5
+
+srtrim:                
+                       mr              r2,r8                                           ; Save the guy we are releasing
+                       lwz             r8,SAVprev(r8)                          ; Skip over the first
                        subi    r7,r7,LocalSaveTarget           ; Figure out how much to trim   
-                       mr              r6,r3                                           ; r6 <- first one to trim
+                       mr              r6,r8                                           ; Save the first one to trim
                        mr              r5,r7                                           ; Save the number we are trimming
                        
-saveRet64a:
-            addic.     r7,r7,-1                                        ; Any left to do?
-                       ble--   saveRet64b                                      ; Nope...
-                       ld              r3,SAVprev(r3)                          ; Skip to the next one
-                       b               saveRet64a                                      ; Keep going...
+srtrimming:    addic.  r7,r7,-1                                        ; Any left to do?
+                       ble-    srtrimmed                                       ; Nope...
+                       lwz             r8,SAVprev(r8)                          ; Skip to the next one
+                       b               srtrimming                                      ; Keep going...
                        
-saveRet64b:                                                                            ; r3 <- last one to trim
-                       ld              r7,SAVprev(r3)                          ; Point to the first one not to trim
+                       .align  5
+
+srtrimmed:     lis             r10,hi16(EXT(saveanchor))       ; Get the high part of the anchor       
+                       lwz             r7,SAVprev(r8)                          ; Point to the next one
+                       ori             r10,r10,lo16(EXT(saveanchor))   ; Bottom half of the anchor 
                        li              r4,LocalSaveTarget                      ; Set the target count
-                       std             r7,SAVprev(r2)                          ; Trim stuff leaving the one just released as first
-                       stw             r4,lclfreecnt(r10)                      ; Set the current count
+                       stw             r7,SAVprev(r2)                          ; Trim stuff leaving the one just released as first
+                       stw             r4,lclfreecnt(r9)                       ; Set the current count
                        
+                       mflr    r9                                                      ; Save the return
                        bl              savelock                                        ; Lock up the anchor
                        
-                       ld              r8,SVfree(0)                            ; Get the old head of the free list
-                       lwz             r4,SVfreecnt(0)                         ; Get the number of free ones
-                       lwz             r7,SVinuse(0)                           ; Get the number that are in use
-                       std             r6,SVfree(0)                            ; Point to the first trimmed savearea
+                       lwz             r3,SVfree(r10)                          ; Get the old head of the free list
+                       lwz             r4,SVfreecnt(r10)                       ; Get the number of free ones
+                       lwz             r7,SVinuse(r10)                         ; Get the number that are in use
+                       stw             r6,SVfree(r10)                          ; Point to the first trimmed savearea
                        add             r4,r4,r5                                        ; Add number trimmed to free count
-                       std             r8,SAVprev(r3)                          ; Chain the old head to the tail of the trimmed guys
+                       stw             r3,SAVprev(r8)                          ; Chain the old head to the tail of the trimmed guys
                        sub             r7,r7,r5                                        ; Remove the trims from the in use count
-                       stw             r4,SVfreecnt(0)                         ; Set new free count
-                       stw             r7,SVinuse(0)                           ; Set new in use count
+                       stw             r4,SVfreecnt(r10)                       ; Set new free count
+                       stw             r7,SVinuse(r10)                         ; Set new in use count
 
-                       mtlr    r0                                                      ; Restore the return to our caller
-                       b               saveunlock                                      ; Set adjust count, unlock the saveanchor, and return
-            
+                       bl              saveunlock                                      ; Set adjust count and unlock the saveanchor
 
-/*
- * *********************
- * * s a v e R e t 3 2 *
- * *********************
- *
- *                     This is the internal routine to free a savearea, passed by 32-bit physical
- *                     address.  We assume that IR, DR, and EE are all off, and:
- *                             r3 = phys address of the savearea
- *                        r10 = per-proc ptr
- *                     We destroy:
- *                             r0,r2-r8.
- */
-            .align     5
- saveRet32:
-                       li              r0,SAVempty                                     ; Get marker for free savearea
-                       lwz             r7,lclfreecnt(r10)                      ; Get the local count
-                       lwz             r6,lclfree+4(r10)                       ; Get the old local header
-                       addi    r7,r7,1                                         ; Pop up the free count
-                       stw             r6,SAVprev+4(r3)                        ; Plant free chain pointer
-                       cmplwi  r7,LocalSaveMax                         ; Has the list gotten too long?
-                       stb             r0,SAVflags+2(r3)                       ; Mark savearea free
-                       stw             r3,lclfree+4(r10)                       ; Chain us on in
-                       stw             r7,lclfreecnt(r10)                      ; Bump up the count
-                       bltlr+                                                          ; List not too long, so done
-                       
-/*                     The local savearea chain has gotten too long.  Trim it down to the target.
- *                     Here's a tricky bit, and important:
- *
- *                     When we trim the list, we NEVER trim the very first one.  This is because that is
- *                     the very last one released and the exception exit code will release the savearea
- *                     BEFORE it is done using it. Wouldn't be too good if another processor started
- *                     using it, eh?  So for this case, we are safe so long as the savearea stays on
- *                     the local list.  (Note: the exit routine needs to do this because it is in the 
- *                     process of restoring all context and it needs to keep it until the last second.)
- */
+                       mtlr    r9                                                      ; Restore the return
 
-            mflr       r0                                                      ; save return to caller of saveRet32
-                       mr              r2,r3                                           ; r2 <- 1st one on local list, which must not be trimmed
-                       lwz             r3,SAVprev+4(r3)                        ; Skip over the first
-                       subi    r7,r7,LocalSaveTarget           ; Figure out how much to trim   
-                       mr              r6,r3                                           ; r6 <- first one to trim
-                       mr              r5,r7                                           ; Save the number we are trimming
-                       
-saveRet32a:
-            addic.     r7,r7,-1                                        ; Any left to do?
-                       ble-    saveRet32b                                      ; Nope...
-                       lwz             r3,SAVprev+4(r3)                        ; Skip to the next one
-                       b               saveRet32a                                      ; Keep going...
-                       
-saveRet32b:                                                                            ; r3 <- last one to trim
-                       lwz             r7,SAVprev+4(r3)                        ; Point to the first one not to trim
-                       li              r4,LocalSaveTarget                      ; Set the target count
-                       stw             r7,SAVprev+4(r2)                        ; Trim stuff leaving the one just released as first
-                       stw             r4,lclfreecnt(r10)                      ; Set the current count
-                       
-                       bl              savelock                                        ; Lock up the anchor
+                       btlr+   cr1_eq                                          ; Leave if we were a physical request...
                        
-                       lwz             r8,SVfree+4(0)                          ; Get the old head of the free list
-                       lwz             r4,SVfreecnt(0)                         ; Get the number of free ones
-                       lwz             r7,SVinuse(0)                           ; Get the number that are in use
-                       stw             r6,SVfree+4(0)                          ; Point to the first trimmed savearea
-                       add             r4,r4,r5                                        ; Add number trimmed to free count
-                       stw             r8,SAVprev+4(r3)                        ; Chain the old head to the tail of the trimmed guys
-                       sub             r7,r7,r5                                        ; Remove the trims from the in use count
-                       stw             r4,SVfreecnt(0)                         ; Set new free count
-                       stw             r7,SVinuse(0)                           ; Set new in use count
+                       mtmsr   r12                                                     ; Restore translation and exceptions
+                       isync                                                           ; Make sure about it
+       
+#if FPVECDBG
+                       lis             r0,HIGH_ADDR(CutTrace)          ; (TEST/DEBUG)
+                       mr              r3,r2                                           ; (TEST/DEBUG)
+                       li              r2,0x2205                                       ; (TEST/DEBUG)
+                       oris    r0,r0,LOW_ADDR(CutTrace)        ; (TEST/DEBUG) 
+                       sc                                                                      ; (TEST/DEBUG) 
+#endif
+                       blr                                                                     ; Leave...
 
-                       mtlr    r0                                                      ; Restore the return to our caller
-                       b               saveunlock                                      ; Set adjust count, unlock the saveanchor, and return
 
+;
+;                      NOTE: This is the most complicated part of savearea maintainence. 
+;                            Expect errors here.......
+;
+;                      save_trim_free - this routine will trim the free list down to the target count.
+;                      It trims the list and, if the pool page was fully allocated, puts that page on 
+;                      the start of the pool list.
+;
+;                      If the savearea being released is the last on a pool page (i.e., all entries
+;                      are released), the page is dequeued from the pool and queued to any other 
+;                      found during this scan.  Note that this queue is maintained virtually.
+;
+;                      When the scan is done, the saveanchor lock is released and the list of
+;                      freed pool pages is returned.
+
+
+;                      For latency sake we may want to revisit this code. If we are trimming a
+;                      large number of saveareas, we could be disabled and holding the savearea lock
+;                      for quite a while.  It may be that we want to break the trim down into parts.
+;                      Possibly trimming the free list, then individually pushing them into the free pool.
+;
+;                      This function expects to be called with translation on and a valid stack.
+;
 
-/*
- * *******************************
- * * s a v e _ t r i m _ f r e e *
- * *******************************
- *
- *     struct savearea_comm    *save_trim_free(void);
- *
- *                     Trim the free list down to the target count, ie by -(SVadjust) save areas.
- *                     It trims the list and, if a pool page was fully allocated, puts that page on 
- *                     the start of the pool list.
- *
- *                     If the savearea being released is the last on a pool page (i.e., all entries
- *                     are released), the page is dequeued from the pool and queued to any other 
- *                     found during this scan.  Note that this queue is maintained virtually.
- *
- *                     When the scan is done, the saveanchor lock is released and the list of
- *                     freed pool pages is returned to our caller.
- *
- *                     For latency sake we may want to revisit this code. If we are trimming a
- *                     large number of saveareas, we could be disabled and holding the savearea lock
- *                     for quite a while.  It may be that we want to break the trim down into parts.
- *                     Possibly trimming the free list, then individually pushing them into the free pool.
- *
- *                     This function expects to be called with translation on and a valid stack.
- *                     It uses the standard ABI, ie we destroy r2 and r3-r11, and return the ptr in r3.
- */
                        .align  5
                        .globl  EXT(save_trim_free)
 
 LEXT(save_trim_free)
 
                        subi    r1,r1,(FM_ALIGN(16)+FM_SIZE)    ; Make space for 4 registers on stack
-            mflr       r9                                                      ; save our return address
+                       mfsprg  r9,2                                            ; Get the feature flags
                        stw             r28,FM_SIZE+0(r1)                       ; Save R28
-                       stw             r29,FM_SIZE+4(r1)                       ; Save R29
-                       stw             r30,FM_SIZE+8(r1)                       ; Save R30
-                       stw             r31,FM_SIZE+12(r1)                      ; Save R31
-
-            bl         saveSetup                                       ; turn off translation and interrupts, load many regs
-            bl         savelock                                        ; Go lock up the anchor
+                       mfmsr   r12                                                     ; Get the MSR 
+                       rlwinm  r12,r12,0,MSR_FP_BIT+1,MSR_FP_BIT-1     ; Force floating point off
+                       rlwinm  r12,r12,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1   ; Force vectors off
+                       stw             r29,FM_SIZE+4(r1)                       ; Save R28
+                       mtcrf   0x04,r9                                         ; Set the features                      
+                       stw             r30,FM_SIZE+8(r1)                       ; Save R28
+                       lis             r10,hi16(EXT(saveanchor))       ; Get the high part of the anchor       
+                       stw             r31,FM_SIZE+12(r1)                      ; Save R28
+                       andi.   r3,r12,0x7FCF                           ; Turn off all translation and rupts
+                       ori             r10,r10,lo16(EXT(saveanchor))   ; Bottom half of the anchor 
+                       mflr    r9                                                      ; Save the return
+
+                       bt              pfNoMSRirb,stNoMSR                      ; No MSR...
+
+                       mtmsr   r3                                                      ; Translation and all off
+                       isync                                                           ; Toss prefetch
+                       b               stNoMSRx
+                       
+                       .align  5
+                       
+stNoMSR:       li              r0,loadMSR                                      ; Get the MSR setter SC
+                       sc                                                                      ; Set it
+                       
+stNoMSRx:      bl              savelock                                        ; Go lock up the anchor
 
-                       lwz             r8,SVadjust(0)                          ; How many do we need to clear out?
+                       lwz             r8,SVadjust(r10)                        ; How many do we need to clear out?
                        li              r3,0                                            ; Get a 0
                        neg.    r8,r8                                           ; Get the actual we need to toss (adjust is neg if too many)
-            ble-       save_trim_free1                         ; skip if no trimming needed anymore
-            bf--       pf64Bitb,saveTrim32                     ; handle 32-bit processors
-            b          saveTrim64                                      ; handle 64-bit processors
-
-save_trim_free1:                                                               ; by the time we were called, no need to trim anymore                   
-                       stw             r3,SVlock(0)                            ; Quick unlock (no need for sync or to set adjust, nothing changed)
+                       lwz             r7,SVfree(r10)                          ; Get the first on the free list
+                       bgt+    stneedtrim                                      ; Yeah, we still need it...
+                       
                        mtlr    r9                                                      ; Restore return
+                       stw             r3,SVlock(r10)                          ; Quick unlock (no need for sync or to set adjust, nothing changed)
+
+                       mtmsr   r12                                                     ; Restore translation and exceptions
+                       isync                                                           ; Make sure about it
        
 #if FPVECDBG
                        lis             r0,HIGH_ADDR(CutTrace)          ; (TEST/DEBUG)
@@ -834,42 +609,34 @@ save_trim_free1:                                                          ; by the time we were called, no need to trim anymore
                        oris    r0,r0,LOW_ADDR(CutTrace)        ; (TEST/DEBUG) 
                        sc                                                                      ; (TEST/DEBUG) 
 #endif
-                       addi    r1,r1,(FM_ALIGN(16)+FM_SIZE); Pop stack - have not trashed register so no need to reload
-                       b               saveRestore                                     ; restore translation and EE, turn SF off, return to our caller
-
-
-/*
- * ***********************
- * * s a v e T r i m 3 2 *
- * ***********************
- *
- *     Handle "save_trim_free" on 32-bit processors.  At this point, translation and interrupts
- *  are off, the savearea anchor is locked, and:
- *              r8 = #pages to trim (>0)
- *          r9 = return address
- *             r10 = per-proc ptr
- *             r11 = MSR at entry
- */
+                       addi    r1,r1,(FM_ALIGN(16)+FM_SIZE)    ; Pop stack - have not trashed register so no need to reload
+                       blr                                                                     ; Leave...
 
-saveTrim32:    
-                       lwz             r7,SVfree+4(0)                          ; Get the first on the free list
-            mr         r6,r7                                           ; Save the first one 
+                       .align  5
+                       
+stneedtrim:    mr              r6,r7                                           ; Save the first one 
                        mr              r5,r8                                           ; Save the number we are trimming
                        
+                       nop
+                       nop
+                       
 sttrimming:    addic.  r5,r5,-1                                        ; Any left to do?
                        ble-    sttrimmed                                       ; Nope...
-                       lwz             r7,SAVprev+4(r7)                        ; Skip to the next one
+                       lwz             r7,SAVprev(r7)                          ; Skip to the next one
                        b               sttrimming                                      ; Keep going...
+                       
+                       .align  5
 
-sttrimmed:     lwz             r5,SAVprev+4(r7)                        ; Get the next one (for new head of free list)
-                       lwz             r4,SVfreecnt(0)                         ; Get the free count
-                       stw             r5,SVfree+4(0)                          ; Set new head
+sttrimmed:     lwz             r5,SAVprev(r7)                          ; Get the next one (for new head of free list)
+                       lwz             r4,SVfreecnt(r10)                       ; Get the free count
+                       stw             r5,SVfree(r10)                          ; Set new head
                        sub             r4,r4,r8                                        ; Calculate the new free count
                        li              r31,0                                           ; Show we have no free pool blocks yet
-                       crclr   cr1_eq                                          ; dont exit loop before 1st iteration
-                       stw             r4,SVfreecnt(0)                         ; Set new free count
+                       cmplwi  cr1,r5,0                                        ; Make sure this is not equal
+                       stw             r4,SVfreecnt(r10)                       ; Set new free count
                        lis             r30,hi16(sac_empty)                     ; Get what empty looks like
                        
+;
 ;                      NOTE: The savearea size must be 640 (0x280).  We are doing a divide by shifts and stuff
 ;                      here.
 ;
@@ -877,17 +644,6 @@ sttrimmed: lwz             r5,SAVprev+4(r7)                        ; Get the next one (for new head of free list
 #error Savearea size is not 640!!!!!!!!!!!!
 #endif
 
-            ; Loop over each savearea we are trimming.
-            ;   r6 = next savearea to trim
-            ;   r7 = last savearea to trim
-            ;   r8 = #pages to trim (>0)
-            ;    r9 = return address
-            ;  r10 = per-proc ptr
-            ;  r11 = MSR at entry
-            ;  r30 = what SACalloc looks like when all saveareas are free
-            ;  r31 = free pool block list
-            ;  cr1 = beq set if we just trimmed the last, ie if we are done
-
 sttoss:                beq+    cr1,stdone                                      ; All done now...
 
                        cmplw   cr1,r6,r7                                       ; Have we finished the loop?
@@ -905,7 +661,7 @@ sttoss:             beq+    cr1,stdone                                      ; All done now...
                        srw             r4,r4,r0                                        ; Get the allocation mask
                        or              r5,r5,r4                                        ; Free this entry
                        cmplw   r5,r4                                           ; Is this the only free entry?
-                       lwz             r6,SAVprev+4(r6)                        ; Chain to the next trimmed savearea
+                       lwz             r6,SAVprev(r6)                          ; Chain to the next trimmed savearea
                        cmplw   cr7,r30,r5                                      ; Does this look empty?
                        stw             r5,SACalloc(r2)                         ; Save back the allocation bits
                        beq-    stputpool                                       ; First free entry, go put it into the pool...
@@ -917,19 +673,19 @@ sttoss:           beq+    cr1,stdone                                      ; All done now...
                        
                        lwz             r29,SACflags(r2)                        ; Get the flags
                        cmplwi  cr5,r31,0                                       ; Is this guy on the release list?
-                       lwz             r28,SACnext+4(r2)                       ; Get the forward chain
+                       lwz             r28,SACnext(r2)                         ; Get the forward chain
 
                        rlwinm. r0,r29,0,sac_permb,sac_permb    ; Is this a permanently allocated area? (also sets 0 needed below)
                        bne-    sttoss                                          ; This is permanent entry, do not try to release...
 
-                       lwz             r29,SACprev+4(r2)                       ; and the previous
+                       lwz             r29,SACprev(r2)                         ; and the previous
                        beq-    cr5,stnot1st                            ; Not first
-                       lwz             r0,SACvrswap+4(r31)                     ; Load the previous pool page vr conversion
+                       lwz             r0,SACvrswap(r31)                       ; Load the previous pool page vr conversion
                        
-stnot1st:      stw             r28,SACnext+4(r29)                      ; Previous guy points to my next
+stnot1st:      stw             r28,SACnext(r29)                        ; Previous guy points to my next
                        xor             r0,r0,r31                                       ; Make the last guy virtual
-                       stw             r29,SACprev+4(r28)                      ; Next guy points back to my previous                   
-                       stw             r0,SAVprev+4(r2)                        ; Store the old top virtual as my back chain
+                       stw             r29,SACprev(r28)                        ; Next guy points back to my previous                   
+                       stw             r0,SAVprev(r2)                          ; Store the old top virtual as my back chain
                        mr              r31,r2                                          ; My physical is now the head of the chain
                        b               sttoss                                          ; Get the next one...
                        
@@ -937,136 +693,31 @@ stnot1st:        stw             r28,SACnext+4(r29)                      ; Previous guy points to my next
 ;                      A pool block that had no free entries now has one.  Stick it on the pool list.
 ;
                        
-stputpool:     lwz             r28,SVpoolfwd+4(0)                      ; Get the first guy on the list
-                       li              r0,saveanchor                           ; Point to the saveanchor
-                       stw             r2,SVpoolfwd+4(0)                       ; Put us on the top of the list
-                       stw             r28,SACnext+4(r2)                       ; We point to the old top
-                       stw             r2,SACprev+4(r28)                       ; Old top guy points back to us
-                       stw             r0,SACprev+4(r2)                        ; Our back points to the anchor
-                       b               sttoss                                          ; Go on to the next one...
-
-
-/*
- * ***********************
- * * s a v e T r i m 6 4 *
- * ***********************
- *
- *     Handle "save_trim_free" on 64-bit processors.  At this point, translation and interrupts
- *  are off, SF is on, the savearea anchor is locked, and:
- *              r8 = #pages to trim (>0)
- *          r9 = return address
- *             r10 = per-proc ptr
- *             r11 = MSR at entry
- */
-
-saveTrim64:    
-                       ld              r7,SVfree(0)                            ; Get the first on the free list
-            mr         r6,r7                                           ; Save the first one 
-                       mr              r5,r8                                           ; Save the number we are trimming
-                       
-sttrimming64:  
-            addic.     r5,r5,-1                                        ; Any left to do?
-                       ble--   sttrimmed64                                     ; Nope...
-                       ld              r7,SAVprev(r7)                          ; Skip to the next one
-                       b               sttrimming64                            ; Keep going...
-
-sttrimmed64:
-            ld         r5,SAVprev(r7)                          ; Get the next one (for new head of free list)
-                       lwz             r4,SVfreecnt(0)                         ; Get the free count
-                       std             r5,SVfree(0)                            ; Set new head
-                       sub             r4,r4,r8                                        ; Calculate the new free count
-                       li              r31,0                                           ; Show we have no free pool blocks yet
-                       crclr   cr1_eq                                          ; dont exit loop before 1st iteration
-                       stw             r4,SVfreecnt(0)                         ; Set new free count
-                       lis             r30,hi16(sac_empty)                     ; Get what empty looks like
-                       
-
-            ; Loop over each savearea we are trimming.
-            ;   r6 = next savearea to trim
-            ;   r7 = last savearea to trim
-            ;   r8 = #pages to trim (>0)
-            ;    r9 = return address
-            ;  r10 = per-proc ptr
-            ;  r11 = MSR at entry
-            ;  r30 = what SACalloc looks like when all saveareas are free
-            ;  r31 = free pool block list
-            ;  cr1 = beq set if we just trimmed the last, ie if we are done
-            ;
-            ; WARNING: as in the 32-bit path, this code is doing a divide by 640 (SAVsize).
-
-sttoss64:
-            beq++      cr1,stdone                                      ; All done now...
-
-                       cmpld   cr1,r6,r7                                       ; Have we finished the loop?
-
-                       lis             r0,0x0044                                       ; Get top of table      
-                       rldicr  r2,r6,0,51                                      ; r2 <- phys addr of savearea block (with control area)
-                       ori             r0,r0,0x2200                            ; Finish shift table
-                       rlwinm  r4,r6,25,27,30                          ; Get (addr >> 7) & 0x1E (same as twice high nybble)
-                       lwz             r5,SACalloc(r2)                         ; Get the allocation bits
-                       addi    r4,r4,1                                         ; Shift 1 extra
-                       rlwinm  r3,r6,25,31,31                          ; Get (addr >> 7) & 1
-                       rlwnm   r0,r0,r4,29,31                          ; Get partial index
-                       lis             r4,lo16(0x8000)                         ; Get the bit mask
-                       add             r0,r0,r3                                        ; Make the real index
-                       srw             r4,r4,r0                                        ; Get the allocation mask
-                       or              r5,r5,r4                                        ; Free this entry
-                       cmplw   r5,r4                                           ; Is this the only free entry?
-                       ld              r6,SAVprev(r6)                          ; Chain to the next trimmed savearea
-                       cmplw   cr7,r30,r5                                      ; Does this look empty?
-                       stw             r5,SACalloc(r2)                         ; Save back the allocation bits
-                       beq--   stputpool64                                     ; First free entry, go put it into the pool...
-                       bne++   cr7,sttoss64                            ; Not an empty block
+                       .align  5
                        
-;                      We have an empty block.  Remove it from the pool list.
+stputpool:     lwz             r28,SVpoolfwd(r10)                      ; Get the first guy on the list
+                       stw             r2,SVpoolfwd(r10)                       ; Put us on the top of the list
+                       stw             r28,SACnext(r2)                         ; We point to the old top
+                       stw             r2,SACprev(r28)                         ; Old top guy points back to us
+                       stw             r10,SACprev(r2)                         ; Our back points to the anchor
+                       b               sttoss                                          ; Go on to the next one...
                        
-                       lwz             r29,SACflags(r2)                        ; Get the flags
-                       cmpldi  cr5,r31,0                                       ; Is this guy on the release list?
-                       ld              r28,SACnext(r2)                         ; Get the forward chain
-
-                       rlwinm. r0,r29,0,sac_permb,sac_permb    ; Is this a permanently allocated area? (also sets 0 needed below)
-                       bne--   sttoss64                                        ; This is permanent entry, do not try to release...
+;
+;                      We are all done.  Relocate pool release head, restore all, and go.
+;                      
 
-                       ld              r29,SACprev(r2)                         ; and the previous
-                       beq--   cr5,stnot1st64                          ; Not first
-                       ld              r0,SACvrswap(r31)                       ; Load the previous pool page vr conversion
-                       
-stnot1st64:    
-            std                r28,SACnext(r29)                        ; Previous guy points to my next
-                       xor             r0,r0,r31                                       ; Make the last guy virtual
-                       std             r29,SACprev(r28)                        ; Next guy points back to my previous                   
-                       std             r0,SAVprev(r2)                          ; Store the old top virtual as my back chain
-                       mr              r31,r2                                          ; My physical is now the head of the chain
-                       b               sttoss64                                        ; Get the next one...
-                       
-;                      A pool block that had no free entries now has one.  Stick it on the pool list.
-                       
-stputpool64:
-            ld         r28,SVpoolfwd(0)                        ; Get the first guy on the list
-                       li              r0,saveanchor                           ; Point to the saveanchor
-                       std             r2,SVpoolfwd(0)                         ; Put us on the top of the list
-                       std             r28,SACnext(r2)                         ; We point to the old top
-                       std             r2,SACprev(r28)                         ; Old top guy points back to us
-                       std             r0,SACprev(r2)                          ; Our back points to the anchor
-                       b               sttoss64                                        ; Go on to the next one...
+                       .align  5
                        
-
-;                      We are all done.  Relocate pool release head, restore all, and go.  This code
-;                      is used both by the 32 and 64-bit paths.
-;                               r9 = return address
-;                              r10 = per-proc ptr
-;                              r11 = MSR at entry
-;                              r31 = free pool block list
-
 stdone:                bl              saveunlock                                      ; Unlock the saveanchor and set adjust field
 
                        mr.             r3,r31                                          ; Move release chain and see if there are any
                        li              r5,0                                            ; Assume either V=R or no release chain
                        beq-    stnorel                                         ; Nothing to release...
-                       lwz             r5,SACvrswap+4(r31)                     ; Get the vr conversion (only need low half if 64-bit)
+                       lwz             r5,SACvrswap(r31)                       ; Get the vr conversion
+
+stnorel:       mtmsr   r12                                                     ; Restore translation and exceptions
+                       isync                                                           ; Make sure about it
 
-stnorel:       
-            bl         saveRestore                                     ; restore translation and exceptions, turn off SF
                        mtlr    r9                                                      ; Restore the return
                        
                        lwz             r28,FM_SIZE+0(r1)                       ; Restore R28
@@ -1075,7 +726,6 @@ stnorel:
                        lwz             r31,FM_SIZE+12(r1)                      ; Restore R31
                        addi    r1,r1,(FM_ALIGN(16)+FM_SIZE)    ; Pop the stack
                        xor             r3,r3,r5                                        ; Convert release chain address to virtual
-            rlwinm     r3,r3,0,0,31                            ; if 64-bit, clear upper half of virtual address
                                                        
 #if FPVECDBG
                        lis             r0,HIGH_ADDR(CutTrace)          ; (TEST/DEBUG)
@@ -1084,69 +734,70 @@ stnorel:
                        sc                                                                      ; (TEST/DEBUG) 
 #endif
                        blr                                                                     ; Return...
-            
-            
-/*
- * ***************************
- * * s a v e _ r e c o v e r *
- * ***************************
- *
- *     int save_recover(void);
- *
- *     Returns nonzero if we can get enough saveareas to hit the target.  We scan the free
- *     pool.  If we empty a pool block, we remove it from the pool list.
- */                    
+                       
+;
+;                      save_recover - here we scan the free pool and see if we can get
+;                      enough free saveareas to hit target.
+;
+;                      If we empty a pool block, remove it from the pool list
+;
+;
                        
                        .align  5
                        .globl  EXT(save_recover)
 
 LEXT(save_recover)
-            mflr       r9                                                      ; save return address
-            bl         saveSetup                                       ; turn translation and interrupts off, SF on, load many regs
-            bl         savelock                                        ; lock the savearea anchor
+                       mfsprg  r9,2                                            ; Get the feature flags
+                       mfmsr   r12                                                     ; Get the MSR 
+                       rlwinm  r12,r12,0,MSR_FP_BIT+1,MSR_FP_BIT-1     ; Force floating point off
+                       rlwinm  r12,r12,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1   ; Force vectors off
+                       mtcrf   0x04,r9                                         ; Set the features                      
+                       lis             r10,hi16(EXT(saveanchor))       ; Get the high part of the anchor       
+                       andi.   r3,r12,0x7FCF                           ; Turn off all translation and rupts
+                       ori             r10,r10,lo16(EXT(saveanchor))   ; Bottom half of the anchor 
+                       mflr    r9                                                      ; Save the return
+
+                       bt              pfNoMSRirb,srcNoMSR                     ; No MSR...
+
+                       mtmsr   r3                                                      ; Translation and all off
+                       isync                                                           ; Toss prefetch
+                       b               srcNoMSRx
+                       
+                       .align  5
+                       
+srcNoMSR:      li              r0,loadMSR                                      ; Get the MSR setter SC
+                       sc                                                                      ; Set it
+                       
+srcNoMSRx:     bl              savelock                                        ; Go lock up the anchor
 
-                       lwz             r8,SVadjust(0)                          ; How many do we need to clear get?
+                       lwz             r8,SVadjust(r10)                        ; How many do we need to clear get?
                        li              r3,0                                            ; Get a 0
                        mr.             r8,r8                                           ; Do we need any?
-            ble--      save_recover1                           ; not any more
-            bf--       pf64Bitb,saveRecover32          ; handle 32-bit processor
-            b          saveRecover64                           ; handle 64-bit processor
-            
-save_recover1:                                                                 ; by the time we locked the anchor, no longer short
+                       bgt+    srcneedmore                                     ; Yeah, we still need it...
+                       
                        mtlr    r9                                                      ; Restore return
-                       stw             r3,SVlock(0)                            ; Quick unlock (no need for sync or to set adjust, nothing changed)
+                       stw             r3,SVlock(r10)                          ; Quick unlock (no need for sync or to set adjust, nothing changed)
+
+                       mtmsr   r12                                                     ; Restore translation and exceptions
+                       isync                                                           ; Make sure about it
+       
 #if FPVECDBG
                        lis             r0,HIGH_ADDR(CutTrace)          ; (TEST/DEBUG)
                        li              r2,0x2208                                       ; (TEST/DEBUG)
                        oris    r0,r0,LOW_ADDR(CutTrace)        ; (TEST/DEBUG) 
                        sc                                                                      ; (TEST/DEBUG) 
 #endif
-                       b               saveRestore                                     ; turn translation etc back on, return to our caller
-
+                       blr                                                                     ; Leave...
 
-/*
- * *****************************
- * * s a v e R e c o v e r 3 2 *
- * *****************************
- *
- *     Handle "save_recover" on 32-bit processors.  At this point, translation and interrupts
- *  are off, the savearea anchor is locked, and:
- *              r8 = #pages to recover
- *          r9 = return address
- *             r10 = per-proc ptr
- *             r11 = MSR at entry
- */
-
-saveRecover32:
-                       li              r6,saveanchor                           ; Start at pool anchor
-                       crclr   cr1_eq                                          ; initialize the loop test                                      
-                       lwz             r7,SVfreecnt(0)                         ; Get the current free count
-
-
-; Loop over next block in free pool.  r6 is the ptr to the last block we looked at.
-
-srcnpool:      lwz             r6,SACnext+4(r6)                        ; Point to the next one
-                       cmplwi  r6,saveanchor                           ; Have we wrapped?
+                       .align  5
+       
+srcneedmore:
+                       mr              r6,r10                                          ; Start at pool anchor
+                       cmplwi  cr1,r10,0                                       ; Make sure we start as not equal                                       
+                       lwz             r7,SVfreecnt(r10)                       ; Get the current free count
+                       
+srcnpool:      lwz             r6,SACnext(r6)                          ; Point to the next one
+                       cmplw   r6,r10                                          ; Have we wrapped?
                        beq-    srcdone                                         ; Yes, did not have enough...
                        
                        lwz             r5,SACalloc(r6)                         ; Pick up the allocation for this pool block
@@ -1159,16 +810,6 @@ srcnpool: lwz             r6,SACnext+4(r6)                        ; Point to the next one
 #error Savearea size is not 640!!!!!!!!!!!!
 #endif
 
-; Loop over free savearea in current block.
-;               r5 = bitmap of free saveareas in block at r6 (ie, SACalloc)
-;               r6 = ptr to current free pool block
-;               r7 = free count
-;               r8 = #pages more we still need to recover
-;           r9 = return address
-;              r10 = per-proc ptr
-;              r11 = MSR at entry
-;              cr1 = beq if (r8==0)
-
 srcnext:       beq-    cr1,srcdone                                     ; We have no more to get...
 
                        lis             r3,0x8000                                       ; Get the top bit on
@@ -1184,273 +825,130 @@ srcnext:       beq-    cr1,srcdone                                     ; We have no more to get...
                        stw             r5,SACalloc(r6)                         ; Set new allocation bits
                        
                        add             r2,r2,r6                                        ; Get the actual address of the savearea
-                       lwz             r3,SVfree+4(0)                          ; Get the head of the chain
+                       lwz             r3,SVfree(r10)                          ; Get the head of the chain
                        cmplwi  cr1,r8,0                                        ; Do we actually need any more?
-                       stw             r2,SVfree+4(0)                          ; Push ourselves in the front
-                       stw             r3,SAVprev+4(r2)                        ; Chain the rest of the list behind 
+                       stw             r2,SVfree(r10)                          ; Push ourselves in the front
+                       stw             r3,SAVprev(r2)                          ; Chain the rest of the list behind 
                        
                        bne+    srcnext                                         ; The pool block is not empty yet, try for another...
                        
-                       lwz             r2,SACnext+4(r6)                        ; Get the next pointer
-                       lwz             r3,SACprev+4(r6)                        ; Get the previous pointer
-                       stw             r3,SACprev+4(r2)                        ; The previous of my next points to my previous
-                       stw             r2,SACnext+4(r3)                        ; The next of my previous points to my next
+                       lwz             r2,SACnext(r6)                          ; Get the next pointer
+                       lwz             r3,SACprev(r6)                          ; Get the previous pointer
+                       stw             r3,SACprev(r2)                          ; The previous of my next points to my previous
+                       stw             r2,SACnext(r3)                          ; The next of my previous points to my next
                        bne+    cr1,srcnpool                            ; We still have more to do...
-
-
-; Join here from 64-bit path when we have recovered all the saveareas we need to.
-
-srcdone:       stw             r7,SVfreecnt(0)                         ; Set the new free count
+                       
+srcdone:       stw             r7,SVfreecnt(r10)                       ; Set the new free count
                        bl              saveunlock                                      ; Unlock the save and set adjust field
 
                        mtlr    r9                                                      ; Restore the return
+                       mtmsr   r12                                                     ; Restore translation and exceptions
+                       isync                                                           ; Make sure about it
+       
 #if FPVECDBG
                        lis             r0,HIGH_ADDR(CutTrace)          ; (TEST/DEBUG)
                        li              r2,0x2209                                       ; (TEST/DEBUG)
                        oris    r0,r0,LOW_ADDR(CutTrace)        ; (TEST/DEBUG) 
                        sc                                                                      ; (TEST/DEBUG) 
 #endif
-                       b               saveRestore                                     ; turn xlate and EE back on, SF off, and return to our caller
-
-
-/*
- * *****************************
- * * s a v e R e c o v e r 6 4 *
- * *****************************
- *
- *     Handle "save_recover" on 64-bit processors.  At this point, translation and interrupts
- *  are off, the savearea anchor is locked, and:
- *              r8 = #pages to recover
- *          r9 = return address
- *             r10 = per-proc ptr
- *             r11 = MSR at entry
- */
-
-saveRecover64:
-                       li              r6,saveanchor                           ; Start at pool anchor
-                       crclr   cr1_eq                                          ; initialize the loop test                                      
-                       lwz             r7,SVfreecnt(0)                         ; Get the current free count
-
-
-; Loop over next block in free pool.  r6 is the ptr to the last block we looked at.
-
-srcnpool64:    
-            ld         r6,SACnext(r6)                          ; Point to the next one
-                       cmpldi  r6,saveanchor                           ; Have we wrapped?
-                       beq--   srcdone                                         ; Yes, did not have enough...
+                       blr                                                                     ; Leave...
                        
-                       lwz             r5,SACalloc(r6)                         ; Pick up the allocation for this pool block
-                       
-
-; Loop over free savearea in current block.
-;               r5 = bitmap of free saveareas in block at r6 (ie, SACalloc)
-;               r6 = ptr to current free pool block
-;               r7 = free count
-;               r8 = #pages more we still need to recover
-;           r9 = return address
-;              r10 = per-proc ptr
-;              r11 = MSR at entry
-;              cr1 = beq if (r8==0)
 ;
-; WARNING: as in the 32-bit path, we depend on (SAVsize==640)
+;                      Here is where we lock the saveanchor lock
+;                      We assume R10 points to the saveanchor
+;                      We trash R7 and R3
+;
 
-srcnext64:     
-            beq--      cr1,srcdone                                     ; We have no more to get...
+                       .align  5
+       
+savelock:      lwarx   r7,0,r10                                        ; Grab the lock value 
+                       li              r3,1                                            ; Use part of the delay time 
+                       mr.             r7,r7                                           ; Is it locked? */
+                       bne-    sllcks                                          ; Yeah, wait for it to clear...
+                       stwcx.  r3,0,r10                                        ; Try to seize that there durn lock
+                       beq+    sllckd                                          ; Got it...
+                       b               savelock                                        ; Collision, try again...
 
-                       lis             r3,0x8000                                       ; Get the top bit on
-                       cntlzw  r4,r5                                           ; Find a free slot
-                       addi    r7,r7,1                                         ; Bump up the free count
-                       srw             r3,r3,r4                                        ; Make a mask
-                       slwi    r0,r4,7                                         ; First multiply by 128
-                       subi    r8,r8,1                                         ; Decrement the need count
-                       slwi    r2,r4,9                                         ; Then multiply by 512
-                       andc.   r5,r5,r3                                        ; Clear out the "free" bit
-                       add             r2,r2,r0                                        ; Sum to multiply by 640        
-                       
-                       stw             r5,SACalloc(r6)                         ; Set new allocation bits
+                       .align  5
                        
-                       add             r2,r2,r6                                        ; Get the actual address of the savearea
-                       ld              r3,SVfree(0)                            ; Get the head of the chain
-                       cmplwi  cr1,r8,0                                        ; Do we actually need any more?
-                       std             r2,SVfree(0)                            ; Push ourselves in the front
-                       std             r3,SAVprev(r2)                          ; Chain the rest of the list behind 
+sllcks:                lwz             r7,SVlock(r10)                          ; Get that lock in here
+                       mr.             r7,r7                                           ; Is it free yet?
+                       beq+    savelock                                        ; Yeah, try for it again...
+                       b               sllcks                                          ; Sniff away...
                        
-                       bne++   srcnext64                                       ; The pool block is not empty yet, try for another...
+                       nop                                                                     ; Force isync to last in ifetch buffer
+                       nop
+                       nop
                        
-                       ld              r2,SACnext(r6)                          ; Get the next pointer
-                       ld              r3,SACprev(r6)                          ; Get the previous pointer
-                       std             r3,SACprev(r2)                          ; The previous of my next points to my previous
-                       std             r2,SACnext(r3)                          ; The next of my previous points to my next
-                       bne++   cr1,srcnpool64                          ; We still have more to do...
-            
-            b          srcdone
-
+sllckd:                isync                                                           ; Make sure translation is off
+                       blr                                                                     ; Return....
 
-/* 
- * *******************
- * * s a v e l o c k *
- * *******************
- *
- *                     Lock the savearea anchor, so we can manipulate the free list.
- *              msr = interrupts and translation off
- *                     We destroy:
- *                             r8, r3, r12
- */                    
-                       .align  5
 
-savelock:      lwz             r8,SVlock(0)                            ; See if lock is held
-            cmpwi      r8,0
-                       li              r12,saveanchor                          ; Point to the saveanchor
-                       bne--   savelock                                        ; loop until lock released...
-               
-savelock0:     lwarx   r8,0,r12                                        ; Grab the lock value 
-                       cmpwi   r8,0                                            ; taken?
-            li         r8,1                                            ; get nonzero to lock it with
-                       bne--   savelock1                                       ; already locked, wait for it to clear...
-                       stwcx.  r8,0,r12                                        ; Try to seize that there durn lock
-            isync                                                              ; assume we got it
-            beqlr++                                                            ; reservation not lost, so we have the lock
-                       b               savelock0                                       ; Try again...
-                       
-savelock1:     li              r8,lgKillResv                           ; Point to killing field
-                       stwcx.  r8,0,r8                                         ; Kill reservation
-                       b               savelock                                        ; Start over....
-               
+;
+;                      This is the common routine that sets the saveadjust field and unlocks the savearea 
+;                      anchor.
+;                      
+;                      Note that we can not use R9 here because we use it to save the LR across the call.
+;                      Also, R10 is assumed to point to the saveanchor. R3 is also reserved.
+;
 
-/*
- * ***********************
- * * s a v e u n l o c k *
- * ***********************
- *
- *
- *                     This is the common routine that sets the saveadjust field and unlocks the savearea 
- *                     anchor.
- *                             msr = interrupts and translation off
- *                     We destroy:
- *                             r2, r5, r6, r8.
- */
                        .align  5
+
 saveunlock:
-                       lwz             r6,SVfreecnt(0)                         ; and the number on the free list
-                       lwz             r5,SVinuse(0)                           ; Pick up the in use count
-            subic.     r8,r6,FreeListMin                       ; do we have at least the minimum?
-                       lwz             r2,SVtarget(0)                          ; Get the target
-            neg                r8,r8                                           ; assuming we are short, get r8 <- shortfall
-            blt--      saveunlock1                                     ; skip if fewer than minimum on free list
+                       lwz             r6,SVfreecnt(r10)                       ; and the number on the free list
+                       lwz             r5,SVinuse(r10)                         ; Pick up the in use count
+                       cmplwi  r6,FreeListMin                          ; Do we have at least the minimum?
+                       blt-    sutooshort                                      ; Do not have minumum....
+                       lwz             r7,SVtarget(r10)                        ; Get the target
                        
                        add             r6,r6,r5                                        ; Get the total number of saveareas
-                       addi    r5,r2,-SaveLowHysteresis        ; Find low end of acceptible range
+                       addi    r5,r7,-SaveLowHysteresis        ; Find bottom
                        sub             r5,r6,r5                                        ; Make everything below hysteresis negative
-                       sub             r2,r2,r6                                        ; Get the distance from the target
+                       sub             r7,r7,r6                                        ; Get the distance from the target
+                       rlwinm  r5,r5,0,0,31                            ; Clear negative bit
                        addi    r5,r5,-(SaveLowHysteresis + SaveHighHysteresis + 1)     ; Subtract full hysteresis range
                        srawi   r5,r5,31                                        ; Get 0xFFFFFFFF if outside range or 0 if inside
-                       and             r8,r2,r5                                        ; r8 <- 0 if in range or distance to target if not
+                       and             r7,r7,r5                                        ; Get 0 if in range or distance to target if not
 
-saveunlock1:
-                       li              r5,0                                            ; Set a clear value
-                       stw             r8,SVadjust(0)                          ; Set the adjustment value                      
-                       eieio                                                           ; Make sure everything is done
-                       stw             r5,SVlock(0)                            ; Unlock the savearea chain 
+                       li              r8,0                                            ; Set a clear value
+                       stw             r7,SVadjust(r10)                        ; Set the adjustment value                      
+
+                       sync                                                            ; Make sure everything is done
+                       stw             r8,SVlock(r10)                          ; Unlock the savearea chain 
                        blr
+                       
+                       .align  5
+                       
+sutooshort:    subfic  r6,r6,FreeListMin                       ; Get the number needed to hit minimum
+                       li              r8,0                                            ; Set a clear value
+                       stw             r6,SVadjust(r10)                        ; Set the adjustment value                      
+
+                       sync                                                            ; Make sure everything is done
+                       stw             r8,SVlock(r10)                          ; Unlock the savearea chain 
+                       blr
+
+
 
 
 /*
- * *******************
- * * s a v e _ c p v *
- * *******************
- *
- *     struct savearea *save_cpv(addr64_t saveAreaPhysAddr);
- *
- *          Converts a physical savearea address to virtual.  Called with translation on
- *                     and in 32-bit mode.  Note that the argument is passed as a long long in (r3,r4).
+ *                     struct savearea *save_cpv(struct savearea *);    Converts a physical savearea address to virtual
  */
 
                        .align  5
                        .globl  EXT(save_cpv)
 
 LEXT(save_cpv)
-            mflr       r9                                                      ; save return address
-            mr         r8,r3                                           ; save upper half of phys address here
-            bl         saveSetup                                       ; turn off translation and interrupts, turn SF on
-                       rlwinm  r5,r4,0,0,19                            ; Round back to the start of the physical savearea block
-            bf--       pf64Bitb,save_cpv1                      ; skip if 32-bit processor
-            rldimi     r5,r8,32,0                                      ; r5 <- 64-bit phys address of block
-save_cpv1:
-                       lwz             r6,SACvrswap+4(r5)                      ; Get the conversion to virtual (only need low half if 64-bit)
-            mtlr       r9                                                      ; restore return address
-            xor                r3,r4,r6                                        ; convert phys to virtual
-            rlwinm     r3,r3,0,0,31                            ; if 64-bit, zero upper half of virtual address
-            b          saveRestore                                     ; turn translation etc back on, SF off, and return r3
-                               
                        
-/*
- * *********************
- * * s a v e S e t u p *
- * *********************
- *
- * This routine is called at the start of all the save-area subroutines.
- * It turns off translation, disabled interrupts, turns on 64-bit mode,
- * and sets up cr6 with the feature flags (especially pf64Bit).
- * 
- * Note that most save-area routines cannot take _any_ interrupt (such as a
- * PTE miss) once the savearea anchor is locked, since that would result in
- * instant deadlock as we need a save-area to process any exception.
- * We set up:
- *             r10 = per-proc ptr
- *             r11 = old MSR
- *             cr5 = pfNoMSRir feature flag
- *             cr6 = pf64Bit   feature flag
- *
- * We use r0, r3, r10, and r11.
- */
-saveSetup:
-            mfmsr      r11                                                     ; get msr
-                       mfsprg  r3,2                                            ; get feature flags
-                       li              r0,0
-            mtcrf      0x2,r3                                          ; copy pf64Bit to cr6
-            ori                r0,r0,lo16(MASK(MSR_IR)+MASK(MSR_DR)+MASK(MSR_EE))
-            mtcrf      0x4,r3                                          ; copy pfNoMSRir to cr5
-            andc       r3,r11,r0                                       ; turn off IR, DR, and EE
-            li         r0,1                                            ; get a 1 in case its a 64-bit machine
-            bf--       pf64Bitb,saveSetup1                     ; skip if not a 64-bit machine
-                       rldimi  r3,r0,63,MSR_SF_BIT                     ; turn SF (bit 0) on
-            mtmsrd     r3                                                      ; turn translation and interrupts off, 64-bit mode on
-            isync                                                              ; wait for it to happen
-            mfsprg     r10,0                                           ; get per-proc ptr
-            blr
-saveSetup1:                                                                            ; here on 32-bit machines
-            bt-                pfNoMSRirb,saveSetup2           ; skip if cannot turn off IR with a mtmsr
-            mtmsr      r3                                                      ; turn translation and interrupts off
-            isync                                                              ; wait for it to happen
-            mfsprg     r10,0                                           ; get per-proc ptr
-            blr
-saveSetup2:                                                                            ; here if pfNoMSRir set for this machine
-            li         r0,loadMSR                                      ; we will "mtmsr r3" via system call
-            sc
-            mfsprg     r10,0                                           ; get per-proc ptr
-            blr
-        
-                       
-/*
- * *************************
- * * s a v e R e s t o r e *
- * *************************
- *
- * Undoes the effect of calling "saveSetup", ie it turns relocation and interrupts back on,
- * and turns 64-bit mode back off.
- *             r11 = old MSR
- *             cr6 = pf64Bit   feature flag
- */
-saveRestore:
-            bt++       pf64Bitb,saveRestore64          ; handle a 64-bit processor
-saveRestore32:
-            mtmsr      r11                                                     ; restore MSR
-            isync                                                              ; wait for translation to start up
-            blr
-saveRestore64:                                                                 ; 64-bit processor
-            mtmsrd     r11                                                     ; restore MSR
-            isync                                                              ; wait for changes to happen
-            blr
-
+                       mfmsr   r10                                                     ; Get the current MSR
+                       rlwinm  r10,r10,0,MSR_FP_BIT+1,MSR_FP_BIT-1     ; Force floating point off
+                       rlwinm  r10,r10,0,MSR_VEC_BIT+1,MSR_VEC_BIT-1   ; Force vectors off
+                       rlwinm  r4,r3,0,0,19                            ; Round back to the start of the physical savearea block
+                       andi.   r9,r10,0x7FEF                           ; Turn off interrupts and data translation
+                       mtmsr   r9                                                      ; Disable DR and EE
+                       isync
+                       
+                       lwz             r4,SACvrswap(r4)                        ; Get the conversion to virtual
+                       mtmsr   r10                                                     ; Interrupts and DR back on
+                       isync
+                       xor             r3,r3,r4                                        ; Convert to physical
+                       blr
index 9a2fd0bf2b2be060af75764fe45ed818450eb854..b6430899bd0811b11cf0fba43efa7e049306c0e5 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8136071c5a81c74455fed224d2e1941615be781c..cbf92e7cfacbf9369a3a7b1ca79e1496c0794def 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 54899e4113927b9e68b196fbeb79a8842b862bb6..2e5768c745c3d05d2d993b7e26031e22568c1f64 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -39,6 +36,7 @@
 #include <ppc/POWERMAC/video_console_entries.h>
 #include <ppc/misc_protos.h>
 #include <ppc/POWERMAC/serial_io.h>
+#include <ppc/POWERMAC/mp/mp.h>
 #include <kern/cpu_number.h>
 #include <ppc/Firmware.h>
 #include <ppc/proc_reg.h>
@@ -101,7 +99,6 @@ unsigned int killprint = 0;
 unsigned int debcnputc = 0;
 extern unsigned int    mappingdeb0;
 extern int debugger_holdoff[NCPUS];
-extern int debugger_cpu;
 
 static void _cnputc(char c)
 {
index e58bd12bd95f5b861a3d69dcee838941296c8f8c..508165fab70279b24eb8201db0fde31645ee18b3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 88d639fa8f7fd92e68c8b71b7c880f42f68b3303..a1a0b34c4fdaf745d0ab34cfc15bc76c02e4e03d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
diff --git a/osfmk/ppc/skiplists.s b/osfmk/ppc/skiplists.s
deleted file mode 100644 (file)
index 4bb4a78..0000000
+++ /dev/null
@@ -1,1304 +0,0 @@
-/*
- * Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_LICENSE_HEADER_END@
- */
-
-/* skiplists.s
- *
- * These are the subroutines that manage the skip-list data structures used for the
- * resident mappings for each pmap.  We used to use a much simpler hash-based scheme,
- * but it didn't scale well for 64-bit address spaces and multi-GB real memories.
- * Here's a brief tutorial on skip-lists:
- *
- * The basic idea is that each mapping is on one or more singly-linked lists, sorted
- * in increasing order by virtual address.  The number of lists a mapping is on is an
- * invariant property determined when the mapping is created, using an exponentially-
- * distributed random number.  Every mapping is on the first list.  Ideally, each
- * successive list has only 1/F as many nodes on it as the previous, where F is the
- * "fanout."  With a max of n lists, up to F**n nodes can be handled optimally.
- *
- * Searching, adding, and deleting from a skip-list can all be done in O(ln(n)) time.
- * Because the first skip-list is just a sorted list of all mappings, it is also
- * efficient to purge a sparsely populated pmap of all the mappings in a large range,
- * for example when tearing down an address space.  Large-range deletes are the
- * primary advantage of skip-lists over a hash, btw.
- *
- * We currently use a fanout of 4 and a maximum of 12 lists (cf kSkipListFanoutShift
- * and kSkipListMaxLists.)  Thus, we can optimally handle pmaps with as many as 4**12 
- * pages, which is 64GB of resident physical memory per pmap.  Pmaps can be larger than
- * this, albeit with diminishing efficiency.
- *
- * The major problem with skip-lists is that we could waste a lot of space with 12
- * 64-bit link fields in every mapping.  So we currently have two sizes of mappings:
- * 64-byte nodes with 4 list links, and 128-byte nodes with 12.  Only one in every
- * (4**4)==256 mappings requires the larger node, so the average size is 64.25 bytes.
- * In practice, the additional complexity of the variable node size is entirely
- * contained in the allocate and free routines.
- *
- * The other, mostly theoretic problem with skip-lists is that they have worst cases
- * where performance becomes nearly linear.  These worst-cases are quite rare but there
- * is no practical way to prevent them.
- */   
-
-; set nonzero to accumulate skip-list stats on a per-map basis:
-#define        SKIPLISTSTATS   1
-
-; cr7 bit set when mapSearchFull() finds a match on a high list:
-#define        bFullFound      28
-
-#include <assym.s>
-#include <debug.h>
-#include <ppc/asm.h>
-#include <ppc/proc_reg.h>
-#include <ppc/exception.h>
-
-
-/*
- *  *********************
- *     * m a p S e a r c h *
- *     *********************
- *
- * Given a pmap and a virtual address (VA), find the mapping for that address.
- * This is the fast call, that does not set up the previous-ptr vector or make
- * consistency checks.  When called:
- *             the pmap is locked (shared or exclusive)
- *             translation is off, interrupts masked
- *             64-bit mode is enabled (if on a 64-bit machine)
- *             cr6 is loaded with the corresponding feature flags (in particular, pf64Bit)
- *             r3 = pmap ptr
- *             r4 = high 32 bits of key to search for (0 if a 32-bit processor)
- *             r5 = low 32 bits of key (low 12 bits may be nonzero garbage)
- *             r7 = mpFlags field if found.  Undefined if not
- *
- * We return the mapping ptr (or 0) in r3, and the next VA (or 0 if no more) in r4 and r5.
- * Except for cr6 (which is global), we trash nonvolatile regs.  Called both on 32- and 64-bit
- * machines, though we quickly branch into parallel code paths.
- */ 
-            .text
-                       .align  5
-            .globl     EXT(mapSearch)
-LEXT(mapSearch)
-            lbz                r7,pmapCurLists(r3)             ; get largest #lists any mapping is on
-            la         r8,pmapSkipLists+4(r3)  ; point to lists in pmap, assuming 32-bit machine
-            rlwinm     r5,r5,0,0,19                    ; zero low 12 bits of key
-            mr         r6,r3                                   ; save pmap ptr here so we can accumulate statistics
-            li         r9,0                                    ; initialize prev ptr
-            addic.     r7,r7,-1                                ; get base-0 number of last list, and test for 0
-            li         r2,0                                    ; initialize count of mappings visited
-            slwi       r7,r7,3                                 ; get offset of last list in use
-            blt--      mapSrchPmapEmpty                ; pmapCurLists==0 (ie, no mappings)
-            lwzx       r3,r8,r7                                ; get 32-bit ptr to 1st mapping in highest list
-            bf--       pf64Bitb,mapSrch32c             ; skip if 32-bit processor
-            subi       r8,r8,4                                 ; we use all 64 bits of ptrs
-            rldimi     r5,r4,32,0                              ; r5 <- 64-bit va
-            ldx                r3,r8,r7                                ; get 64-bit ptr to 1st mapping in highest list
-            b          mapSrch64c                              ; enter 64-bit search loop
-
-            
-            ; 64-bit processors.  Check next mapping.
-            ;   r2 = count of mappings visited so far
-            ;  r3 = current mapping ptr
-            ;  r4 = va of current mapping (ie, of r3)
-            ;  r5 = va to search for (the "key") (low 12 bits are 0)
-            ;  r6 = pmap ptr
-            ;  r7 = current skip list number * 8
-            ;  r8 = ptr to skip list vector of mapping pointed to by r9 (or pmap, if r9==0)
-            ;  r9 = prev ptr, or 0 if none
-            
-            .align     5
-mapSrch64a:                                                                    ; loop over each mapping
-            ld         r4,mpVAddr(r3)                  ; get va for this mapping (plus flags in low 12 bits)
-            addi       r2,r2,1                                 ; count mappings visited
-            rldicr     r4,r4,0,51                              ; zero low 12 bits of mapping va
-            cmpld      cr1,r5,r4                               ; compare the vas
-            blt                cr1,mapSrch64d                  ; key is less, try next list
-            la         r8,mpList0(r3)                  ; point to skip list vector in this mapping
-            mr         r9,r3                                   ; remember prev ptr
-            beq--      cr1,mapSrch64Found              ; this is the correct mapping
-            ldx                r3,r7,r8                                ; get ptr to next mapping in current list
-mapSrch64c:
-            mr.                r3,r3                                   ; was there another mapping on current list?
-            bne++      mapSrch64a                              ; was another, so loop
-mapSrch64d:
-            subic.     r7,r7,8                                 ; move on to next list offset
-            ldx                r3,r7,r8                                ; get next mapping on next list (if any)
-            bge++      mapSrch64c                              ; loop to try next list
-          
-            ; Mapping not found, check to see if prev node was a block mapping or nested pmap.
-            ; If not, or if our address is not covered by the block or nested map, return 0.
-            ; Note the advantage of keeping the check for block mappings (and nested pmaps)
-            ; out of the inner loop; we do the special case work at most once per search, and
-            ; never for the most-common case of finding a scalar mapping.  The full searches
-            ; must check _in_ the inner loop, to get the prev ptrs right.
-
-            mr.                r9,r9                                   ; was there a prev ptr?
-            li         r3,0                                    ; assume we are going to return null
-            ld         r4,pmapSkipLists(r6)    ; assume prev ptr null... so next is first
-            beq--      mapSrch64Exit                   ; prev ptr was null, search failed
-            lwz                r0,mpFlags(r9)                  ; get flag bits from prev mapping
-            ld         r10,mpVAddr(r9)                 ; re-fetch base address of prev ptr
-            ld         r4,mpList0(r9)                  ; get 64-bit ptr to next mapping, if any
-            andi.      r0,r0,mpBlock+mpNest    ; block mapping or nested pmap?
-            lhz                r11,mpBSize(r9)                 ; get #pages/#segments in block/submap mapping
-            rldicr     r10,r10,0,51                    ; zero low 12 bits of mapping va
-            beq                mapSrch64Exit                   ; prev mapping was just a scalar page, search failed
-            cmpwi      r0,mpBlock                              ; block mapping or nested pmap?
-            sldi       r0,r11,12                               ; assume block mapping, get size in bytes - 4k
-            beq                mapSrch64f                              ; we guessed right, it was a block mapping
-            addi       r11,r11,1                               ; mpBSize is 1 too low
-            sldi       r11,r11,28                              ; in a nested pmap, mpBSize is in units of segments
-            subi       r0,r11,4096                             ; get address of last page in submap
-mapSrch64f:
-            add                r10,r10,r0                              ; r10 <- last page in this mapping
-            cmpld      r5,r10                                  ; does this mapping cover our page?
-            bgt                mapSrch64Exit                   ; no, search failed
-            mr         r3,r9                                   ; yes, we found it
-
-            ; found the mapping
-            ;   r2 = count of nodes visited
-            ;  r3 = the mapping
-            ;  r6 = pmap ptr
-            
-mapSrch64Found:                                                                ; WARNING: can drop down to here
-            ld         r4,mpList0(r3)                  ; get ptr to next mapping
-            lwz                r7,mpFlags(r3)                  ; Get the flags for our caller
-            
-            ;   r2 = count of nodes visited
-            ;  r3 = return value (ie, found mapping or 0)
-            ;   r4 = next mapping (or 0 if none)
-            ;  r6 = pmap ptr
-            ;  r7 = mpFlags
-            
-mapSrch64Exit:                                                         ; WARNING: can drop down to here
-            mr.                r5,r4                                   ; next ptr null?
-#if    SKIPLISTSTATS
-            lwz                r10,pmapSearchCnt(r6)   ; prepare to accumulate statistics
-            ld         r8,pmapSearchVisits(r6)
-            addi       r10,r10,1                               ; count searches
-            add                r8,r8,r2                                ; count nodes visited
-            stw                r10,pmapSearchCnt(r6)
-            std                r8,pmapSearchVisits(r6)
-#endif
-            beqlr-                                                     ; next ptr was null, so return 0 in r4 and r5
-            lwz                r5,mpVAddr+4(r4)                ; get VA of next node
-            lwz                r4,mpVAddr+0(r4)
-            blr
-
-            
-            ; 32-bit processors.  Check next mapping.
-            ;   r2 = count of mappings visited so far
-            ;  r3 = current mapping ptr
-            ;  r4 = va of current mapping (ie, of r3)
-            ;  r5 = va to search for (the "key") (low 12 bits are 0)
-            ;  r6 = pmap ptr
-            ;  r7 = current skip list number * 8
-            ;  r8 = ptr to skip list vector of mapping pointed to by r9 (or pmap, if r9==0)
-            ;  r9 = prev ptr, or 0 if none
-            
-            .align     4
-mapSrch32a:                                                                    ; loop over each mapping
-            lwz                r4,mpVAddr+4(r3)                ; get va for this mapping (plus flags in low 12 bits)
-            addi       r2,r2,1                                 ; count mappings visited
-            rlwinm     r4,r4,0,0,19                    ; zero low 12 bits of mapping va
-            cmplw      cr1,r5,r4                               ; compare the vas
-            blt                cr1,mapSrch32d                  ; key is less, try next list
-            la         r8,mpList0+4(r3)                ; point to skip list vector in this mapping
-            mr         r9,r3                                   ; remember prev ptr
-            beq-       cr1,mapSrch32Found              ; this is the correct mapping
-            lwzx       r3,r7,r8                                ; get ptr to next mapping in current list
-mapSrch32c:
-            mr.                r3,r3                                   ; was there another mapping on current list?
-            bne+       mapSrch32a                              ; was another, so loop
-mapSrch32d:
-            subic.     r7,r7,8                                 ; move on to next list offset
-            lwzx       r3,r7,r8                                ; get next mapping on next list (if any)
-            bge+       mapSrch32c                              ; loop to try next list
-          
-            ; Mapping not found, check to see if prev node was a block mapping or nested pmap.
-            ; If not, or if our address is not covered by the block or nested map, return 0.
-            ; Note the advantage of keeping the check for block mappings (and nested pmaps)
-            ; out of the inner loop; we do the special case work at most once per search, and
-            ; never for the most-common case of finding a scalar mapping.  The full searches
-            ; must check _in_ the inner loop, to get the prev ptrs right.
-
-            mr.                r9,r9                                   ; was there a prev ptr?
-            li         r3,0                                    ; assume we are going to return null
-            lwz                r4,pmapSkipLists+4(r6)  ; assume prev ptr null... so next is first
-            beq-       mapSrch32Exit                   ; prev ptr was null, search failed
-            lwz                r0,mpFlags(r9)                  ; get flag bits from prev mapping
-            lwz                r10,mpVAddr+4(r9)               ; re-fetch base address of prev ptr
-            andi.      r0,r0,mpBlock+mpNest    ; block mapping or nested pmap?
-            lwz                r4,mpList0+4(r9)                ; get ptr to next mapping, if any
-            beq                mapSrch32Exit                   ; prev mapping was just a scalar page, search failed
-            lhz                r11,mpBSize(r9)                 ; get #pages/#segments in block/submap mapping
-            cmpwi      r0,mpBlock                              ; block mapping or nested pmap?
-            rlwinm     r10,r10,0,0,19                  ; zero low 12 bits of block mapping va
-            slwi       r0,r11,12                               ; assume block mapping, get size in bytes - 4k
-            beq                mapSrch32f                              ; we guessed right, it was a block mapping
-            addi       r11,r11,1                               ; mpBSize is 1 too low
-            slwi       r11,r11,28                              ; in a nested pmap, mpBSize is in units of segments
-            subi       r0,r11,4096                             ; get address of last page in submap
-mapSrch32f:
-            add                r10,r10,r0                              ; r10 <- last page in this mapping
-            cmplw      r5,r10                                  ; does this mapping cover our page?
-            bgt                mapSrch32Exit                   ; no, search failed
-            mr         r3,r9                                   ; yes, we found it
-
-            ; found the mapping
-            ;   r2 = count of nodes visited
-            ;  r3 = the mapping
-            ;  r6 = pmap ptr
-            
-mapSrch32Found:                                                                ; WARNING: can drop down to here
-            lwz                r4,mpList0+4(r3)                ; get ptr to next mapping
-            lwz                r7,mpFlags(r3)                  ; Get mpFlags for our caller
-            ;   r2 = count of nodes visited
-            ;  r3 = return value (ie, found mapping or 0)
-            ;   r4 = next mapping (or 0 if none)
-            ;  r6 = pmap ptr
-            ;  r7 = mpFlags
-            
-mapSrch32Exit:
-            mr.                r5,r4                                   ; next ptr null?
-#if    SKIPLISTSTATS
-            lwz                r10,pmapSearchCnt(r6)   ; prepare to accumulate statistics
-            lwz                r8,pmapSearchVisits(r6)
-            lwz                r9,pmapSearchVisits+4(r6)
-            addi       r10,r10,1                               ; count searches
-            addc       r9,r9,r2                                ; count nodes visited
-            addze      r8,r8
-            stw                r10,pmapSearchCnt(r6)
-            stw                r8,pmapSearchVisits(r6)
-            stw                r9,pmapSearchVisits+4(r6)
-#endif
-            beqlr-                                                     ; next ptr was null, so return 0 in r4 and r5
-            lwz                r5,mpVAddr+4(r4)                ; get VA of next node
-            lwz                r4,mpVAddr+0(r4)
-            blr
-
-            ; Here when the pmap is empty (ie, pmapCurLists==0), both in 32 and 64-bit mode,
-            ; and from both mapSearch and mapSearchFull.
-            ;  r6 = pmap ptr
-            
-mapSrchPmapEmpty:
-            li         r3,0                                    ; return null
-            li         r4,0                                    ; return 0 as virtual address of next node
-            li         r5,0
-#if    SKIPLISTSTATS
-            lwz                r7,pmapSearchCnt(r6)    ; prepare to accumulate statistics
-            addi       r7,r7,1                                 ; count searches
-            stw                r7,pmapSearchCnt(r6)
-#endif
-            blr
-            
-
-/*
- *  *****************************
- *     * m a p S e a r c h F u l l *
- *     *****************************
- *
- * Given a pmap and a virtual address (VA), find the mapping for that address.
- * This is the "full" call, that sets up a vector of ptrs to the previous node
- * (or to the pmap, if there is no previous node) for each list that the mapping
- * in on.  We also make consistency checks on the skip-lists.  When called:
- *             the pmap is locked (shared or exclusive)
- *             translation is off, interrupts masked
- *             64-bit mode is enabled (if on a 64-bit machine)
- *             cr6 is loaded with the corresponding feature flags (in particular, pf64Bit)
- *             r3 = pmap ptr
- *             r4 = high 32 bits of key to search for (0 if a 32-bit processor)
- *             r5 = low 32 bits of key (low 12 bits may be nonzero garbage)
- *
- * We return the mapping ptr (or 0) in r3, and the next VA (or 0 if no more) in r4 and r5.
- * Except for cr6 (which is global), we trash nonvolatile regs.  Called both on 32- and 64-bit
- * machines, though we quickly branch into parallel code paths.
- */ 
-            .text
-                       .align  5
-            .globl     EXT(mapSearchFull)
-LEXT(mapSearchFull)
-            lbz                r7,pmapCurLists(r3)             ; get largest #lists any mapping is on
-            la         r8,pmapSkipLists+4(r3)  ; point to lists in pmap, assuming 32-bit machine
-            rlwinm     r5,r5,0,0,19                    ; zero low 12 bits of key
-            mr         r6,r3                                   ; save pmap ptr here so we can accumulate statistics
-            li         r2,0                                    ; initialize count of mappings visited
-            mfsprg     r12,0                                   ; get the per-proc data ptr
-            crclr      bFullFound                              ; we have not found the mapping yet
-            addic.     r7,r7,-1                                ; get base-0 number of last list, and test for 0
-            subi       r9,r8,mpList0+4                 ; initialize prev ptr to be a fake mapping
-            slwi       r7,r7,3                                 ; get (offset*8) of last list
-            la         r12,skipListPrev+4(r12) ; point to vector of prev ptrs, assuming 32-bit machine
-            blt--      mapSrchPmapEmpty                ; pmapCurLists==0 (ie, no mappings)
-            lwzx       r3,r8,r7                                ; get 32-bit ptr to 1st mapping in highest list
-            li         r10,0                                   ; initialize prev ptrs VA to 0 too
-            bf--       pf64Bitb,mapSrchFull32c ; skip if 32-bit processor
-            subi       r8,r8,4                                 ; we use all 64 bits of ptrs
-            subi       r12,r12,4
-            rldimi     r5,r4,32,0                              ; r5 <- 64-bit va
-            ldx                r3,r8,r7                                ; get 64-bit ptr to 1st mapping in highest list
-            b          mapSrchFull64c                  ; enter 64-bit search loop
-
-            
-            ; 64-bit processors.  Check next mapping.
-            ;   r2 = count of mappings visited so far
-            ;  r3 = current mapping ptr
-            ;  r4 = va of current mapping (ie, of r3)
-            ;  r5 = va to search for (the "key") (low 12 bits are 0)
-            ;  r6 = pmap ptr
-            ;  r7 = current skip list number * 8
-            ;  r8 = ptr to skip list vector of mapping pointed to by r9
-            ;  r9 = prev ptr, ie highest mapping that comes before search target (initially the pmap)
-            ;  r10 = prev mappings va, or 0 if r9==pmap 
-            ;  r12 = ptr to the skipListPrev vector in the per-proc
-            
-            .align     5
-mapSrchFull64a:                                                                ; loop over each mapping
-            ld         r4,mpVAddr(r3)                  ; get va for this mapping (plus flags in low 12 bits)
-            addi       r2,r2,1                                 ; count mappings visited
-            lwz                r0,mpFlags(r3)                  ; get mapping flag bits
-            cmpld      cr0,r10,r4                              ; make sure VAs come in strictly ascending order
-            rldicr     r4,r4,0,51                              ; zero low 12 bits of mapping va
-            cmpld      cr1,r5,r4                               ; compare the vas
-            bge--      cr0,mapSkipListPanic    ; die if keys are out of order
-            andi.      r0,r0,mpBlock+mpNest    ; is it a scalar mapping? (ie, of a single page)
-            blt                cr1,mapSrchFull64d              ; key is less, try next list
-            beq                cr1,mapSrchFull64Found  ; this is the correct mapping
-            bne--      cr0,mapSrchFull64e              ; handle block mapping or nested pmap
-mapSrchFull64b:
-            la         r8,mpList0(r3)                  ; point to skip list vector in this mapping
-            mr         r9,r3                                   ; current becomes previous
-            ldx                r3,r7,r8                                ; get ptr to next mapping in current list
-            mr         r10,r4                                  ; remember prev ptrs VA
-mapSrchFull64c:
-            mr.                r3,r3                                   ; was there another mapping on current list?
-            bne++      mapSrchFull64a                  ; was another, so loop
-mapSrchFull64d:
-            stdx       r9,r7,r12                               ; save prev ptr in per-proc vector
-            subic.     r7,r7,8                                 ; move on to next list offset
-            ldx                r3,r7,r8                                ; get next mapping on next list (if any)
-            bge++      mapSrchFull64c                  ; loop to try next list
-          
-            ; Mapping not found, return 0 and next higher key
-
-            li         r3,0                                    ; return null
-            bt--       bFullFound,mapSkipListPanic     ; panic if it was on earlier list
-            ld         r4,mpList0(r9)                  ; get 64-bit ptr to next mapping, if any
-            b          mapSrch64Exit
-            
-            ; Block mapping or nested pmap, and key > base.  We must compute the va of
-            ; the end of the block to see if key fits within it.
-
-mapSrchFull64e:            
-            lhz                r11,mpBSize(r3)                 ; get #pages/#segments in block/submap mapping (if nonscalar)
-            cmpwi      r0,mpBlock                              ; distinguish between block mapping and nested pmaps
-            sldi       r0,r11,12                               ; assume block mapping, get size in bytes - 4k
-            beq                mapSrchFull64f                  ; we guessed right, it was a block mapping
-            addi       r11,r11,1                               ; mpBSize is 1 too low
-            sldi       r11,r11,28                              ; in a nested pmap, mpBSize is in units of segments
-            subi       r0,r11,4096                             ; get address of last page in submap
-mapSrchFull64f:
-            add                r4,r4,r0                                ; r4 <- last page in this mapping
-            cmpld      r5,r4                                   ; does this mapping cover our page?
-            bgt                mapSrchFull64b                  ; no, try next mapping (r4 is advanced to end of range)
-
-
-            ; found the mapping
-            ;   r2 = count of nodes visited
-            ;  r3 = the mapping
-            ;  r6 = pmap ptr
-            ;  r7 = current skip list number * 8
-            ;  r8 = ptr to prev mappings (ie, r9) skip-list vector
-            ;  r9 = prev ptr, ie highest mapping that comes before search target
-            ;  r10 = prev mappings va
-            ;  r12 = ptr to the skipListPrev vector in the per-proc
-            
-mapSrchFull64Found:                                                    ; WARNING: can drop down to here
-            cmpwi      r7,0                                    ; are we in the last skip-list?
-            crset      bFullFound                              ; remember that we found the mapping
-            bne                mapSrchFull64d                  ; mapSearchFull must search all lists to get prev ptrs
-            ld         r4,mpList0(r3)                  ; get ptr to next mapping
-            stdx       r9,r7,r12                               ; save prev ptr in last list
-            lwz                r7,mpFlags(r3)                  ; Get the flags for our caller
-            b          mapSrch64Exit
-
-            
-            ; 32-bit processors.  Check next mapping.
-            ;   r2 = count of nodes visited
-            ;  r3 = ptr to next mapping in current list
-            ;  r5 = va to search for (the "key") (low 12 bits are 0)
-            ;  r6 = pmap ptr
-            ;  r7 = current skip list number * 8
-            ;  r8 = ptr to skip list vector of mapping pointed to by r9
-            ;  r9 = prev ptr, ie highest mapping that comes before search target (initially the pmap)
-            ;  r10 = prev mappings va, or 0 if r9==pmap 
-            ;  r12 = ptr to the skipListPrev vector in the per-proc
-            
-            .align     4
-mapSrchFull32a:                                                                ; loop over each mapping
-            lwz                r4,mpVAddr+4(r3)                ; get va for this mapping (plus flags in low 12 bits)
-            addi       r2,r2,1                                 ; count mappings visited
-            lwz                r0,mpFlags(r3)                  ; get mapping flag bits
-            cmplw      cr0,r10,r4                              ; make sure VAs come in strictly ascending order
-            rlwinm     r4,r4,0,0,19                    ; zero low 12 bits of mapping va
-            cmplw      cr1,r5,r4                               ; compare the vas
-            bge-       cr0,mapSkipListPanic    ; die if keys are out of order
-            andi.      r0,r0,mpBlock+mpNest    ; is it a scalar mapping? (ie, of a single page)
-            blt                cr1,mapSrchFull32d              ; key is less than this va, try next list
-            beq-       cr1,mapSrchFull32Found  ; this is the correct mapping
-            bne-       cr0,mapSrchFull32e              ; handle block mapping or nested pmap
-mapSrchFull32b:
-            la         r8,mpList0+4(r3)                ; point to skip list vector in this mapping
-            mr         r9,r3                                   ; current becomes previous
-            lwzx       r3,r7,r8                                ; get ptr to next mapping in current list
-            mr         r10,r4                                  ; remember prev ptrs VA
-mapSrchFull32c:
-            mr.                r3,r3                                   ; next becomes current
-            bne+       mapSrchFull32a                  ; was another, so loop
-mapSrchFull32d:
-            stwx       r9,r7,r12                               ; save prev ptr in per-proc vector
-            subic.     r7,r7,8                                 ; move on to next list offset
-            lwzx       r3,r7,r8                                ; get next mapping on lower list (if any)
-            bge+       mapSrchFull32c                  ; loop to try next list
-
-            ; mapping not found, return 0 and next-key
-            
-            li         r3,0                                    ; return null
-            bt-                bFullFound,mapSkipListPanic     ; panic if it was on an earlier list
-            lwz                r4,mpList0+4(r9)                ; get ptr to next mapping
-            b          mapSrch32Exit
-            
-            ; Block mapping or nested pmap, and key > base.  We must compute the va of
-            ; the end of the block to see if our key fits within it.
-
-mapSrchFull32e:            
-            lhz                r11,mpBSize(r3)                 ; get #pages/#segments in block/submap mapping (if nonscalar)
-            cmpwi      r0,mpBlock                              ; distinguish between block mapping and nested pmaps
-            slwi       r0,r11,12                               ; assume block mapping, get size in bytes - 4k
-            beq                mapSrchFull32f                  ; we guessed right, it was a block mapping
-            addi       r11,r11,1                               ; mpBSize is 1 too low
-            slwi       r11,r11,28                              ; in a nested pmap, mpBSize is in units of segments
-            subi       r0,r11,4096                             ; get address of last page in submap
-mapSrchFull32f:
-            add                r4,r4,r0                                ; r4 <- last page in this mapping
-            cmplw      r5,r4                                   ; does this mapping cover our page?
-            bgt                mapSrchFull32b                  ; no, try next mapping
-            
-            
-            ; found the mapping
-            ;   r2 = count of nodes visited
-            ;  r3 = the mapping
-            ;  r6 = pmap ptr
-            ;  r7 = current skip list number * 8
-            ;  r9 = prev ptr, ie highest mapping that comes before search target, or 0
-            ;  r10 = prev mappings va
-            ;  r12 = ptr to the skipListPrev vector in the per-proc
-            
-mapSrchFull32Found:                                                    ; WARNING: can drop down to here
-            cmpwi      r7,0                                    ; are we in the last skip-list?
-            crset      bFullFound                              ; remember that we found the mapping
-            bne                mapSrchFull32d                  ; mapSearchFull must search all lists to get prev ptrs
-            lwz                r4,mpList0+4(r3)                ; get ptr to next mapping
-            stwx       r9,r7,r12                               ; save prev ptr in last list
-            lwz                r7,mpFlags(r3)                  ; Get mpFlags for our caller
-            b          mapSrch32Exit
-
-
-/*
- *     *********************
- *     * m a p I n s e r t *
- *     *********************
- *
- * Insert a mapping into pmap skip-lists.  The caller has already called mapSearchFull to 
- * determine that this mapping does not overlap other mappings in the pmap.  As a side effect 
- * of calling mapSearchFull, the per-proc skipListPrev array is set up with a vector of the 
- * previous ptrs for each skip list.  When called:
- *             the pmap is locked (exclusive)
- *             translation is off, interrupts masked
- *             64-bit mode is enabled (if on a 64-bit machine)
- *             mapSearchFull has just been called for this mappings key
- *             cr6 is loaded with the corresponding feature flags (in particular, pf64Bit)
- *             r3 = pmap ptr
- *             r4 = mapping ptr
- *
- * There is no return value.  Except for cr6 (which is global), we trash nonvolatile regs.
- */ 
-
-                       .align  5
-                       .globl  EXT(mapInsert)
-LEXT(mapInsert)
-            lwz                r8,mpFlags(r4)                  ; get this mappings flags
-            lbz                r7,pmapCurLists(r3)             ; get current max# lists any mapping is on
-            la         r10,pmapSkipLists+4(r3) ; r10 <-- base of pmap list headers, assuming 32-bit machine
-            la         r11,mpList0+4(r4)               ; r11 <-- base of this mappings list vector
-            mfsprg     r12,0                                   ; get ptr to our per-proc
-            andi.      r9,r8,mpLists                   ; get #lists this mapping is on (1<=n<=27)
-            la         r12,skipListPrev+4(r12) ; r12 <-- base of prev ptr vector
-            sub.       r6,r9,r7                                ; is this mapping on more lists than any other?
-            slwi       r8,r9,3                                 ; get #lists * 8
-            subi       r8,r8,8                                 ; get offset to topmost (last) list in use
-            bf--       pf64Bitb,mapIns32               ; handle 32-bit processor
-            subi       r10,r10,4                               ; we use all 8 bytes of the ptr fields
-            subi       r11,r11,4
-            subi       r12,r12,4
-            ble++      mapIns64a                               ; not new max #lists
-            
-            ; 64-bit processor: We must increase pmapCurLists.  Since mapSearchFull() only
-            ; sets up the first pmapCurLists prev ptrs, we must initialize the new ones to
-            ; point to the pmap.  While we are at it, we verify that the unused list hdrs in
-            ; the pmap are 0.
-            
-            cmpwi      r9,kSkipListMaxLists    ; in range?
-            stb                r9,pmapCurLists(r3)             ; remember new max
-            mtctr      r6                                              ; set up count of new lists
-            mr         r5,r8                                   ; copy offset to last list
-            subi       r0,r10,mpList0                  ; r0 <-- fake mapping ptr (to pmap) for null prev ptrs
-            bgt--      mapSkipListPanic                ; choke if this mapping is on too many lists
-mapIns64NewList:
-            ldx                r6,r5,r10                               ; get pmap list head
-            stdx       r0,r5,r12                               ; initialize prev ptr
-            subi       r5,r5,8                                 ; get next list offset
-            cmpdi      r6,0                                    ; was list hdr null?
-            bdnzt      cr0_eq,mapIns64NewList  ; loop if more lists to initialize and list hdr was 0
-            bne--      mapSkipListPanic                ; die if pmap list hdr was not null
-            b          mapIns64a
-            
-            ; 64-bit processor: loop over each list this mapping is on
-            ;   r4 = mapping
-            ;   r8 = next list offset
-            ;  r10 = ptr to base of pmap list header vector
-            ;  r11 = ptr to base of new mappings list vector
-            ;  r12 = ptr to base of prev ptr vector in per-proc
-            
-            .align     5
-mapIns64a:
-            ldx                r5,r8,r12                               ; get prev ptr from per-proc vector
-            cmpwi      cr1,r8,0                                ; more to go?
-            la         r7,mpList0(r5)                  ; get base of prev mappings list vector
-            ldx                r9,r8,r7                                ; ***
-            stdx       r4,r8,r7                                ; * insert new mapping in middle of this list
-            stdx       r9,r8,r11                               ; ***
-            subi       r8,r8,8                                 ; get next list offset
-            bne++      cr1,mapIns64a                   ; more lists to go
-            blr                                                                ; done          
-
-            ; Handle 32-bit processor.  First, increase pmapCurLists if necessary; cr0 is bgt
-            ; iff the new mapping has more lists.  Since mapSearchFull() only sets up the first
-            ; pmapCurLists prev ptrs, we must initialize any new ones to point to the pmap.
-            ; While we are at it, we verify that the unused list hdrs in the pmap are 0.
-            
-mapIns32:
-            ble+       mapIns32a                               ; skip if new mapping does not use extra lists
-            cmpwi      r9,kSkipListMaxLists    ; in range?
-            stb                r9,pmapCurLists(r3)             ; remember new max
-            mtctr      r6                                              ; set up count of new lists
-            mr         r5,r8                                   ; copy offset to last list
-            subi       r0,r10,mpList0+4                ; r0 <-- fake mapping ptr (to pmap) for null prev ptrs
-            bgt-       mapSkipListPanic                ; choke if this mapping is on too many lists
-mapIns32NewList:
-            lwzx       r6,r5,r10                               ; get pmap list head
-            stwx       r0,r5,r12                               ; initialize prev ptr
-            subi       r5,r5,8                                 ; get next list offset
-            cmpwi      r6,0                                    ; was list hdr null?
-            bdnzt      cr0_eq,mapIns32NewList  ; loop if more lists to initialize and list hdr was 0
-            bne-       mapSkipListPanic                ; die if pmap list hdr was not null
-            b          mapIns32a
-            
-            ; 32-bit processor: loop over each list this mapping is on
-            ;   r4 = mapping
-            ;   r8 = next list offset
-            ;  r10 = ptr to base of pmap list header vector
-            ;  r11 = ptr to base of new mappings list vector
-            ;  r12 = ptr to base of prev ptr vector
-            
-            .align     4
-mapIns32a:
-            lwzx       r5,r8,r12                               ; get prev ptr from per-proc vector
-            cmpwi      cr1,r8,0                                ; more to go?
-            la         r7,mpList0+4(r5)                ; get base of prev mappings list vector
-            lwzx       r9,r8,r7                                ; ***
-            stwx       r4,r8,r7                                ; * insert new mapping in middle of this list
-            stwx       r9,r8,r11                               ; ***
-            subi       r8,r8,8                                 ; get next list offset
-            bne+       cr1,mapIns32a                   ; more lists to go
-            blr                                                                ; done          
-
-
-/*
- *     *********************
- *     * m a p R e m o v e *
- *     *********************
- *
- * Remove a mapping from pmap skip-lists.  The caller has already called mapSearchFull to 
- * find the mapping, which sets up the skipListPrev array with a vector of the previous
- * ptrs for each skip list.  When called:
- *             the pmap is locked (exclusive)
- *             translation is off, interrupts masked
- *             64-bit mode is enabled (if on a 64-bit machine)
- *             mapSearchFull has just been called for this mappings key
- *             cr6 is loaded with the corresponding feature flags (in particular, pf64Bit)
- *             r3 = pmap ptr
- *             r4 = mapping ptr
- *
- * There is no return value.  Except for cr6 (which is global), we trash nonvolatile regs.
- */ 
-
-                       .align  5
-                       .globl  EXT(mapRemove)
-LEXT(mapRemove)
-            lwz                r8,mpFlags(r4)                  ; get this mappings flags
-            lbz                r10,pmapCurLists(r3)    ; get current #lists in use
-            la         r11,mpList0+4(r4)               ; r11 <-- base of this mappings list vector
-            mfsprg     r12,0                                   ; get ptr to our per-proc
-            andi.      r9,r8,mpLists                   ; get #lists this mapping is on (1<=n<=27)
-            slwi       r8,r9,3                                 ; get #lists * 8
-            cmpw       cr5,r9,r10                              ; compare mpLists to pmapCurLists
-            la         r12,skipListPrev+4(r12) ; r12 <-- base of prev ptr vector
-            bgt--      cr5,mapSkipListPanic    ; die if mpLists > pmapCurLists
-            subi       r8,r8,8                                 ; get offset to topmast (last) list this mapping is in
-            bf--       pf64Bitb,mapRem32a              ; skip if 32-bit processor
-            subi       r11,r11,4                               ; we use all 64 bits of list links on 64-bit machines
-            subi       r12,r12,4
-            b          mapRem64a
-
-            ; 64-bit processor: loop over each list this mapping is on
-            ;   r3 = pmap
-            ;   r4 = mapping
-            ;   r8 = offset to next list
-            ;  r10 = pmapCurLists
-            ;  r11 = ptr to base of mapping list vector
-            ;  r12 = ptr to base of prev ptr vector in per-proc
-            ;  cr5 = beq if (mpLists == pmapCurLists)
-
-            .align     5
-mapRem64a:
-            ldx                r5,r8,r12                               ; get prev ptr from per-proc vector
-            ldx                r9,r8,r11                               ; get next ptr from mapping
-            cmpwi      cr1,r8,0                                ; more to go?
-            la         r7,mpList0(r5)                  ; get base of prev mappings list vector
-            stdx       r9,r8,r7                                ; point to next from prev
-            subi       r8,r8,8                                 ; get next list offset
-            bne++      cr1,mapRem64a                   ; loop if another list to unlink from
-            
-            ; Did we reduce #lists in use by removing last mapping in last list?
-            
-            bnelr++    cr5                                             ; if (mpLists!=pmapCurLists) cannot have removed last map
-            la         r5,pmapSkipLists(r3)    ; point to vector of list hdrs
-mapRem64b:
-            subic.     r10,r10,1                               ; get base-0 list#
-            slwi       r8,r10,3                                ; get offset to last list
-            ldx                r0,r8,r5                                ; get last list ptr
-            cmpdi      cr1,r0,0                                ; null?
-            bnelr      cr1                                             ; not null, so we are done
-            stb                r10,pmapCurLists(r3)    ; was null, so decrement pmapCurLists
-            bgt                mapRem64b                               ; loop to see if more than one list was emptied
-            blr
-            
-            
-            ; 32-bit processor: loop over each list this mapping is on
-            ;   r3 = pmap
-            ;   r4 = mapping
-            ;   r8 = offset to next list
-            ;  r10 = pmapCurLists
-            ;  r11 = ptr to base of mapping list vector
-            ;  r12 = ptr to base of prev ptr vector in per-proc
-            ;  cr5 = beq if (mpLists == pmapCurLists)
-            
-            .align     4
-mapRem32a:
-            lwzx       r5,r8,r12                               ; get prev ptr from per-proc vector
-            lwzx       r9,r8,r11                               ; get next ptr from mapping
-            cmpwi      cr1,r8,0                                ; more to go?
-            la         r7,mpList0+4(r5)                ; get base of prev mappings list vector
-            stwx       r9,r8,r7                                ; point to next from prev
-            subi       r8,r8,8                                 ; get next list offset
-            bne+       cr1,mapRem32a                   ; loop if another list to unlink from
-            
-            ; Did we reduce #lists in use by removing last mapping in last list?
-            
-            bnelr+     cr5                                             ; if (mpLists!=pmapCurLists) cannot have removed last map
-            la         r5,pmapSkipLists+4(r3)  ; point to vector of list hdrs
-mapRem32b:
-            subic.     r10,r10,1                               ; get base-0 list#
-            slwi       r8,r10,3                                ; get offset to last list
-            lwzx       r0,r8,r5                                ; get last list ptr
-            cmpwi      cr1,r0,0                                ; null?
-            bnelr      cr1                                             ; not null, so we are done
-            stb                r10,pmapCurLists(r3)    ; was null, so decrement pmapCurLists
-            bgt                mapRem32b                               ; loop to see if more than one list was emptied
-            blr
-            
-
-/*
- * *************************
- * * m a p S e t L i s t s *
- * *************************
- *
- * Called to decide how many skip-lists the next mapping will be on.  For each pmap,
- * we maintain a psuedo-random sequence based on a linear feedback shift register.  The
- * next number is generated by rotating the old value left by 1 and XORing with a
- * polynomial (actually 4 8-bit polynomials concatanated) and adding 1.
- * The simple (unclamped) number of lists a mapping is on is the number of trailing 0s
- * in the pseudo-random sequence, shifted by the (log2-1) of the fanout F, plus one.  
- * This seems to give us a near perfect distribution, in the sense that about F times more nodes
- * are allocated on n lists, as are on (n+1) lists.
- *
- * At one point we used a simple counter to assign lists.  While this gave perfect
- * distribution, there were certain access pattern that would drive a worst case 
- * distribution (e.g., insert low, then high, then low, etc.).  Unfortunately,
- * these patterns were not too uncommon.  We changed to a less-than-perfect assignment,
- * but one that works consistently across all known access patterns.
- *
- * Also, we modify the "simple" trailing-0-based list count, to account for an important
- * observation: because VM does a lot of removing and restoring of mappings in the process of
- * doing copy-on-write etc, it is common to have the pmap's "random number" (ie, the
- * count of created mappings) be much larger than the number of mappings currently in the
- * pmap.  This means the simple list count will often be larger than justified by the number of 
- * mappings in the pmap.  To avoid this common situation, we clamp the list count to be no more
- * than ceil(logBaseF(pmapResidentCnt)).
- *
- * Finally, we also clamp the list count to kSkipListMaxLists.
- *
- * We are passed the pmap ptr in r3.  Called with translation on, interrupts enabled,
- * and in 32-bit mode.
- */
-            .align     5
-                       .globl  EXT(mapSetLists)
-LEXT(mapSetLists)
-            lwz                r5,pmapRandNum(r3)              ; get the per-pmap counter of mapping creates
-            lwz                r4,pmapResidentCnt(r3)  ; get number of mappings in this pmap
-                       lis             r11,hi16(0xA7CBF5B9)    ; Get polynomial (I just made this up...)
-                       li              r0,-1                                   ; get a mask of 1s
-                       ori             r11,r11,lo16(0xA7CBF5B9)        ; Get polynomial (I just made this up...)
-                       rlwinm  r5,r5,1,0,31                    ; Rotate
-                       cntlzw  r7,r4                                   ; get magnitude of pmapResidentCnt
-                       xor             r5,r5,r11                               ; Munge with poly
-                       srw             r7,r0,r7                                ; r7 <- mask for magnitude of pmapResidentCnt
-                       addi    r6,r5,1                                 ; increment pmapRandNum non-atomically
-            andc       r8,r5,r6                                ; get a mask for trailing zeroes in pmapRandNum
-            stw                r6,pmapRandNum(r3)              ; update "random number"
-                       and             r8,r8,r7                                ; clamp trailing 0s to magnitude of pmapResidentCnt
-            rlwinm     r8,r8,0,32-(kSkipListMaxLists*(kSkipListFanoutShift+1))+1,31 ; clamp to kSkipListMaxLists
-            cntlzw     r9,r8                                   ; count leading 0s in the mask
-            subfic     r10,r9,32                               ; r10 <- trailing zero count
-            srwi       r11,r10,kSkipListFanoutShift ; shift by 1 if fanout is 4, 2 if 8, etc
-            addi       r3,r11,1                                ; every mapping is on at least one list
-            blr
-            
-
-/*
- * *************************************
- * * m a p S k i p L i s t V e r i f y *
- * *************************************
- *
- * This does a fairly thorough sweep through a pmaps skip-list data structure, doing
- * consistency checks.  It is typically called (from hw_exceptions.s) from debug or
- * instrumented builds.  It is probably not a good idea to call this in production builds,
- * as it must run with exceptions disabled and can take a long time to verify a big pmap.
- * It runs in O(n*ln(n)).
- *
- * Called on a bl, with the pmap ptr in r20.  We assume the pmap is locked (shared) and
- * that EE and DR are off.  We check all 64 bits of ptrs even on 32-bit machines.
- * We use r20-r31, cr0, cr1, and cr7.  If we return, no inconsistencies were found.
- *
- * You will notice we make little attempt to schedule the code; clarity is deemed more
- * important than speed.
- */
- /*
-  *                    mapSkipListVerifyC is a version that is callable from C.
-  *                    This should be called only from the debugger, IT DOES NOT LOCK THE PMAP!!!!
-  */
-                       .globl  EXT(mapSkipListVerifyC)
-LEXT(mapSkipListVerifyC)
-
-                       stwu    r1,-(FM_ALIGN((31-13+1)*4)+FM_SIZE)(r1) ; Make some space on the stack
-                       mflr    r0                                                      ; Save the link register
-                       stmw    r13,FM_ARG0(r1)                         ; Save all registers
-                       stw             r0,(FM_ALIGN((31-13+1)*4)+FM_SIZE+FM_LR_SAVE)(r1)       ; Save the return
-                       
-                       lwz             r15,pmapvr(r3)                          ; Get the V to R translation
-                       lwz             r16,pmapvr+4(r3)                        ; Get the V to R translation
-                       mr              r19,r4                                          ; Save register dump area
-                       
-                       bl              EXT(mapSetUp)                           ; Get set up
-                       
-                       mr              r17,r11
-                       xor             r20,r3,r16                                      ; Translate 32-bit portion
-                       bf--    pf64Bitb,mslvc32a                       ; Skip if 32-bit...
-                       
-                       rldimi  r20,r15,32,0                            ; Shift the fixed upper part of the physical over and cram in top
-                       
-mslvc32a:      lis             r18,hi16(EXT(DebugWork))
-                       ori             r18,r18,lo16(EXT(DebugWork))
-                       li              r0,0x4262
-                       stw             r0,4(r18)                                       ; Make sure the test knows to run
-                       
-                       bl              EXT(mapSkipListVerify)          ; Run the test
-
-                       li              r0,0                                            
-                       stw             r0,4(r18)                                       ; Remove explicit call flag
-
-                       bt++    pf64Bitb,mslvc64a                       ; This is 64-bit...
-
-                       mtmsr   r17                                                     ; Restore enables/translation/etc.
-                       isync
-                       
-                       li              r0,0
-                       stw             r0,0x000+0(r19)
-                       stw             r0,0x000+4(r19)
-                       stw             r0,0x008+0(r19)
-                       stw             r1,0x008+4(r19)
-                       stw             r0,0x010+0(r19)
-                       stw             r2,0x010+4(r19)
-                       stw             r0,0x018+0(r19)
-                       stw             r3,0x018+4(r19)
-                       stw             r0,0x020+0(r19)
-                       stw             r4,0x020+4(r19)
-                       stw             r0,0x028+0(r19)
-                       stw             r5,0x028+4(r19)
-                       stw             r0,0x030+0(r19)
-                       stw             r6,0x030+4(r19)
-                       stw             r0,0x038+0(r19)
-                       stw             r7,0x038+4(r19)
-                       stw             r0,0x040+0(r19)
-                       stw             r8,0x040+4(r19)
-                       stw             r0,0x048+0(r19)
-                       stw             r9,0x048+4(r19)
-                       stw             r0,0x050+0(r19)
-                       stw             r10,0x050+4(r19)
-                       stw             r0,0x058+0(r19)
-                       stw             r11,0x058+4(r19)
-                       stw             r0,0x060+0(r19)
-                       stw             r12,0x060+4(r19)
-                       stw             r0,0x068+0(r19)
-                       stw             r13,0x068+4(r19)
-                       stw             r0,0x070+0(r19)
-                       stw             r14,0x070+4(r19)
-                       stw             r0,0x078+0(r19)
-                       stw             r15,0x078+4(r19)
-                       stw             r0,0x080+0(r19)
-                       stw             r16,0x080+4(r19)
-                       stw             r0,0x088+0(r19)
-                       stw             r17,0x088+4(r19)
-                       stw             r0,0x090+0(r19)
-                       stw             r18,0x090+4(r19)
-                       stw             r0,0x098+0(r19)
-                       stw             r19,0x098+4(r19)
-                       stw             r0,0x0A0+0(r19)
-                       stw             r20,0x0A0+4(r19)
-                       stw             r0,0x0A8+0(r19)
-                       stw             r21,0x0A8+4(r19)
-                       stw             r0,0x0B0+0(r19)
-                       stw             r22,0x0B0+4(r19)
-                       stw             r0,0x0B8+0(r19)
-                       stw             r23,0x0B8+4(r19)
-                       stw             r0,0x0C0+0(r19)
-                       stw             r24,0x0C0+4(r19)
-                       stw             r0,0x0C8+0(r19)
-                       stw             r25,0x0C8+4(r19)
-                       stw             r0,0x0D0+0(r19)
-                       stw             r26,0x0D0+4(r19)
-                       stw             r0,0x0D8+0(r19)
-                       stw             r27,0x0D8+4(r19)
-                       stw             r0,0x0E0+0(r19)
-                       stw             r28,0x0E0+4(r19)
-                       stw             r0,0x0E8+0(r19)
-                       stw             r29,0x0E8+4(r19)
-                       stw             r0,0x0F0+0(r19)
-                       stw             r30,0x0F0+4(r19)
-                       stw             r0,0x0F8+0(r19)
-                       stw             r31,0x0F8+4(r19)
-                       
-                       b               mslvcreturn                                     ; Join common...
-
-mslvc64a:      mtmsrd  r17                                                     ; Restore enables/translation/etc.
-                       isync                                                           
-                       
-                       std             r0,0x000(r19)
-                       std             r1,0x008(r19)
-                       std             r2,0x010(r19)
-                       std             r3,0x018(r19)
-                       std             r4,0x020(r19)
-                       std             r5,0x028(r19)
-                       std             r6,0x030(r19)
-                       std             r7,0x038(r19)
-                       std             r8,0x040(r19)
-                       std             r9,0x048(r19)
-                       std             r10,0x050(r19)
-                       std             r11,0x058(r19)
-                       std             r12,0x060(r19)
-                       std             r13,0x068(r19)
-                       std             r14,0x070(r19)
-                       std             r15,0x078(r19)
-                       std             r16,0x080(r19)
-                       std             r17,0x088(r19)
-                       std             r18,0x090(r19)
-                       std             r19,0x098(r19)
-                       std             r20,0x0A0(r19)
-                       std             r21,0x0A8(r19)
-                       std             r22,0x0B0(r19)
-                       std             r23,0x0B8(r19)
-                       std             r24,0x0C0(r19)
-                       std             r25,0x0C8(r19)
-                       std             r26,0x0D0(r19)
-                       std             r27,0x0D8(r19)
-                       std             r28,0x0E0(r19)
-                       std             r29,0x0E8(r19)
-                       std             r30,0x0F0(r19)
-                       std             r31,0x0F8(r19)
-                       
-                       
-mslvcreturn:
-                       lwz             r0,(FM_ALIGN((31-13+1)*4)+FM_SIZE+FM_LR_SAVE)(r1)       ; Get the return
-                       lmw             r13,FM_ARG0(r1)                         ; Get the registers
-                       mtlr    r0                                                      ; Restore the return
-                       lwz             r1,0(r1)                                        ; Pop the stack
-                       blr
-
-                       .globl  EXT(mapSkipListVerify)
-LEXT(mapSkipListVerify)
-            mflr       r31                                             ; save LR so we can bl to mapVerifyDie
-            
-            ; If we have already found an inconsistency and died, don not do so again, to
-            ; avoid a loop.
-            
-                       lis             r27,hi16(EXT(DebugWork))
-                       ori             r27,r27,lo16(EXT(DebugWork))
-                       lwz             r0,4(r27)                               ; Get the explicit entry flag
-                       lwz             r27,0(r27)                              ; Get lockout
-                       cmplwi  r0,0x4262                               ; Should we run anyway?
-                       beq--   mslvAnyway                              ; Yes...
-            cmpwi      r27,0                                   ; have we already found an error?
-            bnelr--                                                    ; yes, just return wo checking again
-
-mslvAnyway:           
-            ; Not recursive call, so initialize.
-            
-            mfsprg     r23,2                                   ; get the feature flags
-            mtcrf      0x02,r23                                ; put pf64Bit where we can test it
-            lbz                r26,pmapCurLists(r20)   ; get #lists that are in use
-            lwz                r21,pmapResidentCnt(r20); get #mappings in this pmap
-            cmpwi      r26,kSkipListMaxLists   ; in range?
-            bgtl--     mapVerifyDie                    ; pmapCurLists is too big
-            
-            ; To prevent infinite loops, set limit of (pmapCurLists*pmapResidentCnt) iterations.
-            ; Since we walk each list this is the max number of mappings we could visit.
-            
-            li         r23,0                                   ; initialize count
-mapVer0:
-            subic.     r26,r26,1                               ; loop pmapCurLists times (but at least once)
-            add                r23,r23,r21                             ; compute (pmapCurLists*pmapResidentCnt) 
-            bgt                mapVer0                                 ; this will be a 64-bit qty on 64-bit machines
-            
-            li         r22,kSkipListMaxLists   ; initialize list#
-            bf--       pf64Bitb,mapVer32               ; go handle a 32-bit processor
-            
-            ; 64-bit machine.
-            ;
-            ; Loop over each list, counting mappings in each.  We first check whether or not
-            ; the list is empty (ie, if the pmapSlipLists ptr is null.)  All lists above
-            ; pmapCurLists should be empty, and no list at or below pmapCurLists should be.
-            ;  r20 = pmap ptr
-            ;  r21 = decrementing counter of mappings in this pmap
-            ;  r22 = next list# (1...kSkipListMaxLists)
-            ;  r23 = decrementing counter for infinite loop check
-            
-mapVer64:
-            slwi       r25,r22,3                               ; get offset to next skiplist
-            la         r26,pmapSkipLists(r20)  ; get ptr to base of skiplist vector
-            subi       r25,r25,8
-            ldx                r26,r25,r26                             ; get 1st mapping on this list, if any
-            lbz                r28,pmapCurLists(r20)   ; get #lists in use
-            cmpdi      cr6,r26,0                               ; set cr6_eq if this list is null ("null")
-            cmpw       cr7,r22,r28                             ; set cr7_gt if this list is > pmapCurLists ("high")
-            crxor      cr0_eq,cr6_eq,cr7_gt    ; cr0_eq <-- (null & !high) | (!null & high)
-            beql--     mapVerifyDie                    ; die if this list is null when it should not be, etc
-            b          mapVer64g
-           
-            ; Loop over each node in the list.
-            ;  r20 = pmap ptr
-            ;  r21 = decrementing counter of mappings in this pmap
-            ;  r22 = this list# (1...kSkipListMaxLists)
-            ;  r23 = decrementing counter for infinite loop check
-            ;  r25 = offset to this skiplist (ie, ((r22<<3)-8))
-            ;  r26 = mapping
-            
-mapVer64a:
-            lwz                r29,mpFlags(r26)                ; get bits for this mapping
-            ld         r28,mpVAddr(r26)                ; get key
-            subic.     r23,r23,1                               ; check for loops
-            bltl--     mapVerifyDie                    ; we have visited > (pmapCurLists*pmapResidentCnt) nodes
-            andi.      r30,r26,mpBasicSize-1   ; test address for alignment
-            bnel--     mapVerifyDie                    ; not aligned
-            andi.      r27,r29,mpLists                 ; get #lists this mapping is supposed to be on
-            cmpw       cr1,r27,r22                             ; is it supposed to be on this list?
-            bltl--     cr1,mapVerifyDie                ; mappings mpLists is too low
-            cmpwi      r27,kSkipListMaxLists   ; too big?
-            bgtl--     mapVerifyDie                    ; mappings mpLists > max
-            rldicr     r28,r28,0,51                    ; clear low 12 bits of va
-            bne++      cr1,mapVer64f                   ; jump if this is not highest list for this node
-            
-            ; This is the "highest" (last) list this mapping is on.
-            ; Do some additional checks (so we only do them once per mapping.)
-            ; First, if a block mapping or nested pmap, compute block end.
-            
-            andi.      r29,r29,mpBlock+mpNest  ; is it block mapping or nested pmap?
-            subi       r21,r21,1                               ; count mappings in this pmap
-            beq++      mapVer64b                               ; not nested or pmap
-            lhz                r27,mpBSize(r26)                ; get #pages or #segments
-            cmpwi      r29,mpBlock                             ; which one is it?
-            sldi       r29,r27,12                              ; assume block mapping, units are (pages-1)
-            beq                mapVer64b                               ; guessed correctly
-            addi       r27,r27,1                               ; units of nested pmap are (#segs-1)
-            sldi       r29,r27,28                              ; convert to #bytes
-            subi       r29,r29,4096                    ; get offset to last byte in nested pmap
-            
-            ; Here with r29 = size of block - 4k, or 0 if mapping is a scalar page.
-
-mapVer64b:
-            add                r24,r28,r29                             ; r24 <- address of last valid page in this mapping
-            la         r28,mpList0(r26)                ; get base of this mappings vector            
-            lwz                r27,mpFlags(r26)                ; Get the number of lists
-            andi.      r27,r27,mpLists                 ; get #lists this mapping is on (1<=n<=27)
-            cmplwi     r27,mpBasicLists                ; Into bigger mapping?
-            li         r27,mpBasicLists*8-8    ; Assume normal
-            ble+       mapVer64c                               ; It is...
-            li         r27,kSkipListMaxLists*8-8       ; initialize list offset for inner loop
-            
-            ; Inner loop over each list link in this mappingss mpList vector.
-            ;  r24 = address of last valid page in this mapping
-            ;  r27 = offset for next list in inner loop
-            ;  r28 = base of this mappings list links
-            
-mapVer64c:
-            cmpw       cr1,r27,r25                             ; higher, lower, or same?
-            ldx                r29,r27,r28                             ; get link to next mapping at this level
-            mr.                r29,r29                                 ; null?
-            beq                mapVer64d                               ; link null, which is always OK
-            bgtl--     cr1,mapVerifyDie                ; a mapping has a non-null list higher than its mpLists
-            ld         r30,mpVAddr(r29)                ; get next mappings va
-            rldicr     r30,r30,0,51                    ; zero low 12 bits
-            cmpld      r30,r24                                 ; compare next key with ours
-            blel--     mapVerifyDie                    ; a next node has key <= to ours
-mapVer64d:
-            subic.     r27,r27,8                               ; move on to next list
-            bne++      mapVer64c                               ; loop if more to go
-            
-            ; Next node on current list, or next list if current done, or return if no more lists.
-            
-mapVer64f:
-            la         r28,mpList0(r26)                ; get base of this mappings vector
-            ldx                r26,r25,r28                             ; get next mapping on this list
-mapVer64g:
-            mr.                r26,r26                                 ; is there one?
-            bne++      mapVer64a                               ; yes, handle
-            subic.     r22,r22,1                               ; is there another list?
-            bgt++      mapVer64                                ; loop if so
-            
-            cmpwi      r21,0                                   ; did we find all the mappings in the pmap?
-            bnel--     mapVerifyDie                    ; no
-            mtlr       r31                                             ; restore return address
-            li         r3,0
-            blr
-            
-            
-            ; Handle 32-bit machine.
-            
-mapVer32:
-            lwz                r24,mpFlags(r20)                ; Get number of lists
-            la         r30,pmapSkipLists(r20)  ; first, check the pmap list hdrs
-            andi.      r24,r24,mpLists                 ; Clean the number of lists
-            bl         mapVerUpperWordsAre0    ; are the upper words of each list all 0?
-            
-            ; Loop over each list, counting mappings in each.  We first check whether or not
-            ; the list is empty.  All lists above pmapCurLists should be empty, and no list
-            ; at or below pmapCurLists should be.
-            ;
-            ;  r20 = pmap ptr
-            ;  r21 = decrementing counter of mappings in this pmap
-            ;  r22 = next list# (1...kSkipListMaxLists)
-            ;  r23 = decrementing counter for infinite loop check
-            
-mapVer32NextList:
-            lbz                r28,pmapCurLists(r20)   ; get #lists in use
-            slwi       r25,r22,3                               ; get offset to next skiplist
-            la         r26,pmapSkipLists+4(r20) ; get ptr to base of skiplist vector
-            subi       r25,r25,8
-            lwzx       r26,r25,r26                             ; get the 1st mapping on this list, or 0
-            cmpw       cr7,r22,r28                             ; set cr7_gt if this list is > pmapCurLists ("high")
-            cmpwi      cr6,r26,0                               ; set cr6_eq if this list is null ("null")
-            crxor      cr0_eq,cr6_eq,cr7_gt    ; cr0_eq <-- (null & !high) | (!null & high)
-            beql-      mapVerifyDie                    ; die if this list is null when it should not be, etc
-            b          mapVer32g
-           
-            ; Loop over each node in the list.
-            ;  r20 = pmap ptr
-            ;  r21 = decrementing counter of mappings in this pmap
-            ;  r22 = this list# (1...kSkipListMaxLists)
-            ;  r23 = decrementing counter for infinite loop check
-            ;  r25 = offset to this skiplist (ie, ((r22<<3)-8))
-            ;  r26 = mapping
-            
-mapVer32a:
-            lwz                r29,mpFlags(r26)                ; get bits for this mapping
-            andi.      r30,r26,mpBasicSize-1   ; test address for alignment
-            lwz                r24,mpVAddr+0(r26)              ; get upper word of key
-            bnel-      mapVerifyDie                    ; mapping address not 64-byte aligned
-            lwz                r28,mpVAddr+4(r26)              ; get lower word of key
-            subic.     r23,r23,1                               ; check for loops
-            bltl-      mapVerifyDie                    ; we have visited > (pmapCurLists*pmapResidentCnt) nodes
-            cmpwi      r24,0                                   ; upper word of key (ie, va) should be 0
-            bnel-      mapVerifyDie                    ; was not
-            andi.      r27,r29,mpLists                 ; get #lists this mapping is supposed to be on
-            cmpw       cr1,r27,r22                             ; is it supposed to be on this list?
-            bltl-      cr1,mapVerifyDie                ; mappings mpLists is too low
-            cmpwi      r27,kSkipListMaxLists   ; too big?
-            bgtl-      mapVerifyDie                    ; mappings mpLists > max
-            rlwinm     r28,r28,0,0,19                  ; clear low 12 bits of va
-            bne+       cr1,mapVer32f                   ; jump if this is not highest list for this node
-            
-            ; This is the "highest" (last) list this mapping is on.
-            ; Do some additional checks (so we only do them once per mapping.)
-            ; First, make sure upper words of the mpList vector are 0.
-
-            subi       r21,r21,1                               ; count mappings in this pmap
-            lwz                r24,mpFlags(r26)                ; Get number of lists
-            la         r30,mpList0(r26)                ; point to base of skiplist vector
-                       andi.   r24,r24,mpLists                 ; Clean the number of lists
-                       bl              mapVerUpperWordsAre0    ; make sure upper words are all 0 (uses r24 and r27)
-            
-            ; Then, if a block mapping or nested pmap, compute block end.
-            
-            andi.      r29,r29,mpBlock+mpNest  ; is it block mapping or nested pmap?
-            beq+       mapVer32b                               ; no
-            lhz                r27,mpBSize(r26)                ; get #pages or #segments
-            cmpwi      r29,mpBlock                             ; which one is it?
-            slwi       r29,r27,12                              ; assume block mapping, units are pages
-            beq                mapVer32b                               ; guessed correctly
-            addi       r27,r27,1                               ; units of nested pmap are (#segs-1)
-            slwi       r29,r27,28                              ; convert to #bytes
-            subi       r29,r29,4096                    ; get offset to last byte in nested pmap
-            
-            ; Here with r29 = size of block - 4k, or 0 if mapping is a scalar page.
-
-mapVer32b:
-            add                r24,r28,r29                             ; r24 <- address of last valid page in this mapping
-            la         r28,mpList0+4(r26)              ; get base of this mappings vector            
-            lwz                r27,mpFlags(r26)                ; Get the number of lists
-            andi.      r27,r27,mpLists                 ; get #lists this mapping is on (1<=n<=27)
-            cmplwi     r27,mpBasicLists                ; Into bigger mapping?
-            li         r27,mpBasicLists*8-8    ; Assume normal
-            ble+       mapVer32c                               ; It is...
-            li         r27,kSkipListMaxLists*8-8       ; initialize list offset for inner loop
-            
-            ; Inner loop over each list in this mappings mpList vector.
-            ;  r24 = address of last valid page in this mapping
-            ;  r27 = offset for next list in inner loop
-            ;  r28 = base of this mappings list links
-            
-mapVer32c:
-            cmpw       cr1,r27,r25                             ; higher, lower, or same?
-            lwzx       r29,r27,r28                             ; get link to next mapping at this level
-            mr.                r29,r29                                 ; null?
-            beq                mapVer32d                               ; link null, which is always OK
-           
-           
-            bgtl-      cr1,mapVerifyDie                ; a mapping has a non-null list higher than its mpLists
-            lwz                r30,mpVAddr+4(r29)              ; get next mappings va
-            rlwinm     r30,r30,0,0,19                  ; zero low 12 bits
-            cmplw      r30,r24                                 ; compare next key with ours
-            blel-      mapVerifyDie                    ; a next node has key <= to ours
-mapVer32d:
-            subic.     r27,r27,8                               ; move on to next list
-            bne+       mapVer32c                               ; loop if more to go
-            
-            ; Next node on current list, or next list if current done, or return if no more lists.
-            
-mapVer32f:
-            la         r28,mpList0+4(r26)              ; get base of this mappings vector again
-            lwzx       r26,r25,r28                             ; get next mapping on this list
-mapVer32g:
-            mr.                r26,r26                                 ; is there one?
-            bne+       mapVer32a                               ; yes, handle
-            subic.     r22,r22,1                               ; is there another list?
-            bgt+       mapVer32NextList                ; loop if so
-            
-            cmpwi      r21,0                                   ; did we find all the mappings in the pmap?
-            bnel-      mapVerifyDie                    ; no
-            mtlr       r31                                             ; restore return address
-            li         r3,0
-            blr
-
-            ; Subroutine to verify that the upper words of a vector of kSkipListMaxLists
-            ; doublewords are 0.
-            ;  r30 = ptr to base of vector
-            ; Uses r24 and r27.
-            
-mapVerUpperWordsAre0:
-                       cmplwi  r24,mpBasicLists                ; Do we have more than basic?
-            li         r24,mpBasicLists*8              ; Assume basic
-            ble++      mapVerUpper1                    ; We have the basic size
-            li         r24,kSkipListMaxLists*8 ; Use max size
-            
-mapVerUpper1:
-            subic.     r24,r24,8                               ; get offset to next doubleword
-            lwzx       r27,r24,r30                             ; get upper word
-            cmpwi      cr1,r27,0                               ; 0 ?
-            bne-       cr1,mapVerifyDie                ; die if not, passing callers LR
-            bgt+       mapVerUpper1                    ; loop if more to go
-            blr
-            
-            ; bl here if mapSkipListVerify detects an inconsistency.
-
-mapVerifyDie:
-                       mflr    r3
-                       mtlr    r31                                             ; Restore return
-                       lis             r31,hi16(EXT(DebugWork))
-                       ori             r31,r31,lo16(EXT(DebugWork))
-                       lwz             r0,4(r31)                               ; Get the explicit entry flag
-                       cmplwi  r0,0x4262                               ; Should we run anyway?
-                       beqlr--                                                 ; Explicit call, return...
-                       
-            li         r0,1
-                       stw             r0,0(r31)                               ; Lock out further calls
-            BREAKPOINT_TRAP                                    ; hopefully, enter debugger
-            b          .-4
-            
-            
-/*
- * Panic (choke, to be exact) because of messed up skip lists.  The LR points back
- * to the original caller of the skip-list function.
- */
-mapSkipListPanic:                                                      ; skip-lists are screwed up
-            lis                r0,hi16(Choke)
-            ori                r0,r0,lo16(Choke)
-            li      r3,failSkipLists           ; get choke code
-            sc                                                         ; choke
-            b          .-4
-            
-
index ad15ec476bab02acb3556a8a0fe8f8047ae795b2..93b670fae98305a10d82a6774319ec949677da9c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #define _PPC_SPEC_REG_H_
 
 /* Defines for PVRs */
-#define PROCESSOR_VERSION_750          8       /* ? */
+#define PROCESSOR_VERSION_601          1
+#define PROCESSOR_VERSION_603          3
+#define PROCESSOR_VERSION_604          4
+#define PROCESSOR_VERSION_603e         6
+#define PROCESSOR_VERSION_750          8
 #define PROCESSOR_VERSION_750FX                0x7000  /* ? */
+#define PROCESSOR_VERSION_604e         9
+#define PROCESSOR_VERSION_604ev                10      /* ? */
 #define PROCESSOR_VERSION_7400         12      /* ? */
 #define PROCESSOR_VERSION_7410         0x800C  /* ? */
 #define PROCESSOR_VERSION_7450         0x8000  /* ? */
 #define PROCESSOR_VERSION_7455         0x8001  /* ? */
-#define PROCESSOR_VERSION_7457         0x8002  /* ? */
-#define PROCESSOR_VERSION_970          0x0039  /* ? */
 
 #endif /* _PPC_SPEC_REG_H_ */
index 29c2283623085e0970891cb23e7beb01fc27a248..12714d5515261b21e82febce436b9c5e1009f844 100644 (file)
@@ -3,31 +3,25 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 /*
  * @OSF_COPYRIGHT@
  */
-
-#define __APPLE_API_PRIVATE
-
 #include <cpus.h>
 #include <mach_kdb.h>
 #include <mach_kdp.h>
 #include <ppc/asm.h>
 #include <ppc/proc_reg.h>
 #include <ppc/spec_reg.h>
-#include <machine/cpu_capabilities.h>
 #include <mach/ppc/vm_param.h>
 #include <assym.s>
        
-#define ptFilter       0
-#define ptVersion      4
-#define ptRevision     6
-#define ptFeatures     8
-#define ptCPUCap       12
-#define ptPatch                16
-#define ptInitRout     20
-#define ptRptdProc     24
-#define ptTempMax      28
-#define ptTempThr      32
-#define ptLineSize     36
-#define ptl1iSize      40
-#define ptl1dSize      44
-#define ptPTEG         48
-#define ptMaxVAddr     52
-#define ptMaxPAddr     56
-#define ptSize         60
+#define ptFilter 0
+#define ptVersion 4
+#define ptRevision 6
+#define ptFeatures 8
+#define ptInitRout 12
+#define ptRptdProc 16
+#define ptTempMax 20
+#define ptTempThr 24
+#define ptLineSize 28
+#define ptl1iSize 32
+#define ptl1dSize 36
+#define ptSize 40
 
 #define bootCPU 10
 #define firstInit 9
 #define firstBoot 8
 
+/* Defines for PVRs */
+#define PROCESSOR_VERSION_601          1
+#define PROCESSOR_VERSION_603          3
+#define PROCESSOR_VERSION_604          4
+#define PROCESSOR_VERSION_603e         6
+#define PROCESSOR_VERSION_750          8
+#define PROCESSOR_VERSION_750FX                0x7000  /* ? */
+#define PROCESSOR_VERSION_604e         9
+#define PROCESSOR_VERSION_604ev                10      /* ? */
+#define PROCESSOR_VERSION_7400         12      /* ? */
+#define PROCESSOR_VERSION_7410         0x800C  /* ? */
+#define PROCESSOR_VERSION_7450         0x8000  /* ? */
+#define PROCESSOR_VERSION_7455         0x8001  /* ? */
+
 /*
  * Interrupt and bootup stack for initial processor
  */
 
        .file   "start.s"
        
+       .data
+
+               /* Align on page boundry */
+       .align  PPC_PGSHIFT
+               /* Red zone for interrupt stack, one page (will be unmapped)*/
+       .set    ., .+PPC_PGBYTES
+               /* intstack itself */
+
+     .globl  EXT(FixedStackStart)
+EXT(FixedStackStart):
+     
+        .globl  EXT(intstack)
+EXT(intstack):
+       .set    ., .+INTSTACK_SIZE*NCPUS
+       
+       /* Debugger stack - used by the debugger if present */
+       /* NOTE!!! Keep the debugger stack right after the interrupt stack */
+#if MACH_KDP || MACH_KDB
+    .globl  EXT(debstack)
+EXT(debstack):
+       .set    ., .+KERNEL_STACK_SIZE*NCPUS
+     
+        .globl  EXT(FixedStackEnd)
+EXT(FixedStackEnd):
+
+       .align  ALIGN
+    .globl  EXT(intstack_top_ss)
+EXT(intstack_top_ss):
+       .long   EXT(intstack)+INTSTACK_SIZE-FM_SIZE                     /* intstack_top_ss points to the top of interrupt stack */
+
+       .align  ALIGN
+    .globl  EXT(debstack_top_ss)       
+EXT(debstack_top_ss):
+
+       .long   EXT(debstack)+KERNEL_STACK_SIZE-FM_SIZE         /* debstack_top_ss points to the top of debug stack */
+
+    .globl  EXT(debstackptr)
+EXT(debstackptr):      
+       .long   EXT(debstack)+KERNEL_STACK_SIZE-FM_SIZE
+
+#endif /* MACH_KDP || MACH_KDB */
+
 /*
  * All CPUs start here.
  *
  * This code is called from SecondaryLoader
  *
  * Various arguments are passed via a table:
- *   R3 = pointer to other startup parameters
+ *   ARG0 = pointer to other startup parameters
  */
        .text
-
-ENTRY(resetPOR,TAG_NO_FRAME_USED)
-
-                       li              r12,0                                                           ; Get a 0
-                       stw             r12,0xF0(0)                                                     ; Make sure the special flag is clear
-                       mtmsrd  r12                                                                     ; Make sure we are in 32-bit mode
-                       isync                                                                           ; Really make sure
-                       lwz             r3,0xF4(0)                                                      ; Get the boot_args pointer
-                       b               startJoin                                                       ; Join up...
-
-
+       
 ENTRY(_start_cpu,TAG_NO_FRAME_USED)
                        crclr   bootCPU                                                         ; Set non-boot processor
                        crclr   firstInit                                                       ; Set not first time init
@@ -106,12 +140,11 @@ ENTRY(_start_cpu,TAG_NO_FRAME_USED)
                        mtspr   tbl,r17                                                         ; Clear bottom so we do not tick
                        mtspr   tbu,r15                                                         ; Set top
                        mtspr   tbl,r16                                                         ; Then bottom again
+                       
                        b               allstart
                        
 ENTRY(_start,TAG_NO_FRAME_USED)
 
-startJoin:
-                       mflr            r2                                      ; Save the return address
                        lis             r30,hi16(EXT(per_proc_info))            ; Set current per_proc
                        ori             r30,r30,lo16(EXT(per_proc_info))        ; Set current per_proc
                        crset   bootCPU                                                         ; Set boot processor
@@ -129,22 +162,52 @@ startJoin:
                        ori             r20,r20,LOW_ADDR(fwdisplock)            ; Get address of the firmware display lock
                        stw             r19,0(r20)                                                      ; Make sure the lock is free
                        
-allstart:
-                       mr              r31,r3                                                          ; Save away arguments
-
-                       crand   firstBoot,bootCPU,firstInit                     ; Indicate if we are on the initial first processor startup
+allstart:      mr              r31,r3                                                          ; Save away arguments
+                       lis             r23,hi16(EXT(per_proc_info))            ; Set base per_proc
+                       ori             r23,r23,lo16(EXT(per_proc_info))        ; Set base per_proc
 
                        mtsprg  0,r30                                                           ; Set the per_proc
 
-                       li              r9,0                                                            ; Clear out a register
-                       mtsprg  1,r9                                                            ; Clear the SPRGs
-                       mtsprg  2,r9
-                       mtsprg  3,r9
-
+                       mfspr   r6,hid0                                                         ; Get the HID0
                        li              r7,MSR_VM_OFF                                           ; Get real mode MSR                     
+                       rlwinm  r6,r6,0,sleep+1,doze-1                          ; Remove any vestiges of sleep
+                       mtspr   hid0,r6                                                         ; Set the insominac HID0
                        mtmsr   r7                                                                      ; Set the real mode SRR
                        isync                                   
 
+;                      Map in the first 256Mb in both instruction and data BATs
+
+                       li              r7,((0x7FF<<2)|2)                                       ; Set up for V=R 256MB in supervisor space
+                       li      r8,((2<<3)|2)                                           ; Physical address = 0, coherent, R/W
+                       li              r9,0                                                            ; Clear out a register
+                       
+                       mtsprg  1,r9                                                            ; Clear the extra SPRGs
+                       mtsprg  2,r9
+                       mtsprg  3,r9
+
+                       sync
+                       isync
+                       mtdbatu 0,r7                                                            ; Map bottom 256MB
+                       mtdbatl 0,r8                                                            ; Map bottom 256MB
+                       mtdbatu 1,r9                                                            ; Invalidate maps
+                       mtdbatl 1,r9                                                            ; Invalidate maps
+                       mtdbatu 2,r9                                                            ; Invalidate maps
+                       mtdbatl 2,r9                                                            ; Invalidate maps
+                       mtdbatu 3,r9                                                            ; Invalidate maps
+                       mtdbatl 3,r9                                                            ; Invalidate maps
+                       sync
+                       isync
+                       mtibatu 0,r7                                                            ; Map bottom 256MB
+                       mtibatl 0,r8                                                            ; Map bottom 256MB
+                       mtibatu 1,r9                                                            ; Invalidate maps
+                       mtibatl 1,r9                                                            ; Invalidate maps
+                       mtibatu 2,r9                                                            ; Invalidate maps
+                       mtibatl 2,r9                                                            ; Invalidate maps
+                       mtibatu 3,r9                                                            ; Invalidate maps
+                       mtibatl 3,r9                                                            ; Invalidate maps
+                       sync
+                       isync
+                       
                        lis             r26,hi16(processor_types)                       ; Point to processor table
                        ori             r26,r26,lo16(processor_types)           ; Other half
                        mfpvr   r10                                                                     ; Get the PVR
@@ -160,26 +223,21 @@ nextPVR:  lwz             r28,ptFilter(r26)                                       ; Get the filter
 donePVR:       lwz             r20,ptInitRout(r26)                                     ; Grab the special init routine
                        mtlr    r20                                                                     ; Setup to call the init
 
-                       bf              firstBoot,notFirst                                      ; Not first boot, go...
+                       bf              firstInit,notFirst                                      ; Not first boot, go...
                        
 ;                      
 ;                      The following code just does a general initialization of the features just
 ;                      after the initial first-time boot.  This is not done after waking up or on
-;                      any "secondary" processor.  Just after the boot-processor init, we copy the
-;                      features to any possible per_proc.
+;                      any "secondary" processor.
 ;
 ;                      We are just setting defaults.   The specific initialization code will modify these
 ;                      if necessary. 
 ;                      
-                       lis             r18,hi16(EXT(_cpu_capabilities))        ; Get the address of _cpu_capabilities
-                       ori             r18,r18,lo16(EXT(_cpu_capabilities))
-                       lwz             r17,ptCPUCap(r26)                                       ; Get the default cpu capabilities
-                       stw             r17, 0(r18)                                                     ; Save the default value in _cpu_capabilities
                        
                        lwz             r17,ptFeatures(r26)                                     ; Pick up the features
                        
-                       lwz             r18,ptRptdProc(r26)                                     ; Get the reported processor
-                       sth             r18,pfrptdProc(r30)                                     ; Set the reported processor
+                       lwz             r13,ptRptdProc(r26)                                     ; Get the reported processor
+                       sth             r13,pfrptdProc(r30)                                     ; Set the reported processor
                        
                        lwz             r13,ptTempMax(r26)                                      ; Get maximum operating temperature
                        stw             r13,thrmmaxTemp(r30)                            ; Set the maximum
@@ -192,63 +250,18 @@ donePVR:  lwz             r20,ptInitRout(r26)                                     ; Grab the special init routine
                        stw             r13,pfl1iSize(r30)                                      ; Save it
                        lwz             r13,ptl1dSize(r26)                                      ; Get dcache size
                        stw             r13,pfl1dSize(r30)                                      ; Save it
-                       lwz             r13,ptPTEG(r26)                                         ; Get PTEG size address
-                       stw             r13,pfPTEG(r30)                                         ; Save it
-                       lwz             r13,ptMaxVAddr(r26)                                     ; Get max virtual address
-                       stw             r13,pfMaxVAddr(r30)                                     ; Save it
-                       lwz             r13,ptMaxPAddr(r26)                                     ; Get max physical address
-                       stw             r13,pfMaxPAddr(r30)                                     ; Save it
-                       lis             r11,hi16(EXT(patch_table))
-                       ori             r11,r11,lo16(EXT(patch_table))
-                       lwz             r19,ptPatch(r26)                                        ; Get ptPatch field
-                       li              r12,PATCH_TABLE_SIZE
-                       mtctr   r12
-patch_loop:
-                       lwz             r16,patchType(r11)                                      ; Load the patch type
-                       lwz             r15,patchValue(r11)                                     ; Load the patch value
-                       cmplwi  cr1,r16,PATCH_FEATURE                           ; Is it a patch feature entry
-                       and.    r14,r15,r19                                                     ; Is it set in the patch feature
-                       crandc  cr0_eq,cr1_eq,cr0_eq                            ; Do we have a match
-                       beq             patch_apply                                                     ; Yes, patch memory
-                       cmplwi  cr1,r16,PATCH_PROCESSOR                         ; Is it a patch processor entry
-                       cmplw   cr0,r15,r18                                                     ; Check matching processor
-                       crand   cr0_eq,cr1_eq,cr0_eq                            ; Do we have a match
-                       bne             patch_skip                                                      ; No, skip patch memory
-patch_apply:
-                       lwz             r13,patchAddr(r11)                                      ; Load the address to patch
-                       lwz             r14,patchData(r11)                                      ; Load the patch data
-                       stw             r14,0(r13)                                                      ; Patch the location
-                       dcbf    0,r13                                                           ; Flush the old one
-                       sync                                                                            ; Make sure we see it all
-                       icbi    0,r13                                                           ; Flush the i-cache
-                       isync                                                                           ; Hang out
-                       sync                                                                            ; Hang out some more...
-patch_skip:
-                       addi    r11,r11,peSize                                          ; Point to the next patch entry
-                       bdnz    patch_loop                                                      ; Loop if in the range
                        b               doOurInit                                                       ; Go do processor specific initialization...
 
 notFirst:      lwz             r17,pfAvailable(r30)                            ; Get our features
+                       rlwinm. r0,r17,0,pfValidb,pfValidb                      ; Have we set up this CPU yet?
+                       bne             doOurInit                                                       ; Yeah, must be wakeup...
 
-doOurInit:     mr.             r20,r20                                                         ; See if initialization routine
-                       crand   firstBoot,bootCPU,firstInit                     ; Indicate if we are on the initial first processor startup
-                       bnelrl                                                                          ; Do the initialization
-                       
-                       ori             r17,r17,lo16(pfValid)                           ; Set the valid bit
-                       stw             r17,pfAvailable(r30)                            ; Set the available features
-
-                       bf              firstBoot,nofeatcpy                                     ; Skip feature propagate if not first time boot...
-
-                       li              r2,NCPUS                                                        ; Get number of CPUs
                        lis             r23,hi16(EXT(per_proc_info))            ; Set base per_proc
                        ori             r23,r23,lo16(EXT(per_proc_info))        ; Set base per_proc
-                       addi    r6,r23,ppSize                                           ; Point to the next one
                        
-cpyFCpu:       addic.  r2,r2,-1                                                        ; Count down
+                       la              r7,pfAvailable(r30)                                     ; Point to features of our processor
                        la              r8,pfAvailable(r23)                                     ; Point to features of boot processor
-                       la              r7,pfAvailable(r6)                                      ; Point to features of our processor
                        li              r9,(pfSize+thrmSize)/4                          ; Get size of a features area
-                       ble--   nofeatcpy                                                       ; Copied all we need
                        
 cpyFeat:       subi    r9,r9,1                                                         ; Count word
                        lwz             r0,0(r8)                                                        ; Get boot cpu features
@@ -257,75 +270,18 @@ cpyFeat:  subi    r9,r9,1                                                         ; Count word
                        addi    r7,r7,4                                                         ; Next out
                        addi    r8,r8,4                                                         ; Next in
                        bgt             cpyFeat                                                         ; Copy all boot cpu features to us...
-
-                       lwz             r17,pfAvailable(r6)                                     ; Get our newly initialized features                    
-                       addi    r6,r6,ppSize                                            ; Point to the next one
-                       b               cpyFCpu                                                         ; Do the next per_proc...
                        
+                       lwz             r17,pfAvailable(r30)                            ; Get our newly initialized features                    
 
-nofeatcpy:     rlwinm. r0,r17,0,pf64Bitb,pf64Bitb                      ; Is this a 64-bit machine?
-                       mtsprg  2,r17                                                           ; Remember the feature flags
-
-                       bne++   start64                                                         ; Skip following if 64-bit...
-
-                       mfspr   r6,hid0                                                         ; Get the HID0
-                       rlwinm  r6,r6,0,sleep+1,doze-1                          ; Remove any vestiges of sleep
-                       mtspr   hid0,r6                                                         ; Set the insominac HID0
-                       isync                                   
-               
-;                      Clear the BAT registers
-
-                       li              r9,0                                                            ; Clear out a register
-                       sync
-                       isync
-                       mtdbatu 0,r9                                                            ; Invalidate maps
-                       mtdbatl 0,r9                                                            ; Invalidate maps
-                       mtdbatu 1,r9                                                            ; Invalidate maps
-                       mtdbatl 1,r9                                                            ; Invalidate maps
-                       mtdbatu 2,r9                                                            ; Invalidate maps
-                       mtdbatl 2,r9                                                            ; Invalidate maps
-                       mtdbatu 3,r9                                                            ; Invalidate maps
-                       mtdbatl 3,r9                                                            ; Invalidate maps
-                       sync
-                       isync
-                       mtibatu 0,r9                                                            ; Invalidate maps
-                       mtibatl 0,r9                                                            ; Invalidate maps
-                       mtibatu 1,r9                                                            ; Invalidate maps
-                       mtibatl 1,r9                                                            ; Invalidate maps
-                       mtibatu 2,r9                                                            ; Invalidate maps
-                       mtibatl 2,r9                                                            ; Invalidate maps
-                       mtibatu 3,r9                                                            ; Invalidate maps
-                       mtibatl 3,r9                                                            ; Invalidate maps
-                       sync
-                       isync
-                       b               startcommon                                                     ; Go join up the common start routine
+doOurInit:     
+                       mr.             r20,r20                                                         ; See if initialization routine
+                       crand   firstBoot,bootCPU,firstInit                     ; Indicate if we are on the initial first processor startup
+                       bnelrl                                                                          ; Do the initialization
                        
-start64:       lis             r5,hi16(startcommon)                            ; Get top of address of continue point
-                       mfspr   r6,hid0                                                         ; Get the HID0
-                       ori             r5,r5,lo16(startcommon)                         ; Get low of address of continue point
-                       lis             r9,hi16(MASK(MSR_HV))                           ; ?
-                       lis             r20,hi16(dozem|napm|sleepm)                     ; Get mask of power saving features     
-                       li              r7,MSR_VM_OFF                                           ; Get real mode MSR, 64-bit off 
-                       sldi    r9,r9,32                                                        ; Slide into position
-                       sldi    r20,r20,32                                                      ; Slide power stuff into position
-                       or              r9,r9,r7                                                        ; Form initial MSR
-                       andc    r6,r6,r20                                                       ; Remove any vestiges of sleep
-                       isync
-                       mtspr   hid0,r6                                                         ; Set the insominac HID0
-                       mfspr   r6,hid0                                                         ; Get it
-                       mfspr   r6,hid0                                                         ; Get it
-                       mfspr   r6,hid0                                                         ; Get it
-                       mfspr   r6,hid0                                                         ; Get it
-                       mfspr   r6,hid0                                                         ; Get it
-                       mfspr   r6,hid0                                                         ; Get it
-                       isync
-                       mtsrr0  r5                                                                      ; Set the continue point
-                       mtsrr1  r9                                                                      ; Set our normal disabled MSR                           
-                       rfid                                                                            ; Tally ho...
+                       ori             r17,r17,lo16(pfValid)                           ; Set the valid bit
+                       stw             r17,pfAvailable(r30)                            ; Set the available features
+                       mtsprg  2,r17                                                           ; Remember the feature flags
                        
-                       .align  5                                       
-
-startcommon:
                        rlwinm. r0,r17,0,pfFloatb,pfFloatb                      ; See if there is floating point
                        beq-    noFloat                                                         ; Nope, this is a really stupid machine...
                        
@@ -387,9 +343,7 @@ noFloat:    rlwinm. r0,r17,0,pfAltivecb,pfAltivecb          ; See if there is Altivec
 
                        mtspr   vrsave,r0                                                       ; Set that no VRs are used yet */
                        
-                       vspltish v1,1                                                           ; Turn on the non-Java bit and saturate
-                       vspltisw v0,1                                                           ; Turn on the saturate bit
-                       vxor    v1,v1,v0                                                        ; Turn off saturate     and leave non-Java set
+                       vspltisw        v1,0                                                    ; Clear a register
                        lvx             v0,br0,r5                                                       ; Initialize VR0
                        mtvscr  v1                                                                      ; Clear the vector status register
                        vor             v2,v0,v0                                                        ; Copy into the next register
@@ -448,16 +402,12 @@ noSMP:            rlwinm. r0,r17,0,pfThermalb,pfThermalb          ; See if there is an TAU
 noThermometer:
                        
                        bl              EXT(cacheInit)                                          ; Initializes all caches (including the TLB)
-
-                       rlwinm. r0,r17,0,pf64Bitb,pf64Bitb                      ; Is this a 64-bit machine?
-                       beq++   isnot64                                                         ; Skip following if not 64-bit...
                        
-                       mfmsr   r29                                                                     ; Get the MSR
-                       rlwinm  r29,r29,0,0,31                                          ; Make sure that 64-bit mode is off
-                       mtmsrd  r29                                                                     ; Set it
-                       isync                                                                           ; Make sure
+                       li              r0,MSR_SUPERVISOR_INT_OFF                       ; Make sure we do not have FP enabled
+                       mtmsr   r0                                                                      ; Set the standard MSR values
+                       isync
                        
-isnot64:       bf              bootCPU,callcpu                                 
+                       bf              bootCPU,callcpu                                         ; Not the boot processor...
 
                        lis             r29,HIGH_ADDR(EXT(intstack_top_ss))     ; move onto interrupt stack
                        ori             r29,r29,LOW_ADDR(EXT(intstack_top_ss))
@@ -469,8 +419,6 @@ isnot64:    bf              bootCPU,callcpu
                        mr              r1,r29
                        mr              r3,r31                                                          ; Restore any arguments we may have trashed
 
-;                      Note that we exit from here with translation still off
-
                        bl      EXT(ppc_init)                                                   ; Jump into boot init code
                        BREAKPOINT_TRAP
 
@@ -484,8 +432,6 @@ callcpu:
                        mr              r1,r29                                                          ; move onto new stack
                        mr              r3,r31                                                          ; Restore any arguments we may have trashed
 
-;                      Note that we exit from here with translation still off
-
                        bl              EXT(ppc_init_cpu)                                       ; Jump into cpu init code
                        BREAKPOINT_TRAP                                                         ; Should never return
 
@@ -538,10 +484,10 @@ init750CX:
                        bf      firstBoot, init750                                              ; No init for wakeup....
                        mfspr   r13,hid1                                                        ; Get HID1
                        li      r14,lo16(0xFD5F)                                                ; Get valid
-                       rlwinm  r13,r13,4,28,31                                         ; Isolate
-                       slw     r14,r14,r13                                                             ; Position
-                       rlwimi  r17,r14,15-pfCanNapb,pfCanNapb,pfCanNapb        ; Set it                        
-                       b       init750                                                                 ; Join common...
+                       rlwinm  r13,r13,4,28,31                                                 ; Isolate
+                       slw     r14,r14,r13                                                     ; Position
+                       rlwimi  r17,r14,15-pfCanNapb,pfCanNapb,pfCanNapb                        ; Set it                        
+                       b       init750                                                         ; Join common...
 
 
 ;                      750FX
@@ -556,9 +502,9 @@ init750FXnb:
                        lwz     r13, pfHID0(r30)                                                ; Get HID0
                        lwz     r11, pfHID1(r30)                                                ; Get HID1
 
-                       rlwinm. r0, r11, 0, hid1ps, hid1ps                      ; Isolate the hid1ps bit
+                       rlwinm. r0, r11, 0, hid1ps, hid1ps                                      ; Isolate the hid1ps bit
                        beq     init750FXnb2                                                    ; Clear BTIC if hid1ps set
-                       rlwinm  r13, r13, 0, btic+1, btic-1                     ; Clear the BTIC bit
+                       rlwinm  r13, r13, 0, btic+1, btic-1                                     ; Clear the BTIC bit
 
 init750FXnb2:
                        sync
@@ -566,9 +512,9 @@ init750FXnb2:
                        isync
                        sync
 
-                       rlwinm  r12, r11, 0, hid1ps+1, hid1ps-1         ; Select PLL0
+                       rlwinm  r12, r11, 0, hid1ps+1, hid1ps-1                                 ; Select PLL0
                        mtspr   hid1, r12                                                       ; Restore PLL config
-                       mftb    r13                                                                     ; Wait 5000 ticks (> 200 us)
+                       mftb    r13                                                             ; Wait 5000 ticks (> 200 us)
 
 init750FXnbloop:
                        mftb    r14
@@ -578,21 +524,6 @@ init750FXnbloop:
                        mtspr   hid1, r11                                                       ; Select the desired PLL
                        blr
 
-;                      750FX vers 2.0 or later
-init750FXV2:
-                       bf      firstBoot, init750FXV2nb                                        ; Wake from sleep
-
-                       mfspr   r11, hid2
-                       stw     r11, pfHID2(r30)                                                ; Save the HID2 value
-                       b       init750FX                                                       ; Continue with 750FX init
-
-init750FXV2nb:
-                       lwz     r13, pfHID2(r30)                                                ; Get HID2
-                       rlwinm  r13, r13, 0, hid2vmin+1, hid2vmin-1                             ; Clear the vmin bit
-                       mtspr   hid2, r13                                                       ; Restore HID2 value
-                       sync                                                                    ; Wait for it to be done
-                       b       init750FX
-
 ;                      7400
 
 init7400:      bf              firstBoot,i7400nb                                       ; Do different if not initial boot...
@@ -606,7 +537,7 @@ i7400hl2:   lis             r14,hi16(256*1024)                                      ; Base L2 size
                        rlwinm  r15,r15,4,30,31                                          
                        slw             r14,r14,r15                                                     ; Set 256KB, 512KB, 1MB, or 2MB
                        
-                       stw             r13,pfl2crOriginal(r30)                         ; Shadow the L2CR
+                       stw             r13,pfl2crOriginal(r30)                                 ; Shadow the L2CR
                        stw             r13,pfl2cr(r30)                                         ; Shadow the L2CR
                        stw             r14,pfl2Size(r30)                                       ; Set the L2 size
                        
@@ -624,7 +555,7 @@ i7400hl2:   lis             r14,hi16(256*1024)                                      ; Base L2 size
                        
 i7400nb:
                        li              r11,0
-                       mtspr   l2cr,r11                                                        ; Make sure L2CR is zero
+                       mtspr           l2cr,r11                                                ; Make sure L2CR is zero
                        lwz             r11,pfHID0(r30)                                         ; Get HID0
                        sync
                        mtspr   hid0,r11                                                        ; Set the HID
@@ -664,25 +595,17 @@ init7410: li              r13,0                                                           ; Clear
 ;                      745X - Any 7450 family processor
 
 init745X:
-                       bf              firstBoot,init745Xnb                            ; Do different if not initial boot...
+                       bf              firstBoot,init745Xnb                                    ; Do different if not initial boot...
 
                        mfspr   r13,l2cr                                                        ; Get the L2CR
                        rlwinm. r0,r13,0,l2e,l2e                                        ; Any L2?
                        bne+    init745Xhl2                                                     ; Yes...
                        rlwinm  r17,r17,0,pfL2b+1,pfL2b-1                       ; No L2, turn off feature
                        
-init745Xhl2:
-                       mfpvr   r14                                                             ; Get processor version
-                       rlwinm  r14,r14,16,16,31                                                ; Isolate processor version
-                       cmpli   cr0, r14, PROCESSOR_VERSION_7457
-                       lis             r14,hi16(512*1024)                                      ; 512KB L2
-                       beq     init745Xhl2_2
-
-                       lis             r14,hi16(256*1024)                                      ; Base L2 size
+init745Xhl2:   lis             r14,hi16(256*1024)                                      ; Base L2 size
                        rlwinm  r15,r13,22,12,13                                        ; Convert to 256k, 512k, or 768k
                        add             r14,r14,r15                                                     ; Add in minimum
-
-init745Xhl2_2:
+                       
                        stw             r13,pfl2crOriginal(r30)                                 ; Shadow the L2CR
                        stw             r13,pfl2cr(r30)                                         ; Shadow the L2CR
                        stw             r14,pfl2Size(r30)                                       ; Set the L2 size
@@ -694,24 +617,24 @@ init745Xhl2_2:
                        bne+    init745Xhl3                                                     ; Yes...
                        rlwinm  r17,r17,0,pfL3b+1,pfL3b-1                       ; No L3, turn off feature
 
-init745Xhl3:   cmplwi  cr0,r13,0                                               ; No L3 if L3CR is zero
-                       beq-    init745Xnone                                            ; Go turn off the features...
+init745Xhl3:   cmplwi  cr0,r13,0                                                       ; No L3 if L3CR is zero
+                       beq-    init745Xnone                                                    ; Go turn off the features...
                        lis             r14,hi16(1024*1024)                                     ; Base L3 size
                        rlwinm  r15,r13,4,31,31                                         ; Get size multiplier
                        slw             r14,r14,r15                                                     ; Set 1 or 2MB
                        
-                       stw             r13,pfl3crOriginal(r30)                         ; Shadow the L3CR
+                       stw             r13,pfl3crOriginal(r30)                                 ; Shadow the L3CR
                        stw             r13,pfl3cr(r30)                                         ; Shadow the L3CR
                        stw             r14,pfl3Size(r30)                                       ; Set the L3 size
                        b               init745Xfin                                                     ; Return....
                                
 init745Xnone:
-                       rlwinm  r17,r17,0,pfL3fab+1,pfL3b-1                     ; No 3rd level cache or assist
+                       rlwinm  r17,r17,0,pfL3fab+1,pfL3b-1                                     ; No 3rd level cache or assist
                        rlwinm  r11,r17,pfWillNapb-pfCanNapb,pfCanNapb,pfCanNapb                ; Set pfCanNap if pfWillNap is set
                        or      r17,r17,r11
 
 init745Xfin:
-                       rlwinm  r17,r17,0,pfWillNapb+1,pfWillNapb-1     ; Make sure pfWillNap is not set
+                       rlwinm  r17,r17,0,pfWillNapb+1,pfWillNapb-1                             ; Make sure pfWillNap is not set
 
                        mfspr   r11,hid0                                                        ; Get the current HID0
                        stw             r11,pfHID0(r30)                                         ; Save the HID0 value
@@ -778,73 +701,6 @@ init7450done:
                        b       init745X                                                        ; Continue with standard init
 
 
-init970:       
-                       li              r20,0                                                           ; Clear this
-                       mtspr   hior,r20                                                        ; Make sure that  0 is interrupt prefix
-                       bf              firstBoot,init970nb                                     ; No init for wakeup or second processor....
-
-
-                       mfspr   r11,hid0                                                        ; Get original hid0
-                       std             r11,pfHID0(r30)                                         ; Save original
-                       mfspr   r11,hid1                                                        ; Get original hid1
-                       std             r11,pfHID1(r30)                                         ; Save original
-                       mfspr   r11,hid4                                                        ; Get original hid4
-                       std             r11,pfHID4(r30)                                         ; Save original
-                       mfspr   r11,hid5                                                        ; Get original hid5
-                       std             r11,pfHID5(r30)                                         ; Save original
-               
-;
-;                      We can not query or change the L2 size.  We will just
-;                      phoney up a L2CR to make sysctl "happy" and set the
-;                      L2 size to 512K.
-;
-
-                       lis             r0,0x8000                                                       ; Synthesize a "valid" but non-existant L2CR
-                       stw             r0,pfl2crOriginal(r30)                          ; Set a dummy L2CR
-                       stw             r0,pfl2cr(r30)                                          ; Set a dummy L2CR
-                       lis             r0,8                                                            ; Get 512K
-                       stw             r0,pfl2Size(r30)                                        ; Set the L2 size
-
-                       blr
-                       
-;
-;                      Start up code for second processor or wake up from sleep
-;
-                       
-init970nb:     ld              r11,pfHID0(r30)                                         ; Get it
-                       isync
-                       mtspr   hid0,r11                                                        ; Stuff it
-                       mfspr   r11,hid0                                                        ; Get it
-                       mfspr   r11,hid0                                                        ; Get it
-                       mfspr   r11,hid0                                                        ; Get it
-                       mfspr   r11,hid0                                                        ; Get it
-                       mfspr   r11,hid0                                                        ; Get it
-                       mfspr   r11,hid0                                                        ; Get it
-                       isync
-               
-                       ld              r11,pfHID1(r30)                                         ; Get it
-                       isync
-                       mtspr   hid1,r11                                                        ; Stick it
-                       mtspr   hid1,r11                                                        ; Stick it again
-                       isync
-               
-                       ld              r11,pfHID4(r30)                                         ; Get it
-                       sync
-                       mtspr   hid4,r11                                                        ; Stick it
-                       isync
-                       
-                       ld              r11,pfHID5(r30)                                         ; Get it
-                       mtspr   hid5,r11                                                        ; Set it
-                       isync
-                       blr                                                                                     ; Leave...
-               
-
-;                      Unsupported Processors
-initUnsupported:
-                       mtlr    r2                                      ; Restore the return address
-                       blr                                             ; Return to the booter
-
-
 ;
 ;      Processor to feature table
 
@@ -854,8 +710,6 @@ initUnsupported:
 ;      .short  ptVersion               - Version code from PVR.  Always start with 0 which is default
 ;      .short  ptRevision              - Revision code from PVR. A zero value denotes the generic attributes if not specific
 ;      .long   ptFeatures              - Available features
-;      .long   ptCPUCap                - Default value for _cpu_capabilities
-;      .long   ptPatch                 - Patch features
 ;      .long   ptInitRout              - Initilization routine.  Can modify any of the other attributes.
 ;      .long   ptRptdProc              - Processor type reported
 ;      .long   ptTempMax               - Maximum operating temprature
@@ -863,371 +717,322 @@ initUnsupported:
 ;      .long   ptLineSize              - Level 1 cache line size
 ;      .long   ptl1iSize               - Level 1 instruction cache size
 ;      .long   ptl1dSize               - Level 1 data cache size
-;      .long   ptPTEG                  - Size of PTEG
-;      .long   ptMaxVAddr              - Maximum effective address
-;      .long   ptMaxPAddr              - Maximum physical address
-;
        
        .align  2
 processor_types:
 
+       
+;      601 (generic)
+
+       .align  2
+       .long   0xFFFF0000              ; All revisions
+       .short  PROCESSOR_VERSION_601
+       .short  0
+       .long   pfFloat | pfSMPcap | pfL1i | pfL1d
+       .long   0
+       .long   CPU_SUBTYPE_POWERPC_ALL
+       .long   0
+       .long   0
+       .long   32
+       .long   32*1024
+       .long   32*1024
+       
+;      603 (generic)
+
+       .align  2
+       .long   0xFFFF0000              ; All revisions
+       .short  PROCESSOR_VERSION_603
+       .short  0
+       .long   pfFloat | pfL1i | pfL1d
+       .long   0
+       .long   CPU_SUBTYPE_POWERPC_603
+       .long   0
+       .long   0
+       .long   32
+       .long   32*1024
+       .long   32*1024
+       
+;      603e (generic)
+
+       .align  2
+       .long   0xFFFF0000              ; All revisions
+       .short  PROCESSOR_VERSION_603e
+       .short  0
+       .long   pfFloat | pfL1i | pfL1d
+       .long   0
+       .long   CPU_SUBTYPE_POWERPC_603e
+       .long   0
+       .long   0
+       .long   32
+       .long   32*1024
+       .long   32*1024
+       
+;      604 (generic)
+
+       .align  2
+       .long   0xFFFF0000              ; All revisions
+       .short  PROCESSOR_VERSION_604
+       .short  0
+       .long   pfFloat | pfSMPcap | pfL1i | pfL1d
+       .long   0
+       .long   CPU_SUBTYPE_POWERPC_604
+       .long   0
+       .long   0
+       .long   32
+       .long   32*1024
+       .long   32*1024
+       
+;      604e (generic)
+
+       .align  2
+       .long   0xFFFF0000              ; All revisions
+       .short  PROCESSOR_VERSION_604e
+       .short  0
+       .long   pfFloat | pfSMPcap | pfL1i | pfL1d
+       .long   0
+       .long   CPU_SUBTYPE_POWERPC_604e
+       .long   0
+       .long   0
+       .long   32
+       .long   32*1024
+       .long   32*1024
+       
+;      604ev (generic)
+
+       .align  2
+       .long   0xFFFF0000              ; All revisions
+       .short  PROCESSOR_VERSION_604ev
+       .short  0
+       .long   pfFloat | pfSMPcap | pfL1i | pfL1d
+       .long   0
+       .long   CPU_SUBTYPE_POWERPC_604e
+       .long   0
+       .long   0
+       .long   32
+       .long   32*1024
+       .long   32*1024
+
 ;       750 (ver 2.2)
 
-                       .align  2
-                       .long   0xFFFFFFFF              ; Exact match
-                       .short  PROCESSOR_VERSION_750
-                       .short  0x4202
-                       .long   pfFloat | pfCanSleep | pfCanNap | pfCanDoze | pf32Byte | pfL2
-                       .long   kCache32 | kHasGraphicsOps | kHasStfiwx
-                       .long   PatchExt32
-                       .long   init750
-                       .long   CPU_SUBTYPE_POWERPC_750
-                       .long   105
-                       .long   90
-                       .long   32
-                       .long   32*1024
-                       .long   32*1024
-                       .long   64
-                       .long   52
-                       .long   32
+        .align  2
+        .long   0xFFFFFFFF              ; Exact match
+        .short  PROCESSOR_VERSION_750
+        .short  0x4202
+        .long   pfFloat | pfCanSleep | pfCanNap | pfCanDoze | pfL1i | pfL1d | pfL2
+        .long   init750
+        .long   CPU_SUBTYPE_POWERPC_750
+        .long   105
+        .long   90
+        .long   32
+        .long   32*1024
+        .long   32*1024
 
 ;       750CX (ver 2.x)
 
-                       .align  2
-                       .long   0xFFFF0F00              ; 2.x vers
-                       .short  PROCESSOR_VERSION_750
-                       .short  0x0200
-                       .long   pfFloat | pfCanSleep | pfCanNap | pfCanDoze | pf32Byte | pfL2
-                       .long   kCache32 | kHasGraphicsOps | kHasStfiwx
-                       .long   PatchExt32
-                       .long   init750CX
-                       .long   CPU_SUBTYPE_POWERPC_750
-                       .long   105
-                       .long   90
-                       .long   32
-                       .long   32*1024
-                       .long   32*1024
-                       .long   64
-                       .long   52
-                       .long   32
-
+        .align  2
+        .long   0xFFFF0F00              ; 2.x vers
+        .short  PROCESSOR_VERSION_750
+        .short  0x0200
+        .long   pfFloat | pfCanSleep | pfCanNap | pfCanDoze | pfL1i | pfL1d | pfL2
+        .long   init750CX
+        .long   CPU_SUBTYPE_POWERPC_750
+        .long   105
+        .long   90
+        .long   32
+        .long   32*1024
+        .long   32*1024
+       
 ;      750 (generic)
 
-                       .align  2
-                       .long   0xFFFF0000              ; All revisions
-                       .short  PROCESSOR_VERSION_750
-                       .short  0
-                       .long   pfFloat | pfCanSleep | pfCanNap | pfCanDoze | pfThermal | pf32Byte | pfL2
-                       .long   kCache32 | kHasGraphicsOps | kHasStfiwx
-                       .long   PatchExt32
-                       .long   init750
-                       .long   CPU_SUBTYPE_POWERPC_750
-                       .long   105
-                       .long   90
-                       .long   32
-                       .long   32*1024
-                       .long   32*1024
-                       .long   64
-                       .long   52
-                       .long   32
-
-;       750FX (ver 1.x)
-
-                       .align  2
-                       .long   0xFFFF0F00              ; 1.x vers
-                       .short  PROCESSOR_VERSION_750FX
-                       .short  0x0100
-                       .long   pfFloat | pfCanSleep | pfCanNap | pfCanDoze | pfSlowNap | pfNoMuMMCK | pf32Byte | pfL2
-                       .long   kCache32 | kHasGraphicsOps | kHasStfiwx
-                       .long   PatchExt32
-                       .long   init750FX
-                       .long   CPU_SUBTYPE_POWERPC_750
-                       .long   105
-                       .long   90
-                       .long   32
-                       .long   32*1024
-                       .long   32*1024
-                       .long   64
-                       .long   52
-                       .long   32
-
+       .align  2
+       .long   0xFFFF0000              ; All revisions
+       .short  PROCESSOR_VERSION_750
+       .short  0
+       .long   pfFloat | pfCanSleep | pfCanNap | pfCanDoze | pfThermal | pfL1i | pfL1d | pfL2
+       .long   init750
+       .long   CPU_SUBTYPE_POWERPC_750
+       .long   105
+       .long   90
+       .long   32
+       .long   32*1024
+       .long   32*1024
+       
 ;       750FX (generic)
 
-                       .align  2
-                       .long   0xFFFF0000              ; All revisions
-                       .short  PROCESSOR_VERSION_750FX
-                       .short  0
-                       .long   pfFloat | pfCanSleep | pfCanNap | pfCanDoze | pfSlowNap | pfNoMuMMCK | pf32Byte | pfL2
-                       .long   kCache32 | kHasGraphicsOps | kHasStfiwx
-                       .long   PatchExt32
-                       .long   init750FXV2
-                       .long   CPU_SUBTYPE_POWERPC_750
-                       .long   105
-                       .long   90
-                       .long   32
-                       .long   32*1024
-                       .long   32*1024
-                       .long   64
-                       .long   52
-                       .long   32
-
+        .align  2
+        .long   0xFFFF0000              ; All revisions
+        .short  PROCESSOR_VERSION_750FX
+        .short  0
+        .long   pfFloat | pfCanSleep | pfCanNap | pfCanDoze | pfSlowNap | pfNoMuMMCK | pfL1i | pfL1d | pfL2
+        .long   init750FX
+        .long   CPU_SUBTYPE_POWERPC_750
+        .long   105
+        .long   90
+        .long   32
+        .long   32*1024
+        .long   32*1024
+       
 ;      7400 (ver 2.0 - ver 2.7)
 
-                       .align  2
-                       .long   0xFFFFFFF8              ; ver 2.0 - 2.7
-                       .short  PROCESSOR_VERSION_7400
-                       .short  0x0200
-                       .long   pfFloat | pfAltivec | pfSMPcap | pfCanSleep | pfCanNap | pfCanDoze | pfThermal | pf32Byte | pfL1fa | pfL2 | pfL2fa | pfHasDcba
-                       .long   kHasAltivec | kCache32 | kDcbaAvailable | kDataStreamsAvailable | kHasGraphicsOps | kHasStfiwx
-                       .long   PatchExt32
-                       .long   init7400v2_7
-                       .long   CPU_SUBTYPE_POWERPC_7400
-                       .long   105
-                       .long   90
-                       .long   32
-                       .long   32*1024
-                       .long   32*1024
-                       .long   64
-                       .long   52
-                       .long   32
-
+       .align  2
+       .long   0xFFFFFFF8              ; All revisions
+       .short  PROCESSOR_VERSION_7400
+       .short  0x0200
+       .long   pfFloat | pfAltivec | pfSMPcap | pfCanSleep | pfCanNap | pfCanDoze | pfThermal | pfL1i | pfL1d | pfL1fa | pfL2 | pfL2fa
+       .long   init7400v2_7
+       .long   CPU_SUBTYPE_POWERPC_7400
+       .long   105
+       .long   90
+       .long   32
+       .long   32*1024
+       .long   32*1024
+       
 ;      7400 (generic)
 
-                       .align  2
-                       .long   0xFFFF0000              ; All revisions
-                       .short  PROCESSOR_VERSION_7400
-                       .short  0
-                       .long   pfFloat | pfAltivec | pfSMPcap | pfCanSleep | pfCanNap | pfCanDoze | pfThermal | pf32Byte | pfL1fa | pfL2 | pfL2fa | pfHasDcba
-                       .long   kHasAltivec | kCache32 | kDcbaAvailable | kDataStreamsRecommended | kDataStreamsAvailable | kHasGraphicsOps | kHasStfiwx
-                       .long   PatchExt32
-                       .long   init7400
-                       .long   CPU_SUBTYPE_POWERPC_7400
-                       .long   105
-                       .long   90
-                       .long   32
-                       .long   32*1024
-                       .long   32*1024
-                       .long   64
-                       .long   52
-                       .long   36
-
+       .align  2
+       .long   0xFFFF0000              ; All revisions
+       .short  PROCESSOR_VERSION_7400
+       .short  0
+       .long   pfFloat | pfAltivec | pfSMPcap | pfCanSleep | pfCanNap | pfCanDoze | pfThermal | pfL1i | pfL1d | pfL1fa | pfL2 | pfL2fa
+       .long   init7400
+       .long   CPU_SUBTYPE_POWERPC_7400
+       .long   105
+       .long   90
+       .long   32
+       .long   32*1024
+       .long   32*1024
+       
 ;      7410 (ver 1.1)
 
-                       .align  2
-                       .long   0xFFFFFFFF              ; Exact match
-                       .short  PROCESSOR_VERSION_7400
-                       .short  0x1101
-                       .long   pfFloat | pfAltivec | pfSMPcap | pfCanSleep | pfCanNap | pfCanDoze | pf32Byte | pfL1fa | pfL2 | pfL2fa | pfHasDcba
-                       .long   kHasAltivec | kCache32 | kDcbaAvailable | kDataStreamsRecommended | kDataStreamsAvailable | kHasGraphicsOps | kHasStfiwx
-                       .long   PatchExt32
-                       .long   init7410
-                       .long   CPU_SUBTYPE_POWERPC_7400
-                       .long   105
-                       .long   90
-                       .long   32
-                       .long   32*1024
-                       .long   32*1024
-                       .long   64
-                       .long   52
-                       .long   36
+       .align  2
+       .long   0xFFFFFFFF              ; Exact match
+       .short  PROCESSOR_VERSION_7400
+       .short  0x1101
+       .long   pfFloat | pfAltivec | pfSMPcap | pfCanSleep | pfCanNap | pfCanDoze | pfL1i | pfL1d | pfL1fa | pfL2 | pfL2fa
+       .long   init7410
+       .long   CPU_SUBTYPE_POWERPC_7400
+       .long   105
+       .long   90
+       .long   32
+       .long   32*1024
+       .long   32*1024
 
 ;      7410 (generic)
 
-                       .align  2
-                       .long   0xFFFF0000              ; All other revisions
-                       .short  PROCESSOR_VERSION_7410
-                       .short  0
-                       .long   pfFloat | pfAltivec | pfSMPcap | pfCanSleep | pfCanNap | pfCanDoze | pf32Byte | pfL1fa | pfL2 | pfL2fa | pfHasDcba
-                       .long   kHasAltivec | kCache32 | kDcbaAvailable | kDataStreamsRecommended | kDataStreamsAvailable | kHasGraphicsOps | kHasStfiwx
-                       .long   PatchExt32
-                       .long   init7410
-                       .long   CPU_SUBTYPE_POWERPC_7400
-                       .long   105
-                       .long   90
-                       .long   32
-                       .long   32*1024
-                       .long   32*1024
-                       .long   64
-                       .long   52
-                       .long   36
+       .align  2
+       .long   0xFFFF0000              ; All other revisions
+       .short  PROCESSOR_VERSION_7410
+       .short  0
+       .long   pfFloat | pfAltivec | pfSMPcap | pfCanSleep | pfCanNap | pfCanDoze | pfL1i | pfL1d | pfL1fa | pfL2 | pfL2fa
+       .long   init7410
+       .long   CPU_SUBTYPE_POWERPC_7400
+       .long   105
+       .long   90
+       .long   32
+       .long   32*1024
+       .long   32*1024
 
 ;      7450 (ver 1.xx)
 
-                       .align  2
-                       .long   0xFFFFFF00              ; Just revisions 1.xx
-                       .short  PROCESSOR_VERSION_7450
-                       .short  0x0100
-                       .long   pfFloat | pfAltivec | pfSMPcap | pfCanSleep | pfNoMSRir | pfNoL2PFNap | pfLClck | pf32Byte | pfL2 | pfL2fa | pfL2i | pfL3 | pfL3fa  | pfHasDcba
-                       .long   kHasAltivec | kCache32 | kDcbaAvailable | kDataStreamsRecommended | kDataStreamsAvailable | kHasGraphicsOps | kHasStfiwx
-                       .long   PatchExt32
-                       .long   init7450
-                       .long   CPU_SUBTYPE_POWERPC_7450
-                       .long   105
-                       .long   90
-                       .long   32
-                       .long   32*1024
-                       .long   32*1024
-                       .long   64
-                       .long   52
-                       .long   36
+       .align  2
+       .long   0xFFFFFF00              ; Just revisions 1.xx
+       .short  PROCESSOR_VERSION_7450
+       .short  0x0100
+       .long   pfFloat | pfAltivec | pfSMPcap | pfCanSleep | pfNoMSRir | pfNoL2PFNap | pfLClck | pfL1i | pfL1d | pfL2 | pfL2fa | pfL2i | pfL3 | pfL3fa
+       .long   init7450
+       .long   CPU_SUBTYPE_POWERPC_7450
+       .long   105
+       .long   90
+       .long   32
+       .long   32*1024
+       .long   32*1024
 
 ;      7450 (2.0)
 
-                       .align  2
-                       .long   0xFFFFFFFF              ; Just revision 2.0
-                       .short  PROCESSOR_VERSION_7450
-                       .short  0x0200
-                       .long   pfFloat | pfAltivec | pfSMPcap | pfCanSleep | pfNoMSRir | pfNoL2PFNap | pfLClck | pf32Byte | pfL2 | pfL2fa | pfL2i | pfL3 | pfL3fa | pfHasDcba
-                       .long   kHasAltivec | kCache32 | kDcbaAvailable | kDataStreamsRecommended | kDataStreamsAvailable | kHasGraphicsOps | kHasStfiwx
-                       .long   PatchExt32
-                       .long   init7450
-                       .long   CPU_SUBTYPE_POWERPC_7450
-                       .long   105
-                       .long   90
-                       .long   32
-                       .long   32*1024
-                       .long   32*1024
-                       .long   64
-                       .long   52
-                       .long   36
+       .align  2
+       .long   0xFFFFFFFF              ; Just revision 2.0
+       .short  PROCESSOR_VERSION_7450
+       .short  0x0200
+       .long   pfFloat | pfAltivec | pfSMPcap | pfCanSleep | pfNoMSRir | pfNoL2PFNap | pfLClck | pfL1i | pfL1d | pfL2 | pfL2fa | pfL2i | pfL3 | pfL3fa
+       .long   init7450
+       .long   CPU_SUBTYPE_POWERPC_7450
+       .long   105
+       .long   90
+       .long   32
+       .long   32*1024
+       .long   32*1024
 
 ;      7450 (2.1)
 
-                       .align  2
-                       .long   0xFFFF0000              ; All other revisions
-                       .short  PROCESSOR_VERSION_7450
-                       .short  0
-                       .long   pfFloat | pfAltivec | pfSMPcap | pfCanSleep | pfWillNap | pfNoMSRir | pfNoL2PFNap | pfLClck | pf32Byte | pfL2 | pfL2fa | pfL2i | pfL3 | pfL3fa | pfHasDcba
-                       .long   kHasAltivec | kCache32 | kDcbaAvailable | kDataStreamsRecommended | kDataStreamsAvailable | kHasGraphicsOps | kHasStfiwx
-                       .long   PatchExt32
-                       .long   init7450
-                       .long   CPU_SUBTYPE_POWERPC_7450
-                       .long   105
-                       .long   90
-                       .long   32
-                       .long   32*1024
-                       .long   32*1024
-                       .long   64
-                       .long   52
-                       .long   36
+       .align  2
+       .long   0xFFFF0000              ; All other revisions
+       .short  PROCESSOR_VERSION_7450
+       .short  0
+       .long   pfFloat | pfAltivec | pfSMPcap | pfCanSleep | pfWillNap | pfNoMSRir | pfNoL2PFNap | pfLClck | pfL1i | pfL1d | pfL2 | pfL2fa | pfL2i | pfL3 | pfL3fa
+       .long   init7450
+       .long   CPU_SUBTYPE_POWERPC_7450
+       .long   105
+       .long   90
+       .long   32
+       .long   32*1024
+       .long   32*1024
 
 ;      7455 (1.xx)  Just like 7450 2.0
 
-                       .align  2
-                       .long   0xFFFFFF00              ; Just revisions 1.xx
-                       .short  PROCESSOR_VERSION_7455
-                       .short  0x0100
-                       .long   pfFloat | pfAltivec | pfSMPcap | pfCanSleep | pfNoMSRir | pfNoL2PFNap | pfLClck | pf32Byte | pfL2 | pfL2fa | pfL2i | pfL3 | pfL3fa | pfHasDcba
-                       .long   kHasAltivec | kCache32 | kDcbaAvailable | kDataStreamsRecommended | kDataStreamsAvailable | kHasGraphicsOps | kHasStfiwx
-                       .long   PatchExt32
-                       .long   init745X
-                       .long   CPU_SUBTYPE_POWERPC_7450
-                       .long   105
-                       .long   90
-                       .long   32
-                       .long   32*1024
-                       .long   32*1024
-                       .long   64
-                       .long   52
-                       .long   36
+       .align  2
+       .long   0xFFFFFF00              ; Just revisions 1.xx
+       .short  PROCESSOR_VERSION_7455
+       .short  0x0100
+       .long   pfFloat | pfAltivec | pfSMPcap | pfCanSleep | pfNoMSRir | pfNoL2PFNap | pfLClck | pfL1i | pfL1d | pfL2 | pfL2fa | pfL2i | pfL3 | pfL3fa
+       .long   init745X
+       .long   CPU_SUBTYPE_POWERPC_7450
+       .long   105
+       .long   90
+       .long   32
+       .long   32*1024
+       .long   32*1024
 
 ;      7455 (2.0)
 
-                       .align  2
-                       .long   0xFFFFFFFF              ; Just revision 2.0
-                       .short  PROCESSOR_VERSION_7455
-                       .short  0x0200
-                       .long   pfFloat | pfAltivec | pfSMPcap | pfCanSleep | pfWillNap | pfNoMSRir | pfNoL2PFNap | pfLClck | pf32Byte | pfL2 | pfL2fa | pfL2i | pfL3 | pfL3fa | pfHasDcba
-                       .long   kHasAltivec | kCache32 | kDcbaAvailable | kDataStreamsRecommended | kDataStreamsAvailable | kHasGraphicsOps | kHasStfiwx
-                       .long   PatchExt32
-                       .long   init745X
-                       .long   CPU_SUBTYPE_POWERPC_7450
-                       .long   105
-                       .long   90
-                       .long   32
-                       .long   32*1024
-                       .long   32*1024
-                       .long   64
-                       .long   52
-                       .long   36
+       .align  2
+       .long   0xFFFFFFFF              ; Just revision 2.0
+       .short  PROCESSOR_VERSION_7455
+       .short  0x0200
+       .long   pfFloat | pfAltivec | pfSMPcap | pfCanSleep | pfWillNap | pfNoMSRir | pfNoL2PFNap | pfLClck | pfL1i | pfL1d | pfL2 | pfL2fa | pfL2i | pfL3 | pfL3fa
+       .long   init745X
+       .long   CPU_SUBTYPE_POWERPC_7450
+       .long   105
+       .long   90
+       .long   32
+       .long   32*1024
+       .long   32*1024
 
 ;      7455 (2.1)
 
-                       .align  2
-                       .long   0xFFFF0000              ; All other revisions
-                       .short  PROCESSOR_VERSION_7455
-                       .short  0
-                       .long   pfFloat | pfAltivec | pfSMPcap | pfCanSleep | pfCanNap | pfNoMSRir | pfNoL2PFNap | pfLClck | pf32Byte | pfL2 | pfL2fa | pfL2i | pfL3 | pfL3fa | pfHasDcba
-                       .long   kHasAltivec | kCache32 | kDcbaAvailable | kDataStreamsRecommended | kDataStreamsAvailable | kHasGraphicsOps | kHasStfiwx
-                       .long   PatchExt32
-                       .long   init745X
-                       .long   CPU_SUBTYPE_POWERPC_7450
-                       .long   105
-                       .long   90
-                       .long   32
-                       .long   32*1024
-                       .long   32*1024
-                       .long   64
-                       .long   52
-                       .long   36
-
-;      7457
-
-                       .align  2
-                       .long   0xFFFF0000              ; All revisions
-                       .short  PROCESSOR_VERSION_7457
-                       .short  0
-                       .long   pfFloat | pfAltivec | pfSMPcap | pfCanSleep | pfCanNap | pfNoMSRir | pfNoL2PFNap | pfLClck | pf32Byte | pfL2 | pfL2fa | pfL2i | pfL3 | pfL3fa | pfHasDcba
-                       .long   kHasAltivec | kCache32 | kDcbaAvailable | kDataStreamsRecommended | kDataStreamsAvailable | kHasGraphicsOps | kHasStfiwx
-                       .long   PatchExt32
-                       .long   init745X
-                       .long   CPU_SUBTYPE_POWERPC_7450
-                       .long   105
-                       .long   90
-                       .long   32
-                       .long   32*1024
-                       .long   32*1024
-                       .long   64
-                       .long   52
-                       .long   36
-
-;      970
-
-                       .align  2
-                       .long   0xFFFF0000              ; All versions so far
-                       .short  PROCESSOR_VERSION_970
-                       .short  0
-                       .long   pfFloat | pfAltivec | pfSMPcap | pfCanSleep | pfCanNap | pf128Byte | pf64Bit | pfL2 | pfSCOMFixUp
-                       .long   kHasAltivec | k64Bit | kCache128 | kDataStreamsAvailable | kDcbtStreamsRecommended | kDcbtStreamsAvailable | kHasGraphicsOps | kHasStfiwx | kHasFsqrt
-                       .long   PatchLwsync
-                       .long   init970
-                       .long   CPU_SUBTYPE_POWERPC_970
-                       .long   105
-                       .long   90
-                       .long   128
-                       .long   64*1024
-                       .long   32*1024
-                       .long   128
-                       .long   65
-                       .long   42
-
-;      All other processors are not supported
-
-                       .align  2
-                       .long   0x00000000              ; Matches everything
-                       .short  0
-                       .short  0
-                       .long   pfFloat | pf32Byte
-                       .long   kCache32 | kHasGraphicsOps | kHasStfiwx
-                       .long   PatchExt32
-                       .long   initUnsupported
-                       .long   CPU_SUBTYPE_POWERPC_ALL
-                       .long   105
-                       .long   90
-                       .long   32
-                       .long   32*1024
-                       .long   32*1024
-                       .long   64
-                       .long   52
-                       .long   32
+       .align  2
+       .long   0xFFFF0000              ; All other revisions
+       .short  PROCESSOR_VERSION_7455
+       .short  0
+       .long   pfFloat | pfAltivec | pfSMPcap | pfCanSleep | pfCanNap | pfNoMSRir | pfNoL2PFNap | pfLClck | pfL1i | pfL1d | pfL2 | pfL2fa | pfL2i | pfL3 | pfL3fa
+       .long   init745X
+       .long   CPU_SUBTYPE_POWERPC_7450
+       .long   105
+       .long   90
+       .long   32
+       .long   32*1024
+       .long   32*1024
+
+;      Default dumb loser machine
 
+       .align  2
+       .long   0x00000000              ; Matches everything
+       .short  0
+       .short  0
+       .long   pfFloat | pfL1i | pfL1d
+       .long   0
+       .long   CPU_SUBTYPE_POWERPC_ALL
+       .long   105
+       .long   90
+       .long   32
+       .long   32*1024
+       .long   32*1024
index 3f80e92ad88105c35003d49d8b5b5380f83892e3..8e7a65b050c2aaa9a7073394a76f486a6d2ca7f9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -47,8 +44,6 @@ extern void thread_bootstrap_return(void);
 extern struct   Saveanchor saveanchor;
 extern int      real_ncpus;                     /* Number of actual CPUs */
 
-#define       USRSTACK        0xc0000000
-
 kern_return_t
 thread_userstack(
     thread_t,
@@ -71,7 +66,6 @@ thread_entrypoint(
 unsigned int get_msr_exportmask(void);
 unsigned int get_msr_nbits(void);
 unsigned int get_msr_rbits(void);
-void ppc_checkthreadstate(void *, int);
 void thread_set_child(thread_act_t child, int pid);
 void thread_set_parent(thread_act_t parent, int pid);
                
@@ -83,9 +77,6 @@ unsigned int state_count[] = {
        PPC_THREAD_STATE_COUNT,
        PPC_FLOAT_STATE_COUNT,
        PPC_EXCEPTION_STATE_COUNT,
-       PPC_VECTOR_STATE_COUNT,
-       PPC_THREAD_STATE64_COUNT,
-       PPC_EXCEPTION_STATE64_COUNT,
 };
 
 /*
@@ -110,29 +101,32 @@ act_machine_get_state(
        unsigned int vrvalidwrk;
 
        register struct ppc_thread_state *ts;
-       register struct ppc_thread_state64 *xts;
        register struct ppc_exception_state *es;
-       register struct ppc_exception_state64 *xes;
        register struct ppc_float_state *fs;
        register struct ppc_vector_state *vs;
        
+       
+#if    MACH_ASSERT
+    if (watchacts & WA_STATE)
+       printf("act_%x act_machine_get_state(thr_act=%x,flav=%x,st=%x,cnt@%x=%x)\n",
+              current_act(), thr_act, flavor, tstate,
+              count, (count ? *count : 0));
+#endif /* MACH_ASSERT */
+
        genuser = find_user_regs(thr_act);                                              /* Find the current user general context for this activation */
 
        switch (flavor) {
                
                case THREAD_STATE_FLAVOR_LIST:
                        
-                       if (*count < 6)  {
+                       if (*count < 3)  {
                                return (KERN_INVALID_ARGUMENT);
                        }
                
                        tstate[0] = PPC_THREAD_STATE;
                        tstate[1] = PPC_FLOAT_STATE;
                        tstate[2] = PPC_EXCEPTION_STATE;
-                       tstate[3] = PPC_VECTOR_STATE;
-                       tstate[4] = PPC_THREAD_STATE64;
-                       tstate[5] = PPC_EXCEPTION_STATE64;
-                       *count = 6;
+                       *count = 3;
                
                        return KERN_SUCCESS;
        
@@ -147,46 +141,46 @@ act_machine_get_state(
                        sv = genuser;                                                                   /* Copy this over */
                        
                        if(sv) {                                                                                /* Is there a save area yet? */
-                               ts->r0  = (unsigned int)sv->save_r0;
-                               ts->r1  = (unsigned int)sv->save_r1;
-                               ts->r2  = (unsigned int)sv->save_r2;
-                               ts->r3  = (unsigned int)sv->save_r3;
-                               ts->r4  = (unsigned int)sv->save_r4;
-                               ts->r5  = (unsigned int)sv->save_r5;
-                               ts->r6  = (unsigned int)sv->save_r6;
-                               ts->r7  = (unsigned int)sv->save_r7;
-                               ts->r8  = (unsigned int)sv->save_r8;
-                               ts->r9  = (unsigned int)sv->save_r9;
-                               ts->r10 = (unsigned int)sv->save_r10;
-                               ts->r11 = (unsigned int)sv->save_r11;
-                               ts->r12 = (unsigned int)sv->save_r12;
-                               ts->r13 = (unsigned int)sv->save_r13;
-                               ts->r14 = (unsigned int)sv->save_r14;
-                               ts->r15 = (unsigned int)sv->save_r15;
-                               ts->r16 = (unsigned int)sv->save_r16;
-                               ts->r17 = (unsigned int)sv->save_r17;
-                               ts->r18 = (unsigned int)sv->save_r18;
-                               ts->r19 = (unsigned int)sv->save_r19;
-                               ts->r20 = (unsigned int)sv->save_r20;
-                               ts->r21 = (unsigned int)sv->save_r21;
-                               ts->r22 = (unsigned int)sv->save_r22;
-                               ts->r23 = (unsigned int)sv->save_r23;
-                               ts->r24 = (unsigned int)sv->save_r24;
-                               ts->r25 = (unsigned int)sv->save_r25;
-                               ts->r26 = (unsigned int)sv->save_r26;
-                               ts->r27 = (unsigned int)sv->save_r27;
-                               ts->r28 = (unsigned int)sv->save_r28;
-                               ts->r29 = (unsigned int)sv->save_r29;
-                               ts->r30 = (unsigned int)sv->save_r30;
-                               ts->r31 = (unsigned int)sv->save_r31;
-                               ts->cr  = (unsigned int)sv->save_cr;
-                               ts->xer = (unsigned int)sv->save_xer;
-                               ts->lr  = (unsigned int)sv->save_lr;
-                               ts->ctr = (unsigned int)sv->save_ctr;
-                               ts->srr0 = (unsigned int)sv->save_srr0;
-                               ts->srr1 = (unsigned int)sv->save_srr1;
+                               ts->r0  = sv->save_r0;
+                               ts->r1  = sv->save_r1;
+                               ts->r2  = sv->save_r2;
+                               ts->r3  = sv->save_r3;
+                               ts->r4  = sv->save_r4;
+                               ts->r5  = sv->save_r5;
+                               ts->r6  = sv->save_r6;
+                               ts->r7  = sv->save_r7;
+                               ts->r8  = sv->save_r8;
+                               ts->r9  = sv->save_r9;
+                               ts->r10 = sv->save_r10;
+                               ts->r11 = sv->save_r11;
+                               ts->r12 = sv->save_r12;
+                               ts->r13 = sv->save_r13;
+                               ts->r14 = sv->save_r14;
+                               ts->r15 = sv->save_r15;
+                               ts->r16 = sv->save_r16;
+                               ts->r17 = sv->save_r17;
+                               ts->r18 = sv->save_r18;
+                               ts->r19 = sv->save_r19;
+                               ts->r20 = sv->save_r20;
+                               ts->r21 = sv->save_r21;
+                               ts->r22 = sv->save_r22;
+                               ts->r23 = sv->save_r23;
+                               ts->r24 = sv->save_r24;
+                               ts->r25 = sv->save_r25;
+                               ts->r26 = sv->save_r26;
+                               ts->r27 = sv->save_r27;
+                               ts->r28 = sv->save_r28;
+                               ts->r29 = sv->save_r29;
+                               ts->r30 = sv->save_r30;
+                               ts->r31 = sv->save_r31;
+                               ts->cr  = sv->save_cr;
+                               ts->xer = sv->save_xer;
+                               ts->lr  = sv->save_lr;
+                               ts->ctr = sv->save_ctr;
+                               ts->srr0 = sv->save_srr0;
+                               ts->srr1 = sv->save_srr1;
                                ts->mq  = 0;                                                    /* MQ register (601 only) */
-                               ts->vrsave      = (unsigned int)sv->save_vrsave;                        /* VRSAVE register (Altivec only) */
+                               ts->vrsave      = sv->save_vrsave;                      /* VRSAVE register (Altivec only) */
                        }
                        else {                                                                          /* No user state yet. Save seemingly random values. */
                                                
@@ -207,75 +201,6 @@ act_machine_get_state(
                        *count = PPC_THREAD_STATE_COUNT;                        /* Pass back the amount we actually copied */
                        return KERN_SUCCESS;
        
-       
-               case PPC_THREAD_STATE64:
-       
-                       if (*count < PPC_THREAD_STATE64_COUNT) {        /* Is the count ok? */
-                               return KERN_INVALID_ARGUMENT;
-                       }
-               
-                       xts = (struct ppc_thread_state64 *) tstate;
-
-                       sv = genuser;                                                           /* Copy this over */
-                       
-                       if(sv) {                                                                        /* Is there a save area yet? */
-                               xts->r0         = sv->save_r0;
-                               xts->r1         = sv->save_r1;
-                               xts->r2         = sv->save_r2;
-                               xts->r3         = sv->save_r3;
-                               xts->r4         = sv->save_r4;
-                               xts->r5         = sv->save_r5;
-                               xts->r6         = sv->save_r6;
-                               xts->r7         = sv->save_r7;
-                               xts->r8         = sv->save_r8;
-                               xts->r9         = sv->save_r9;
-                               xts->r10        = sv->save_r10;
-                               xts->r11        = sv->save_r11;
-                               xts->r12        = sv->save_r12;
-                               xts->r13        = sv->save_r13;
-                               xts->r14        = sv->save_r14;
-                               xts->r15        = sv->save_r15;
-                               xts->r16        = sv->save_r16;
-                               xts->r17        = sv->save_r17;
-                               xts->r18        = sv->save_r18;
-                               xts->r19        = sv->save_r19;
-                               xts->r20        = sv->save_r20;
-                               xts->r21        = sv->save_r21;
-                               xts->r22        = sv->save_r22;
-                               xts->r23        = sv->save_r23;
-                               xts->r24        = sv->save_r24;
-                               xts->r25        = sv->save_r25;
-                               xts->r26        = sv->save_r26;
-                               xts->r27        = sv->save_r27;
-                               xts->r28        = sv->save_r28;
-                               xts->r29        = sv->save_r29;
-                               xts->r30        = sv->save_r30;
-                               xts->r31        = sv->save_r31;
-                               xts->cr         = sv->save_cr;
-                               xts->xer        = sv->save_xer;
-                               xts->lr         = sv->save_lr;
-                               xts->ctr        = sv->save_ctr;
-                               xts->srr0       = sv->save_srr0;
-                               xts->srr1       = sv->save_srr1;
-                               xts->vrsave     = sv->save_vrsave;                      /* VRSAVE register (Altivec only) */
-                       }
-                       else {                                                                          /* No user state yet. Save seemingly random values. */
-                                               
-                               for(i=0; i < 32; i++) {                                 /* Fill up with defaults */
-                                       ((unsigned long long *)&xts->r0)[i] = ((unsigned long long *)&FloatInit)[0];
-                               }
-                               xts->cr         = 0;
-                               xts->xer        = 0;
-                               xts->lr         = ((unsigned long long *)&FloatInit)[0];
-                               xts->ctr        = ((unsigned long long *)&FloatInit)[0];
-                               xts->srr0       = ((unsigned long long *)&FloatInit)[0];
-                               xts->srr1       = MSR_EXPORT_MASK_SET;
-                               xts->vrsave     = 0;                                            /* VRSAVE register (Altivec only) */
-                       }
-               
-                       *count = PPC_THREAD_STATE64_COUNT;                      /* Pass back the amount we actually copied */
-                       return KERN_SUCCESS;
-       
                case PPC_EXCEPTION_STATE:
        
                        if (*count < PPC_EXCEPTION_STATE_COUNT) {
@@ -283,10 +208,17 @@ act_machine_get_state(
                        }
                
                        es = (struct ppc_exception_state *) tstate;
-                       sv = genuser;                                                           /* Copy this over */
                
+                       sv = thr_act->mact.pcb;                                         /* Start with the normal savearea */
+                       while(sv) {                                                                     /* Find the user context */
+                               if(sv->save_srr1 & MASK(MSR_PR)) {              /* Are we looking at the user context? */
+                                       break;                                                          /* Outta here */
+                               }
+                               sv = sv->save_hdr.save_prev;                    /* Back chain */
+                       }
+
                        if(sv) {                                                                        /* See if valid state yet */
-                               es->dar = (unsigned int)sv->save_dar;
+                               es->dar = sv->save_dar;
                                es->dsisr = sv->save_dsisr;
                                es->exception = sv->save_exception;
                        }
@@ -299,29 +231,6 @@ act_machine_get_state(
                        *count = PPC_EXCEPTION_STATE_COUNT;
                        return KERN_SUCCESS;
        
-               case PPC_EXCEPTION_STATE64:
-       
-                       if (*count < PPC_EXCEPTION_STATE64_COUNT) {
-                               return KERN_INVALID_ARGUMENT;
-                       }
-               
-                       xes = (struct ppc_exception_state64 *) tstate;
-                       sv = genuser;                                                           /* Copy this over */
-               
-                       if(sv) {                                                                        /* See if valid state yet */
-                               xes->dar = sv->save_dar;
-                               xes->dsisr = sv->save_dsisr;
-                               xes->exception = sv->save_exception;
-                       }
-                       else {                                                                          /* Nope, not yet */
-                               xes->dar = 0;
-                               xes->dsisr = 0;
-                               xes->exception = ((unsigned int *)&FloatInit)[0];
-                       }
-               
-                       *count = PPC_EXCEPTION_STATE64_COUNT;
-                       return KERN_SUCCESS;
-       
                case PPC_FLOAT_STATE: 
                
                        if (*count < PPC_FLOAT_STATE_COUNT)  {
@@ -332,7 +241,14 @@ act_machine_get_state(
                
                        fs = (struct ppc_float_state *) tstate;         /* Point to destination */
                        
-                       fsv = find_user_fpu(thr_act);                           /* Get the user's fpu savearea */
+                       fsv = (savearea_fpu *)thr_act->mact.curctx->FPUsave;    /* Start with the top FPU savearea */
+                       
+                       while(fsv) {                                                            /* Find the user context */
+                               if(!fsv->save_hdr.save_level) {                 /* Are we looking at the user context? */
+                                       break;                                                          /* Outta here */
+                               }
+                               fsv = (savearea_fpu *)fsv->save_hdr.save_prev;  /* Back chain */
+                       }
                        
                        if(fsv) {                                                                       /* See if we have any */
                                bcopy((char *)&fsv->save_fp0, (char *)fs, 32*8); /* 32 registers  */
@@ -363,7 +279,14 @@ act_machine_get_state(
                
                        vs = (struct ppc_vector_state *) tstate;        /* Point to destination */
                        
-                       vsv = find_user_vec(thr_act);                           /* Find the vector savearea */
+                       vsv = (savearea_vec *)thr_act->mact.curctx->VMXsave;    /* Start with the top vector savearea */
+                       
+                       while(vsv) {                                                            /* Find the user context */
+                               if(!vsv->save_hdr.save_level) {                 /* Are we looking at the user context? */
+                                       break;                                                          /* Outta here */
+                               }
+                               vsv = (savearea_vec *)vsv->save_hdr.save_prev;  /* Back chain */
+                       }
                        
                        if(vsv) {                                                                       /* See if we have any */
                                
@@ -374,7 +297,7 @@ act_machine_get_state(
                                        vs->save_vscr[0] = 0;                           /* Set an initial value if no general user yet */
                                        vs->save_vscr[1] = 0;
                                        vs->save_vscr[2] = 0;
-                                       vs->save_vscr[3] = 0x00010000;          /* Always start with Java mode off */
+                                       vs->save_vscr[3] = 0x00010000;
                                }
                                for(i=0; i < 32; i++) {                                 /* Copy the saved registers and invalidate the others */
                                        for(j=0; j < 4; j++) {
@@ -396,7 +319,7 @@ act_machine_get_state(
                                        vs->save_vscr[0] = 0;                           /* Set an initial value if no general user yet */
                                        vs->save_vscr[1] = 0;
                                        vs->save_vscr[2] = 0;
-                                       vs->save_vscr[3] = 0x00010000;          /* Always start with Java mode off */
+                                       vs->save_vscr[3] = 0x00010000;
                                }
                                vs->save_vrvalid = 0;                                   /* Clear the valid flags */
                        }
@@ -432,14 +355,18 @@ act_machine_set_state(
        unsigned int    i;
        int                             clgn;
        register struct ppc_thread_state *ts;
-       register struct ppc_thread_state64 *xts;
        register struct ppc_exception_state *es;
-       register struct ppc_exception_state *xes;
        register struct ppc_float_state *fs;
        register struct ppc_vector_state *vs;
        
     int        kernel_act = thr_act->kernel_loading || thr_act->kernel_loaded;
 
+#if    MACH_ASSERT
+    if (watchacts & WA_STATE)
+       printf("act_%x act_machine_set_state(thr_act=%x,flav=%x,st=%x,cnt=%x)\n",
+              current_act(), thr_act, flavor, tstate, count);
+#endif /* MACH_ASSERT */
+               
 //     dbgTrace((unsigned int)thr_act, (unsigned int)sv, flavor);      /* (TEST/DEBUG) */
 
        clgn = count;                                                                                   /* Get the count */
@@ -451,13 +378,6 @@ act_machine_set_state(
                                return KERN_INVALID_ARGUMENT;                           /* Yeah, just leave... */
                        }
                        break;
-       
-               case PPC_THREAD_STATE64:
-                       
-                       if (clgn < PPC_THREAD_STATE64_COUNT)  {                 /* Is it too short? */
-                               return KERN_INVALID_ARGUMENT;                           /* Yeah, just leave... */
-                       }
-                       break;
                        
                case PPC_EXCEPTION_STATE:
                        
@@ -465,12 +385,6 @@ act_machine_set_state(
                                return KERN_INVALID_ARGUMENT;                           /* Yeah, just leave... */
                        }
                        
-               case PPC_EXCEPTION_STATE64:
-                       
-                       if (clgn < PPC_EXCEPTION_STATE64_COUNT)  {              /* Is it too short? */
-                               return KERN_INVALID_ARGUMENT;                           /* Yeah, just leave... */
-                       }
-                       
                        break;
                        
                case PPC_FLOAT_STATE:
@@ -499,135 +413,70 @@ act_machine_set_state(
        switch (flavor) {
                
                case PPC_THREAD_STATE:
+               case PPC_EXCEPTION_STATE:
                                
                        ts = (struct ppc_thread_state *)tstate;
+                                                                               
+                       if(flavor == PPC_THREAD_STATE) {                                /* Are we updating plain state? */
+                       
+                               genuser->save_r0        = ts->r0;
+                               genuser->save_r1        = ts->r1;
+                               genuser->save_r2        = ts->r2;
+                               genuser->save_r3        = ts->r3;
+                               genuser->save_r4        = ts->r4;
+                               genuser->save_r5        = ts->r5;
+                               genuser->save_r6        = ts->r6;
+                               genuser->save_r7        = ts->r7;
+                               genuser->save_r8        = ts->r8;
+                               genuser->save_r9        = ts->r9;
+                               genuser->save_r10       = ts->r10;
+                               genuser->save_r11       = ts->r11;
+                               genuser->save_r12       = ts->r12;
+                               genuser->save_r13       = ts->r13;
+                               genuser->save_r14       = ts->r14;
+                               genuser->save_r15       = ts->r15;
+                               genuser->save_r16       = ts->r16;
+                               genuser->save_r17       = ts->r17;
+                               genuser->save_r18       = ts->r18;
+                               genuser->save_r19       = ts->r19;
+                               genuser->save_r20       = ts->r20;
+                               genuser->save_r21       = ts->r21;
+                               genuser->save_r22       = ts->r22;
+                               genuser->save_r23       = ts->r23;
+                               genuser->save_r24       = ts->r24;
+                               genuser->save_r25       = ts->r25;
+                               genuser->save_r26       = ts->r26;
+                               genuser->save_r27       = ts->r27;
+                               genuser->save_r28       = ts->r28;
+                               genuser->save_r29       = ts->r29;
+                               genuser->save_r30       = ts->r30;
+                               genuser->save_r31       = ts->r31;
+                       
+                               genuser->save_cr        = ts->cr;
+                               genuser->save_xer       = ts->xer;
+                               genuser->save_lr        = ts->lr;
+                               genuser->save_ctr       = ts->ctr;
+                               genuser->save_srr0      = ts->srr0;
+                               genuser->save_vrsave    = ts->vrsave;                                   /* VRSAVE register (Altivec only) */
 
-                       genuser->save_r0        = (uint64_t)ts->r0;
-                       genuser->save_r1        = (uint64_t)ts->r1;
-                       genuser->save_r2        = (uint64_t)ts->r2;
-                       genuser->save_r3        = (uint64_t)ts->r3;
-                       genuser->save_r4        = (uint64_t)ts->r4;
-                       genuser->save_r5        = (uint64_t)ts->r5;
-                       genuser->save_r6        = (uint64_t)ts->r6;
-                       genuser->save_r7        = (uint64_t)ts->r7;
-                       genuser->save_r8        = (uint64_t)ts->r8;
-                       genuser->save_r9        = (uint64_t)ts->r9;
-                       genuser->save_r10       = (uint64_t)ts->r10;
-                       genuser->save_r11       = (uint64_t)ts->r11;
-                       genuser->save_r12       = (uint64_t)ts->r12;
-                       genuser->save_r13       = (uint64_t)ts->r13;
-                       genuser->save_r14       = (uint64_t)ts->r14;
-                       genuser->save_r15       = (uint64_t)ts->r15;
-                       genuser->save_r16       = (uint64_t)ts->r16;
-                       genuser->save_r17       = (uint64_t)ts->r17;
-                       genuser->save_r18       = (uint64_t)ts->r18;
-                       genuser->save_r19       = (uint64_t)ts->r19;
-                       genuser->save_r20       = (uint64_t)ts->r20;
-                       genuser->save_r21       = (uint64_t)ts->r21;
-                       genuser->save_r22       = (uint64_t)ts->r22;
-                       genuser->save_r23       = (uint64_t)ts->r23;
-                       genuser->save_r24       = (uint64_t)ts->r24;
-                       genuser->save_r25       = (uint64_t)ts->r25;
-                       genuser->save_r26       = (uint64_t)ts->r26;
-                       genuser->save_r27       = (uint64_t)ts->r27;
-                       genuser->save_r28       = (uint64_t)ts->r28;
-                       genuser->save_r29       = (uint64_t)ts->r29;
-                       genuser->save_r30       = (uint64_t)ts->r30;
-                       genuser->save_r31       = (uint64_t)ts->r31;
-               
-                       genuser->save_cr        = ts->cr;
-                       genuser->save_xer       = (uint64_t)ts->xer;
-                       genuser->save_lr        = (uint64_t)ts->lr;
-                       genuser->save_ctr       = (uint64_t)ts->ctr;
-                       genuser->save_srr0      = (uint64_t)ts->srr0;
-                       genuser->save_vrsave    = ts->vrsave;                                   /* VRSAVE register (Altivec only) */
-
-                       genuser->save_srr1 = MSR_PREPARE_FOR_IMPORT(genuser->save_srr1, ts->srr1);      /* Set the bits we can change */
-
-                       if(!kernel_act) genuser->save_srr1 |= MSR_EXPORT_MASK_SET;      /* If not a kernel guy, force the magic bits on */      
-               
-                       genuser->save_srr1 &= ~(MASK(MSR_FP) | MASK(MSR_VEC));  /* Make sure we don't enable the floating point unit */
-               
-                       return KERN_SUCCESS;
-
-
-               case PPC_THREAD_STATE64:
+                               genuser->save_srr1 = MSR_PREPARE_FOR_IMPORT(genuser->save_srr1, ts->srr1);      /* Set the bits we can change */
+       
+                               if(!kernel_act) genuser->save_srr1 |= MSR_EXPORT_MASK_SET;      /* If not a kernel guy, force the magic bits on */      
+                       
+                               genuser->save_srr1 &= ~(MASK(MSR_FP) | MASK(MSR_VEC));  /* Make sure we don't enable the floating point unit */
+                       
+                               return KERN_SUCCESS;
                                
-                       xts = (struct ppc_thread_state64 *)tstate;
-
-                       genuser->save_r0        = xts->r0;
-                       genuser->save_r1        = xts->r1;
-                       genuser->save_r2        = xts->r2;
-                       genuser->save_r3        = xts->r3;
-                       genuser->save_r4        = xts->r4;
-                       genuser->save_r5        = xts->r5;
-                       genuser->save_r6        = xts->r6;
-                       genuser->save_r7        = xts->r7;
-                       genuser->save_r8        = xts->r8;
-                       genuser->save_r9        = xts->r9;
-                       genuser->save_r10       = xts->r10;
-                       genuser->save_r11       = xts->r11;
-                       genuser->save_r12       = xts->r12;
-                       genuser->save_r13       = xts->r13;
-                       genuser->save_r14       = xts->r14;
-                       genuser->save_r15       = xts->r15;
-                       genuser->save_r16       = xts->r16;
-                       genuser->save_r17       = xts->r17;
-                       genuser->save_r18       = xts->r18;
-                       genuser->save_r19       = xts->r19;
-                       genuser->save_r20       = xts->r20;
-                       genuser->save_r21       = xts->r21;
-                       genuser->save_r22       = xts->r22;
-                       genuser->save_r23       = xts->r23;
-                       genuser->save_r24       = xts->r24;
-                       genuser->save_r25       = xts->r25;
-                       genuser->save_r26       = xts->r26;
-                       genuser->save_r27       = xts->r27;
-                       genuser->save_r28       = xts->r28;
-                       genuser->save_r29       = xts->r29;
-                       genuser->save_r30       = xts->r30;
-                       genuser->save_r31       = xts->r31;
-               
-                       genuser->save_cr        = xts->cr;
-                       genuser->save_xer       = xts->xer;
-                       genuser->save_lr        = xts->lr;
-                       genuser->save_ctr       = xts->ctr;
-                       genuser->save_srr0      = xts->srr0;
-                       genuser->save_vrsave    = xts->vrsave;                                  /* VRSAVE register (Altivec only) */
-
-                       genuser->save_srr1 = MSR_PREPARE_FOR_IMPORT(genuser->save_srr1, xts->srr1);     /* Set the bits we can change */
+                       }
 
-                       if(!kernel_act) genuser->save_srr1 |= MSR_EXPORT_MASK_SET;      /* If not a kernel guy, force the magic bits on */      
-               
-                       genuser->save_srr1 &= ~(MASK(MSR_FP) | MASK(MSR_VEC));  /* Make sure we don't enable the floating point unit */
-               
-                       return KERN_SUCCESS;
-                               
-                               
-               case PPC_EXCEPTION_STATE:
-                       
                        es = (struct ppc_exception_state *) tstate;
                
-                       genuser->save_dar = (uint64_t)es->dar;
+                       genuser->save_dar = es->dar;
                        genuser->save_dsisr = es->dsisr;
                        genuser->save_exception = es->exception;
 
                        return KERN_SUCCESS;
        
-/*
- *             It's pretty worthless to try to change this stuff, but we'll do it anyway.
- */
-               case PPC_EXCEPTION_STATE64:
-                       
-                       xes = (struct ppc_exception_state *) tstate;
-               
-                       genuser->save_dar       = xes->dar;
-                       genuser->save_dsisr = xes->dsisr;
-                       genuser->save_exception = xes->exception;
-
-                       return KERN_SUCCESS;
-       
                case PPC_FLOAT_STATE:
 
                        toss_live_fpu(thr_act->mact.curctx);                    /* Toss my floating point if live anywhere */
@@ -651,7 +500,7 @@ act_machine_set_state(
                                                fsvn = (savearea_fpu *)fsvo->save_hdr.save_prev;        /* Skip on to the next */
                                        }
                                        
-                                       fsvo->save_hdr.save_prev = (addr64_t)fsv;               /* Queue us on in */
+                                       fsvo->save_hdr.save_prev = (savearea *)fsv;             /* Queue us on in */
                                }
                                
                        }
@@ -689,7 +538,7 @@ act_machine_set_state(
                                                vsvn = (savearea_vec *)vsvo->save_hdr.save_prev;        /* Skip on to the next */
                                        }
                                        
-                                       vsvo->save_hdr.save_prev = (addr64_t)vsv;       /* Queue us on in */
+                                       vsvo->save_hdr.save_prev = (savearea *)vsv;     /* Queue us on in */
                                }
                                
                        }
@@ -800,7 +649,7 @@ savearea *get_user_regs(thread_act_t act) {
                if(sv->save_srr1 & MASK(MSR_PR)) return sv;     /* We found a user state context... */
 
                osv = sv;                                                                       /* Save the last one */
-               sv = (savearea *)sv->save_hdr.save_prev;        /* Get the previous context */
+               sv = sv->save_hdr.save_prev;                            /* Get the previous context */
        }
 
        sv = save_alloc();                                                              /* Get one */
@@ -810,7 +659,7 @@ savearea *get_user_regs(thread_act_t act) {
        sv->save_hdr.save_level = 0;                                    /* Mark user state */
        
        if(osv) {                                                                               /* Did we already have one? */
-               osv->save_hdr.save_prev = (addr64_t)sv;         /* Chain us on the end */
+               osv->save_hdr.save_prev = sv;                           /* Chain us on the end */
        }
        else {                                                                                  /* We are the first */
                act->mact.pcb = sv;                                                     /* Put it there */
@@ -822,10 +671,10 @@ savearea *get_user_regs(thread_act_t act) {
        }
        sv->save_cr     = 0;
        sv->save_xer    = 0;
-       sv->save_lr     = (uint64_t)FloatInit;
-       sv->save_ctr    = (uint64_t)FloatInit;
-       sv->save_srr0   = (uint64_t)FloatInit;
-       sv->save_srr1 = (uint64_t)MSR_EXPORT_MASK_SET;
+       sv->save_lr     = ((unsigned int *)&FloatInit)[0];
+       sv->save_ctr    = ((unsigned int *)&FloatInit)[1];
+       sv->save_srr0   = ((unsigned int *)&FloatInit)[0];
+       sv->save_srr1 = MSR_EXPORT_MASK_SET;
 
        sv->save_fpscr = 0;                                                             /* Clear all floating point exceptions */
 
@@ -833,7 +682,14 @@ savearea *get_user_regs(thread_act_t act) {
        sv->save_vscr[0] = 0x00000000;                                  
        sv->save_vscr[1] = 0x00000000;                                  
        sv->save_vscr[2] = 0x00000000;                                  
-       sv->save_vscr[3] = 0x00010000;                                  /* Disable java mode and clear saturated */
+       sv->save_vscr[3] = 0x00010000;                                  /* Supress java mode and clear saturated */
+       
+       spc = (unsigned int)act->map->pmap->space;              /* Get the space we're in */
+       
+       srs = (unsigned int *)&sv->save_sr0;                    /* Point to the SRs */
+       for(i = 0; i < 16; i++) {                                               /* Fill in the SRs for the new context */
+               srs[i] = SEG_REG_PROT | (i<<20) | spc;          /* Set the SR */
+       }
        
        return sv;                                                                              /* Bye bye... */
 }
@@ -853,7 +709,7 @@ savearea *find_user_regs(thread_act_t act) {
                if(sv->save_srr1 & MASK(MSR_PR)) {                      /* Are we looking at the user context? */
                        break;                                                                  /* Outta here */
                }
-               sv = (savearea *)sv->save_hdr.save_prev;        /* Get the previous context */
+               sv = sv->save_hdr.save_prev;                            /* Get the previous context */
        }
        
        return sv;                                                                              /* Bye bye... */
@@ -915,13 +771,8 @@ thread_userstack(
 {
         struct ppc_thread_state *state;
 
-        /*
-         * Set a default.
-         */
-        if (*user_stack == 0)
-                *user_stack = USRSTACK;
-               if (customstack)
-                       *customstack = 0;
+       if (customstack)
+               *customstack = 0;
 
         switch (flavor) {
         case PPC_THREAD_STATE:
@@ -930,14 +781,13 @@ thread_userstack(
  
                 state = (struct ppc_thread_state *) tstate;
     
-                /*
-                 * If a valid user stack is specified, use it.
-                 */
-                *user_stack = state->r1 ? state->r1: USRSTACK;
+                /* If a valid user stack is specified, use it. */
+               if (state->r1)
+                       *user_stack = state->r1;
+
+               if (customstack && state->r1)
+                       *customstack = 1;
 
-                               if (customstack && state->r1)
-                                       *customstack = 1;
-                                       
                 break;
         default :
                 return (KERN_INVALID_ARGUMENT);
@@ -959,7 +809,7 @@ void thread_setuserstack(struct thread_activation *act, unsigned int user_stack)
        
        sv = get_user_regs(act);                /* Get the user state registers */
        
-       sv->save_r1 = (uint64_t)user_stack;
+       sv->save_r1 = user_stack;
        
        return;
 }    
@@ -978,7 +828,7 @@ unsigned int thread_adjuserstack(struct thread_activation *act, int adjust)
        
        sv->save_r1 += adjust;                  /* Adjust the stack */
        
-       return (unsigned int)sv->save_r1;       /* Return the adjusted stack */
+       return sv->save_r1;                             /* Return the adjusted stack */
        
 }    
 
@@ -995,7 +845,7 @@ void thread_setentrypoint(struct thread_activation *act, unsigned int entry)
        
        sv = get_user_regs(act);                /* Get the user state registers */
        
-       sv->save_srr0 = (uint64_t)entry;
+       sv->save_srr0 = entry;
        
        return;
 }    
@@ -1051,32 +901,14 @@ unsigned int get_msr_rbits(void)
        return (MASK(MSR_PR)|MASK(MSR_ME)|MASK(MSR_IR)|MASK(MSR_DR)|MASK(MSR_EE));
 }
 
-void ppc_checkthreadstate(void * tsptr, int flavor)
-{
-       if (flavor == PPC_THREAD_STATE64) {
-               struct ppc_thread_state64 *ts64 =(struct ppc_thread_state64 *)tsptr;
-
-               /* Make sure naughty bits are off and necessary bits are on */
-               ts64->srr1 &= ~(MASK(MSR_POW)|MASK(MSR_ILE)|MASK(MSR_IP)|MASK(MSR_LE));
-               ts64->srr1 |= (MASK(MSR_PR)|MASK(MSR_ME)|MASK(MSR_IR)|MASK(MSR_DR)|MASK(MSR_EE));
-       } else {
-               struct ppc_thread_state *ts =(struct ppc_thread_state *)tsptr;
-
-               /* Make sure naughty bits are off and necessary bits are on */
-               ts->srr1 &= ~(MASK(MSR_POW)|MASK(MSR_ILE)|MASK(MSR_IP)|MASK(MSR_LE));
-               ts->srr1 |= (MASK(MSR_PR)|MASK(MSR_ME)|MASK(MSR_IR)|MASK(MSR_DR)|MASK(MSR_EE));
-       }
-       return;
-}
-
 void  thread_set_child(thread_act_t child, int pid)
 {
        struct savearea *child_state;
        
        child_state = get_user_regs(child);
        
-       child_state->save_r3 = (uint_t)pid;
-       child_state->save_r4 = 1ULL;
+       child_state->save_r3 = pid;
+       child_state->save_r4 = 1;
 }
 void  thread_set_parent(thread_act_t parent, int pid)
 {
@@ -1084,7 +916,7 @@ void  thread_set_parent(thread_act_t parent, int pid)
        
        parent_state = get_user_regs(parent);
        
-       parent_state->save_r3 = (uint64_t)pid;
+       parent_state->save_r3 = pid;
        parent_state->save_r4 = 0;
 }
 
@@ -1148,7 +980,7 @@ void *act_thread_csave(void) {
                fsv->save_hdr.save_misc2 = 0xDEBB1ED0;          /* Eye catcher for debug */
                fsv->save_hdr.save_misc3 = 0xE5DA11A5;          /* Eye catcher for debug */
 
-               sv->save_hdr.save_misc0 = (uint64_t)fsv;        /* Remember this one */
+               sv->save_hdr.save_misc0 = (unsigned int)fsv;    /* Remember this one */
 
                bcopy((char *)((unsigned int)ofsv + sizeof(savearea_comm)),     /* Copy everything but the headers */
                        (char *)((unsigned int)fsv + sizeof(savearea_comm)), 
@@ -1168,7 +1000,7 @@ void *act_thread_csave(void) {
                vsv->save_hdr.save_misc2 = 0xDEBB1ED0;          /* Eye catcher for debug */
                vsv->save_hdr.save_misc3 = 0xE5DA11A5;          /* Eye catcher for debug */
 
-               sv->save_hdr.save_misc1 = (uint64_t)vsv;        /* Chain in the floating point */
+               sv->save_hdr.save_misc1 = (unsigned int)vsv;    /* Chain in the floating point */
 
                bcopy((char *)((unsigned int)ovsv + sizeof(savearea_comm)),     /* Copy everything but the headers */
                        (char *)((unsigned int)vsv + sizeof(savearea_comm)), 
@@ -1227,12 +1059,17 @@ void act_thread_catt(void *ctx) {
        
        spc = (unsigned int)act->map->pmap->space;              /* Get the space we're in */
        
+       srs = (unsigned int *)&sv->save_sr0;                    /* Point to the SRs */
+       for(i = 0; i < 16; i++) {                                               /* Fill in the SRs for the new context */
+               srs[i] = SEG_REG_PROT | (i<<20) | spc;          /* Set the SRs */
+       }
+       
        osv = act->mact.pcb;                                                    /* Get the top general savearea */
        psv = 0;
        while(osv) {                                                                    /* Any saved state? */
                if(osv->save_srr1 & MASK(MSR_PR)) break;        /* Leave if this is user state */
                psv = osv;                                                                      /* Save previous savearea address */
-               osv = (savearea *)osv->save_hdr.save_prev;      /* Get one underneath our's */
+               osv = osv->save_hdr.save_prev;                          /* Get one underneath our's */
        }
        
        if(osv) {                                                                               /* Did we find one? */
@@ -1243,7 +1080,7 @@ void act_thread_catt(void *ctx) {
                
        }
 
-       if(psv) psv->save_hdr.save_prev = (addr64_t)sv; /* Chain us to the end or */
+       if(psv) psv->save_hdr.save_prev = sv;                   /* Chain us to the end or */
        else act->mact.pcb = (pcb_t)sv;                                 /* to the start if the only one */
        
        ovsv = act->mact.curctx->VMXsave;                               /* Get the top vector savearea */
@@ -1263,7 +1100,7 @@ void act_thread_catt(void *ctx) {
        }
        
        if(vsv) {                                                                               /* Are we sticking any vector on this one? */
-               if(pvsv) pvsv->save_hdr.save_prev = (addr64_t)vsv;      /* Yes, chain us to the end or */
+               if(pvsv) pvsv->save_hdr.save_prev = (savearea *)vsv;    /* Yes, chain us to the end or */
                else act->mact.curctx->VMXsave = vsv;           /* to the start if the only one */
 
                vsv->save_hdr.save_misc2 = 0;                           /* Eye catcher for debug */
@@ -1288,7 +1125,7 @@ void act_thread_catt(void *ctx) {
        }
        
        if(fsv) {                                                                               /* Are we sticking any vector on this one? */
-               if(pfsv) pfsv->save_hdr.save_prev = (addr64_t)fsv;      /* Yes, chain us to the end or */
+               if(pfsv) pfsv->save_hdr.save_prev = (savearea *)fsv;    /* Yes, chain us to the end or */
                else act->mact.curctx->FPUsave = fsv;           /* to the start if the only one */
 
                fsv->save_hdr.save_misc2 = 0;                           /* Eye catcher for debug */
index f6f1f64cfc24494752123355412a86c0eaf0eaac..3d5259fac17b5545c41378d369f35c8cb6ed72f4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ea4436522ff7911be4464c0e453f63ce51a3c20e..5debfb6dc888d5ce2b57b073bfbcdb906493bb76 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 50a5de4fe1e623e832bf389e7d5547d39c0d090b..9b323dab964d0aa3308fea459ae2ba89e63c7e6c 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2aaa57da4768316b28e6281bd706dc9d6f828a62..9cf775c8253adb63c8decdd68d4eee761be63f95 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -61,11 +58,9 @@ struct facility_context {
        savearea_fpu    *FPUsave;               /* The floating point savearea */
        savearea                *FPUlevel;              /* The floating point context level */
        unsigned int    FPUcpu;                 /* The last processor to enable floating point */
-       unsigned int    FPUsync;                /* Sync lock */
        savearea_vec    *VMXsave;               /* The VMX savearea */
        savearea                *VMXlevel;              /* The VMX context level */
        unsigned int    VMXcpu;                 /* The last processor to enable vector */
-       unsigned int    VMXsync;                /* Sync lock */
        struct thread_activation *facAct;       /* Activation associated with context */
 };
 
@@ -95,12 +90,7 @@ typedef struct MachineThrAct {
        struct vmmCntrlEntry *vmmCEntry;        /* Pointer current emulation context or 0 */
        struct vmmCntrlTable *vmmControl;       /* Pointer to virtual machine monitor control table */
        uint64_t                qactTimer;              /* Time thread needs to interrupt. This is a single-shot timer. Zero is unset */
-       unsigned int    cioSpace;               /* Address space ID for in progress copyin/out */
-#define        cioSwitchAway 0x80000000        /* Context switched away from thread since MapUserAddressSpace */
-#define cioSwitchAwayb 0
-       addr64_t                cioRelo;                /* Relocation value for in progress copyin/out */
        unsigned int    ksp;                    /* points to TOP OF STACK or zero */
-       unsigned int    preemption_count;       /* preemption count */
        unsigned int    bbDescAddr;             /* Points to Blue Box Trap descriptor area in kernel (page aligned) */
        unsigned int    bbUserDA;               /* Points to Blue Box Trap descriptor area in user (page aligned) */
        unsigned int    bbTableStart;   /* Points to Blue Box Trap dispatch area in user */
@@ -108,8 +98,6 @@ typedef struct MachineThrAct {
        unsigned int    bbTaskID;               /* Opaque task ID for Blue Box threads */
        unsigned int    bbTaskEnv;              /* Opaque task data reference for Blue Box threads */
        unsigned int    specFlags;              /* Special flags */
-    unsigned int    pmcovfl[8];     /* PMC overflow count */
-    unsigned int    perfmonFlags;   /* Perfmon facility flags */
 
 /* special flags bits */
 
@@ -121,33 +109,31 @@ typedef struct MachineThrAct {
 #define vectorCngbit                   6
 #define timerPopbit                            7
 #define userProtKeybit                 8
-#define FamVMenabit                        11
+#define trapUnalignbit                 9
+#define notifyUnalignbit               10
+#define FamVMenabit                    11
 #define FamVMmodebit                   12
-#define perfMonitorbit          13
 /*     NOTE: Do not move or assign bit 31 without changing exception vector ultra fast path code */
 #define bbThreadbit                            28
 #define bbNoMachSCbit                  29
 #define bbPreemptivebit                        30
 #define spfReserved1                   31      /* See note above */
 
-#define ignoreZeroFault                0x80000000  /* (1<<(31-ignoreZeroFaultbit)) */
-#define floatUsed                      0x40000000  /* (1<<(31-floatUsedbit)) */
-#define vectorUsed                     0x20000000  /* (1<<(31-vectorUsedbit)) */
-
-#define runningVM                      0x08000000  /* (1<<(31-runningVMbit)) */
-#define floatCng                       0x04000000  /* (1<<(31-floatCngbit)) */
-#define vectorCng                      0x02000000  /* (1<<(31-vectorCngbit)) */
-#define timerPop                       0x01000000  /* (1<<(31-timerPopbit)) */
-
-#define userProtKey                    0x00800000  /* (1<<(31-userProtKeybit)) */
-
-#define        FamVMena                        0x00100000  /* (1<<(31-FamVMenabit)) */
-#define        FamVMmode                       0x00080000  /* (1<<(31-FamVMmodebit)) */
-#define perfMonitor         0x00040000  /* (1<<(31-perfMonitorbit)) */
-
-#define bbThread                       0x00000008  /* (1<<(31-bbThreadbit)) */
-#define bbNoMachSC                     0x00000004  /* (1<<(31-bbNoMachSCbit)) */
-#define bbPreemptive           0x00000002  /* (1<<(31-bbPreemptivebit)) */
+#define ignoreZeroFault                (1<<(31-ignoreZeroFaultbit))
+#define floatUsed                      (1<<(31-floatUsedbit))
+#define vectorUsed                     (1<<(31-vectorUsedbit))
+#define runningVM                      (1<<(31-runningVMbit))
+#define floatCng                       (1<<(31-floatCngbit))
+#define vectorCng                      (1<<(31-vectorCngbit))
+#define timerPop                       (1<<(31-timerPopbit))
+#define userProtKey                    (1<<(31-userProtKeybit))
+#define trapUnalign                    (1<<(31-trapUnalignbit))
+#define notifyUnalign          (1<<(31-notifyUnalignbit))
+#define        FamVMena                        (1<<(31-FamVMenabit))
+#define        FamVMmode                       (1<<(31-FamVMmodebit))
+#define bbThread                       (1<<(31-bbThreadbit))
+#define bbNoMachSC                     (1<<(31-bbNoMachSCbit))
+#define bbPreemptive           (1<<(31-bbPreemptivebit))
 
 #define fvChkb 0
 #define fvChk 0x80000000
index fd3514628b93b89d0542acb0e1168e8d82e8ad5d..de7d7cd3e34fdf4cc9a4cbcb1c920e6cce2c1b87 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #include <ppc/proc_reg.h>      /* for SR_xxx definitions */
 #include <ppc/pmap.h>
 #include <ppc/mem.h>
-#include <ppc/mappings.h>
 #include <ppc/Firmware.h>
 #include <ppc/low_trace.h>
-#include <ppc/Diagnostics.h>
-#include <ppc/hw_perfmon.h>
 
 #include <sys/kdebug.h>
 
@@ -84,7 +78,7 @@ extern char init_task_failure_data[];
  */
 #define UPDATE_PPC_EXCEPTION_STATE {                                                   \
        thread_act_t thr_act = current_act();                                           \
-       thr_act->mact.pcb->save_dar = (uint64_t)dar;                            \
+       thr_act->mact.pcb->save_dar = dar;                                                      \
        thr_act->mact.pcb->save_dsisr = dsisr;                                          \
        thr_act->mact.pcb->save_exception = trapno / T_VECTOR_SIZE;     /* back to powerpc */ \
 }
@@ -92,13 +86,13 @@ extern char init_task_failure_data[];
 static void unresolved_kernel_trap(int trapno,
                                   struct savearea *ssp,
                                   unsigned int dsisr,
-                                  addr64_t dar,
+                                  unsigned int dar,
                                   char *message);
 
 struct savearea *trap(int trapno,
                             struct savearea *ssp,
                             unsigned int dsisr,
-                            addr64_t dar)
+                            unsigned int dar)
 {
        int exception;
        int code;
@@ -109,13 +103,12 @@ struct savearea *trap(int trapno,
        unsigned int offset;
        thread_act_t thr_act;
        boolean_t intr;
-       
 #ifdef MACH_BSD
        time_value_t tv;
 #endif /* MACH_BSD */
 
        if(perfTrapHook) {                                                      /* Is there a hook? */
-               if(perfTrapHook(trapno, ssp, dsisr, (unsigned int)dar) == KERN_SUCCESS) return ssp;     /* If it succeeds, we are done... */
+               if(perfTrapHook(trapno, ssp, dsisr, dar) == KERN_SUCCESS) return ssp;   /* If it succeeds, we are done... */
        }
 
 #if 0
@@ -148,13 +141,14 @@ struct savearea *trap(int trapno,
                        ast_taken(AST_PREEMPT, FALSE);
                        break;  
 
-               case T_PERF_MON:
-                       perfmon_handle_pmi(ssp);
-                       break;
-
                case T_RESET:                                   /* Reset interruption */
-                       if (!Call_Debugger(trapno, ssp))
-                               unresolved_kernel_trap(trapno, ssp, dsisr, dar, NULL);
+#if 0
+                       kprintf("*** Reset exception ignored; srr0 = %08X, srr1 = %08X\n",
+                               ssp->save_srr0, ssp->save_srr1);
+#else
+                       panic("Unexpected Reset exception; srr0 = %08X, srr1 = %08X\n",
+                               ssp->save_srr0, ssp->save_srr1);
+#endif
                        break;                                          /* We just ignore these */
                
                /*
@@ -174,40 +168,10 @@ struct savearea *trap(int trapno,
                case T_FP_UNAVAILABLE:
                case T_IO_ERROR:
                case T_RESERVED:
+               case T_ALIGNMENT:
                default:
                        unresolved_kernel_trap(trapno, ssp, dsisr, dar, NULL);
                        break;
-
-
-               case T_ALIGNMENT:
-/*
-*                      If enaNotifyEMb is set, we get here, and
-*                      we have actually already emulated the unaligned access.
-*                      All that we want to do here is to ignore the interrupt. This is to allow logging or
-*                      tracing of unaligned accesses.  
-*/
-                       
-                       KERNEL_DEBUG_CONSTANT(
-                               MACHDBG_CODE(DBG_MACH_EXCP_ALNG, 0) | DBG_FUNC_NONE,
-                               (int)ssp->save_srr0 - 4, (int)dar, (int)dsisr, (int)ssp->save_lr, 0);
-                       break;
-
-               case T_EMULATE:
-/*
-*                      If enaNotifyEMb is set we get here, and
-*                      we have actually already emulated the instruction.
-*                      All that we want to do here is to ignore the interrupt. This is to allow logging or
-*                      tracing of emulated instructions.  
-*/
-
-                       KERNEL_DEBUG_CONSTANT(
-                               MACHDBG_CODE(DBG_MACH_EXCP_EMUL, 0) | DBG_FUNC_NONE,
-                               (int)ssp->save_srr0 - 4, (int)((savearea_comm *)ssp)->save_misc2, (int)dsisr, (int)ssp->save_lr, 0);
-                       break;
-
-
-
-
                        
                case T_TRACE:
                case T_RUNMODE_TRACE:
@@ -241,29 +205,28 @@ struct savearea *trap(int trapno,
                        mp_enable_preemption();
 #endif /* MACH_KDB */
 
-                       if(ssp->save_dsisr & dsiInvMode) {                      /* Did someone try to reserve cache inhibited? */
-                               panic("trap: disallowed access to cache inhibited memory - %016llX\n", dar);
-                       }
-
                        if(intr) ml_set_interrupts_enabled(TRUE);       /* Enable if we were */
-                       
-                       if(((dar >> 28) < 0xE) | ((dar >> 28) > 0xF))  {        /* Is this a copy in/out? */
-                       
-                               offset = (unsigned int)dar;                             /* Set the failing address */
-                               map = kernel_map;                                               /* No, this is a normal kernel access */
+
+                       /* simple case : not SR_COPYIN segment, from kernel */
+                       if ((dar >> 28) != SR_COPYIN_NUM) {
+                               map = kernel_map;
+
+                               offset = dar;
                                
+
 /*
  *     Note: Some ROM device drivers will access page 0 when they start.  The IOKit will 
  *     set a flag to tell us to ignore any access fault on page 0.  After the driver is
  *     opened, it will clear the flag.
  */
-                               if((0 == (offset & -PAGE_SIZE)) &&              /* Check for access of page 0 and */
-                                 ((thr_act->mact.specFlags) & ignoreZeroFault)) {      /* special case of ignoring page zero faults */
-                                       ssp->save_srr0 += 4;                            /* Point to next instruction */
+                               if((0 == (dar & -PAGE_SIZE)) &&         /* Check for access of page 0 and */
+                                 ((thr_act->mact.specFlags) & ignoreZeroFault)) {
+                                                                       /* special case of ignoring page zero faults */
+                                       ssp->save_srr0 += 4;                    /* Point to next instruction */
                                        break;
                                }
 
-                               code = vm_fault(map, trunc_page_32(offset),
+                               code = vm_fault(map, trunc_page(offset),
                                                dsisr & MASK(DSISR_WRITE) ? PROT_RW : PROT_RO,
                                                FALSE, THREAD_UNINT, NULL, 0);
 
@@ -271,8 +234,7 @@ struct savearea *trap(int trapno,
                                        unresolved_kernel_trap(trapno, ssp, dsisr, dar, NULL);
                                } else { 
                                        ssp->save_hdr.save_flags |= SAVredrive; /* Tell low-level to re-try fault */
-                                       ssp->save_dsisr = (ssp->save_dsisr & 
-                                               ~((MASK(DSISR_NOEX) | MASK(DSISR_PROT)))) | MASK(DSISR_HASH);   /* Make sure this is marked as a miss */
+                                       ssp->save_dsisr |= MASK(DSISR_HASH);    /* Make sure this is marked as a miss */
                                }
                                break;
                        }
@@ -280,10 +242,13 @@ struct savearea *trap(int trapno,
                        /* If we get here, the fault was due to a copyin/out */
 
                        map = thr_act->map;
-                       
-                       offset = (unsigned int)(thr_act->mact.cioRelo + dar);   /* Compute the user space address */
 
-                       code = vm_fault(map, trunc_page_32(offset),
+                       /* Mask out SR_COPYIN and mask in original segment */
+
+                       offset = (dar & 0x0fffffff) |
+                               ((mfsrin(dar)<<8) & 0xF0000000);
+
+                       code = vm_fault(map, trunc_page(offset),
                                        dsisr & MASK(DSISR_WRITE) ? PROT_RW : PROT_RO,
                                        FALSE, THREAD_UNINT, NULL, 0);
 
@@ -305,8 +270,7 @@ struct savearea *trap(int trapno,
                        }
                        else { 
                                ssp->save_hdr.save_flags |= SAVredrive; /* Tell low-level to re-try fault */
-                               ssp->save_dsisr = (ssp->save_dsisr & 
-                                       ~((MASK(DSISR_NOEX) | MASK(DSISR_PROT)))) | MASK(DSISR_HASH);   /* Make sure this is marked as a miss */
+                               ssp->save_dsisr |= MASK(DSISR_HASH);    /* Make sure this is marked as a miss */
                        }
                        
                        break;
@@ -332,15 +296,14 @@ struct savearea *trap(int trapno,
 
                        map = kernel_map;
                        
-                       code = vm_fault(map, trunc_page_64(ssp->save_srr0),
+                       code = vm_fault(map, trunc_page(ssp->save_srr0),
                                        PROT_EXEC, FALSE, THREAD_UNINT, NULL, 0);
 
                        if (code != KERN_SUCCESS) {
                                unresolved_kernel_trap(trapno, ssp, dsisr, dar, NULL);
                        } else { 
                                ssp->save_hdr.save_flags |= SAVredrive; /* Tell low-level to re-try fault */
-                               ssp->save_srr1 = (ssp->save_srr1 & 
-                                       ~((unsigned long long)(MASK(DSISR_NOEX) | MASK(DSISR_PROT)))) | MASK(DSISR_HASH);               /* Make sure this is marked as a miss */
+                               ssp->save_srr1 |= MASK(DSISR_HASH);             /* Make sure this is marked as a miss */
                        }
                        break;
 
@@ -380,10 +343,6 @@ struct savearea *trap(int trapno,
                        unresolved_kernel_trap(trapno, ssp, dsisr, dar, NULL);
                        break;  
 
-               case T_PERF_MON:
-                       perfmon_handle_pmi(ssp);
-                       break;
-
                        /*
                         * These trap types should never be seen by trap()
                         * Some are interrupts that should be seen by
@@ -403,41 +362,40 @@ struct savearea *trap(int trapno,
 
                        ml_set_interrupts_enabled(FALSE);                                       /* Turn off interruptions */
 
-                       panic("Unexpected user state trap(cpu %d): 0x%08X DSISR=0x%08X DAR=0x%016llX PC=0x%016llX, MSR=0x%016llX\n",
+                       panic("Unexpected user state trap(cpu %d): 0x%08x DSISR=0x%08x DAR=0x%08x PC=0x%08x, MSR=0x%08x\n",
                               cpu_number(), trapno, dsisr, dar, ssp->save_srr0, ssp->save_srr1);
                        break;
 
                case T_RESET:
-                       ml_set_interrupts_enabled(FALSE);                                       /* Turn off interruptions */
-                       if (!Call_Debugger(trapno, ssp))
-                               panic("Unexpected Reset exception: srr0 = %016llx, srr1 = %016llx\n",
-                                       ssp->save_srr0, ssp->save_srr1);
+#if 0
+                       kprintf("*** Reset exception ignored; srr0 = %08X, srr1 = %08X\n",
+                               ssp->save_srr0, ssp->save_srr1);
+#else
+                       panic("Unexpected Reset exception: srr0 = %0x08x, srr1 = %0x08x\n",
+                               ssp->save_srr0, ssp->save_srr1);
+#endif
                        break;                                          /* We just ignore these */
 
                case T_ALIGNMENT:
 /*
-*                      If enaNotifyEMb is set, we get here, and
-*                      we have actually already emulated the unaligned access.
-*                      All that we want to do here is to ignore the interrupt. This is to allow logging or
-*                      tracing of unaligned accesses.  
-*/
-                       
-                       KERNEL_DEBUG_CONSTANT(
-                               MACHDBG_CODE(DBG_MACH_EXCP_ALNG, 0) | DBG_FUNC_NONE,
-                               (int)ssp->save_srr0 - 4, (int)dar, (int)dsisr, (int)ssp->save_lr, 0);
-                       break;
-
-               case T_EMULATE:
-/*
-*                      If enaNotifyEMb is set we get here, and
-*                      we have actually already emulated the instruction.
+*                      If notifyUnaligned is set, we have actually already emulated the unaligned access.
 *                      All that we want to do here is to ignore the interrupt. This is to allow logging or
-*                      tracing of emulated instructions.  
+*                      tracing of unaligned accesses.  Note that if trapUnaligned is also set, it takes 
+*                      precedence and we will take a bad access fault.
 */
 
-                       KERNEL_DEBUG_CONSTANT(
-                               MACHDBG_CODE(DBG_MACH_EXCP_EMUL, 0) | DBG_FUNC_NONE,
-                               (int)ssp->save_srr0 - 4, (int)((savearea_comm *)ssp)->save_misc2, (int)dsisr, (int)ssp->save_lr, 0);
+                       if(thr_act->mact.specFlags & notifyUnalign) {
+                       
+                               KERNEL_DEBUG_CONSTANT(
+                                               MACHDBG_CODE(DBG_MACH_EXCP_ALNG, 0) | DBG_FUNC_NONE,
+                                                               (int)ssp->save_srr0, (int)dar, (int)dsisr, (int)ssp->save_lr, 0);
+                       }
+                       
+                       if((!(thr_act->mact.specFlags & notifyUnalign)) || (thr_act->mact.specFlags & trapUnalign)) {
+                               code = EXC_PPC_UNALIGNED;
+                               exception = EXC_BAD_ACCESS;
+                               subcode = dar;
+                       }
                        break;
 
                case T_TRACE:                   /* Real PPC chips */
@@ -447,10 +405,11 @@ struct savearea *trap(int trapno,
                  }
                  /* fall through */
 
-               case T_INSTRUCTION_BKPT:
+               case T_INSTRUCTION_BKPT:        /* 603  PPC chips */
+               case T_RUNMODE_TRACE:           /* 601  PPC chips */
                        exception = EXC_BREAKPOINT;
                        code = EXC_PPC_TRACE;
-                       subcode = (unsigned int)ssp->save_srr0;
+                       subcode = ssp->save_srr0;
                        break;
 
                case T_PROGRAM:
@@ -469,32 +428,19 @@ struct savearea *trap(int trapno,
                                UPDATE_PPC_EXCEPTION_STATE
                                exception = EXC_BAD_INSTRUCTION;
                                code = EXC_PPC_UNIPL_INST;
-                               subcode = (unsigned int)ssp->save_srr0;
-                       } else if ((unsigned int)ssp->save_srr1 & MASK(SRR1_PRG_PRV_INS)) {
+                               subcode = ssp->save_srr0;
+                       } else if (ssp->save_srr1 & MASK(SRR1_PRG_PRV_INS)) {
 
                                UPDATE_PPC_EXCEPTION_STATE;
                                exception = EXC_BAD_INSTRUCTION;
                                code = EXC_PPC_PRIVINST;
-                               subcode = (unsigned int)ssp->save_srr0;
+                               subcode = ssp->save_srr0;
                        } else if (ssp->save_srr1 & MASK(SRR1_PRG_TRAP)) {
                                unsigned int inst;
-                               char *iaddr;
-                               
-                               iaddr = (char *)ssp->save_srr0;         /* Trim from long long and make a char pointer */
-                               if (copyin(iaddr, (char *) &inst, 4 )) panic("copyin failed\n");
-                               
-                               if(dgWork.dgFlags & enaDiagTrap) {      /* Is the diagnostic trap enabled? */
-                                       if((inst & 0xFFFFFFF0) == 0x0FFFFFF0) { /* Is this a TWI 31,R31,0xFFFx? */
-                                               if(diagTrap(ssp, inst & 0xF)) { /* Call the trap code */
-                                                       ssp->save_srr0 += 4ULL; /* If we eat the trap, bump pc */
-                                                       exception = 0;                  /* Clear exception */
-                                                       break;                                  /* All done here */
-                                               }
-                                       }
-                               }
-                               
+
+                               if (copyin((char *) ssp->save_srr0, (char *) &inst, 4 ))
+                                       panic("copyin failed\n");
                                UPDATE_PPC_EXCEPTION_STATE;
-                               
                                if (inst == 0x7FE00008) {
                                        exception = EXC_BREAKPOINT;
                                        code = EXC_PPC_BREAKPOINT;
@@ -502,7 +448,7 @@ struct savearea *trap(int trapno,
                                        exception = EXC_SOFTWARE;
                                        code = EXC_PPC_TRAP;
                                }
-                               subcode = (unsigned int)ssp->save_srr0;
+                               subcode = ssp->save_srr0;
                        }
                        break;
                        
@@ -510,31 +456,23 @@ struct savearea *trap(int trapno,
                        UPDATE_PPC_EXCEPTION_STATE;
                        exception = EXC_ARITHMETIC;
                        code = EXC_PPC_ALTIVECASSIST;
-                       subcode = (unsigned int)ssp->save_srr0;
+                       subcode = ssp->save_srr0;
                        break;
 
                case T_DATA_ACCESS:
                        map = thr_act->map;
-
-                       if(ssp->save_dsisr & dsiInvMode) {                      /* Did someone try to reserve cache inhibited? */
-                               UPDATE_PPC_EXCEPTION_STATE;                             /* Don't even bother VM with this one */
-                               exception = EXC_BAD_ACCESS;
-                               subcode = (unsigned int)dar;
-                               break;
-                       }
                        
-                       code = vm_fault(map, trunc_page_64(dar),
+                       code = vm_fault(map, trunc_page(dar),
                                 dsisr & MASK(DSISR_WRITE) ? PROT_RW : PROT_RO,
                                 FALSE, THREAD_ABORTSAFE, NULL, 0);
 
                        if ((code != KERN_SUCCESS) && (code != KERN_ABORTED)) {
                                UPDATE_PPC_EXCEPTION_STATE;
                                exception = EXC_BAD_ACCESS;
-                               subcode = (unsigned int)dar;
+                               subcode = dar;
                        } else { 
                                ssp->save_hdr.save_flags |= SAVredrive; /* Tell low-level to re-try fault */
-                               ssp->save_dsisr = (ssp->save_dsisr & 
-                                       ~((MASK(DSISR_NOEX) | MASK(DSISR_PROT)))) | MASK(DSISR_HASH);   /* Make sure this is marked as a miss */
+                               ssp->save_dsisr |= MASK(DSISR_HASH);    /* Make sure this is marked as a miss */
                        }
                        break;
                        
@@ -544,17 +482,16 @@ struct savearea *trap(int trapno,
                         */
                        map = thr_act->map;
                        
-                       code = vm_fault(map, trunc_page_64(ssp->save_srr0),
+                       code = vm_fault(map, trunc_page(ssp->save_srr0),
                                        PROT_EXEC, FALSE, THREAD_ABORTSAFE, NULL, 0);
 
                        if ((code != KERN_SUCCESS) && (code != KERN_ABORTED)) {
                                UPDATE_PPC_EXCEPTION_STATE;
                                exception = EXC_BAD_ACCESS;
-                               subcode = (unsigned int)ssp->save_srr0;
+                               subcode = ssp->save_srr0;
                        } else { 
                                ssp->save_hdr.save_flags |= SAVredrive; /* Tell low-level to re-try fault */
-                               ssp->save_srr1 = (ssp->save_srr1 & 
-                                       ~((unsigned long long)(MASK(DSISR_NOEX) | MASK(DSISR_PROT)))) | MASK(DSISR_HASH);               /* Make sure this is marked as a miss */
+                               ssp->save_srr1 |= MASK(DSISR_HASH);             /* Make sure this is marked as a miss */
                        }
                        break;
 
@@ -576,7 +513,6 @@ struct savearea *trap(int trapno,
        if (exception) {
                /* if this is the init task, save the exception information */
                /* this probably is a fatal exception */
-#if 0
                if(bsd_init_task == current_task()) {
                        char *buf;
                        int i;
@@ -585,7 +521,7 @@ struct savearea *trap(int trapno,
 
 
                        buf += sprintf(buf, "Exception Code = 0x%x, Subcode = 0x%x\n", code, subcode);
-                       buf += sprintf(buf, "DSISR = 0x%08x, DAR = 0x%016llx\n"
+                       buf += sprintf(buf, "DSISR = 0x%08x, DAR = 0x%08x\n"
                                                                , dsisr, dar);
 
                        for (i=0; i<32; i++) {
@@ -596,12 +532,12 @@ struct savearea *trap(int trapno,
                        }
 
                        buf += sprintf(buf, "\n\n");
-                       buf += sprintf(buf, "cr        = 0x%08X\t\t",ssp->save_cr);
-                       buf += sprintf(buf, "xer       = 0x%08X\n",ssp->save_xer);
-                       buf += sprintf(buf, "lr        = 0x%016llX\t\t",ssp->save_lr);
-                       buf += sprintf(buf, "ctr       = 0x%016llX\n",ssp->save_ctr); 
-                       buf += sprintf(buf, "srr0(iar) = 0x%016llX\t\t",ssp->save_srr0);
-                       buf += sprintf(buf, "srr1(msr) = 0x%016llX\n",ssp->save_srr1,
+                       buf += sprintf(buf, "cr        = 0x%08x\t\t",ssp->save_cr);
+                       buf += sprintf(buf, "xer       = 0x%08x\n",ssp->save_xer);
+                       buf += sprintf(buf, "lr        = 0x%08x\t\t",ssp->save_lr);
+                       buf += sprintf(buf, "ctr       = 0x%08x\n",ssp->save_ctr); 
+                       buf += sprintf(buf, "srr0(iar) = 0x%08x\t\t",ssp->save_srr0);
+                       buf += sprintf(buf, "srr1(msr) = 0x%08B\n",ssp->save_srr1,
                           "\x10\x11""EE\x12PR\x13""FP\x14ME\x15""FE0\x16SE\x18"
                           "FE1\x19""AL\x1a""EP\x1bIT\x1c""DT");
                        buf += sprintf(buf, "\n\n");
@@ -616,7 +552,7 @@ struct savearea *trap(int trapno,
                                                break;
                                if (!copyin(addr,(char*)stack_buf, 
                                                        3 * sizeof(int))) {
-                                               buf += sprintf(buf, "0x%08X : 0x%08X\n"
+                                               buf += sprintf(buf, "0x%08x : 0x%08x\n"
                                                ,addr,stack_buf[2]);
                                                addr = (char*)stack_buf[0];
                                } else {
@@ -626,7 +562,6 @@ struct savearea *trap(int trapno,
                        }
                        buf[0] = '\0';
                }
-#endif
                doexception(exception, code, subcode);
        }
        /* AST delivery
@@ -654,23 +589,22 @@ extern int pmdebug;
 int syscall_trace(int retval, struct savearea *ssp)
 {
        int i, argc;
-       int kdarg[3];
-/* Always prepare to trace mach system calls */
 
-       kdarg[0]=0;
-       kdarg[1]=0;
-       kdarg[2]=0;
-       
-       argc = mach_trap_table[-((unsigned int)ssp->save_r0)].mach_trap_arg_count;
-       
-       if (argc > 3)
-               argc = 3;
-       
-       for (i=0; i < argc; i++)
-               kdarg[i] = (int)*(&ssp->save_r3 + i);
-       
-       KERNEL_DEBUG_CONSTANT(MACHDBG_CODE(DBG_MACH_EXCP_SC, (-(ssp->save_r0))) | DBG_FUNC_START,
-               kdarg[0], kdarg[1], kdarg[2], 0, 0);
+       int kdarg[3];
+       /* Always prepare to trace mach system calls */
+       if (kdebug_enable && (ssp->save_r0 & 0x80000000)) {
+         /* Mach trap */
+         kdarg[0]=0;
+         kdarg[1]=0;
+         kdarg[2]=0;
+         argc = mach_trap_table[-(ssp->save_r0)].mach_trap_arg_count;
+         if (argc > 3)
+           argc = 3;
+         for (i=0; i < argc; i++)
+           kdarg[i] = (int)*(&ssp->save_r3 + i);
+         KERNEL_DEBUG_CONSTANT(MACHDBG_CODE(DBG_MACH_EXCP_SC, (-(ssp->save_r0))) | DBG_FUNC_START,
+                      kdarg[0], kdarg[1], kdarg[2], 0, 0);
+       }           
 
        return retval;
 }
@@ -683,8 +617,11 @@ extern int syscall_trace_end(int, struct savearea *);
 
 int syscall_trace_end(int retval, struct savearea *ssp)
 {
-       KERNEL_DEBUG_CONSTANT(MACHDBG_CODE(DBG_MACH_EXCP_SC,(-((unsigned int)ssp->save_r0))) | DBG_FUNC_END,
-               retval, 0, 0, 0, 0);
+       if (kdebug_enable && (ssp->save_r0 & 0x80000000)) {
+         /* Mach trap */
+         KERNEL_DEBUG_CONSTANT(MACHDBG_CODE(DBG_MACH_EXCP_SC,(-(ssp->save_r0))) | DBG_FUNC_END,
+                      retval, 0, 0, 0, 0);
+       }           
        return retval;
 }
 
@@ -760,7 +697,7 @@ char *trap_type[] = {
        "INVALID EXCEPTION",
        "INVALID EXCEPTION",
        "INVALID EXCEPTION",
-       "Emulate",
+       "INVALID EXCEPTION",
        "0x2000 - Run Mode/Trace",
        "Signal Processor",
        "Preemption",
@@ -773,7 +710,7 @@ int TRAP_TYPES = sizeof (trap_type) / sizeof (trap_type[0]);
 void unresolved_kernel_trap(int trapno,
                            struct savearea *ssp,
                            unsigned int dsisr,
-                           addr64_t dar,
+                           unsigned int dar,
                            char *message)
 {
        char *trap_name;
@@ -794,7 +731,7 @@ void unresolved_kernel_trap(int trapno,
        if (message == NULL)
                message = trap_name;
 
-       kdb_printf("\n\nUnresolved kernel trap(cpu %d): %s DAR=0x%016llX PC=0x%016llX\n",
+       kdb_printf("\n\nUnresolved kernel trap(cpu %d): %s DAR=0x%08x PC=0x%08x\n",
               cpu_number(), trap_name, dar, ssp->save_srr0);
 
        print_backtrace(ssp);
@@ -813,7 +750,7 @@ thread_syscall_return(
         register thread_act_t   thr_act = current_act();
         register struct savearea *regs = USER_REGS(thr_act);
 
-       if (kdebug_enable && ((unsigned int)regs->save_r0 & 0x80000000)) {
+       if (kdebug_enable && (regs->save_r0 & 0x80000000)) {
          /* Mach trap */
          KERNEL_DEBUG_CONSTANT(MACHDBG_CODE(DBG_MACH_EXCP_SC,(-(regs->save_r0))) | DBG_FUNC_END,
                       ret, 0, 0, 0, 0);
index 31c2026f348725931ad3d6660f18e1d79a7edac6..fdc3ef828fccd9faa63f96cbad14a4391b3a2233 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -78,13 +75,12 @@ extern void                 thread_exception_return(void);
 extern struct savearea*        trap(int trapno,
                                     struct savearea *ss,
                                     unsigned int dsisr,
-                                    addr64_t dar);
+                                    unsigned int dar);
 
 typedef kern_return_t (*perfTrap)(int trapno, struct savearea *ss, 
-       unsigned int dsisr, addr64_t dar);
+       unsigned int dsisr, unsigned int dar);
 
 extern perfTrap perfTrapHook;
-extern perfTrap perfIntHook;
 
 extern struct savearea* interrupt(int intno,
                                         struct savearea *ss,
index a856bfc3581296d41366eaa29b92dfb9463d7576..a0254bc7c023c205dcd6ce88319ef0f62850f2c3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 21ac0a1e3e9cd66cb40a1f1377d03f4f7b85937a..f7fda76d19fa4b34645f7dd1b6e417259c174696 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -27,6 +24,9 @@
 **
 ** C routines that we are adding to the MacOS X kernel.
 **
+** Weird Apple PSL stuff goes here...
+**
+** Until then, Copyright 2000, Connectix
 -----------------------------------------------------------------------*/
 
 #include <mach/mach_types.h>
@@ -40,6 +40,7 @@
 #include <ppc/exception.h>
 #include <ppc/mappings.h>
 #include <ppc/thread_act.h>
+#include <ppc/pmap_internals.h>
 #include <vm/vm_kern.h>
 
 #include <ppc/vmachmon.h>
@@ -72,10 +73,8 @@ vmmCntrlEntry *vmm_get_entry(
        vmmCntrlTable *CTable;
        vmmCntrlEntry *CEntry;
 
-       index = index & vmmTInum;                                                               /* Clean up the index */
-
        if (act->mact.vmmControl == 0) return NULL;                             /* No control table means no vmm */
-       if ((index - 1) >= kVmmMaxContexts) return NULL;                /* Index not in range */        
+       if ((index - 1) >= kVmmMaxContextsPerThread) return NULL;       /* Index not in range */        
 
        CTable = act->mact.vmmControl;                                                  /* Make the address a bit more convienient */
        CEntry = &CTable->vmmc[index - 1];                                              /* Point to the entry */
@@ -85,39 +84,6 @@ vmmCntrlEntry *vmm_get_entry(
        return CEntry;
 }
 
-/*-----------------------------------------------------------------------
-** vmm_get_adsp
-**
-** This function verifies and returns the pmap for an address space.
-** If there is none and the request is valid, a pmap will be created.
-**
-** Inputs:
-**             act - pointer to current thread activation
-**             index - index into vmm control table (this is a "one based" value)
-**
-** Outputs:
-**             address of a pmap or 0 if not found or could no be created
-**             Note that if there is no pmap for the address space it will be created.
------------------------------------------------------------------------*/
-
-pmap_t vmm_get_adsp(thread_act_t act, vmm_thread_index_t index)
-{
-       pmap_t pmap;
-
-       if (act->mact.vmmControl == 0) return NULL;                             /* No control table means no vmm */
-       if ((index - 1) >= kVmmMaxContexts) return NULL;                /* Index not in range */        
-
-       pmap = act->mact.vmmControl->vmmAdsp[index - 1];                /* Get the pmap */
-       if(pmap) return pmap;                                                                   /* We've got it... */
-
-       pmap = pmap_create(0);                                                                  /* Make a fresh one */
-       act->mact.vmmControl->vmmAdsp[index - 1] = pmap;                /* Remember it */
-/*
- *     Note that if the create fails, we will return a null.
- */
-       return pmap;                                                                                    /* Return it... */
-}
-
 
 
 /*************************************************************************************
@@ -171,60 +137,10 @@ int vmm_get_version(struct savearea *save)
 int vmm_get_features(struct savearea *save)
 {
        save->save_r3 = kVmmCurrentFeatures;            /* Return the features */
-       if(per_proc_info->pf.Available & pf64Bit) {
-               save->save_r3 &= ~kVmmFeature_LittleEndian;     /* No little endian here */
-               save->save_r3 |= kVmmFeature_SixtyFourBit;      /* Set that we can do 64-bit */
-       }
        return 1;
 }
 
 
-/*-----------------------------------------------------------------------
-** vmm_max_addr
-**
-** This function returns the maximum addressable virtual address sported
-**
-** Outputs:
-**             Returns max address
------------------------------------------------------------------------*/
-
-addr64_t vmm_max_addr(thread_act_t act) 
-{
-       return vm_max_address;                                                  /* Return the maximum address */
-}
-
-/*-----------------------------------------------------------------------
-** vmm_get_XA
-**
-** This function retrieves the eXtended Architecture flags for the specifed VM.
-** 
-** We need to return the result in the return code rather than in the return parameters
-** because we need an architecture independent format so the results are actually 
-** usable by the host. For example, the return parameters for 64-bit are 8 bytes wide vs.
-** 4 for 32-bit. 
-** 
-**
-** Inputs:
-**             act - pointer to current thread activation structure
-**             index - index returned by vmm_init_context
-**
-** Outputs:
-**             Return code is set to the XA flags.  If the index is invalid or the
-**             context has not been created, we return 0.
------------------------------------------------------------------------*/
-
-unsigned int vmm_get_XA(
-       thread_act_t            act,
-       vmm_thread_index_t      index)
-{
-       vmmCntrlEntry           *CEntry;
-
-       CEntry = vmm_get_entry(act, index);                             /* Convert index to entry */            
-       if (CEntry == NULL) return 0;                                   /* Either this isn't a vmm or the index is bogus */
-       
-       return CEntry->vmmXAFlgs;                                               /* Return the flags */
-}
-
 /*-----------------------------------------------------------------------
 ** vmm_init_context
 **
@@ -254,7 +170,7 @@ int vmm_init_context(struct savearea *save)
        vmmCntrlTable           *CTable;
        vm_offset_t                     conkern;
        vmm_state_page_t *      vks;
-       ppnum_t                         conphys;
+       vm_offset_t                     conphys;
        kern_return_t           ret;
        pmap_t                          new_pmap;       
        int                                     cvi, i;
@@ -332,11 +248,11 @@ int vmm_init_context(struct savearea *save)
                act->mact.vmmControl = CTable;                  /* Initialize the table anchor */
        }
 
-       for(cvi = 0; cvi < kVmmMaxContexts; cvi++) {    /* Search to find a free slot */
+       for(cvi = 0; cvi < kVmmMaxContextsPerThread; cvi++) {   /* Search to find a free slot */
                if(!(CTable->vmmc[cvi].vmmFlags & vmmInUse)) break;     /* Bail if we find an unused slot */
        }
        
-       if(cvi >= kVmmMaxContexts) {                            /* Did we find one? */
+       if(cvi >= kVmmMaxContextsPerThread) {           /* Did we find one? */
                ml_set_interrupts_enabled(FALSE);               /* Set back interruptions */
                save->save_r3 = KERN_RESOURCE_SHORTAGE; /* No empty slots... */ 
                return 1;
@@ -353,7 +269,7 @@ int vmm_init_context(struct savearea *save)
                goto return_in_shame;
 
        /* Map the vmm state into the kernel's address space. */
-       conphys = pmap_find_phys(act->map->pmap, (addr64_t)vmm_user_state);
+       conphys = pmap_extract(act->map->pmap, (vm_offset_t)vmm_user_state);
 
        /* Find a virtual address to use. */
        ret = kmem_alloc_pageable(kernel_map, &conkern, PAGE_SIZE);
@@ -366,7 +282,6 @@ int vmm_init_context(struct savearea *save)
        }
        
        /* Map it into the kernel's address space. */
-
        pmap_enter(kernel_pmap, conkern, conphys, 
                VM_PROT_READ | VM_PROT_WRITE, 
                VM_WIMG_USE_DEFAULT, TRUE);
@@ -375,6 +290,17 @@ int vmm_init_context(struct savearea *save)
        vks = (vmm_state_page_t *)conkern;
        bzero((char *)vks, PAGE_SIZE);
        
+       /* Allocate a new pmap for the new vmm context. */
+       new_pmap = pmap_create(0);
+       if (new_pmap == PMAP_NULL) {
+               (void) vm_map_unwire(act->map,                  /* Couldn't get a pmap, unwire the user page */
+                       (vm_offset_t)vmm_user_state,
+                       (vm_offset_t)vmm_user_state + PAGE_SIZE,
+                       TRUE);
+               
+               kmem_free(kernel_map, conkern, PAGE_SIZE);      /* Release the kernel address */
+               goto return_in_shame;
+       }
        
        /* We're home free now. Simply fill in the necessary info and return. */
        
@@ -382,6 +308,7 @@ int vmm_init_context(struct savearea *save)
        vks->thread_index = cvi + 1;                            /* Tell the user the index for this virtual machine */
        
        CTable->vmmc[cvi].vmmFlags = vmmInUse;          /* Mark the slot in use and make sure the rest are clear */
+       CTable->vmmc[cvi].vmmPmap = new_pmap;           /* Remember the pmap for this guy */
        CTable->vmmc[cvi].vmmContextKern = vks;         /* Remember the kernel address of comm area */
        CTable->vmmc[cvi].vmmContextPhys = (vmm_state_page_t *)conphys; /* Remember the state page physical addr */
        CTable->vmmc[cvi].vmmContextUser = vmm_user_state;              /* Remember user address of comm area */
@@ -396,9 +323,9 @@ int vmm_init_context(struct savearea *save)
 
        hw_atomic_add((int *)&saveanchor.savetarget, 2);        /* Account for the number of extra saveareas we think we might "need" */
 
-       if (!(act->map->pmap->pmapFlags & pmapVMhost)) {
+       if (!(act->map->pmap->vflags & pmapVMhost)) {
                simple_lock(&(act->map->pmap->lock));
-               act->map->pmap->pmapFlags |= pmapVMhost;
+               act->map->pmap->vflags |= pmapVMhost;
                simple_unlock(&(act->map->pmap->lock));
        }
        
@@ -428,12 +355,6 @@ return_in_shame:
 **
 ** Outputs:
 **             kernel return code indicating success or failure
-**
-** Strangeness note:
-**             This call will also trash the address space with the same ID.  While this 
-**             is really not too cool, we have to do it because we need to make
-**             sure that old VMM users (not that we really have any) who depend upon 
-**             the address space going away with the context still work the same.
 -----------------------------------------------------------------------*/
 
 kern_return_t vmm_tear_down_context(
@@ -461,14 +382,11 @@ kern_return_t vmm_tear_down_context(
                toss_live_vec(&CEntry->vmmFacCtx);                      /* Get rid of any live context here */
                save_release((savearea *)CEntry->vmmFacCtx.VMXsave);    /* Release it */
        }
-       
-       CEntry->vmmPmap = 0;                                                    /* Remove this trace */
-       if(act->mact.vmmControl->vmmAdsp[index - 1]) {  /* Check if there is an address space assigned here */
-               mapping_remove(act->mact.vmmControl->vmmAdsp[index - 1], 0xFFFFFFFFFFFFF000LL); /* Remove final page explicitly because we might have mapped it */      
-               pmap_remove(act->mact.vmmControl->vmmAdsp[index - 1], 0, 0xFFFFFFFFFFFFF000LL); /* Remove all entries from this map */
-               pmap_destroy(act->mact.vmmControl->vmmAdsp[index - 1]); /* Toss the pmap for this context */
-               act->mact.vmmControl->vmmAdsp[index - 1] = NULL;        /* Clean it up */
-       }
+
+       mapping_remove(CEntry->vmmPmap, 0xFFFFF000);    /* Remove final page explicitly because we might have mapped it */      
+       pmap_remove(CEntry->vmmPmap, 0, 0xFFFFF000);    /* Remove all entries from this map */
+       pmap_destroy(CEntry->vmmPmap);                                  /* Toss the pmap for this context */
+       CEntry->vmmPmap = NULL;                                                 /* Clean it up */
        
        (void) vm_map_unwire(                                                   /* Unwire the user comm page */
                act->map,
@@ -478,10 +396,8 @@ kern_return_t vmm_tear_down_context(
        
        kmem_free(kernel_map, (vm_offset_t)CEntry->vmmContextKern, PAGE_SIZE);  /* Remove kernel's view of the comm page */
        
-       CTable = act->mact.vmmControl;                                  /* Get the control table address */
-       CTable->vmmGFlags = CTable->vmmGFlags & ~vmmLastAdSp;   /* Make sure we don't try to automap into this */
-
        CEntry->vmmFlags = 0;                                                   /* Clear out all of the flags for this entry including in use */
+       CEntry->vmmPmap = 0;                                                    /* Clear pmap pointer */
        CEntry->vmmContextKern = 0;                                             /* Clear the kernel address of comm area */
        CEntry->vmmContextUser = 0;                                             /* Clear the user address of comm area */
        
@@ -493,26 +409,14 @@ kern_return_t vmm_tear_down_context(
        CEntry->vmmFacCtx.VMXcpu = 0;                                   /* Clear facility context control */
        CEntry->vmmFacCtx.facAct = 0;                                   /* Clear facility context control */
        
-       for(cvi = 0; cvi < kVmmMaxContexts; cvi++) {    /* Search to find a free slot */
+       CTable = act->mact.vmmControl;                                  /* Get the control table address */
+       for(cvi = 0; cvi < kVmmMaxContextsPerThread; cvi++) {   /* Search to find a free slot */
                if(CTable->vmmc[cvi].vmmFlags & vmmInUse) {     /* Return if there are still some in use */
                        ml_set_interrupts_enabled(FALSE);               /* No more interruptions */
                        return KERN_SUCCESS;                                    /* Leave... */
                }
        }
 
-/*
- *     When we have tossed the last context, toss any address spaces left over before releasing
- *     the VMM control block 
- */
-
-       for(cvi = 1; cvi <= kVmmMaxContexts; cvi++) {   /* Look at all slots */
-               if(!act->mact.vmmControl->vmmAdsp[index - 1]) continue; /* Nothing to remove here */
-               mapping_remove(act->mact.vmmControl->vmmAdsp[index - 1], 0xFFFFFFFFFFFFF000LL); /* Remove final page explicitly because we might have mapped it */      
-               pmap_remove(act->mact.vmmControl->vmmAdsp[index - 1], 0, 0xFFFFFFFFFFFFF000LL); /* Remove all entries from this map */
-               pmap_destroy(act->mact.vmmControl->vmmAdsp[index - 1]); /* Toss the pmap for this context */
-               act->mact.vmmControl->vmmAdsp[index - 1] = 0;   /* Clear just in case */
-       }               
-
        kfree((vm_offset_t)CTable, sizeof(vmmCntrlTable));      /* Toss the table because to tossed the last context */
        act->mact.vmmControl = 0;                                               /* Unmark us as vmm */
 
@@ -521,83 +425,6 @@ kern_return_t vmm_tear_down_context(
        return KERN_SUCCESS;
 }
 
-
-/*-----------------------------------------------------------------------
-** vmm_set_XA
-**
-** This function sets the eXtended Architecture flags for the specifed VM.
-** 
-** We need to return the result in the return code rather than in the return parameters
-** because we need an architecture independent format so the results are actually 
-** usable by the host. For example, the return parameters for 64-bit are 8 bytes wide vs.
-** 4 for 32-bit. 
-** 
-** Note that this function does a lot of the same stuff as vmm_tear_down_context
-** and vmm_init_context.
-**
-** Inputs:
-**             act - pointer to current thread activation structure
-**             index - index returned by vmm_init_context
-**             flags - the extended architecture flags
-**             
-**
-** Outputs:
-**             KERN_SUCCESS if vm is valid and initialized. KERN_FAILURE if not.
-**             Also, the internal flags are set and, additionally, the VM is completely reset.
------------------------------------------------------------------------*/
-
-kern_return_t vmm_set_XA(
-       thread_act_t            act,
-       vmm_thread_index_t      index,
-       unsigned int xaflags)
-{
-       vmmCntrlEntry           *CEntry;
-       vmmCntrlTable           *CTable;
-       vmm_state_page_t        *vks;
-       vmm_version_t           version;
-
-       if(xaflags & ~vmm64Bit) return KERN_FAILURE;    /* We only support this one kind now */
-
-       CEntry = vmm_get_entry(act, index);                             /* Convert index to entry */            
-       if (CEntry == NULL) return KERN_FAILURE;                /* Either this isn't a vmm or the index is bogus */
-
-       ml_set_interrupts_enabled(TRUE);                                /* This can take a bit of time so pass interruptions */
-       
-       if(CEntry->vmmFacCtx.FPUsave) {                                 /* Is there any floating point context? */
-               toss_live_fpu(&CEntry->vmmFacCtx);                      /* Get rid of any live context here */
-               save_release((savearea *)CEntry->vmmFacCtx.FPUsave);    /* Release it */
-       }
-
-       if(CEntry->vmmFacCtx.VMXsave) {                                 /* Is there any vector context? */
-               toss_live_vec(&CEntry->vmmFacCtx);                      /* Get rid of any live context here */
-               save_release((savearea *)CEntry->vmmFacCtx.VMXsave);    /* Release it */
-       }
-
-       CTable = act->mact.vmmControl;                                  /* Get the control table address */
-       CTable->vmmGFlags = CTable->vmmGFlags & ~vmmLastAdSp;   /* Make sure we don't try to automap into this */
-       
-       CEntry->vmmFlags &= vmmInUse;                                   /* Clear out all of the flags for this entry except in use */
-       CEntry->vmmXAFlgs = (xaflags & vmm64Bit) | (CEntry->vmmXAFlgs & ~vmm64Bit);     /* Set the XA flags */
-       CEntry->vmmFacCtx.FPUsave = 0;                                  /* Clear facility context control */
-       CEntry->vmmFacCtx.FPUlevel = 0;                                 /* Clear facility context control */
-       CEntry->vmmFacCtx.FPUcpu = 0;                                   /* Clear facility context control */
-       CEntry->vmmFacCtx.VMXsave = 0;                                  /* Clear facility context control */
-       CEntry->vmmFacCtx.VMXlevel = 0;                                 /* Clear facility context control */
-       CEntry->vmmFacCtx.VMXcpu = 0;                                   /* Clear facility context control */
-       
-       vks = CEntry->vmmContextKern;                                   /* Get address of the context page */
-       version = vks->interface_version;                               /* Save the version code */
-       bzero((char *)vks, 4096);                                               /* Clear all */
-
-       vks->interface_version = version;                               /* Set our version code */
-       vks->thread_index = index % vmmTInum;                   /* Tell the user the index for this virtual machine */
-       
-       ml_set_interrupts_enabled(FALSE);                               /* No more interruptions */
-       
-       return KERN_SUCCESS;                                                    /* Return the flags */
-}
-
-
 /*-----------------------------------------------------------------------
 ** vmm_tear_down_all
 **
@@ -638,8 +465,7 @@ void vmm_tear_down_all(thread_act_t act) {
        
        if(CTable = act->mact.vmmControl) {                             /* Do we have a vmm control block? */
 
-
-               for(cvi = 1; cvi <= kVmmMaxContexts; cvi++) {   /* Look at all slots */
+               for(cvi = 1; cvi <= kVmmMaxContextsPerThread; cvi++) {  /* Look at all slots */
                        if(CTable->vmmc[cvi - 1].vmmFlags & vmmInUse) { /* Is this one in use */
                                ret = vmm_tear_down_context(act, cvi);  /* Take down the found context */
                                if(ret != KERN_SUCCESS) {                       /* Did it go away? */
@@ -648,10 +474,6 @@ void vmm_tear_down_all(thread_act_t act) {
                                }
                        }
                }               
-
-/*
- *             Note that all address apces should be gone here.
- */
                if(act->mact.vmmControl) {                                              /* Did we find one? */
                        panic("vmm_tear_down_all: control table did not get deallocated\n");    /* Table did not go away */
                }
@@ -664,7 +486,8 @@ void vmm_tear_down_all(thread_act_t act) {
 ** vmm_map_page
 **
 ** This function maps a page from within the client's logical
-** address space into the alternate address space.
+** address space into the alternate address space of the
+** Virtual Machine Monitor context. 
 **
 ** The page need not be locked or resident.  If not resident, it will be faulted
 ** in by this code, which may take some time.   Also, if the page is not locked,
@@ -679,7 +502,7 @@ void vmm_tear_down_all(thread_act_t act) {
 **
 ** Inputs:
 **             act   - pointer to current thread activation
-**             index - index of address space to map into
+**             index - index of vmm state for this page
 **             va    - virtual address within the client's address
 **                         space
 **             ava   - virtual address within the alternate address
@@ -699,55 +522,74 @@ void vmm_tear_down_all(thread_act_t act) {
 
 kern_return_t vmm_map_page(
        thread_act_t            act,
-       vmm_adsp_id_t           index,
-       addr64_t                        cva,
-       addr64_t                        ava,
+       vmm_thread_index_t      index,
+       vm_offset_t             cva,
+       vm_offset_t             ava,
        vm_prot_t                       prot)
 {
        kern_return_t           ret;
        vmmCntrlEntry           *CEntry;
-       register mapping        *mp;
+       vm_offset_t                     phys_addr;
+       register mapping        *mpv, *mp, *nmpv, *nmp;
        struct phys_entry       *pp;
+       pmap_t                          mpmap;
        vm_map_t                        map;
-       addr64_t                        ova, nextva;
-       pmap_t                          pmap;
-
-       pmap = vmm_get_adsp(act, index);                        /* Get the pmap for this address space */
-       if(!pmap) return KERN_FAILURE;                          /* Bogus address space, no VMs, or we can't make a pmap, failure... */
-
-       if(ava > vm_max_address) return kVmmInvalidAddress;     /* Does the machine support an address of this size? */
 
+       CEntry = vmm_get_entry(act, index);                     /* Get and validate the index */
+       if (CEntry == NULL)return KERN_FAILURE;         /* No good, failure... */
+       
+/*
+ *     Find out if we have already mapped the address and toss it out if so.
+ */
+       mp = hw_lock_phys_vir(CEntry->vmmPmap->space, ava);     /* See if there is already a mapping */
+       if((unsigned int)mp & 1) {                                      /* Did we timeout? */
+               panic("vmm_map_page: timeout locking physical entry for alternate virtual address (%08X)\n", ava);      /* Yeah, scream about it! */
+               return KERN_FAILURE;                                    /* Bad hair day, return FALSE... */
+       }
+       if(mp) {                                                                        /* If it was there, toss it */
+               mpv = hw_cpv(mp);                                               /* Convert mapping block to virtual */
+               hw_unlock_bit((unsigned int *)&mpv->physent->phys_link, PHYS_LOCK);     /* We're done, unlock the physical entry */
+               (void)mapping_remove(CEntry->vmmPmap, ava);     /* Throw away the mapping. we're about to replace it */
+       }
        map = current_act()->map;                                       /* Get the current map */
        
        while(1) {                                                                      /* Keep trying until we get it or until we fail */
+               if(hw_cvp_blk(map->pmap, cva)) return KERN_FAILURE;     /* Make sure that there is no block map at this address */
 
-               mp = mapping_find(map->pmap, cva, &nextva, 0);  /* Find the mapping for this address */
+               mp = hw_lock_phys_vir(map->pmap->space, cva);   /* Lock the physical entry for emulator's page */
+               if((unsigned int)mp&1) {                                /* Did we timeout? */
+                       panic("vmm_map_page: timeout locking physical entry for emulator virtual address (%08X)\n", cva);       /* Yeah, scream about it! */
+                       return KERN_FAILURE;                            /* Bad hair day, return FALSE... */
+               }
                
-               if(mp) break;                                                   /* We found it */
+               if(mp) {                                                                /* We found it... */
+                       mpv = hw_cpv(mp);                                       /* Convert mapping block to virtual */
+                       
+                       if(!mpv->physent) return KERN_FAILURE;  /* If there is no physical entry (e.g., I/O area), we won't map it */
+                       
+                       if(!(mpv->PTEr & 1)) break;                     /* If we are writable go ahead and map it... */
+       
+                       hw_unlock_bit((unsigned int *)&mpv->physent->phys_link, PHYS_LOCK);     /* Unlock the map before we try to fault the write bit on */
+               }
 
                ml_set_interrupts_enabled(TRUE);                /* Enable interruptions */
-               ret = vm_fault(map, trunc_page_32((vm_offset_t)cva), VM_PROT_READ | VM_PROT_WRITE, FALSE);      /* Didn't find it, try to fault it in read/write... */
+               ret = vm_fault(map, trunc_page(cva), VM_PROT_READ | VM_PROT_WRITE, FALSE, NULL, 0);     /* Didn't find it, try to fault it in read/write... */
                ml_set_interrupts_enabled(FALSE);               /* Disable interruptions */
                if (ret != KERN_SUCCESS) return KERN_FAILURE;   /* There isn't a page there, return... */
        }
 
-       if(mp->mpFlags & (mpBlock | mpNest | mpSpecial)) {      /* If this is a block, a nest, or some other special thing, we can't map it */
-               mapping_drop_busy(mp);                                  /* We have everything we need from the mapping */
-               return KERN_FAILURE;                                    /* Leave in shame */
-       }
-       
-       while(1) {                                                                              /* Keep trying the enter until it goes in */
-               ova = mapping_make(pmap, ava, mp->mpPAddr, 0, 1, prot); /* Enter the mapping into the pmap */
-               if(!ova) break;                                                 /* If there were no collisions, we are done... */
-               mapping_remove(pmap, ova);                              /* Remove the mapping that collided */
-       }
-
-       mapping_drop_busy(mp);                                          /* We have everything we need from the mapping */
+/*
+ *     Now we make a mapping using all of the attributes of the source page except for protection.
+ *     Also specify that the physical entry is locked.
+ */
+       nmpv = mapping_make(CEntry->vmmPmap, mpv->physent, (ava & -PAGE_SIZE),
+               (mpv->physent->pte1 & -PAGE_SIZE), prot, ((mpv->physent->pte1 >> 3) & 0xF), 1); 
 
-       if (!((per_proc_info[cpu_number()].spcFlags) & FamVMmode)) {
-               act->mact.vmmControl->vmmLastMap = ava & 0xFFFFFFFFFFFFF000ULL; /* Remember the last mapping we made */
-               act->mact.vmmControl->vmmGFlags = (act->mact.vmmControl->vmmGFlags & ~vmmLastAdSp) | index;     /* Remember last address space */
-       }
+       hw_unlock_bit((unsigned int *)&mpv->physent->phys_link, PHYS_LOCK);     /* Unlock the physical entry now, we're done with it */
+       
+       CEntry->vmmLastMap = ava & -PAGE_SIZE;          /* Remember the last mapping we made */
+       if (!((per_proc_info[cpu_number()].spcFlags) & FamVMmode))
+               CEntry->vmmFlags |= vmmMapDone;                         /* Set that we did a map operation */
 
        return KERN_SUCCESS;
 }
@@ -762,11 +604,6 @@ kern_return_t vmm_map_page(
 **
 **     See description of vmm_map_page for details. 
 **
-** Inputs:
-**             Index is used for both the context and the address space ID.
-**             index[24:31] is the context id and index[16:23] is the address space.
-**             if the address space ID is 0, the context ID is used for it.
-**
 ** Outputs:
 **             Normal exit is to run the VM.  Abnormal exit is triggered via a 
 **             non-KERN_SUCCESS return from vmm_map_page or later during the 
@@ -776,100 +613,76 @@ kern_return_t vmm_map_page(
 vmm_return_code_t vmm_map_execute(
        thread_act_t            act,
        vmm_thread_index_t      index,
-       addr64_t                        cva,
-       addr64_t                        ava,
+       vm_offset_t             cva,
+       vm_offset_t             ava,
        vm_prot_t                       prot)
 {
        kern_return_t           ret;
        vmmCntrlEntry           *CEntry;
-       unsigned int            adsp;
-       vmm_thread_index_t      cndx;
 
-       cndx = index & 0xFF;                                                    /* Clean it up */
+       CEntry = vmm_get_entry(act, index);                     /* Get and validate the index */
 
-       CEntry = vmm_get_entry(act, cndx);                              /* Get and validate the index */
        if (CEntry == NULL) return kVmmBogusContext;    /* Return bogus context */
        
        if (((per_proc_info[cpu_number()].spcFlags) & FamVMmode) && (CEntry != act->mact.vmmCEntry))
                return kVmmBogusContext;                        /* Yes, invalid index in Fam */
        
-       adsp = (index >> 8) & 0xFF;                                             /* Get any requested address space */
-       if(!adsp) adsp = (index & 0xFF);                                /* If 0, use context ID as address space ID */
-       
-       ret = vmm_map_page(act, adsp, cva, ava, prot);  /* Go try to map the page on in */
-       
+       ret = vmm_map_page(act, index, cva, ava, prot); /* Go try to map the page on in */
        
        if(ret == KERN_SUCCESS) {
-               act->mact.vmmControl->vmmLastMap = ava & 0xFFFFFFFFFFFFF000ULL; /* Remember the last mapping we made */
-               act->mact.vmmControl->vmmGFlags = (act->mact.vmmControl->vmmGFlags & ~vmmLastAdSp) | cndx;      /* Remember last address space */
-               vmm_execute_vm(act, cndx);                              /* Return was ok, launch the VM */
+               CEntry->vmmFlags |= vmmMapDone;                 /* Set that we did a map operation */
+               vmm_execute_vm(act, index);                             /* Return was ok, launch the VM */
        }
        
-       return ret;                                                                             /* We had trouble mapping in the page */        
+       return kVmmInvalidAddress;                                      /* We had trouble mapping in the page */        
        
 }
 
 /*-----------------------------------------------------------------------
 ** vmm_map_list
 **
-** This function maps a list of pages into various address spaces
+** This function maps a list of pages into the alternate's logical
+** address space.
 **
 ** Inputs:
 **             act   - pointer to current thread activation
-**             index - index of default address space (used if not specifed in list entry
+**             index - index of vmm state for this page
 **             count - number of pages to release
-**             flavor - 0 if 32-bit version, 1 if 64-bit
 **             vmcpComm in the comm page contains up to kVmmMaxMapPages to map
 **
 ** Outputs:
 **             kernel return code indicating success or failure
 **             KERN_FAILURE is returned if kVmmMaxUnmapPages is exceeded
 **             or the vmm_map_page call fails.
-**             We return kVmmInvalidAddress if virtual address size is not supported
 -----------------------------------------------------------------------*/
 
 kern_return_t vmm_map_list(
        thread_act_t            act,
-       vmm_adsp_id_t           index,
-       unsigned int            cnt,
-       unsigned int            flavor)
+       vmm_thread_index_t      index,
+       unsigned int            cnt)
 {
        vmmCntrlEntry           *CEntry;
        boolean_t                       ret;
        unsigned int            i;
-       vmmMList                        *lst;
-       vmmMList64                      *lstx;
-       addr64_t                        cva;
-       addr64_t                        ava;
+       vmmMapList                      *lst;
+       vm_offset_t             cva;
+       vm_offset_t             ava;
        vm_prot_t                       prot;
-       vmm_adsp_id_t           adsp;
 
-       CEntry = vmm_get_entry(act, index);                             /* Convert index to entry */            
-       if (CEntry == NULL) return KERN_FAILURE;                /* Either this isn't a vmm or the index is bogus */
+       CEntry = vmm_get_entry(act, index);                             /* Get and validate the index */
+       if (CEntry == NULL)return -1;                                   /* No good, failure... */
        
        if(cnt > kVmmMaxMapPages) return KERN_FAILURE;  /* They tried to map too many */
        if(!cnt) return KERN_SUCCESS;                                   /* If they said none, we're done... */
        
-       lst = (vmmMList *)&((vmm_comm_page_t *)CEntry->vmmContextKern)->vmcpComm[0];    /* Point to the first entry */
-       lstx = (vmmMList64 *)&((vmm_comm_page_t *)CEntry->vmmContextKern)->vmcpComm[0]; /* Point to the first entry */
+       lst = (vmmMapList *)(&((vmm_comm_page_t *)CEntry->vmmContextKern)->vmcpComm[0]);        /* Point to the first entry */
        
        for(i = 0; i < cnt; i++) {                                              /* Step and release all pages in list */
-               if(flavor) {                                                            /* Check if 32- or 64-bit addresses */
-                       cva = lstx[i].vmlva;                                    /* Get the 64-bit actual address */     
-                       ava = lstx[i].vmlava;                                   /* Get the 64-bit guest address */      
-               }
-               else {
-                       cva = lst[i].vmlva;                                             /* Get the 32-bit actual address */     
-                       ava = lst[i].vmlava;                                    /* Get the 32-bit guest address */      
-               }
-
-               prot = ava & vmmlProt;                                          /* Extract the protection bits */       
-               adsp = (ava & vmmlAdID) >> 4;                           /* Extract an explicit address space request */ 
-               if(!adsp) adsp = index - 1;                                     /* If no explicit, use supplied default */
-               ava = ava &= 0xFFFFFFFFFFFFF000ULL;                     /* Clean up the address */
-               
+               cva = lst[i].vmlva;                                                     /* Get the actual address */    
+               ava = lst[i].vmlava & -vmlFlgs;                         /* Get the alternate address */ 
+               prot = lst[i].vmlava & vmlProt;                         /* Get the protection bits */   
                ret = vmm_map_page(act, index, cva, ava, prot); /* Go try to map the page on in */
-               if(ret != KERN_SUCCESS) return ret;                     /* Bail if any error */
+               if(ret != KERN_SUCCESS) return KERN_FAILURE;    /* Bail if any error */
        }
        
        return KERN_SUCCESS     ;                                                       /* Return... */
@@ -895,36 +708,45 @@ kern_return_t vmm_map_list(
 **         this call could return the wrong one.  Moral of the story: no aliases.
 -----------------------------------------------------------------------*/
 
-addr64_t vmm_get_page_mapping(
+vm_offset_t vmm_get_page_mapping(
        thread_act_t            act,
-       vmm_adsp_id_t           index,
-       addr64_t                        va)
+       vmm_thread_index_t      index,
+       vm_offset_t             va)
 {
        vmmCntrlEntry           *CEntry;
-       register mapping        *mp;
+       vm_offset_t                     ova;
+       register mapping        *mpv, *mp, *nmpv, *nmp;
        pmap_t                          pmap;
-       addr64_t                        nextva, sva;
-       ppnum_t                         pa;
 
-       pmap = vmm_get_adsp(act, index);                                                /* Get and validate the index */
-       if (!pmap)return -1;                                                                    /* No good, failure... */
+       CEntry = vmm_get_entry(act, index);                                             /* Get and validate the index */
+       if (CEntry == NULL)return -1;                                                   /* No good, failure... */
 
-       mp = mapping_find(pmap, va, &nextva, 0);                                /* Find our page */
-       
+       mp = hw_lock_phys_vir(CEntry->vmmPmap->space, va);              /* Look up the mapping */
+       if((unsigned int)mp & 1) {                                                              /* Did we timeout? */
+               panic("vmm_get_page_mapping: timeout locking physical entry for alternate virtual address (%08X)\n", va);       /* Yeah, scream about it! */
+               return -1;                                                                                      /* Bad hair day, return FALSE... */
+       }
        if(!mp) return -1;                                                                              /* Not mapped, return -1 */
 
-       pa = mp->mpPAddr;                                                                               /* Remember the page address */
-
-       mapping_drop_busy(mp);                                                                  /* Go ahead and relase the mapping now */
-       
+       mpv = hw_cpv(mp);                                                                               /* Convert mapping block to virtual */
        pmap = current_act()->map->pmap;                                                /* Get the current pmap */
-       sva = mapping_p2v(pmap, pa);                                                    /* Now find the source virtual */
+       ova = -1;                                                                                               /* Assume failure for now */
+       
+       for(nmpv = hw_cpv(mpv->physent->phys_link); nmpv; nmpv = hw_cpv(nmpv->next)) {  /* Scan 'em all */
+               
+               if(nmpv->pmap != pmap) continue;                                        /* Skip all the rest if this is not the right pmap... */ 
+               
+               ova = ((((unsigned int)nmpv->PTEhash & -64) << 6) ^ (pmap->space  << 12)) & 0x003FF000; /* Backward hash to the wrapped VADDR */
+               ova = ova | ((nmpv->PTEv << 1) & 0xF0000000);           /* Move in the segment number */
+               ova = ova | ((nmpv->PTEv << 22) & 0x0FC00000);          /* Add in the API for the top of the address */
+               break;                                                                                          /* We're done now, pass virtual address back */
+       }
 
-       if(sva != 0) return sva;                                                                /* We found it... */
+       hw_unlock_bit((unsigned int *)&mpv->physent->phys_link, PHYS_LOCK);     /* We're done, unlock the physical entry */
        
-       panic("vmm_get_page_mapping: could not back-map alternate va (%016llX)\n", va); /* We are bad wrong if we can't find it */
+       if(ova == -1) panic("vmm_get_page_mapping: could not back-map alternate va (%08X)\n", va);      /* We are bad wrong if we can't find it */
 
-       return -1;
+       return ova;
 }
 
 /*-----------------------------------------------------------------------
@@ -945,20 +767,19 @@ addr64_t vmm_get_page_mapping(
 
 kern_return_t vmm_unmap_page(
        thread_act_t            act,
-       vmm_adsp_id_t           index,
-       addr64_t                        va)
+       vmm_thread_index_t      index,
+       vm_offset_t             va)
 {
        vmmCntrlEntry           *CEntry;
-       addr64_t                        nadd;
-       pmap_t                          pmap;
+       boolean_t                       ret;
        kern_return_t           kern_result = KERN_SUCCESS;
 
-       pmap = vmm_get_adsp(act, index);                                                /* Get and validate the index */
-       if (!pmap)return -1;                                                                    /* No good, failure... */
+       CEntry = vmm_get_entry(act, index);                                             /* Get and validate the index */
+       if (CEntry == NULL)return -1;                                                   /* No good, failure... */
        
-       nadd = mapping_remove(pmap, va);                                                /* Toss the mapping */
+       ret = mapping_remove(CEntry->vmmPmap, va);                              /* Toss the mapping */
        
-       return ((nadd & 1) ? KERN_FAILURE : KERN_SUCCESS);              /* Return... */
+       return (ret ? KERN_SUCCESS : KERN_FAILURE);                             /* Return... */
 }
 
 /*-----------------------------------------------------------------------
@@ -971,7 +792,6 @@ kern_return_t vmm_unmap_page(
 **             act   - pointer to current thread activation
 **             index - index of vmm state for this page
 **             count - number of pages to release
-**             flavor - 0 if 32-bit, 1 if 64-bit
 **             vmcpComm in the comm page contains up to kVmmMaxUnmapPages to unmap
 **
 ** Outputs:
@@ -981,46 +801,28 @@ kern_return_t vmm_unmap_page(
 
 kern_return_t vmm_unmap_list(
        thread_act_t            act,
-       vmm_adsp_id_t           index,
-       unsigned int            cnt,
-       unsigned int            flavor)
+       vmm_thread_index_t      index,
+       unsigned int            cnt)
 {
        vmmCntrlEntry           *CEntry;
        boolean_t                       ret;
        kern_return_t           kern_result = KERN_SUCCESS;
        unsigned int            *pgaddr, i;
-       addr64_t                        gva;
-       vmmUMList                       *lst;
-       vmmUMList64                     *lstx;
-       pmap_t                          pmap;
-       int                                     adsp;
 
-       CEntry = vmm_get_entry(act, index);                             /* Convert index to entry */            
-       if (CEntry == NULL) return KERN_FAILURE;                /* Either this isn't a vmm or the index is bogus */
+       CEntry = vmm_get_entry(act, index);                                             /* Get and validate the index */
+       if (CEntry == NULL)return -1;                                                   /* No good, failure... */
        
-       if(cnt > kVmmMaxUnmapPages) return KERN_FAILURE;        /* They tried to unmap too many */
-       if(!cnt) return KERN_SUCCESS;                                   /* If they said none, we're done... */
+       if(cnt > kVmmMaxUnmapPages) return KERN_FAILURE;                /* They tried to unmap too many */
+       if(!cnt) return KERN_SUCCESS;                                                   /* If they said none, we're done... */
        
-       lst = lstx = &((vmm_comm_page_t *)CEntry->vmmContextKern)->vmcpComm[0]; /* Point to the first entry */
+       pgaddr = &((vmm_comm_page_t *)CEntry->vmmContextKern)->vmcpComm[0];     /* Point to the first entry */
        
-       for(i = 0; i < cnt; i++) {                                              /* Step and release all pages in list */
-               if(flavor) {                                                            /* Check if 32- or 64-bit addresses */
-                       gva = lstx[i].vmlava;                                   /* Get the 64-bit guest address */      
-               }
-               else {
-                       gva = lst[i].vmlava;                                    /* Get the 32-bit guest address */      
-               }
-
-               adsp = (gva & vmmlAdID) >> 4;                           /* Extract an explicit address space request */ 
-               if(!adsp) adsp = index - 1;                                     /* If no explicit, use supplied default */
-               pmap = act->mact.vmmControl->vmmAdsp[adsp];     /* Get the pmap for this request */
-               if(!pmap) continue;                                                     /* Ain't nuthin' mapped here, no durn map... */
-
-               gva = gva &= 0xFFFFFFFFFFFFF000ULL;                     /* Clean up the address */              
-               (void)mapping_remove(pmap, gva);                        /* Toss the mapping */
+       for(i = 0; i < cnt; i++) {                                                              /* Step and release all pages in list */
+       
+               (void)mapping_remove(CEntry->vmmPmap, pgaddr[i]);       /* Toss the mapping */
        }
        
-       return KERN_SUCCESS     ;                                                       /* Return... */
+       return KERN_SUCCESS     ;                                                                       /* Return... */
 }
 
 /*-----------------------------------------------------------------------
@@ -1042,19 +844,18 @@ kern_return_t vmm_unmap_list(
 
 void vmm_unmap_all_pages(
        thread_act_t            act,
-       vmm_adsp_id_t           index)
+       vmm_thread_index_t      index)
 {
        vmmCntrlEntry           *CEntry;
-       pmap_t                          pmap;
 
-       pmap = vmm_get_adsp(act, index);                                                /* Convert index to entry */            
-       if (!pmap) return;                                                                              /* Either this isn't vmm thread or the index is bogus */
+       CEntry = vmm_get_entry(act, index);                                             /* Convert index to entry */            
+       if (CEntry == NULL) return;                                                             /* Either this isn't vmm thread or the index is bogus */
        
 /*
  *     Note: the pmap code won't deal with the last page in the address space, so handle it explicitly
  */
-       mapping_remove(pmap, 0xFFFFFFFFFFFFF000LL);                             /* Remove final page explicitly because we might have mapped it */      
-       pmap_remove(pmap, 0, 0xFFFFFFFFFFFFF000LL);                             /* Remove all entries from this map */
+       mapping_remove(CEntry->vmmPmap, 0xFFFFF000);                    /* Remove final page explicitly because we might have mapped it */      
+       pmap_remove(CEntry->vmmPmap, 0, 0xFFFFF000);                    /* Remove all entries from this map */
        return;
 }
 
@@ -1082,36 +883,30 @@ void vmm_unmap_all_pages(
 
 boolean_t vmm_get_page_dirty_flag(
        thread_act_t                            act,
-       vmm_adsp_id_t           index,
-       addr64_t                        va,
+       vmm_thread_index_t      index,
+       vm_offset_t             va,
        unsigned int            reset)
 {
        vmmCntrlEntry           *CEntry;
        register mapping        *mpv, *mp;
        unsigned int            RC;
-       pmap_t                          pmap;
 
-       pmap = vmm_get_adsp(act, index);                                                /* Convert index to entry */            
-       if (!pmap) return 1;                                                                    /* Either this isn't vmm thread or the index is bogus */
+       CEntry = vmm_get_entry(act, index);                                             /* Convert index to entry */            
+       if (CEntry == NULL) return 1;                                                   /* Either this isn't vmm thread or the index is bogus */
        
-       RC = hw_test_rc(pmap, (addr64_t)va, reset);                             /* Fetch the RC bits and clear if requested */  
-
-       switch (RC & mapRetCode) {                                                              /* Decode return code */
-       
-               case mapRtOK:                                                                           /* Changed */
-                       return ((RC & (unsigned int)mpC) == (unsigned int)mpC); /* Return if dirty or not */
-                       break;
-       
-               case mapRtNotFnd:                                                                       /* Didn't find it */
-                       return 1;                                                                               /* Return dirty */
-                       break;
-                       
-               default:
-                       panic("vmm_get_page_dirty_flag: hw_test_rc failed - rc = %d, pmap = %08X, va = %016llX\n", RC, pmap, va);
-               
+       mp = hw_lock_phys_vir(CEntry->vmmPmap->space, va);              /* Look up the mapping */
+       if((unsigned int)mp & 1) {                                                              /* Did we timeout? */
+               panic("vmm_get_page_dirty_flag: timeout locking physical entry for alternate virtual address (%08X)\n", va);    /* Yeah, scream about it! */
+               return 1;                                                                                       /* Bad hair day, return dirty... */
        }
+       if(!mp) return 1;                                                                               /* Not mapped, return dirty... */
+       
+       RC = hw_test_rc(mp, reset);                                                             /* Fetch the RC bits and clear if requested */  
 
-       return 1;                                                                                               /* Return the change bit */
+       mpv = hw_cpv(mp);                                                                               /* Convert mapping block to virtual */
+       hw_unlock_bit((unsigned int *)&mpv->physent->phys_link, PHYS_LOCK);             /* We're done, unlock the physical entry */
+
+       return (RC & 1);                                                                                /* Return the change bit */
 }
 
 
@@ -1135,38 +930,32 @@ boolean_t vmm_get_page_dirty_flag(
 
 kern_return_t vmm_protect_page(
        thread_act_t            act,
-       vmm_adsp_id_t           index,
-       addr64_t                        va,
+       vmm_thread_index_t      index,
+       vm_offset_t             va,
        vm_prot_t                       prot)
 {
        vmmCntrlEntry           *CEntry;
-       addr64_t                        nextva;
-       int     ret;
-       pmap_t                          pmap;
-
-       pmap = vmm_get_adsp(act, index);                                                /* Convert index to entry */            
-       if (!pmap) return KERN_FAILURE;                                                 /* Either this isn't vmm thread or the index is bogus */
-       
-       ret = hw_protect(pmap, va, prot, &nextva);                              /* Try to change the protect here */
+       register mapping        *mpv, *mp;
+       unsigned int            RC;
 
-       switch (ret) {                                                                                  /* Decode return code */
+       CEntry = vmm_get_entry(act, index);                                             /* Convert index to entry */            
+       if (CEntry == NULL) return KERN_FAILURE;                                /* Either this isn't vmm thread or the index is bogus */
        
-               case mapRtOK:                                                                           /* All ok... */
-                       break;                                                                                  /* Outta here */
-                       
-               case mapRtNotFnd:                                                                       /* Didn't find it */
-                       return KERN_SUCCESS;                                                    /* Ok, return... */
-                       break;
-                       
-               default:
-                       panic("vmm_protect_page: hw_protect failed - rc = %d, pmap = %08X, va = %016llX\n", ret, pmap, (addr64_t)va);
-               
+       mp = hw_lock_phys_vir(CEntry->vmmPmap->space, va);              /* Look up the mapping */
+       if((unsigned int)mp & 1) {                                                              /* Did we timeout? */
+               panic("vmm_protect_page: timeout locking physical entry for virtual address (%08X)\n", va);     /* Yeah, scream about it! */
+               return 1;                                                                                       /* Bad hair day, return dirty... */
        }
+       if(!mp) return KERN_SUCCESS;                                                    /* Not mapped, just return... */
+       
+       hw_prot_virt(mp, prot);                                                                 /* Set the protection */        
 
-       if (!((per_proc_info[cpu_number()].spcFlags) & FamVMmode)) {
-               act->mact.vmmControl->vmmLastMap = va & 0xFFFFFFFFFFFFF000ULL;  /* Remember the last mapping we made */
-               act->mact.vmmControl->vmmGFlags = (act->mact.vmmControl->vmmGFlags & ~vmmLastAdSp) | index;     /* Remember last address space */
-       }
+       mpv = hw_cpv(mp);                                                                               /* Convert mapping block to virtual */
+       hw_unlock_bit((unsigned int *)&mpv->physent->phys_link, PHYS_LOCK);             /* We're done, unlock the physical entry */
+
+       CEntry->vmmLastMap = va & -PAGE_SIZE;                                   /* Remember the last mapping we changed */
+       if (!((per_proc_info[cpu_number()].spcFlags) & FamVMmode))
+               CEntry->vmmFlags |= vmmMapDone;                                         /* Set that we did a map operation */
 
        return KERN_SUCCESS;                                                                    /* Return */
 }
@@ -1178,10 +967,7 @@ kern_return_t vmm_protect_page(
 ** This function sets the protection bits of a mapped page
 ** and then directly starts executing.
 **
-**     See description of vmm_protect_page for details
-**
-** Inputs:
-**             See vmm_protect_page and vmm_map_execute
+**     See description of vmm_protect_page for details. 
 **
 ** Outputs:
 **             Normal exit is to run the VM.  Abnormal exit is triggered via a 
@@ -1192,33 +978,27 @@ kern_return_t vmm_protect_page(
 vmm_return_code_t vmm_protect_execute(
        thread_act_t            act,
        vmm_thread_index_t      index,
-       addr64_t                        va,
+       vm_offset_t             va,
        vm_prot_t                       prot)
 {
        kern_return_t           ret;
        vmmCntrlEntry           *CEntry;
-       unsigned int            adsp;
-       vmm_thread_index_t      cndx;
 
-       cndx = index & 0xFF;                                                    /* Clean it up */
-       CEntry = vmm_get_entry(act, cndx);                              /* Get and validate the index */
-       if (CEntry == NULL) return kVmmBogusContext;    /* Return bogus context */
-       
-       adsp = (index >> 8) & 0xFF;                                             /* Get any requested address space */
-       if(!adsp) adsp = (index & 0xFF);                                /* If 0, use context ID as address space ID */
+       CEntry = vmm_get_entry(act, index);                                     /* Get and validate the index */
+
+       if (CEntry == NULL) return kVmmBogusContext;            /* Return bogus context */
        
        if (((per_proc_info[cpu_number()].spcFlags) & FamVMmode) && (CEntry != act->mact.vmmCEntry))
                return kVmmBogusContext;                        /* Yes, invalid index in Fam */
        
-       ret = vmm_protect_page(act, adsp, va, prot);    /* Go try to change access */
+       ret = vmm_protect_page(act, index, va, prot);           /* Go try to change access */
        
        if(ret == KERN_SUCCESS) {
-               act->mact.vmmControl->vmmLastMap = va & 0xFFFFFFFFFFFFF000ULL;  /* Remember the last mapping we made */
-               act->mact.vmmControl->vmmGFlags = (act->mact.vmmControl->vmmGFlags & ~vmmLastAdSp) | cndx;      /* Remember last address space */
-               vmm_execute_vm(act, cndx);      /* Return was ok, launch the VM */
+               CEntry->vmmFlags |= vmmMapDone;                                 /* Set that we did a map operation */
+               vmm_execute_vm(act, index);                                             /* Return was ok, launch the VM */
        }
        
-       return ret;                                                                             /* We had trouble of some kind (shouldn't happen) */    
+       return kVmmInvalidAddress;                                                      /* We had trouble of some kind (shouldn't happen) */    
        
 }
 
@@ -1255,6 +1035,9 @@ kern_return_t vmm_get_float_state(
 
        fpu_save(&CEntry->vmmFacCtx);                                   /* Save context if live */
 
+       CEntry->vmmContextKern->vmm_proc_state.ppcFPSCRshadow.i[0] = CEntry->vmmContextKern->vmm_proc_state.ppcFPSCR.i[0];      /* Copy FPSCR */
+       CEntry->vmmContextKern->vmm_proc_state.ppcFPSCRshadow.i[1] = CEntry->vmmContextKern->vmm_proc_state.ppcFPSCR.i[1];      /* Copy FPSCR */
+       
        if(sv = CEntry->vmmFacCtx.FPUsave) {                    /* Is there context yet? */
                bcopy((char *)&sv->save_fp0, (char *)&(CEntry->vmmContextKern->vmm_proc_state.ppcFPRs), 32 * 8); /* 32 registers */
                return KERN_SUCCESS;
@@ -1301,6 +1084,10 @@ kern_return_t vmm_get_vector_state(
        act->mact.specFlags &= ~vectorCng;                              /* Clear the special flag */
        CEntry->vmmContextKern->vmmStat &= ~vmmVectCngd;        /* Clear the change indication */
        
+       for(j=0; j < 4; j++) {                                                  /* Set value for vscr */
+               CEntry->vmmContextKern->vmm_proc_state.ppcVSCRshadow.i[j] = CEntry->vmmContextKern->vmm_proc_state.ppcVSCR.i[j];
+       }
+
        if(sv = CEntry->vmmFacCtx.VMXsave) {                    /* Is there context yet? */
 
                vrvalidwrk = sv->save_vrvalid;                          /* Get the valid flags */
@@ -1379,10 +1166,6 @@ kern_return_t vmm_set_timer(
 **
 ** This function causes the timer for a specified VM to be
 ** returned in return_params[0] and return_params[1].
-** Note that this is kind of funky for 64-bit VMs because we
-** split the timer into two parts so that we still set parms 0 and 1.
-** Obviously, we don't need to do this because the parms are 8 bytes
-** wide.
 ** 
 **
 ** Inputs:
@@ -1404,18 +1187,14 @@ kern_return_t vmm_get_timer(
        CEntry = vmm_get_entry(act, index);                             /* Convert index to entry */            
        if (CEntry == NULL) return KERN_FAILURE;                /* Either this isn't vmm thread or the index is bogus */
 
-       if(CEntry->vmmXAFlgs & vmm64Bit) {                              /* A 64-bit virtual machine? */
-               CEntry->vmmContextKern->vmmRet.vmmrp64.return_params[0] = (uint32_t)(CEntry->vmmTimer >> 32);   /* Return the last timer value */
-               CEntry->vmmContextKern->vmmRet.vmmrp64.return_params[1] = (uint32_t)CEntry->vmmTimer;   /* Return the last timer value */
-       }
-       else {
-               CEntry->vmmContextKern->vmmRet.vmmrp32.return_params[0] = (CEntry->vmmTimer >> 32);     /* Return the last timer value */
-               CEntry->vmmContextKern->vmmRet.vmmrp32.return_params[1] = (uint32_t)CEntry->vmmTimer;   /* Return the last timer value */
-       }
+       CEntry->vmmContextKern->return_params[0] = (CEntry->vmmTimer >> 32);    /* Return the last timer value */
+       CEntry->vmmContextKern->return_params[1] = (uint32_t)CEntry->vmmTimer;  /* Return the last timer value */
+       
        return KERN_SUCCESS;
 }
 
 
+
 /*-----------------------------------------------------------------------
 ** vmm_timer_pop
 **
@@ -1453,7 +1232,7 @@ void vmm_timer_pop(
        CTable = act->mact.vmmControl;                                  /* Make this easier */  
        any = 0;                                                                                /* Haven't found a running unexpired timer yet */
        
-       for(cvi = 0; cvi < kVmmMaxContexts; cvi++) {    /* Cycle through all and check time now */
+       for(cvi = 0; cvi < kVmmMaxContextsPerThread; cvi++) {   /* Cycle through all and check time now */
 
                if(!(CTable->vmmc[cvi].vmmFlags & vmmInUse)) continue;  /* Do not check if the entry is empty */
                
@@ -1571,7 +1350,7 @@ int vmm_stop_vm(struct savearea *save)
                return 1;                                                               /* Return... */
        }
 
-       for(cvi = 0; cvi < kVmmMaxContexts; cvi++) {    /* Search slots */
+       for(cvi = 0; cvi < kVmmMaxContextsPerThread; cvi++) {   /* Search slots */
                if((0x80000000 & vmmask) && (CTable->vmmc[cvi].vmmFlags & vmmInUse)) {  /* See if we need to stop and if it is in use */
                        hw_atomic_or(&CTable->vmmc[cvi].vmmFlags, vmmXStop);    /* Set this one to stop */
                }
index c2af36c8600f596b1605d364b064a102dd80e6e9..de8bfbf58f5e960957ce91b79a0a2d0fe14227c2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 **
 ** C routines that we are adding to the MacOS X kernel.
 **
+** Wierd Apple PSL stuff goes here...
+**
+** Until then, Copyright 2000, Connectix
+**
 -----------------------------------------------------------------------*/
 
 #include <ppc/exception.h>
@@ -51,78 +52,44 @@ typedef union vmm_fp_register_t {
        unsigned char                   b[8];
 } vmm_fp_register_t;
 
+typedef struct vmm_processor_state_t {
 
-typedef struct vmm_regs32_t {
-
-       unsigned long                   ppcPC;                                          /* 000 */
-       unsigned long                   ppcMSR;                                         /* 004 */
-
-       unsigned long                   ppcGPRs[32];                            /* 008 */
-
-       unsigned long                   ppcCR;                                          /* 088 */
-       unsigned long                   ppcXER;                                         /* 08C */
-       unsigned long                   ppcLR;                                          /* 090 */
-       unsigned long                   ppcCTR;                                         /* 094 */
-       unsigned long                   ppcMQ;                                          /* 098 - Obsolete */
-       unsigned long                   ppcVRSave;                                      /* 09C */
-       unsigned long                   ppcRsrvd0A0[40];                        /* 0A0 */
-                                                                                                               /* 140 */
-} vmm_regs32_t;
-
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
-typedef struct vmm_regs64_t {
-
-       unsigned long long              ppcPC;                                          /* 000 */
-       unsigned long long              ppcMSR;                                         /* 008 */
+       unsigned long                   ppcPC;
+       unsigned long                   ppcMSR;
 
-       unsigned long long              ppcGPRs[32];                            /* 010 */
+       unsigned long                   ppcGPRs[32];
 
-       unsigned long long              ppcXER;                                         /* 110 */
-       unsigned long long              ppcLR;                                          /* 118 */
-       unsigned long long              ppcCTR;                                         /* 120 */
-       unsigned long                   ppcCR;                                          /* 128 */
-       unsigned long                   ppcVRSave;                                      /* 12C */
-       unsigned long                   ppcRsvd130[4];                          /* 130 */
-                                                                                                               /* 140 */
-} vmm_regs64_t;
-#pragma pack()
-       
-       
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
-typedef union vmm_regs_t {
-       vmm_regs32_t                    ppcRegs32;
-       vmm_regs64_t                    ppcRegs64;
-} vmm_regs_t;
-#pragma pack()
-
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
-typedef struct vmm_processor_state_t {
+       unsigned long                   ppcCR;
+       unsigned long                   ppcXER;
+       unsigned long                   ppcLR;
+       unsigned long                   ppcCTR;
+       unsigned long                   ppcMQ;                                          /* Obsolete */
+       unsigned long                   ppcVRSave;
                                                                                                                /* 32-byte bndry */
-       vmm_regs_t                              ppcRegs;                                        /* Define registers areas */
+       vmm_vector_register_t   ppcVSCR;
+       vmm_fp_register_t               ppcFPSCR;
+       
+       unsigned long                   ppcReserved1[34];                       /* Future processor state can go here */
        
 /*     We must be 16-byte aligned here */
 
-       vmm_vector_register_t   ppcVRs[32];                                     /* These are only valid after a kVmmGetVectorState */
-       vmm_vector_register_t   ppcVSCR;                                        /* This is always loaded/saved at host/guest transition */
+       vmm_vector_register_t   ppcVRs[32];
+       vmm_vector_register_t   ppcVSCRshadow;
        
 /*     We must be 8-byte aligned here */
 
-       vmm_fp_register_t               ppcFPRs[32];                            /* These are only valid after a kVmmGetFloatState */
-       vmm_fp_register_t               ppcFPSCR;                                       /* This is always loaded/saved at host/guest transition */
+       vmm_fp_register_t               ppcFPRs[32];
+       vmm_fp_register_t               ppcFPSCRshadow;
        unsigned long                   ppcReserved2[2];                        /* Pad out to multiple of 16 bytes */
 } vmm_processor_state_t;
-#pragma pack()
 
 typedef unsigned long vmm_return_code_t;
 
 typedef unsigned long vmm_thread_index_t;
-#define vmmTInum 0x000000FF
-#define vmmTIadsp 0x0000FF00
-typedef unsigned long vmm_adsp_id_t;
 
 enum {
        kVmmCurMajorVersion                                     = 0x0001,
-       kVmmCurMinorVersion                                     = 0x0006,
+       kVmmCurMinorVersion                                     = 0x0005,
        kVmmMinMajorVersion                                     = 0x0001,
 };
 #define kVmmCurrentVersion ((kVmmCurMajorVersion << 16) | kVmmCurMinorVersion)
@@ -134,38 +101,17 @@ enum {
        kVmmFeature_ExtendedMapping                     = 0x00000004,
        kVmmFeature_ListMapping                         = 0x00000008,
        kVmmFeature_FastAssist                          = 0x00000010,
-       kVmmFeature_XA                                          = 0x00000020,
-       kVmmFeature_SixtyFourBit                        = 0x00000040,
-       kVmmFeature_MultAddrSpace                       = 0x00000080,
-};
-#define kVmmCurrentFeatures (kVmmFeature_LittleEndian | kVmmFeature_Stop | kVmmFeature_ExtendedMapping \
-       | kVmmFeature_ListMapping | kVmmFeature_FastAssist | kVmmFeature_XA | kVmmFeature_MultAddrSpace)
-
-enum {
-       vmm64Bit                                                        = 0x80000000,
 };
+#define kVmmCurrentFeatures (kVmmFeature_LittleEndian |                 \
+                                                       kVmmFeature_Stop |                               \
+                                                       kVmmFeature_ExtendedMapping |    \
+                                                       kVmmFeature_ListMapping |                \
+                                                       kVmmFeature_FastAssist)
 
 
 typedef unsigned long vmm_version_t;
 
-typedef struct vmm_ret_parms32_t {
-       unsigned long                   return_params[4];
-} vmm_ret_parms32_t;
-
-typedef struct vmm_ret_parms64_t {
-       unsigned long long              return_params[4];
-} vmm_ret_parms64_t;
-
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
-typedef union vmm_ret_parms_t {
-       vmm_ret_parms64_t               vmmrp64;                /* 64-bit flavor */
-       vmm_ret_parms32_t               vmmrp32;                /* 32-bit flavor */
-       unsigned int                    retgas[11];             /* Force this to be 11 words long */
-} vmm_ret_parms_t;
-#pragma pack()
-
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
-typedef struct vmm_fastassist_state32_t {
+typedef struct vmm_fastassist_state_t {
        unsigned long fastassist_dispatch;
        unsigned long fastassist_refcon;
 
@@ -179,31 +125,8 @@ typedef struct vmm_fastassist_state32_t {
 
        unsigned long fastassist_intercepts;
        unsigned long fastassist_reserved1;
-} vmm_fastassist_state32_t;
-
-typedef struct vmm_fastassist_state64_t {
-       unsigned long long fastassist_dispatch;
-       unsigned long long fastassist_refcon;
-
-       unsigned long long fastassist_dispatch_code;
-       unsigned long long fastassist_parameter[5];
-
-       unsigned long long guest_register[8];
-
-       unsigned long long guest_pc;
-       unsigned long long guest_msr;
-
-       unsigned long fastassist_intercepts;
-       unsigned long fastassist_reserved1;
-} vmm_fastassist_state64_t;
-
-typedef union vmm_fastassist_state_t {
-       vmm_fastassist_state64_t                vmmfs64;                /* 64-bit flavor */
-       vmm_fastassist_state32_t                vmmfs32;                /* 32-bit flavor */
 } vmm_fastassist_state_t;
-#pragma pack()
 
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
 typedef struct vmm_state_page_t {
        /* This structure must remain below 4Kb (one page) in size */
        vmm_version_t                   interface_version;
@@ -228,7 +151,8 @@ typedef struct vmm_state_page_t {
 #define vmmFamSetb             7
 
        vmm_return_code_t               return_code;
-       vmm_ret_parms_t                 vmmRet;
+       unsigned long                   return_params[4];
+       unsigned long                   gas[7];         /* For alignment */
 
        /* The next portion of the structure must remain 32-byte aligned */
        vmm_processor_state_t   vmm_proc_state;
@@ -237,9 +161,7 @@ typedef struct vmm_state_page_t {
        vmm_fastassist_state_t  vmm_fastassist_state;
 
 } vmm_state_page_t;
-#pragma pack()
 
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
 typedef struct vmm_comm_page_t {
        union {
                vmm_state_page_t        vmcpState;                                      /* Reserve area for state */
@@ -247,48 +169,33 @@ typedef struct vmm_comm_page_t {
        } vmcpfirst;
        unsigned int                    vmcpComm[256];                          /* Define last 1024 bytes as a communications area - function specific */
 } vmm_comm_page_t;
-#pragma pack()
 
 enum {
        /* Function Indices (passed in r3) */
-       kVmmGetVersion                          = 0,                                    /* Get VMM system version */
-       kVmmvGetFeatures,                                                                       /* Get VMM supported features */
-       kVmmInitContext,                                                                        /* Initialize a context */
-       kVmmTearDownContext,                                                            /* Destroy a context */
-       kVmmTearDownAll,                                                                        /* Destory all contexts */
-       kVmmMapPage,                                                                            /* Map a host to guest address space */
-       kVmmGetPageMapping,                                                                     /* Get host address of a guest page */
-       kVmmUnmapPage,                                                                          /* Unmap a guest page */
-       kVmmUnmapAllPages,                                                                      /* Unmap all pages in a guest address space */
-       kVmmGetPageDirtyFlag,                                                           /* Check if guest page modified */
-       kVmmGetFloatState,                                                                      /* Retrieve guest floating point context */
-       kVmmGetVectorState,                                                                     /* Retrieve guest vector context */
-       kVmmSetTimer,                                                                           /* Set a guest timer */
-       kVmmGetTimer,                                                                           /* Get a guest timer */
-       kVmmExecuteVM,                                                                          /* Launch a guest */
-       kVmmProtectPage,                                                                        /* Set protection attributes for a guest page */
-       kVmmMapExecute,                                                                         /* Map guest page and launch */
-       kVmmProtectExecute,                                                                     /* Set prot attributes and launch */
-       kVmmMapList,                                                                            /* Map a list of pages into guest address spaces */
-       kVmmUnmapList,                                                                          /* Unmap a list of pages from guest address spaces */
+       kVmmGetVersion                          = 0,
+       kVmmvGetFeatures,
+       kVmmInitContext,
+       kVmmTearDownContext,
+       kVmmTearDownAll,
+       kVmmMapPage,
+       kVmmGetPageMapping,
+       kVmmUnmapPage,
+       kVmmUnmapAllPages,
+       kVmmGetPageDirtyFlag,
+       kVmmGetFloatState,
+       kVmmGetVectorState,
+       kVmmSetTimer,
+       kVmmGetTimer,
+       kVmmExecuteVM,
+       kVmmProtectPage,
+       kVmmMapExecute,
+       kVmmProtectExecute,
+       kVmmMapList,
+       kVmmUnmapList,
        kvmmExitToHost,
        kvmmResumeGuest,
        kvmmGetGuestRegister,
        kvmmSetGuestRegister,
-       
-       kVmmSetXA,                                                                                      /* Set extended architecture features for a VM */
-       kVmmGetXA,                                                                                      /* Get extended architecture features from a VM */
-
-       kVmmMapPage64,                                                                          /* Map a host to guest address space - supports 64-bit */
-       kVmmGetPageMapping64,                                                           /* Get host address of a guest page - supports 64-bit  */
-       kVmmUnmapPage64,                                                                        /* Unmap a guest page - supports 64-bit  */
-       kVmmGetPageDirtyFlag64,                                                         /* Check if guest page modified - supports 64-bit  */
-       kVmmProtectPage64,                                                                      /* Set protection attributes for a guest page - supports 64-bit */
-       kVmmMapExecute64,                                                                       /* Map guest page and launch - supports 64-bit  */
-       kVmmProtectExecute64,                                                           /* Set prot attributes and launch - supports 64-bit  */
-       kVmmMapList64,                                                                          /* Map a list of pages into guest address spaces - supports 64-bit  */
-       kVmmUnmapList64,                                                                        /* Unmap a list of pages from guest address spaces - supports 64-bit  */
-       kVmmMaxAddr,                                                                            /* Returns the maximum virtual address that is mappable  */
 };
 
 #define kVmmReturnNull                                 0
@@ -301,37 +208,7 @@ enum {
 #define kVmmReturnSystemCall                   12
 #define kVmmReturnTraceException               13
 #define kVmmAltivecAssist                              22
-#define kVmmInvalidAddress                             0x1000
-#define kVmmInvalidAdSpace                             0x1001
-
-/*
- *     Notes on guest address spaces.
- *
- *     Address spaces are loosely coupled to virtual machines.  The default is for
- *     a guest with an index of 1 to use address space 1, 2 to use 2, etc.  However,
- *     any guest may be launched using any address space and any address space may be the
- *     target for a map or unmap function.  Note that the (un)map list functions may pass in
- *     an address space ID on a page-by-page basis.
- *     
- *     An address space is instantiated either explicitly by mapping something into it, or 
- *     implicitly by launching a guest with it.
- *
- *     An address space is destroyed explicitly by kVmmTearDownAll or kVmmUnmapAllPages.  It is
- *     destroyed implicitly by kVmmTearDownContext.  The latter is done in order to remain
- *     backwards compatible with the previous implementation, which does not have decoupled
- *     guests and address spaces.
- *
- *     An address space supports the maximum virtual address supported by the processor.  
- *     The 64-bit variant of the mapping functions can be used on non-64-bit machines.  If an
- *     unmappable address (e.g., an address larger than 4GB-1 on a 32-bit machine) is requested, 
- *     the operation fails with a kVmmInvalidAddress return code.
- *
- *     Note that for 64-bit calls, both host and guest are specified at 64-bit values.
- *
- */
-
-
-
+#define kVmmInvalidAddress                             4096
 
 /*
  *     Storage Extended Protection modes
@@ -356,45 +233,25 @@ enum {
 #define kVmmProtRORO (kVmmProtXtnd | 0x00000003)
 
 /*
- *     Map list formats
- *     The last 12 bits in the guest virtual address is used as flags as follows:
- *             0x007 - for the map calls, this is the key to set
- *             0x3F0 - for both map and unmap, this is the address space ID upon which to operate.
- *                             Note that if 0, the address space ID from the function call is used instead.
+ *     Map list format
  */
 
-typedef struct vmmMList {
-       unsigned int    vmlva;                  /* Virtual address in host address space */
-       unsigned int    vmlava;                 /* Virtual address in guest address space */
-} vmmMList;
-
-typedef struct vmmMList64 {
-       unsigned long long      vmlva;          /* Virtual address in host address space */
-       unsigned long long      vmlava;         /* Virtual address in guest address space */
-} vmmMList64;
-
-typedef struct vmmUMList {
-       unsigned int    vmlava;                 /* Virtual address in guest address space */
-} vmmUMList;
-
-typedef struct vmmUMList64 {
-       unsigned long long      vmlava;         /* Virtual address in guest address space */
-} vmmUMList64;
+typedef struct vmmMapList {
+       unsigned int    vmlva;                  /* Virtual address in emulator address space */
+       unsigned int    vmlava;                 /* Virtual address in alternate address space */
+#define vmlFlgs 0x00000FFF                     /* Flags passed in in vmlava low order 12 bits */
+#define vmlProt 0x00000003                     /* Protection flags for the page */
+} vmmMapList;
 
-#define vmmlFlgs 0x00000FFF                    /* Flags passed in in vmlava low order 12 bits */
-#define vmmlProt 0x00000007                    /* Protection flags for the page */
-#define vmmlAdID 0x000003F0                    /* Guest address space ID - used only if non-zero */
-#define vmmlRsvd 0x00000C08                    /* Reserved for future */
 
 /*************************************************************************************
        Internal Emulation Types
 **************************************************************************************/
 
-#define kVmmMaxContexts                                        32
+#define kVmmMaxContextsPerThread               32
 #define kVmmMaxUnmapPages                              64
 #define kVmmMaxMapPages                                        64
 
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
 typedef struct vmmCntrlEntry {                                         /* Virtual Machine Monitor control table entry */
        unsigned int    vmmFlags;                                               /* Assorted control flags */
 #define vmmInUse               0x80000000
@@ -405,32 +262,27 @@ typedef struct vmmCntrlEntry {                                            /* Virtual Machine Monitor control table ent
 #define vmmVectCngdb   2
 #define vmmTimerPop            0x10000000
 #define vmmTimerPopb   3
+#define vmmMapDone             0x08000000
+#define vmmMapDoneb            4
 #define vmmFAMmode             0x04000000
 #define vmmFAMmodeb            5
 #define vmmXStop               0x00800000
 #define vmmXStopb              8
 #define vmmSpfSave             0x000000FF
 #define vmmSpfSaveb            24
-       unsigned int    vmmXAFlgs;                                              /* Extended Architecture flags */
+       pmap_t                  vmmPmap;                                                /* pmap for alternate context's view of task memory */
        vmm_state_page_t *vmmContextKern;                               /* Kernel address of context communications area */
-       ppnum_t                 vmmContextPhys;                         /* Physical address of context communications area */
+       vmm_state_page_t *vmmContextPhys;                               /* Physical address of context communications area */
        vmm_state_page_t *vmmContextUser;                               /* User address of context communications area */
        facility_context vmmFacCtx;                                             /* Header for vector and floating point contexts */
-       pmap_t                  vmmPmap;                                                /* Last dispatched pmap */
        uint64_t                vmmTimer;                                               /* Last set timer value. Zero means unset */
+       vm_offset_t             vmmLastMap;                                             /* Last vaddr mapping into virtual machine */
        unsigned int    vmmFAMintercept;                                /* FAM intercepted exceptions */
 } vmmCntrlEntry;
-#pragma pack()
 
-#pragma pack(4)                                                        /* Make sure the structure stays as we defined it */
 typedef struct vmmCntrlTable {                                         /* Virtual Machine Monitor Control table */
-       unsigned int    vmmGFlags;                                              /* Global flags */
-#define vmmLastAdSp 0xFF                                                       /* Remember the address space that was mapped last */
-       addr64_t                vmmLastMap;                                             /* Last vaddr mapping made */
-       vmmCntrlEntry   vmmc[kVmmMaxContexts];                  /* One entry for each possible Virtual Machine Monitor context */
-       pmap_t                  vmmAdsp[kVmmMaxContexts];               /* Guest address space pmaps */
+       vmmCntrlEntry   vmmc[kVmmMaxContextsPerThread]; /* One entry for each possible Virtual Machine Monitor context */
 } vmmCntrlTable;
-#pragma pack()
 
 /* function decls for kernel level routines... */
 extern void vmm_execute_vm(thread_act_t act, vmm_thread_index_t index);
@@ -441,22 +293,20 @@ extern kern_return_t vmm_get_vector_state(thread_act_t act, vmm_thread_index_t i
 extern kern_return_t vmm_set_timer(thread_act_t act, vmm_thread_index_t index, unsigned int timerhi, unsigned int timerlo);
 extern kern_return_t vmm_get_timer(thread_act_t act, vmm_thread_index_t index);
 extern void vmm_tear_down_all(thread_act_t act);
-extern kern_return_t vmm_map_page(thread_act_t act, vmm_thread_index_t hindex, addr64_t cva,
-       addr64_t ava, vm_prot_t prot);
-extern vmm_return_code_t vmm_map_execute(thread_act_t act, vmm_thread_index_t hindex, addr64_t cva,
-       addr64_t ava, vm_prot_t prot);
-extern kern_return_t vmm_protect_page(thread_act_t act, vmm_thread_index_t hindex, addr64_t va,
+extern kern_return_t vmm_map_page(thread_act_t act, vmm_thread_index_t hindex, vm_offset_t cva,
+       vm_offset_t ava, vm_prot_t prot);
+extern vmm_return_code_t vmm_map_execute(thread_act_t act, vmm_thread_index_t hindex, vm_offset_t cva,
+       vm_offset_t ava, vm_prot_t prot);
+extern kern_return_t vmm_protect_page(thread_act_t act, vmm_thread_index_t hindex, vm_offset_t va,
        vm_prot_t prot);
-extern vmm_return_code_t vmm_protect_execute(thread_act_t act, vmm_thread_index_t hindex, addr64_t va,
+extern vmm_return_code_t vmm_protect_execute(thread_act_t act, vmm_thread_index_t hindex, vm_offset_t va,
        vm_prot_t prot);
-extern addr64_t vmm_get_page_mapping(thread_act_t act, vmm_thread_index_t index,
-       addr64_t va);
-extern kern_return_t vmm_unmap_page(thread_act_t act, vmm_thread_index_t index, addr64_t va);
+extern vm_offset_t vmm_get_page_mapping(thread_act_t act, vmm_thread_index_t index,
+       vm_offset_t va);
+extern kern_return_t vmm_unmap_page(thread_act_t act, vmm_thread_index_t index, vm_offset_t va);
 extern void vmm_unmap_all_pages(thread_act_t act, vmm_thread_index_t index);
 extern boolean_t vmm_get_page_dirty_flag(thread_act_t act, vmm_thread_index_t index,
-       addr64_t va, unsigned int reset);
-extern kern_return_t vmm_set_XA(thread_act_t act, vmm_thread_index_t index, unsigned int xaflags);
-extern unsigned int vmm_get_XA(thread_act_t act, vmm_thread_index_t index);
+       vm_offset_t va, unsigned int reset);
 extern int vmm_get_features(struct savearea *);
 extern int vmm_get_version(struct savearea *);
 extern int vmm_init_context(struct savearea *);
@@ -466,14 +316,13 @@ extern void vmm_force_exit(thread_act_t act, struct savearea *);
 extern int vmm_stop_vm(struct savearea *save);
 extern void vmm_timer_pop(thread_act_t act);
 extern void vmm_interrupt(ReturnHandler *rh, thread_act_t act);
-extern kern_return_t vmm_map_list(thread_act_t act, vmm_thread_index_t index, unsigned int cnt, unsigned int flavor);
-extern kern_return_t vmm_unmap_list(thread_act_t act, vmm_thread_index_t index, unsigned int cnt, unsigned int flavor);
+extern kern_return_t vmm_map_list(thread_act_t act, vmm_thread_index_t index, unsigned int cnt);
+extern kern_return_t vmm_unmap_list(thread_act_t act, vmm_thread_index_t index, unsigned int cnt);
 extern vmm_return_code_t vmm_resume_guest(vmm_thread_index_t index, unsigned long pc, 
        unsigned long vmmCntrl, unsigned long vmmCntrMaskl);
 extern vmm_return_code_t vmm_exit_to_host(vmm_thread_index_t index);
 extern unsigned long vmm_get_guest_register(vmm_thread_index_t index, unsigned long reg_index);
 extern vmm_return_code_t vmm_set_guest_register(vmm_thread_index_t index, unsigned long reg_index, unsigned long reg_value);
-extern addr64_t vmm_max_addr(thread_act_t act);
 
 #endif
 
index 1a4a673812557a7551522442f999af2bb1be17a0..e3d8f494ea1d1f6cae9fbcada0231e8847d742fb 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -33,9 +30,6 @@
  *     facility.
  */
 
-#define vmmMapDone 31
-#define vmmDoing64 30
-
 
 /*
  *     int vmm_dispatch(savearea, act);
@@ -50,7 +44,7 @@
  *             R30 = current savearea
  */
  
-                       .align  5                                                                                               ; Line up on cache line
+                       .align  5                                                               /* Line up on cache line */
                        .globl  EXT(vmm_dispatch_table)
 
 LEXT(vmm_dispatch_table)
@@ -68,15 +62,15 @@ LEXT(vmm_dispatch_table)
                        .long   0                                                                                               ; Not valid in Fam
                        .long   EXT(vmm_tear_down_all)                                                  ; Tears down all VMMs 
                        .long   0                                                                                               ; Not valid in Fam
-                       .long   EXT(vmm_map_page32)                                                             ; Maps a page from the main address space into the VM space - supports 32-bit
+                       .long   EXT(vmm_map_page)                                                               ; Maps a page from the main address space into the VM space 
                        .long   1                                                                                               ; Valid in Fam
-                       .long   EXT(vmm_get_page_mapping32)                                             ; Returns client va associated with VM va - supports 32-bit
+                       .long   EXT(vmm_get_page_mapping)                                               ; Returns client va associated with VM va
                        .long   1                                                                                               ; Valid in Fam
-                       .long   EXT(vmm_unmap_page32)                                                   ; Unmaps a page from the VM space - supports 32-bit
+                       .long   EXT(vmm_unmap_page)                                                             ; Unmaps a page from the VM space
                        .long   1                                                                                               ; Valid in Fam
-                       .long   EXT(vmm_unmap_all_pages)                                                ; Unmaps all pages from the VM space
+                       .long   EXT(vmm_unmap_all_pages)                                                ; Unmaps all pages from the VM space 
                        .long   1                                                                                               ; Valid in Fam
-                       .long   EXT(vmm_get_page_dirty_flag32)                                  ; Gets the change bit for a page and optionally clears it - supports 32-bit
+                       .long   EXT(vmm_get_page_dirty_flag)                                    ; Gets the change bit for a page and optionally clears it
                        .long   1                                                                                               ; Valid in Fam
                        .long   EXT(vmm_get_float_state)                                                ; Gets current floating point state
                        .long   0                                                                                               ; not valid in Fam
@@ -88,15 +82,15 @@ LEXT(vmm_dispatch_table)
                        .long   1                                                                                               ; Valid in Fam
                        .long   EXT(switchIntoVM)                                                               ; Switches to the VM context
                        .long   1                                                                                               ; Valid in Fam
-                       .long   EXT(vmm_protect_page32)                                                 ; Sets protection values for a page - supports 32-bit
+                       .long   EXT(vmm_protect_page)                                                   ; Sets protection values for a page
                        .long   1                                                                                               ; Valid in Fam
-                       .long   EXT(vmm_map_execute32)                                                  ; Maps a page an launches VM - supports 32-bit
+                       .long   EXT(vmm_map_execute)                                                    ; Maps a page an launches VM
                        .long   1                                                                                               ; Not valid in Fam
-                       .long   EXT(vmm_protect_execute32)                                              ; Sets protection values for a page and launches VM - supports 32-bit
+                       .long   EXT(vmm_protect_execute)                                                ; Sets protection values for a page and launches VM
                        .long   1                                                                                               ; Valid in Fam
-                       .long   EXT(vmm_map_list32)                                                             ; Maps a list of pages - supports 32-bit
+                       .long   EXT(vmm_map_list)                                                               ; Maps a list of pages
                        .long   1                                                                                               ; Valid in Fam
-                       .long   EXT(vmm_unmap_list32)                                                   ; Unmaps a list of pages - supports 32-bit
+                       .long   EXT(vmm_unmap_list)                                                             ; Unmaps a list of pages
                        .long   1                                                                                               ; Valid in Fam
                        .long   EXT(vmm_fam_reserved)                                                   ; exit from Fam to host
                        .long   1                                                                                               ; Valid in Fam
@@ -106,31 +100,6 @@ LEXT(vmm_dispatch_table)
                        .long   1                                                                                               ; Valid in Fam
                        .long   EXT(vmm_fam_reserved)                                                   ; Set guest register from Fam
                        .long   1                                                                                               ; Valid in Fam
-                       .long   EXT(vmm_set_XA)                                                                 ; Set extended architecture features for a VM 
-                       .long   0                                                                                               ; Not valid in Fam
-                       .long   EXT(vmm_get_XA)                                                                 ; Get extended architecture features from a VM 
-                       .long   1                                                                                               ; Valid in Fam
-                       .long   EXT(vmm_map_page)                                                               ; Map a host to guest address space - supports 64-bit 
-                       .long   1                                                                                               ; Valid in Fam
-                       .long   EXT(vmm_get_page_mapping)                                               ; Get host address of a guest page - supports 64-bit 
-                       .long   1                                                                                               ; Valid in Fam
-                       .long   EXT(vmm_unmap_page)                                                             ; Unmap a guest page - supports 64-bit 
-                       .long   1                                                                                               ; Valid in Fam
-                       .long   EXT(vmm_get_page_dirty_flag)                                    ; Check if guest page modified - supports 64-bit 
-                       .long   1                                                                                               ; Valid in Fam
-                       .long   EXT(vmm_protect_page)                                                   ; Sets protection values for a page - supports 64-bit
-                       .long   1                                                                                               ; Valid in Fam
-                       .long   EXT(vmm_map_execute)                                                    ; Map guest page and launch - supports 64-bit 
-                       .long   1                                                                                               ; Valid in Fam
-                       .long   EXT(vmm_protect_execute)                                                ; Set prot attributes and launch - supports 64-bit 
-                       .long   1                                                                                               ; Valid in Fam
-                       .long   EXT(vmm_map_list64)                                                             ; Map a list of pages into guest address spaces - supports 64-bit 
-                       .long   1                                                                                               ; Valid in Fam
-                       .long   EXT(vmm_unmap_list64)                                                   ; Unmap a list of pages from guest address spaces - supports 64-bit 
-                       .long   1                                                                                               ; Valid in Fam
-                       .long   EXT(vmm_max_addr)                                                               ; Returns the maximum virtual address 
-                       .long   1                                                                                               ; Valid in Fam
-
 
                        .set    vmm_count,(.-EXT(vmm_dispatch_table))/8                 ; Get the top number
 
@@ -140,16 +109,16 @@ LEXT(vmm_dispatch_table)
 
 LEXT(vmm_dispatch)
 
-                       lwz             r11,saver3+4(r30)                       ; Get the selector
+                       lwz             r11,saver3(r30)                         ; Get the selector
                        mr              r3,r4                                           ; All of our functions want the activation as the first parm
                        lis             r10,hi16(EXT(vmm_dispatch_table))       ; Get top half of table
                        cmplwi  r11,kVmmExecuteVM                       ; Should we switch to the VM now?
                        cmplwi  cr1,r11,vmm_count                       ; See if we have a valid selector
                        ori             r10,r10,lo16(EXT(vmm_dispatch_table))   ; Get low half of table
-                       lwz             r4,saver4+4(r30)                        ; Get 1st parameter after selector
+                       lwz             r4,saver4(r30)                          ; Get 1st parameter after selector
                        beq+    EXT(switchIntoVM)                       ; Yes, go switch to it....
                        rlwinm  r11,r11,3,0,28                          ; Index into table
-                       bge-    cr1,vmmBogus                            ; It is a bogus entry
+                       bgt-    cr1,vmmBogus                            ; It is a bogus entry
                        add             r12,r10,r11                                     ; Get the vmm dispatch syscall entry
                        mfsprg  r10,0                                           ; Get the per_proc
                        lwz             r13,0(r12)                                      ; Get address of routine
@@ -159,24 +128,19 @@ LEXT(vmm_dispatch)
                        rlwinm. r5,r5,0,FamVMmodebit,FamVMmodebit       ; Test FamVMmodebit
                        crand   cr0_eq,cr1_eq,cr0_gt            ; In Fam and Invalid syscall    
                        beq             vmmBogus                                        ; Intercept to host
-                       lwz             r5,saver5+4(r30)                        ; Get 2nd parameter after selector - note that some of these parameters may actually be long longs
-                       lwz             r6,saver6+4(r30)                        ; Get 3rd parameter after selector
+                       lwz             r5,saver5(r30)                          ; Get 2nd parameter after selector
+                       lwz             r6,saver6(r30)                          ; Get 3rd parameter after selector
                        mtlr    r13                                                     ; Set the routine address
-                       lwz             r7,saver7+4(r30)                        ; Get 4th parameter after selector
-                       lwz             r8,saver8+4(r30)                        ; Get 5th parameter after selector
-                       lwz             r9,saver9+4(r30)                        ; Get 6th parameter after selector
+                       lwz             r7,saver7(r30)                          ; Get 4th parameter after selector
 ;
-;                      NOTE: some of the above parameters are actually long longs.  We have glue code that transforms
-;                      all needed parameters and/or adds 32-/64-bit flavors to the needed functions.
+;                      NOTE: currently the most paramters for any call is 4.  We will support at most 8 because we
+;                      do not want to get into any stack based parms.  However, here is where we need to add
+;                      code for the 5th - 8th parms if we need them.
 ;                      
 
                        blrl                                                            ; Call function
-
-vmmRetPt:      li              r0,0                                            ; Clear this out                        
-                       stw             r0,saver3(r30)                          ; Make sure top of RC is clear
-                       stw             r3,saver3+4(r30)                        ; Pass back the return code
-                       stw             r0,saver4(r30)                          ; Make sure bottom of RC is clear (just in case)
-                       stw             r4,saver4+4(r30)                        ; Pass back the bottom return code (just in case)
+                       
+                       stw             r3,saver3(r30)                          ; Pass back the return code
                        li              r3,1                                            ; Set normal return with check for AST
                        b               EXT(ppcscret)                           ; Go back to handler...
                        
@@ -215,113 +179,18 @@ LEXT(vmm_get_features_sel)                                               ; Selector based version of get features
 
 LEXT(vmm_init_context_sel)                                             ; Selector based version of init context
 
-                       lwz             r4,saver4+4(r30)                        ; Get the passed in version
-                       lwz             r5,saver5+4(r30)                        ; Get the passed in comm area
+                       lwz             r4,saver4(r30)                          ; Get the passed in version
+                       lwz             r5,saver5(r30)                          ; Get the passed in comm area
                        lis             r3,hi16(EXT(vmm_init_context))
-                       stw             r4,saver3+4(r30)                        ; Cheat and move this parameter over
+                       stw             r4,saver3(r30)                          ; Cheat and move this parameter over
                        ori             r3,r3,lo16(EXT(vmm_init_context))
-                       stw             r5,saver4+4(r30)                        ; Cheat and move this parameter over
+                       stw             r5,saver4(r30)                          ; Cheat and move this parameter over
 
 selcomm:       mtlr    r3                                                      ; Set the real routine address
                        mr              r3,r30                                          ; Pass in the savearea
                        blrl                                                            ; Call the function
                        b               EXT(ppcscret)                           ; Go back to handler...
 
-                       .align  5
-                       .globl  EXT(vmm_map_page32)
-
-LEXT(vmm_map_page32)
-                       mr              r9,r7                                                                                   ; Move prot to correct parm
-                       mr              r8,r6                                                                                   ; Move guest address to low half of long long
-                       li              r7,0                                                                                    ; Clear high half of guest address
-                       mr              r6,r5                                                                                   ; Move host address to low half of long long
-                       li              r5,0                                                                                    ; Clear high half of host address
-                       b               EXT(vmm_map_page)                                                               ; Transition to real function...
-
-                       .align  5
-                       .globl  EXT(vmm_get_page_mapping32)
-
-LEXT(vmm_get_page_mapping32)
-                       mr              r6,r5                                                                                   ; Move guest address to low half of long long
-                       li              r5,0                                                                                    ; Clear high half of guest address
-                       bl              EXT(vmm_get_page_mapping)                                               ; Transition to real function...
-                       mr              r3,r4                                                                                   ; Convert addr64_t to vm_offset_t, dropping top half
-                       b               vmmRetPt                                                                                ; Join normal return...
-
-                       .align  5
-                       .globl  EXT(vmm_unmap_page32)
-
-LEXT(vmm_unmap_page32)
-                       mr              r6,r5                                                                                   ; Move guest address to low half of long long
-                       li              r5,0                                                                                    ; Clear high half of guest address
-                       b               EXT(vmm_unmap_page)                                                             ; Transition to real function...
-
-                       .align  5
-                       .globl  EXT(vmm_get_page_dirty_flag32)
-
-LEXT(vmm_get_page_dirty_flag32)
-                       mr              r7,r6                                                                                   ; Move reset flag
-                       mr              r6,r5                                                                                   ; Move guest address to low half of long long
-                       li              r5,0                                                                                    ; Clear high half of guest address
-                       b               EXT(vmm_get_page_dirty_flag)                                    ; Transition to real function...
-
-                       .align  5
-                       .globl  EXT(vmm_protect_page32)
-
-LEXT(vmm_protect_page32)
-                       mr              r7,r6                                                                                   ; Move protection bits
-                       mr              r6,r5                                                                                   ; Move guest address to low half of long long
-                       li              r5,0                                                                                    ; Clear high half of guest address
-                       b               EXT(vmm_protect_page)                                                   ; Transition to real function...
-
-                       .align  5
-                       .globl  EXT(vmm_map_execute32)
-
-LEXT(vmm_map_execute32)
-                       mr              r9,r7                                                                                   ; Move prot to correct parm
-                       mr              r8,r6                                                                                   ; Move guest address to low half of long long
-                       li              r7,0                                                                                    ; Clear high half of guest address
-                       mr              r6,r5                                                                                   ; Move host address to low half of long long
-                       li              r5,0                                                                                    ; Clear high half of host address
-                       b               EXT(vmm_map_execute)                                                    ; Transition to real function...
-
-                       .align  5
-                       .globl  EXT(vmm_protect_execute32)
-                       
-LEXT(vmm_protect_execute32)
-                       mr              r7,r6                                                                                   ; Move protection bits
-                       mr              r6,r5                                                                                   ; Move guest address to low half of long long
-                       li              r5,0                                                                                    ; Clear high half of guest address
-                       b               EXT(vmm_protect_execute)                                                ; Transition to real function...
-
-                       .align  5
-                       .globl  EXT(vmm_map_list32)
-                       
-LEXT(vmm_map_list32)
-                       li              r6,0                                                                                    ; Set 32-bit flavor
-                       b               EXT(vmm_map_list)                                                               ; Go to common routine...
-
-                       .align  5
-                       .globl  EXT(vmm_map_list64)
-                       
-LEXT(vmm_map_list64)
-                       li              r6,1                                                                                    ; Set 64-bit flavor
-                       b               EXT(vmm_map_list)                                                               ; Go to common routine...
-
-                       .align  5
-                       .globl  EXT(vmm_map_list32)
-                       
-LEXT(vmm_unmap_list32)
-                       li              r6,0                                                                                    ; Set 32-bit flavor
-                       b               EXT(vmm_unmap_list)                                                             ; Go to common routine...
-
-                       .align  5
-                       .globl  EXT(vmm_map_list64)
-                       
-LEXT(vmm_unmap_list64)
-                       li              r6,1                                                                                    ; Set 64-bit flavor
-                       b               EXT(vmm_unmap_list)                                                             ; Go to common routine...
-
 /*
  *                     Here is where we transition to the virtual machine.
  *
@@ -336,6 +205,12 @@ LEXT(vmm_unmap_list64)
  *                     calls.  This is called, but never returned from.  We always go directly back to the
  *                     user from here.
  *
+ *                     Still need to figure out final floats and vectors. For now, we will go brute
+ *                     force and when we go into the VM, we will force save any normal floats and 
+ *                     vectors. Then we will hide them and swap the VM copy (if any) into the normal
+ *                     chain.  When we exit VM we will do the opposite.  This is not as fast as I would
+ *                     like it to be.
+ *
  *
  */
  
@@ -353,42 +228,29 @@ LEXT(vmm_execute_vm)
 
 LEXT(switchIntoVM)
                        mfsprg  r10,0                                           ; Get the per_proc
-                       rlwinm  r31,r4,24,24,31                         ; Get the address space
-                       rlwinm  r4,r4,0,24,31                           ; Isolate the context id
-                       lwz             r28,vmmControl(r3)                      ; Pick up the control table address
+                       lwz             r15,spcFlags(r10)                       ; Get per_proc special flags
+                       rlwinm. r0,r15,0,FamVMmodebit,FamVMmodebit      ; Test FamVMmodebit
+                       bne             vmmFamGuestResume               
+                       lwz             r5,vmmControl(r3)                       ; Pick up the control table address
                        subi    r4,r4,1                                         ; Switch to zero offset
-                       rlwinm. r2,r28,0,0,30                           ; Is there a context there? (Note: we will ignore bit 31 so that we 
+                       rlwinm. r2,r5,0,0,30                            ; Is there a context there? (Note: we will ignore bit 31 so that we 
                                                                                                ;   do not try this while we are transitioning off to on
-                       cmplwi  cr1,r4,kVmmMaxContexts          ; Is the index valid?
+                       cmplwi  cr1,r4,kVmmMaxContextsPerThread ; Is the index valid?
                        beq-    vmmBogus                                        ; Not started, treat like a bogus system call
-                       subic.  r31,r31,1                                       ; Make address space 0 based and test if we use default
                        mulli   r2,r4,vmmCEntrySize                     ; Get displacement from index
-                       bge-    cr1,swvmmBogus                          ; Index is bogus...
-                       add             r2,r2,r28                                       ; Point to the entry
-                       bge--   swvmmDAdsp                                      ; There was an explicit address space request
-                       mr              r31,r4                                          ; Default the address space to the context ID
-
-swvmmDAdsp:    la              r2,vmmc(r2)                                     ; Get the offset to the context array
-                       lwz             r8,vmmGFlags(r28)                       ; Get the general flags
+                       bgt-    cr1,swvmmBogus                          ; Index is bogus...
+                       add             r2,r2,r5                                        ; Point to the entry
+                       
                        lwz             r4,vmmFlags(r2)                         ; Get the flags for the selected entry
-                       crset   vmmMapDone                                      ; Assume we will be mapping something
                        lwz             r5,vmmContextKern(r2)           ; Get the context area address
                        rlwinm. r26,r4,0,vmmInUseb,vmmInUseb    ; See if the slot is in use
-                       cmplwi  cr1,r31,kVmmMaxContexts         ; See if we have a valid address space ID
-                       rlwinm  r8,r8,0,24,31                           ; Clean up address space
-                       beq--   swvmmBogus                                      ; This context is no good...
-
-                       la              r26,vmmAdsp(r28)                        ; Point to the pmaps
-                       sub             r8,r8,r31                                       ; Get diff between launching address space - 1 and last mapped into (should be 1 if the same)
-                       rlwinm  r31,r31,2,0,29                          ; Index to the pmap
-                       cmplwi  r8,1                                            ; See if we have the same address space
-                       bge--   cr1,swvmmBogAdsp                        ; Address space is no good...
-                       lwzx    r31,r26,r31                                     ; Get the requested address space pmap
-                       li              r0,0                                            ; Get a 0 in case we need to trash redrive
-                       lwz             r15,spcFlags(r10)                       ; Get per_proc special flags
-                       beq             swvmmAdspOk                                     ; Do not invalidate address space if we are launching the same
-                       crclr   vmmMapDone                                      ; Clear map done flag
-                       stb             r0,vmmGFlags+3(r28)                     ; Clear the last mapped address space ID so we will not redrive later
+                       bne+    swvmChkIntcpt                           ; We are so cool. Go do check for immediate intercepts...
+                       
+swvmmBogus:    li              r2,kVmmBogusContext                     ; Set bogus index return
+                       li              r3,1                                            ; Set normal return with check for AST  
+                       stw             r2,saver3(r30)                          ; Pass back the return code
+                       b               EXT(ppcscret)                           ; Go back to handler...
+
 ;
 ;                      Here we check for any immediate intercepts.  So far, the only
 ;                      two of these are a timer pop and and external stop.  We will not dispatch if
@@ -396,10 +258,7 @@ swvmmDAdsp:        la              r2,vmmc(r2)                                     ; Get the offset to the context array
 ;                      to 0) or to set a future time, or if it is external stop, set the vmmXStopRst flag.
 ;
 
-swvmmAdspOk:
-                       rlwinm. r0,r15,0,FamVMmodebit,FamVMmodebit      ; Test FamVMmodebit
-                       stw             r31,vmmPmap(r2)                         ; Save the last dispatched address space
-                       bne             vmmFamGuestResume               
+swvmChkIntcpt:
                        lwz             r6,vmmCntrl(r5)                         ; Get the control field
                        rlwinm. r7,r6,0,vmmXStartb,vmmXStartb   ; Clear all but start bit
                        beq+    swvmChkStop                                     ; Do not reset stop
@@ -414,18 +273,23 @@ swvmtryx: lwarx   r4,r8,r2                                        ; Pick up the flags
 
 swvmChkStop:                   
                        rlwinm. r26,r4,0,vmmXStopb,vmmXStopb    ; Is this VM stopped?
-                       bne--   swvmSetStop                                     ; Yes...
+                       beq+    swvmNoStop                                      ; Nope...
+                               
+                       li              r2,kVmmStopped                          ; Set stopped return
+                       li              r3,1                                            ; Set normal return with check for AST
+                       stw             r2,saver3(r30)                          ; Pass back the return code
+                       stw             r2,return_code(r5)                      ; Save the exit code
+                       b               EXT(ppcscret)                           ; Go back to handler...
                        
+swvmNoStop:                    
                        rlwinm. r26,r4,0,vmmTimerPopb,vmmTimerPopb      ; Did the timer go pop?
-                       cmplwi  cr1,r31,0                                       ; Is there actually an address space defined?
-                       bne--   svvmTimerPop                            ; Yes...
-
-;
-;                      Special note: we need to intercept any attempt to launch a guest into a non-existent address space.
-;                      We will just go emulate an ISI if there is not one.
-;
-
-                       beq--   cr1,swvmEmulateISI                      ; We are trying to launch into an undefined address space.  This is not so good...
+                       beq+    swvmDoSwitch                            ; No...
+               
+                       li              r2,kVmmReturnNull                       ; Set null return
+                       li              r3,1                                            ; Set normal return with check for AST
+                       stw             r2,saver3(r30)                          ; Pass back the return code
+                       stw             r2,return_code(r5)                      ; Save the exit code
+                       b               EXT(ppcscret)                           ; Go back to handler...
 
 ;
 ;                      Here is where we actually swap into the VM (alternate) context.
@@ -449,34 +313,29 @@ swvmDoSwitch:
                        stw             r11,deferctx(r3)                        ; Start using the virtual machine facility context when we exit
 
                        lwz             r11,ACT_MACT_SPF(r26)           ; Get the special flags
-                       mr              r3,r31                                          ; Get the pointer to the PMAP
+                       lwz             r3,vmmPmap(r27)                         ; Get the pointer to the PMAP
                        oris    r15,r11,hi16(runningVM) ;       ; Show that we are swapped to the VM right now
                        bl              EXT(hw_set_user_space_dis)      ; Swap the address spaces
                        lwz             r17,vmmFlags(r27)                       ; Get the status flags
                        lwz             r20,vmmContextKern(r27)         ; Get the state page kernel addr
                        lwz             r21,vmmCntrl(r20)                       ; Get vmmCntrl
                        rlwinm. r22,r21,0,vmmFamEnab,vmmFamEnab ; Is vmmFamEnab set?
-                       lwz             r22,vmmXAFlgs(r27)                      ; Get the eXtended Architecture flags
-                       stw             r22,VMMXAFlgs(r10)                      ; Store vmmXAFlgs in per_proc VMMXAFlgs
                        beq             swvmNoFam                                       ; No Fam intercept
-                       rlwinm. r22,r22,0,0,0                           ; Are we doing a 64-bit virtual machine?
                        rlwimi  r15,r21,32+vmmFamSetb-FamVMmodebit,FamVMmodebit,FamVMmodebit    ; Set FamVMmode bit
                        rlwinm  r21,r21,0,vmmFamSetb+1,vmmFamSetb-1     ; Clear FamSet bit
-                       bne             swvmXfamintercpt
                        lwz             r22,famintercepts(r20)          ; Load intercept bit field
-                       b               swvmfamintercptres
-swvmXfamintercpt:
-                       lwz             r22,faminterceptsX(r20)         ; Load intercept bit field
-swvmfamintercptres:
                        stw             r21,vmmCntrl(r20)                       ; Update vmmCntrl
                        lwz             r19,vmmContextPhys(r27)         ; Get vmmFAMarea address
                        stw             r22,vmmFAMintercept(r27)        ; Get vmmFAMintercept
                        stw             r22,FAMintercept(r10)           ; Store vmmFAMintercept in per_proc FAMintercept
+                       stw             r19,vmmContextPhys(r27)         ; Store vmmContextPhys
                        stw             r19,VMMareaPhys(r10)            ; Store VMMareaPhys
                        oris    r15,r15,hi16(FamVMena)          ; Set FamVMenabit
 swvmNoFam:
+                       rlwinm. r0,r17,0,vmmMapDoneb,vmmMapDoneb        ; Did we just do a map function?
                        stw             r27,vmmCEntry(r26)                      ; Remember what context we are running
-                       bf++    vmmMapDone,swvmNoMap            ; We have not mapped anything or it was not for this address space
+                       andc    r17,r17,r0                                      ; Turn off map flag
+                       beq+    swvmNoMap                                       ; No mapping done...
 
 ;
 ;                      This little bit of hoopala here (triggered by vmmMapDone) is
@@ -487,24 +346,17 @@ swvmNoFam:
 ;                      double faults from happening.  Note that there is only a gain if the VM
 ;                      takes a fault, then the emulator resolves it only, and then begins
 ;                      the VM execution again.  It seems like this should be the normal case.
-;
-;                      Note that we need to revisit this when we move the virtual machines to the task because
-;                      then it will be possible for more than one thread to access this stuff at the same time.
 ;
                        
                        lwz             r3,SAVflags(r30)                        ; Pick up the savearea flags
-                       lwz             r2,vmmLastMap(r28)                      ; Get the last mapped address
-                       lwz             r14,vmmLastMap+4(r28)           ; Get the last mapped address low half
+                       lwz             r2,vmmLastMap(r27)                      ; Get the last mapped address
                        li              r20,T_DATA_ACCESS                       ; Change to DSI fault
                        oris    r3,r3,hi16(SAVredrive)          ; Set exception redrive
                        stw             r2,savedar(r30)                         ; Set the DAR to the last thing we mapped
-                       stw             r14,savedar+4(r30)                      ; Set the DAR to the last thing we mapped
                        stw             r3,SAVflags(r30)                        ; Turn on the redrive request
                        lis             r2,hi16(MASK(DSISR_HASH))       ; Set PTE/DBAT miss
-                       li              r0,0                                            ; Clear
                        stw             r20,saveexception(r30)          ; Say we need to emulate a DSI
                        stw             r2,savedsisr(r30)                       ; Pretend we have a PTE miss                    
-                       stb             r0,vmmGFlags+3(r28)                     ; Show that the redrive has been taken care of
                        
 swvmNoMap:     lwz             r20,vmmContextKern(r27)         ; Get the comm area
                        rlwimi  r15,r17,32-(floatCngbit-vmmFloatCngdb),floatCngbit,vectorCngbit ; Shift and insert changed bits                 
@@ -544,18 +396,15 @@ swvmNoMap:        lwz             r20,vmmContextKern(r27)         ; Get the comm area
                        ori             r18,r18,lo16(EXT(per_proc_info))        ; Set base per_proc
                        li              r16,FPUowner                            ; Displacement to float owner
                        add             r19,r18,r19                                     ; Point to the owner per_proc
+                       li              r0,0                                            ; Clear this out        
                        
 swvminvfpu:    lwarx   r18,r16,r19                                     ; Get the owner
-
-                       sub             r0,r18,r25                                      ; Subtract one from the other
-                       sub             r3,r25,r18                                      ; Subtract the other from the one
-                       or              r3,r3,r0                                        ; Combine them
-                       srawi   r3,r3,31                                        ; Get a 0 if equal or -1 of not
-                       and             r18,r18,r3                                      ; Make 0 if same, unchanged if not
-                       stwcx.  r18,r16,r19                                     ; Try to invalidate it
-                       bne--   swvminvfpu                                      ; Try again if there was a collision...
-
-                       lwz             r3,FPUsave(r25)                         ; Get the FPU savearea
+                       cmplw   r18,r25                                         ; Does he still have this context?
+                       bne             swvminvfpv                                      ; Nope...               
+                       stwcx.  r0,r16,r19                                      ; Try to invalidate it
+                       bne-    swvminvfpu                                      ; Try again if there was a collision...
+                       
+swvminvfpv:    lwz             r3,FPUsave(r25)                         ; Get the FPU savearea
                        dcbt    r14,r17                                         ; Touch in first line of new stuff
                        mr.             r3,r3                                           ; Is there one?
                        bne+    swvmGotFloat                            ; Yes...
@@ -566,7 +415,7 @@ swvminvfpu: lwarx   r18,r16,r19                                     ; Get the owner
                        stw             r26,SAVact(r3)                          ; Save our activation
                        li              r0,0                                            ; Get a zero
                        stb             r7,SAVflags+2(r3)                       ; Set that this is floating point
-                       stw             r0,SAVprev+4(r3)                        ; Clear the back chain
+                       stw             r0,SAVprev(r3)                          ; Clear the back chain
                        stw             r0,SAVlevel(r3)                         ; We are always at level 0 (user state)
                        
                        stw             r3,FPUsave(r25)                         ; Chain us to context
@@ -579,6 +428,11 @@ swvmGotFloat:
                        
                        bl              EXT(bcopy)                                      ; Copy the new values
                        
+                       lwz             r14,vmmppcFPSCRshadow(r17)      ; Get the fpscr pad
+                       lwz             r10,vmmppcFPSCRshadow+4(r17)    ; Get the fpscr
+                       stw             r14,savefpscrpad(r30)           ; Save the new fpscr pad
+                       stw             r10,savefpscr(r30)                      ; Save the new fpscr
+
                        lwz             r11,ACT_MACT_SPF(r26)           ; Get the special flags
                        stw             r15,vmmCntrl(r17)                       ; Save the control flags sans vmmFloatLoad
                        rlwinm  r11,r11,0,floatCngbit+1,floatCngbit-1   ; Clear the changed bit here
@@ -610,16 +464,13 @@ swvmNoNewFloats:
                        ori             r18,r18,lo16(EXT(per_proc_info))        ; Set base per_proc
                        li              r16,VMXowner                            ; Displacement to vector owner
                        add             r19,r18,r19                                     ; Point to the owner per_proc   
+                       li              r0,0                                            ; Clear this out        
                        
 swvminvvec:    lwarx   r18,r16,r19                                     ; Get the owner
-
-                       sub             r0,r18,r25                                      ; Subtract one from the other
-                       sub             r3,r25,r18                                      ; Subtract the other from the one
-                       or              r3,r3,r0                                        ; Combine them
-                       srawi   r3,r3,31                                        ; Get a 0 if equal or -1 of not
-                       and             r18,r18,r3                                      ; Make 0 if same, unchanged if not
-                       stwcx.  r18,r16,r19                                     ; Try to invalidate it
-                       bne--   swvminvfpu                                      ; Try again if there was a collision...
+                       cmplw   r18,r25                                         ; Does he still have this context?
+                       bne             swvminvved                                      ; Nope...               
+                       stwcx.  r0,r16,r19                                      ; Try to invalidate it
+                       bne-    swvminvvec                                      ; Try again if there was a collision...
                        
 swvminvved:    lwz             r3,VMXsave(r25)                         ; Get the vector savearea
                        dcbt    r14,r17                                         ; Touch in first line of new stuff
@@ -632,7 +483,7 @@ swvminvved: lwz             r3,VMXsave(r25)                         ; Get the vector savearea
                        stw             r26,SAVact(r3)                          ; Save our activation
                        li              r0,0                                            ; Get a zero
                        stb             r7,SAVflags+2(r3)                       ; Set that this is vector
-                       stw             r0,SAVprev+4(r3)                        ; Clear the back chain
+                       stw             r0,SAVprev(r3)                          ; Clear the back chain
                        stw             r0,SAVlevel(r3)                         ; We are always at level 0 (user state)
                        
                        stw             r3,VMXsave(r25)                         ; Chain us to context
@@ -645,12 +496,21 @@ swvmGotVect:
                        
                        bl              EXT(bcopy)                                      ; Copy the new values
 
+                       lwz             r11,vmmppcVSCRshadow+0(r17)     ; Get the VSCR
+                       lwz             r14,vmmppcVSCRshadow+4(r17)     ; Get the VSCR
+                       lwz             r10,vmmppcVSCRshadow+8(r17)     ; Get the VSCR
+                       lwz             r9,vmmppcVSCRshadow+12(r17)     ; Get the VSCR
                        lwz             r8,savevrsave(r30)                      ; Get the current VRSave
                        
+                       stw             r11,savevscr+0(r30)                     ; Set the VSCR
+                       stw             r14,savevscr+4(r30)                     ; Set the VSCR
+                       stw             r10,savevscr+8(r30)                     ; Set the VSCR
+                       stw             r9,savevscr+12(r30)                     ; Set the VSCR
+                       stw             r8,savevrvalid(r21)                     ; Set the current VRSave as valid saved
+                       
                        lwz             r11,ACT_MACT_SPF(r26)           ; Get the special flags
                        stw             r15,vmmCntrl(r17)                       ; Save the control flags sans vmmVectLoad
                        rlwinm  r11,r11,0,vectorCngbit+1,vectorCngbit-1 ; Clear the changed bit here
-                       stw             r8,savevrvalid(r21)                     ; Set the current VRSave as valid saved
                        lwz             r14,vmmStat(r17)                        ; Get the status flags
                        mfsprg  r10,0                                           ; Get the per_proc
                        stw             r11,ACT_MACT_SPF(r26)           ; Get the special flags
@@ -663,65 +523,6 @@ swvmNoNewVects:
                        lwz             r16,ACT_THREAD(r26)                     ; Restore the thread pointer
                        b               EXT(ppcscret)                           ; Go back to handler...
 
-                       .align  5
-                       
-swvmmBogus:    li              r2,kVmmBogusContext                     ; Set bogus index return
-                       li              r0,0                                            ; Clear
-                       li              r3,1                                            ; Set normal return with check for AST  
-                       stw             r0,saver3(r30)                          ; Clear upper half
-                       stw             r2,saver3+4(r30)                        ; Pass back the return code
-                       b               EXT(ppcscret)                           ; Go back to handler...
-                       
-swvmmBogAdsp:
-                       li              r2,kVmmInvalidAdSpace           ; Set bogus address space return
-                       li              r0,0                                            ; Clear
-                       li              r3,1                                            ; Set normal return with check for AST  
-                       stw             r0,saver3(r30)                          ; Clear upper half
-                       stw             r2,saver3+4(r30)                        ; Pass back the return code
-                       b               EXT(ppcscret)                           ; Go back to handler...
-                               
-swvmSetStop:
-                       li              r2,kVmmStopped                          ; Set stopped return
-                       li              r0,0                                            ; Clear
-                       li              r3,1                                            ; Set normal return with check for AST
-                       stw             r0,saver3(r30)                          ; Clear upper half
-                       stw             r2,saver3+4(r30)                        ; Pass back the return code
-                       stw             r2,return_code(r5)                      ; Save the exit code
-                       b               EXT(ppcscret)                           ; Go back to handler...
-               
-svvmTimerPop:
-                       li              r2,kVmmReturnNull                       ; Set null return
-                       li              r0,0                                            ; Clear
-                       li              r3,1                                            ; Set normal return with check for AST
-                       stw             r0,saver3(r30)                          ; Clear upper half
-                       stw             r2,saver3+4(r30)                        ; Pass back the return code
-                       stw             r2,return_code(r5)                      ; Save the exit code
-                       b               EXT(ppcscret)                           ; Go back to handler...
-               
-swvmEmulateISI:
-                       mfsprg  r10,2                                           ; Get feature flags
-                       lwz             r11,vmmXAFlgs(r28)                      ; Get the eXtended Architecture flags                   
-                       mtcrf   0x02,r10                                        ; Move pf64Bit to its normal place in CR6
-                       rlwinm. r11,r11,0,0,0                           ; Are we doing a 64-bit virtual machine?                
-                       li              r2,kVmmReturnInstrPageFault     ; Set ISI
-                       crnot   vmmDoing64,cr0_eq                       ; Remember if this is a 64-bit VM
-                       li              r0,0                                            ; Clear
-                       li              r3,1                                            ; Set normal return with check for AST
-                       stw             r0,saver3(r30)                          ; Clear upper half
-                       stw             r2,saver3+4(r30)                        ; Pass back the return code
-                       stw             r2,return_code(r5)                      ; Save the exit code
-                       lis             r7,hi16(MASK(DSISR_HASH))       ; Pretend like we got a PTE miss
-                       bt              vmmDoing64,vmISI64                      ; Go do this for a 64-bit VM...
-
-                       lwz             r10,vmmppcpc(r5)                        ; Get the PC as failing address
-                       stw             r10,return_params+0(r5)         ; Save PC as first return parm
-                       stw             r7,return_params+4(r5)          ; Save the pseudo-DSISR as second return parm
-                       b               EXT(ppcscret)                           ; Go back to handler...
-
-vmISI64:       ld              r10,vmmppcXpc(r5)                       ; Get the PC as failing address
-                       std             r10,return_paramsX+0(r5)        ; Save PC as first return parm
-                       std             r7,return_paramsX+8(r5)         ; Save the pseudo-DSISR as second return parm
-                       b               EXT(ppcscret)                           ; Go back to handler...
 
 ;
 ;                      These syscalls are invalid, FAM syscall fast path 
@@ -790,7 +591,7 @@ vmmexitcall:
                        mr              r3,r16                                          ; Restore activation address
                        stw             r19,vmmStat(r5)                         ; Save the changed and popped flags
                        bl              swapCtxt                                        ; Exchange the VM context for the emulator one
-                       stw             r8,saver3+4(r30)                        ; Set the return code as the return value also
+                       stw             r8,saver3(r30)                          ; Set the return code as the return value also
                        b               EXT(retFromVM)                          ; Go back to handler...
 
 
@@ -862,7 +663,7 @@ LEXT(vmm_force_exit)
                        lis             r9,hi16(SAVredrive)                     ; Get exception redrive bit
                        rlwinm  r8,r8,30,24,31                          ; Convert exception to return code
                        andc    r7,r7,r9                                        ; Make sure redrive is off because we are intercepting
-                       stw             r8,saver3+4(r30)                        ; Set the return code as the return value also
+                       stw             r8,saver3(r30)                          ; Set the return code as the return value also
                        stw             r7,SAVflags(r30)                        ; Set the savearea flags
                        
 
@@ -880,25 +681,20 @@ vfeNotRun:        lmw             r13,FM_ARG0(r1)                         ; Restore all non-volatile registers
 ;
                        .align  5
 
-swapCtxt:      
-                       mfsprg  r10,2                                           ; Get feature flags
-                       la              r6,vmmppcpc(r5)                         ; Point to the first line
-                       mtcrf   0x02,r10                                        ; Move pf64Bit to its normal place in CR6
+swapCtxt:      la              r6,vmmppcpc(r5)                         ; Point to the first line
                        
                        lwz             r14,saveexception(r30)          ; Get the exception code
                        dcbt    0,r6                                            ; Touch in the first line of the context area
-                       bt++    pf64Bitb,swap64                         ; Go do this swap on a 64-bit machine...
-                       
-                       lwz             r7,savesrr0+4(r30)                      ; Start moving context  
-                       lwz             r8,savesrr1+4(r30)                              
-                       lwz             r9,saver0+4(r30)                                
+                       lwz             r7,savesrr0(r30)                        ; Start moving context  
+                       lwz             r8,savesrr1(r30)                                
+                       lwz             r9,saver0(r30)                          
                        cmplwi  cr1,r14,T_SYSTEM_CALL           ; Are we switching because of a system call?
-                       lwz             r10,saver1+4(r30)                               
-                       lwz             r11,saver2+4(r30)                               
-                       lwz             r12,saver3+4(r30)                               
-                       lwz             r13,saver4+4(r30)       
+                       lwz             r10,saver1(r30)                         
+                       lwz             r11,saver2(r30)                         
+                       lwz             r12,saver3(r30)                         
+                       lwz             r13,saver4(r30) 
                        la              r6,vmmppcr6(r5)                         ; Point to second line          
-                       lwz             r14,saver5+4(r30)                               
+                       lwz             r14,saver5(r30)                         
                        
                        dcbt    0,r6                                            ; Touch second line of context area
                        
@@ -935,31 +731,28 @@ swapCtxt:
                        stw             r13,return_params+4(r5)         ; Save the second return
                        stw             r14,return_params+8(r5)         ; Save the third return
 
-swapnotsc:     li              r6,0                                            ; Clear this out
-                       stw             r6,savesrr0(r30)                        ; Insure that high order is clear
-                       stw             r15,savesrr0+4(r30)                     ; Save vm context into the savearea     
-                       stw             r6,savesrr1(r30)                        ; Insure that high order is clear
-                       stw             r23,savesrr1+4(r30)                             
-                       stw             r17,saver0+4(r30)                               
-                       stw             r18,saver1+4(r30)               
-                       stw             r19,saver2+4(r30)               
-                       stw             r20,saver3+4(r30)                               
-                       stw             r21,saver4+4(r30)               
+swapnotsc:     stw             r15,savesrr0(r30)                       ; Save vm context into the savearea     
+                       stw             r23,savesrr1(r30)                               
+                       stw             r17,saver0(r30)                         
+                       stw             r18,saver1(r30)         
+                       stw             r19,saver2(r30)         
+                       stw             r20,saver3(r30)                         
+                       stw             r21,saver4(r30)         
                        la              r6,vmmppcr14(r5)                        ; Point to fourth line          
-                       stw             r22,saver5+4(r30)                               
+                       stw             r22,saver5(r30)                         
                        
                        dcbt    0,r6                                            ; Touch fourth line
 
 ;                      Swap 8 registers
                        
-                       lwz             r7,saver6+4(r30)                        ; Read savearea 
-                       lwz             r8,saver7+4(r30)                                
-                       lwz             r9,saver8+4(r30)                                
-                       lwz             r10,saver9+4(r30)                               
-                       lwz             r11,saver10+4(r30)                              
-                       lwz             r12,saver11+4(r30)                              
-                       lwz             r13,saver12+4(r30)                              
-                       lwz             r14,saver13+4(r30)                              
+                       lwz             r7,saver6(r30)                          ; Read savearea 
+                       lwz             r8,saver7(r30)                          
+                       lwz             r9,saver8(r30)                          
+                       lwz             r10,saver9(r30)                         
+                       lwz             r11,saver10(r30)                                
+                       lwz             r12,saver11(r30)                                
+                       lwz             r13,saver12(r30)                                
+                       lwz             r14,saver13(r30)                                
 
                        lwz             r15,vmmppcr6(r5)                        ; Read vm context 
                        lwz             r24,vmmppcr7(r5)                                
@@ -982,25 +775,25 @@ swapnotsc:        li              r6,0                                            ; Clear this out
 
                        dcbt    0,r6                                            ; Touch fifth line
 
-                       stw             r15,saver6+4(r30)                       ; Write vm context 
-                       stw             r24,saver7+4(r30)                               
-                       stw             r17,saver8+4(r30)                               
-                       stw             r18,saver9+4(r30)               
-                       stw             r19,saver10+4(r30)              
-                       stw             r20,saver11+4(r30)                              
-                       stw             r21,saver12+4(r30)                              
-                       stw             r22,saver13+4(r30)                              
+                       stw             r15,saver6(r30)                         ; Write vm context 
+                       stw             r24,saver7(r30)                         
+                       stw             r17,saver8(r30)                         
+                       stw             r18,saver9(r30)         
+                       stw             r19,saver10(r30)                
+                       stw             r20,saver11(r30)                                
+                       stw             r21,saver12(r30)                                
+                       stw             r22,saver13(r30)                                
 
 ;                      Swap 8 registers
                        
-                       lwz             r7,saver14+4(r30)                       ; Read savearea 
-                       lwz             r8,saver15+4(r30)                               
-                       lwz             r9,saver16+4(r30)                               
-                       lwz             r10,saver17+4(r30)                              
-                       lwz             r11,saver18+4(r30)                              
-                       lwz             r12,saver19+4(r30)                              
-                       lwz             r13,saver20+4(r30)                              
-                       lwz             r14,saver21+4(r30)                              
+                       lwz             r7,saver14(r30)                         ; Read savearea 
+                       lwz             r8,saver15(r30)                         
+                       lwz             r9,saver16(r30)                         
+                       lwz             r10,saver17(r30)                                
+                       lwz             r11,saver18(r30)                                
+                       lwz             r12,saver19(r30)                                
+                       lwz             r13,saver20(r30)                                
+                       lwz             r14,saver21(r30)                                
 
                        lwz             r15,vmmppcr14(r5)                       ; Read vm context 
                        lwz             r24,vmmppcr15(r5)                               
@@ -1023,25 +816,25 @@ swapnotsc:       li              r6,0                                            ; Clear this out
                        
                        dcbt    0,r6                                            ; Touch sixth line
 
-                       stw             r15,saver14+4(r30)                      ; Write vm context 
-                       stw             r24,saver15+4(r30)                              
-                       stw             r17,saver16+4(r30)                              
-                       stw             r18,saver17+4(r30)              
-                       stw             r19,saver18+4(r30)              
-                       stw             r20,saver19+4(r30)                              
-                       stw             r21,saver20+4(r30)                              
-                       stw             r22,saver21+4(r30)                              
+                       stw             r15,saver14(r30)                        ; Write vm context 
+                       stw             r24,saver15(r30)                                
+                       stw             r17,saver16(r30)                                
+                       stw             r18,saver17(r30)                
+                       stw             r19,saver18(r30)                
+                       stw             r20,saver19(r30)                                
+                       stw             r21,saver20(r30)                                
+                       stw             r22,saver21(r30)                                
 
 ;                      Swap 8 registers
                        
-                       lwz             r7,saver22+4(r30)                       ; Read savearea 
-                       lwz             r8,saver23+4(r30)                               
-                       lwz             r9,saver24+4(r30)                               
-                       lwz             r10,saver25+4(r30)                              
-                       lwz             r11,saver26+4(r30)                              
-                       lwz             r12,saver27+4(r30)                              
-                       lwz             r13,saver28+4(r30)                              
-                       lwz             r14,saver29+4(r30)                              
+                       lwz             r7,saver22(r30)                         ; Read savearea 
+                       lwz             r8,saver23(r30)                         
+                       lwz             r9,saver24(r30)                         
+                       lwz             r10,saver25(r30)                                
+                       lwz             r11,saver26(r30)                                
+                       lwz             r12,saver27(r30)                                
+                       lwz             r13,saver28(r30)                                
+                       lwz             r14,saver29(r30)                                
 
                        lwz             r15,vmmppcr22(r5)                       ; Read vm context 
                        lwz             r24,vmmppcr23(r5)                               
@@ -1064,23 +857,23 @@ swapnotsc:       li              r6,0                                            ; Clear this out
 
                        dcbt    0,r6                                            ; Touch seventh line
 
-                       stw             r15,saver22+4(r30)                      ; Write vm context 
-                       stw             r24,saver23+4(r30)                              
-                       stw             r17,saver24+4(r30)                              
-                       stw             r18,saver25+4(r30)              
-                       stw             r19,saver26+4(r30)              
-                       stw             r20,saver27+4(r30)                              
-                       stw             r21,saver28+4(r30)                              
-                       stw             r22,saver29+4(r30)                              
+                       stw             r15,saver22(r30)                        ; Write vm context 
+                       stw             r24,saver23(r30)                                
+                       stw             r17,saver24(r30)                                
+                       stw             r18,saver25(r30)                
+                       stw             r19,saver26(r30)                
+                       stw             r20,saver27(r30)                                
+                       stw             r21,saver28(r30)                                
+                       stw             r22,saver29(r30)                                
 
 ;                      Swap 8 registers
                        
-                       lwz             r7,saver30+4(r30)                       ; Read savearea 
-                       lwz             r8,saver31+4(r30)                               
+                       lwz             r7,saver30(r30)                         ; Read savearea 
+                       lwz             r8,saver31(r30)                         
                        lwz             r9,savecr(r30)                          
-                       lwz             r10,savexer+4(r30)                              
-                       lwz             r11,savelr+4(r30)                               
-                       lwz             r12,savectr+4(r30)                              
+                       lwz             r10,savexer(r30)                                
+                       lwz             r11,savelr(r30)                         
+                       lwz             r12,savectr(r30)                                
                        lwz             r14,savevrsave(r30)                             
 
                        lwz             r15,vmmppcr30(r5)                       ; Read vm context 
@@ -1099,12 +892,12 @@ swapnotsc:       li              r6,0                                            ; Clear this out
                        stw             r12,vmmppcctr(r5)                               
                        stw             r14,vmmppcvrsave(r5)                            
 
-                       stw             r15,saver30+4(r30)                      ; Write vm context 
-                       stw             r24,saver31+4(r30)                              
+                       stw             r15,saver30(r30)                        ; Write vm context 
+                       stw             r24,saver31(r30)                                
                        stw             r17,savecr(r30)                         
-                       stw             r18,savexer+4(r30)              
-                       stw             r19,savelr+4(r30)               
-                       stw             r20,savectr+4(r30)                              
+                       stw             r18,savexer(r30)                
+                       stw             r19,savelr(r30)         
+                       stw             r20,savectr(r30)                                
                        stw             r22,savevrsave(r30)                             
 
 ;                      Swap 8 registers
@@ -1160,7 +953,7 @@ swapnotsc: li              r6,0                                            ; Clear this out
 ;                      Set exit returns for a DSI or alignment exception
 ;
 
-swapDSI:       lwz             r10,savedar+4(r30)                      ; Get the DAR
+swapDSI:       lwz             r10,savedar(r30)                        ; Get the DAR
                        lwz             r7,savedsisr(r30)                       ; and the DSISR
                        stw             r10,return_params+0(r5)         ; Save DAR as first return parm
                        stw             r7,return_params+4(r5)          ; Save DSISR as second return parm
@@ -1186,457 +979,6 @@ swapSC:          lwz             r10,vmmppcr6(r5)                        ; Get the fourth paramter
                        stw             r10,return_params+12(r5)        ; Save it
                        blr                                                                     ; Return...
 
-;
-;                      Here is the swap for 64-bit machines
-;
-
-swap64:                lwz             r22,vmmXAFlgs(r27)                      ; Get the eXtended Architecture flags                   
-                       ld              r7,savesrr0(r30)                        ; Start moving context  
-                       ld              r8,savesrr1(r30)                                
-                       ld              r9,saver0(r30)                          
-                       cmplwi  cr1,r14,T_SYSTEM_CALL           ; Are we switching because of a system call?
-                       ld              r10,saver1(r30)                         
-                       ld              r11,saver2(r30)         
-                       rlwinm. r22,r22,0,0,0                           ; Are we doing a 64-bit virtual machine?                
-                       ld              r12,saver3(r30)                         
-                       crnot   vmmDoing64,cr0_eq                       ; Remember if this is a 64-bit VM
-                       ld              r13,saver4(r30) 
-                       la              r6,vmmppcr6(r5)                         ; Point to second line          
-                       ld              r14,saver5(r30)                         
-                       
-                       dcbt    0,r6                                            ; Touch second line of context area
-                       
-                       bt              vmmDoing64,sw64x1                       ; Skip to 64-bit stuff
-                       
-                       lwz             r15,vmmppcpc(r5)                        ; First line of context 
-                       lis             r22,hi16(MSR_IMPORT_BITS)       ; Get the MSR bits that are controllable by user
-                       lwz             r23,vmmppcmsr(r5)                               
-                       ori             r22,r25,lo16(MSR_IMPORT_BITS)   ; Get the rest of the MSR bits that are controllable by user
-                       lwz             r17,vmmppcr0(r5)                                
-                       lwz             r18,vmmppcr1(r5)                
-                       and             r23,r23,r22                                     ; Keep only the controllable bits               
-                       lwz             r19,vmmppcr2(r5)                
-                       oris    r23,r23,hi16(MSR_EXPORT_MASK_SET)       ; Force on the required bits
-                       lwz             r20,vmmppcr3(r5)                                
-                       ori             r23,r23,lo16(MSR_EXPORT_MASK_SET)       ; Force on the other required bits
-                       lwz             r21,vmmppcr4(r5)                                
-                       lwz             r22,vmmppcr5(r5)                                
-
-                       dcbt    0,r6                                            ; Touch third line of context area
-               
-                       stw             r7,vmmppcpc(r5)                         ; Save emulator context into the context area   
-                       stw             r8,vmmppcmsr(r5)                                
-                       stw             r9,vmmppcr0(r5)                         
-                       stw             r10,vmmppcr1(r5)                                
-                       stw             r11,vmmppcr2(r5)                                
-                       stw             r12,vmmppcr3(r5)                                
-                       stw             r13,vmmppcr4(r5)                                
-                       stw             r14,vmmppcr5(r5)                        
-
-;                      
-;                      Save the first 3 parameters if we are an SC (we will take care of the last later)
-;
-                       bne+    cr1,sw64x1done                          ; Skip next if not an SC exception...   
-                       stw             r12,return_params+0(r5)         ; Save the first return
-                       stw             r13,return_params+4(r5)         ; Save the second return
-                       stw             r14,return_params+8(r5)         ; Save the third return
-                       b               sw64x1done                                      ; We are done with this section...
-
-sw64x1:                ld              r15,vmmppcXpc(r5)                       ; First line of context 
-                       li              r0,1                                            ; Get a 1 to turn on 64-bit
-                       lis             r22,hi16(MSR_IMPORT_BITS)       ; Get the MSR bits that are controllable by user (we will also allow 64-bit here)
-                       sldi    r0,r0,63                                        ; Get 64-bit bit
-                       ld              r23,vmmppcXmsr(r5)                              
-                       ori             r22,r25,lo16(MSR_IMPORT_BITS)   ; Get the rest of the MSR bits that are controllable by user
-                       ld              r17,vmmppcXr0(r5)               
-                       or              r22,r22,r0                                      ; Add the 64-bit bit            
-                       ld              r18,vmmppcXr1(r5)               
-                       and             r23,r23,r22                                     ; Keep only the controllable bits               
-                       ld              r19,vmmppcXr2(r5)               
-                       oris    r23,r23,hi16(MSR_EXPORT_MASK_SET)       ; Force on the required bits
-                       ld              r20,vmmppcXr3(r5)                               
-                       ori             r23,r23,lo16(MSR_EXPORT_MASK_SET)       ; Force on the other required bits
-                       ld              r21,vmmppcXr4(r5)                               
-                       ld              r22,vmmppcXr5(r5)                               
-
-                       dcbt    0,r6                                            ; Touch third line of context area
-               
-                       std             r7,vmmppcXpc(r5)                        ; Save emulator context into the context area   
-                       std             r8,vmmppcXmsr(r5)                               
-                       std             r9,vmmppcXr0(r5)                                
-                       std             r10,vmmppcXr1(r5)                               
-                       std             r11,vmmppcXr2(r5)                               
-                       std             r12,vmmppcXr3(r5)                               
-                       std             r13,vmmppcXr4(r5)                               
-                       std             r14,vmmppcXr5(r5)                       
-
-;                      
-;                      Save the first 3 parameters if we are an SC (we will take care of the last later)
-;
-                       bne+    cr1,sw64x1done                          ; Skip next if not an SC exception...   
-                       std             r12,return_paramsX+0(r5)        ; Save the first return
-                       std             r13,return_paramsX+8(r5)        ; Save the second return
-                       std             r14,return_paramsX+16(r5)       ; Save the third return
-
-sw64x1done:    
-                       std             r15,savesrr0(r30)                       ; Save vm context into the savearea     
-                       std             r23,savesrr1(r30)                               
-                       std             r17,saver0(r30)                         
-                       std             r18,saver1(r30)         
-                       std             r19,saver2(r30)         
-                       std             r20,saver3(r30)                         
-                       std             r21,saver4(r30)         
-                       la              r6,vmmppcr14(r5)                        ; Point to fourth line          
-                       std             r22,saver5(r30)                         
-                       
-                       dcbt    0,r6                                            ; Touch fourth line
-
-;                      Swap 8 registers
-                       
-                       ld              r7,saver6(r30)                  ; Read savearea 
-                       ld              r8,saver7(r30)                          
-                       ld              r9,saver8(r30)                          
-                       ld              r10,saver9(r30)                         
-                       ld              r11,saver10(r30)                                
-                       ld              r12,saver11(r30)                                
-                       ld              r13,saver12(r30)                                
-                       ld              r14,saver13(r30)                                
-                       
-                       bt              vmmDoing64,sw64x2                       ; Skip to 64-bit stuff
-
-                       lwz             r15,vmmppcr6(r5)                        ; Read vm context 
-                       lwz             r24,vmmppcr7(r5)                                
-                       lwz             r17,vmmppcr8(r5)                                
-                       lwz             r18,vmmppcr9(r5)                
-                       lwz             r19,vmmppcr10(r5)               
-                       lwz             r20,vmmppcr11(r5)                               
-                       lwz             r21,vmmppcr12(r5)                               
-                       lwz             r22,vmmppcr13(r5)                               
-
-                       stw             r7,vmmppcr6(r5)                         ; Write context 
-                       stw             r8,vmmppcr7(r5)                         
-                       stw             r9,vmmppcr8(r5)                         
-                       stw             r10,vmmppcr9(r5)                                
-                       stw             r11,vmmppcr10(r5)                               
-                       stw             r12,vmmppcr11(r5)                               
-                       stw             r13,vmmppcr12(r5)       
-                       la              r6,vmmppcr22(r5)                        ; Point to fifth line                   
-                       stw             r14,vmmppcr13(r5)                               
-
-                       dcbt    0,r6                                            ; Touch fifth line
-                       b               sw64x2done                                      ; We are done with this section...
-
-sw64x2:                ld              r15,vmmppcXr6(r5)                       ; Read vm context 
-                       ld              r24,vmmppcXr7(r5)                               
-                       ld              r17,vmmppcXr8(r5)                               
-                       ld              r18,vmmppcXr9(r5)               
-                       ld              r19,vmmppcXr10(r5)              
-                       ld              r20,vmmppcXr11(r5)                              
-                       ld              r21,vmmppcXr12(r5)                              
-                       ld              r22,vmmppcXr13(r5)                              
-
-                       std             r7,vmmppcXr6(r5)                                ; Write context 
-                       std             r8,vmmppcXr7(r5)                                
-                       std             r9,vmmppcXr8(r5)                                
-                       std             r10,vmmppcXr9(r5)                               
-                       std             r11,vmmppcXr10(r5)                              
-                       std             r12,vmmppcXr11(r5)                              
-                       std             r13,vmmppcXr12(r5)      
-                       la              r6,vmmppcXr22(r5)                       ; Point to fifth line                   
-                       std             r14,vmmppcXr13(r5)                              
-
-                       dcbt    0,r6                                            ; Touch fifth line
-
-sw64x2done:    std             r15,saver6(r30)                 ; Write vm context 
-                       std             r24,saver7(r30)                         
-                       std             r17,saver8(r30)                         
-                       std             r18,saver9(r30)         
-                       std             r19,saver10(r30)                
-                       std             r20,saver11(r30)                                
-                       std             r21,saver12(r30)                                
-                       std             r22,saver13(r30)                                
-
-;                      Swap 8 registers
-                       
-                       ld              r7,saver14(r30)                 ; Read savearea 
-                       ld              r8,saver15(r30)                         
-                       ld              r9,saver16(r30)                         
-                       ld              r10,saver17(r30)                                
-                       ld              r11,saver18(r30)                                
-                       ld              r12,saver19(r30)                                
-                       ld              r13,saver20(r30)                                
-                       ld              r14,saver21(r30)                                
-
-                       bt              vmmDoing64,sw64x3                       ; Skip to 64-bit stuff
-
-                       lwz             r15,vmmppcr14(r5)                       ; Read vm context 
-                       lwz             r24,vmmppcr15(r5)                               
-                       lwz             r17,vmmppcr16(r5)                               
-                       lwz             r18,vmmppcr17(r5)               
-                       lwz             r19,vmmppcr18(r5)               
-                       lwz             r20,vmmppcr19(r5)                               
-                       lwz             r21,vmmppcr20(r5)                               
-                       lwz             r22,vmmppcr21(r5)                               
-
-                       stw             r7,vmmppcr14(r5)                        ; Write context 
-                       stw             r8,vmmppcr15(r5)                                
-                       stw             r9,vmmppcr16(r5)                                
-                       stw             r10,vmmppcr17(r5)                               
-                       stw             r11,vmmppcr18(r5)                               
-                       stw             r12,vmmppcr19(r5)                               
-                       stw             r13,vmmppcr20(r5)
-                       la              r6,vmmppcr30(r5)                        ; Point to sixth line                           
-                       stw             r14,vmmppcr21(r5)                               
-                       
-                       dcbt    0,r6                                            ; Touch sixth line
-                       b               sw64x3done                                      ; Done with this section...
-
-sw64x3:                ld              r15,vmmppcXr14(r5)                      ; Read vm context 
-                       ld              r24,vmmppcXr15(r5)                              
-                       ld              r17,vmmppcXr16(r5)                              
-                       ld              r18,vmmppcXr17(r5)              
-                       ld              r19,vmmppcXr18(r5)              
-                       ld              r20,vmmppcXr19(r5)                              
-                       ld              r21,vmmppcXr20(r5)                              
-                       ld              r22,vmmppcXr21(r5)                              
-
-                       std             r7,vmmppcXr14(r5)                       ; Write context 
-                       std             r8,vmmppcXr15(r5)                               
-                       std             r9,vmmppcXr16(r5)                               
-                       std             r10,vmmppcXr17(r5)                              
-                       std             r11,vmmppcXr18(r5)                              
-                       std             r12,vmmppcXr19(r5)                              
-                       std             r13,vmmppcXr20(r5)
-                       la              r6,vmmppcXr30(r5)                       ; Point to sixth line                           
-                       std             r14,vmmppcXr21(r5)                              
-                       
-                       dcbt    0,r6                                            ; Touch sixth line
-
-sw64x3done:    std             r15,saver14(r30)                        ; Write vm context 
-                       std             r24,saver15(r30)                                
-                       std             r17,saver16(r30)                                
-                       std             r18,saver17(r30)                
-                       std             r19,saver18(r30)                
-                       std             r20,saver19(r30)                                
-                       std             r21,saver20(r30)                                
-                       std             r22,saver21(r30)                                
-
-;                      Swap 8 registers
-                       
-                       ld              r7,saver22(r30)                 ; Read savearea 
-                       ld              r8,saver23(r30)                         
-                       ld              r9,saver24(r30)                         
-                       ld              r10,saver25(r30)                                
-                       ld              r11,saver26(r30)                                
-                       ld              r12,saver27(r30)                                
-                       ld              r13,saver28(r30)                                
-                       ld              r14,saver29(r30)                                
-
-                       bt              vmmDoing64,sw64x4                       ; Skip to 64-bit stuff
-
-                       lwz             r15,vmmppcr22(r5)                       ; Read vm context 
-                       lwz             r24,vmmppcr23(r5)                               
-                       lwz             r17,vmmppcr24(r5)                               
-                       lwz             r18,vmmppcr25(r5)               
-                       lwz             r19,vmmppcr26(r5)               
-                       lwz             r20,vmmppcr27(r5)                               
-                       lwz             r21,vmmppcr28(r5)                               
-                       lwz             r22,vmmppcr29(r5)                               
-
-                       stw             r7,vmmppcr22(r5)                        ; Write context 
-                       stw             r8,vmmppcr23(r5)                                
-                       stw             r9,vmmppcr24(r5)                                
-                       stw             r10,vmmppcr25(r5)                               
-                       stw             r11,vmmppcr26(r5)                               
-                       stw             r12,vmmppcr27(r5)                               
-                       stw             r13,vmmppcr28(r5)       
-                       la              r6,vmmppcvscr(r5)                       ; Point to seventh line                 
-                       stw             r14,vmmppcr29(r5)                               
-                       dcbt    0,r6                                            ; Touch seventh line
-                       b               sw64x4done                                      ; Done with this section...
-                       
-sw64x4:                ld              r15,vmmppcXr22(r5)                      ; Read vm context 
-                       ld              r24,vmmppcXr23(r5)                              
-                       ld              r17,vmmppcXr24(r5)                              
-                       ld              r18,vmmppcXr25(r5)              
-                       ld              r19,vmmppcXr26(r5)              
-                       ld              r20,vmmppcXr27(r5)                              
-                       ld              r21,vmmppcXr28(r5)                              
-                       ld              r22,vmmppcXr29(r5)                              
-
-                       std             r7,vmmppcXr22(r5)                       ; Write context 
-                       std             r8,vmmppcXr23(r5)                               
-                       std             r9,vmmppcXr24(r5)                               
-                       std             r10,vmmppcXr25(r5)                              
-                       std             r11,vmmppcXr26(r5)                              
-                       std             r12,vmmppcXr27(r5)                              
-                       std             r13,vmmppcXr28(r5)      
-                       la              r6,vmmppcvscr(r5)                       ; Point to seventh line                 
-                       std             r14,vmmppcXr29(r5)                              
-
-                       dcbt    0,r6                                            ; Touch seventh line
-
-sw64x4done:    std             r15,saver22(r30)                        ; Write vm context 
-                       std             r24,saver23(r30)                                
-                       std             r17,saver24(r30)                                
-                       std             r18,saver25(r30)                
-                       std             r19,saver26(r30)                
-                       std             r20,saver27(r30)                                
-                       std             r21,saver28(r30)                                
-                       std             r22,saver29(r30)                                
-
-;                      Swap 8 registers
-                       
-                       ld              r7,saver30(r30)                 ; Read savearea 
-                       ld              r8,saver31(r30)                         
-                       lwz             r9,savecr(r30)                          
-                       ld              r10,savexer(r30)                                
-                       ld              r11,savelr(r30)                         
-                       ld              r12,savectr(r30)                                
-                       lwz             r14,savevrsave(r30)                             
-
-                       bt              vmmDoing64,sw64x5                       ; Skip to 64-bit stuff
-
-                       lwz             r15,vmmppcr30(r5)                       ; Read vm context 
-                       lwz             r24,vmmppcr31(r5)                               
-                       lwz             r17,vmmppccr(r5)                                
-                       lwz             r18,vmmppcxer(r5)               
-                       lwz             r19,vmmppclr(r5)                
-                       lwz             r20,vmmppcctr(r5)                               
-                       lwz             r22,vmmppcvrsave(r5)                            
-
-                       stw             r7,vmmppcr30(r5)                        ; Write context 
-                       stw             r8,vmmppcr31(r5)                                
-                       stw             r9,vmmppccr(r5)                         
-                       stw             r10,vmmppcxer(r5)                               
-                       stw             r11,vmmppclr(r5)                                
-                       stw             r12,vmmppcctr(r5)                               
-                       stw             r14,vmmppcvrsave(r5)    
-                       b               sw64x5done                                      ; Done here...          
-
-sw64x5:                ld              r15,vmmppcXr30(r5)                      ; Read vm context 
-                       ld              r24,vmmppcXr31(r5)                              
-                       lwz             r17,vmmppcXcr(r5)                               
-                       ld              r18,vmmppcXxer(r5)              
-                       ld              r19,vmmppcXlr(r5)               
-                       ld              r20,vmmppcXctr(r5)                              
-                       lwz             r22,vmmppcXvrsave(r5)                           
-
-                       std             r7,vmmppcXr30(r5)                       ; Write context 
-                       std             r8,vmmppcXr31(r5)                               
-                       stw             r9,vmmppcXcr(r5)                                
-                       std             r10,vmmppcXxer(r5)                              
-                       std             r11,vmmppcXlr(r5)                               
-                       std             r12,vmmppcXctr(r5)                              
-                       stw             r14,vmmppcXvrsave(r5)                           
-
-sw64x5done:    std             r15,saver30(r30)                        ; Write vm context 
-                       std             r24,saver31(r30)                                
-                       stw             r17,savecr(r30)                         
-                       std             r18,savexer(r30)                
-                       std             r19,savelr(r30)         
-                       std             r20,savectr(r30)                                
-                       stw             r22,savevrsave(r30)                             
-
-;                      Swap 8 registers
-                       
-                       lwz             r7,savevscr+0(r30)                      ; Read savearea 
-                       lwz             r8,savevscr+4(r30)                              
-                       lwz             r9,savevscr+8(r30)                              
-                       lwz             r10,savevscr+12(r30)                            
-                       lwz             r11,savefpscrpad(r30)                           
-                       lwz             r12,savefpscr(r30)                              
-
-                       lwz             r15,vmmppcvscr+0(r5)            ; Read vm context 
-                       lwz             r24,vmmppcvscr+4(r5)                            
-                       lwz             r17,vmmppcvscr+8(r5)                            
-                       lwz             r18,vmmppcvscr+12(r5)           
-                       lwz             r19,vmmppcfpscrpad(r5)          
-                       lwz             r20,vmmppcfpscr(r5)                             
-
-                       stw             r7,vmmppcvscr+0(r5)                     ; Write context 
-                       stw             r8,vmmppcvscr+4(r5)                             
-                       stw             r9,vmmppcvscr+8(r5)                             
-                       stw             r10,vmmppcvscr+12(r5)                           
-                       stw             r11,vmmppcfpscrpad(r5)                          
-                       stw             r12,vmmppcfpscr(r5)                             
-
-                       stw             r15,savevscr+0(r30)                     ; Write vm context 
-                       stw             r24,savevscr+4(r30)                             
-                       stw             r17,savevscr+8(r30)                             
-                       stw             r18,savevscr+12(r30)            
-                       stw             r19,savefpscrpad(r30)           
-                       stw             r20,savefpscr(r30)                              
-
-                       
-;
-;                      Cobble up the exception return code and save any specific return values
-;
-                       
-                       lwz             r7,saveexception(r30)           ; Pick up the exception code
-                       rlwinm  r8,r7,30,24,31                          ; Convert exception to return code
-                       cmplwi  r7,T_DATA_ACCESS                        ; Was this a DSI?
-                       stw             r8,return_code(r5)                      ; Save the exit code
-                       cmplwi  cr1,r7,T_INSTRUCTION_ACCESS     ; Exiting because of an ISI?
-                       beq+    swapDSI64                                       ; Yeah...
-                       cmplwi  r7,T_ALIGNMENT                          ; Alignment exception?
-                       beq+    cr1,swapISI64                           ; We had an ISI...
-                       cmplwi  cr1,r7,T_SYSTEM_CALL            ; Exiting because of an system call?
-                       beq+    swapDSI64                                       ; An alignment exception looks like a DSI...
-                       beq+    cr1,swapSC64                            ; We had a system call...
-                       
-                       blr                                                                     ; Return...
-
-;
-;                      Set exit returns for a DSI or alignment exception
-;
-
-swapDSI64:     ld              r10,savedar(r30)                        ; Get the DAR
-                       lwz             r7,savedsisr(r30)                       ; and the DSISR
-                       bt              vmmDoing64,sw64DSI                      ; Skip to 64-bit stuff...
-
-
-                       stw             r10,return_params+0(r5)         ; Save DAR as first return parm
-                       stw             r7,return_params+4(r5)          ; Save DSISR as second return parm
-                       blr                                                                     ; Return...
-
-sw64DSI:       std             r10,return_paramsX+0(r5)        ; Save DAR as first return parm
-                       std             r7,return_paramsX+8(r5)         ; Save DSISR as second return parm (note that this is expanded to 64 bits)
-                       blr                                                                     ; Return...
-
-;
-;                      Set exit returns for a ISI
-;
-
-swapISI64:     bt              vmmDoing64,sw64ISI                      ; Skip to 64-bit stuff...
-                       lwz             r7,vmmppcmsr(r5)                        ; Get the SRR1 value
-                       lwz             r10,vmmppcpc(r5)                        ; Get the PC as failing address
-                       rlwinm  r7,r7,0,1,4                                     ; Save the bits that match the DSISR
-                       stw             r10,return_params+0(r5)         ; Save PC as first return parm
-                       stw             r7,return_params+4(r5)          ; Save the pseudo-DSISR as second return parm
-                       blr                                                                     ; Return...
-
-sw64ISI:       ld              r7,vmmppcXmsr(r5)                       ; Get the SRR1 value
-                       ld              r10,vmmppcXpc(r5)                       ; Get the PC as failing address
-                       rlwinm  r7,r7,0,1,4                                     ; Save the bits that match the DSISR
-                       std             r10,return_paramsX+0(r5)                ; Save PC as first return parm
-                       std             r7,return_paramsX+8(r5)         ; Save the pseudo-DSISR as second return parm
-                       blr                                                                     ; Return...
-
-;
-;                      Set exit returns for a system call (note: we did the first 3 earlier)
-;                      Do we really need to pass parameters back here????
-;
-
-swapSC64:      bt              vmmDoing64,sw64SC                       ; Skip to 64-bit stuff...
-                       lwz             r10,vmmppcr6(r5)                        ; Get the fourth paramter
-                       stw             r10,return_params+12(r5)        ; Save it
-                       blr                                                                     ; Return...
-
-sw64SC:                ld              r10,vmmppcXr6(r5)                       ; Get the fourth paramter
-                       std             r10,return_paramsX+24(r5)       ; Save it
-                       blr                                                                     ; Return...
-
 ;
 ;                      vmmFamGuestResume:
 ;                              Restore Guest context from Fam mode.
@@ -1645,32 +987,29 @@ sw64SC:          ld              r10,vmmppcXr6(r5)                       ; Get the fourth paramter
 vmmFamGuestResume:
                        mfsprg  r10,0                                                   ; Get the per_proc
                        lwz             r27,vmmCEntry(r3)                               ; Get the context that is active
-                       lwz             r4,VMMXAFlgs(r10)                               ; Get the eXtended Architecture flags                   
-                       rlwinm. r4,r4,0,0,0                                             ; Are we doing a 64-bit virtual machine?                
                        lwz             r15,spcFlags(r10)                               ; Get per_proc special flags
                        mr              r26,r3                                                  ; Save the activation pointer
+                       lwz             r17,vmmFlags(r27)                               ; Get the status flags
                        lwz             r20,vmmContextKern(r27)                 ; Get the comm area
                        rlwinm  r15,r15,0,FamVMmodebit+1,FamVMmodebit-1 ; Clear FamVMmodebit
                        stw             r15,spcFlags(r10)                               ; Update the special flags
-                       bne             fgrX
+                       rlwinm. r0,r17,0,vmmMapDoneb,vmmMapDoneb        ; Did we just do a map function?
                        lwz             r7,famguestpc(r20)                              ; Load famguest ctx pc
-                       bf++    vmmMapDone,fgrNoMap                             ; No mapping done for this space.
+                       andc    r17,r17,r0                                              ; Turn off map flag
+                       stw             r17,vmmFlags(r27)                               ; Update vmmFlags
+                       beq+    vmmFamRetNoMap                                  ; No mapping done...
                        lwz             r3,SAVflags(r30)                                ; Pick up the savearea flags
-                       lwz             r2,vmmLastMap(r28)                              ; Get the last mapped address
-                       lwz             r6,vmmLastMap+4(r28)                    ; Get the last mapped address
+                       lwz             r2,vmmLastMap(r27)                              ; Get the last mapped address
                        li              r4,T_DATA_ACCESS                                ; Change to DSI fault
                        oris    r3,r3,hi16(SAVredrive)                  ; Set exception redrive
                        stw             r2,savedar(r30)                                 ; Set the DAR to the last thing we mapped
-                       stw             r6,savedar+4(r30)                               ; Set the DAR to the last thing we mapped
                        stw             r3,SAVflags(r30)                                ; Turn on the redrive request
                        lis             r2,hi16(MASK(DSISR_HASH))               ; Set PTE/DBAT miss
                        stw             r4,saveexception(r30)                   ; Say we need to emulate a DSI
-                       li              r0,0                                                    ; Clear
                        stw             r2,savedsisr(r30)                               ; Pretend we have a PTE miss
-                       stb             r0,vmmGFlags+3(r28)                             ; Show that the redrive has been taken care of
-fgrNoMap:
-                       lwz             r4,savesrr1+4(r30)                              ; Get the saved MSR value
-                       stw             r7,savesrr0+4(r30)                              ; Set savearea pc
+vmmFamRetNoMap:
+                       mfsrr1  r4                                                              ; Get the current MSR value
+                       stw             r7,savesrr0(r30)                                ; Set savearea pc
                        lwz             r5,famguestmsr(r20)                             ; Load famguest ctx msr
                        lis             r6,hi16(MSR_IMPORT_BITS)                ; Get the MSR bits that are controllable by user
                        ori             r6,r6,lo16(MSR_IMPORT_BITS)             ; Get the rest of the MSR bits that are controllable by user
@@ -1679,105 +1018,48 @@ fgrNoMap:
                        ori             r5,r5,lo16(MSR_EXPORT_MASK_SET) ; Force on the other required bits
                        rlwimi  r5,r4,0,MSR_FP_BIT,MSR_FP_BIT   ; Propagate guest FP
                        rlwimi  r5,r4,0,MSR_VEC_BIT,MSR_VEC_BIT ; Propagate guest Vector        
-                       stw             r5,savesrr1+4(r30)                              ; Set savearea srr1
+                       stw             r5,savesrr1(r30)                                ; Set savearea srr1
                        lwz             r4,famguestr0(r20)                              ; Load famguest ctx r0
                        lwz             r5,famguestr1(r20)                              ; Load famguest ctx r1
                        lwz             r6,famguestr2(r20)                              ; Load famguest ctx r2
                        lwz             r7,famguestr3(r20)                              ; Load famguest ctx r3
-                       stw             r4,saver0+4(r30)                                ; Set savearea r0
-                       stw             r5,saver1+4(r30)                                ; Set savearea r1
-                       stw             r6,saver2+4(r30)                                ; Set savearea r2
-                       stw             r7,saver3+4(r30)                                ; Set savearea r3
+                       stw             r4,saver0(r30)                                  ; Set savearea r0
+                       stw             r5,saver1(r30)                                  ; Set savearea r1
+                       stw             r6,saver2(r30)                                  ; Set savearea r2
+                       stw             r7,saver3(r30)                                  ; Set savearea r3
                        lwz             r4,famguestr4(r20)                              ; Load famguest ctx r4
                        lwz             r5,famguestr5(r20)                              ; Load famguest ctx r5
                        lwz             r6,famguestr6(r20)                              ; Load famguest ctx r6
                        lwz             r7,famguestr7(r20)                              ; Load famguest ctx r7
-                       stw             r4,saver4+4(r30)                                ; Set savearea r4
-                       stw             r5,saver5+4(r30)                                ; Set savearea r5
-                       stw             r6,saver6+4(r30)                                ; Set savearea r6
-                       stw             r7,saver7+4(r30)                                ; Set savearea r7
-                       b               fgrret
-fgrX:
-                       ld              r7,famguestXpc(r20)                             ; Load famguest ctx pc
-                       bf++    vmmMapDone,fgrXNoMap                    ; No mapping done for this space.
-                       lwz             r3,SAVflags(r30)                                ; Pick up the savearea flags
-                       ld              r2,vmmLastMap(r28)                              ; Get the last mapped address
-                       li              r4,T_DATA_ACCESS                                ; Change to DSI fault
-                       oris    r3,r3,hi16(SAVredrive)                  ; Set exception redrive
-                       std             r2,savedar(r30)                                 ; Set the DAR to the last thing we mapped
-                       stw             r3,SAVflags(r30)                                ; Turn on the redrive request
-                       lis             r2,hi16(MASK(DSISR_HASH))               ; Set PTE/DBAT miss
-                       stw             r4,saveexception(r30)                   ; Say we need to emulate a DSI
-                       li              r0,0                                                    ; Clear
-                       stw             r2,savedsisr(r30)                               ; Pretend we have a PTE miss
-                       stb             r0,vmmGFlags+3(r28)                             ; Show that the redrive has been taken care of
-fgrXNoMap:
-                       ld              r4,savesrr1(r30)                                ; Get the saved MSR value
-                       std             r7,savesrr0(r30)                                ; Set savearea pc
-                       ld              r5,famguestXmsr(r20)                    ; Load famguest ctx msr
-                       lis             r6,hi16(MSR_IMPORT_BITS)                ; Get the MSR bits that are controllable by user
-                       ori             r6,r6,lo16(MSR_IMPORT_BITS)             ; Get the rest of the MSR bits that are controllable by user
-                       and             r5,r5,r6                                                ; Keep only the controllable bits
-                       oris    r5,r5,hi16(MSR_EXPORT_MASK_SET) ; Force on the required bits
-                       ori             r5,r5,lo16(MSR_EXPORT_MASK_SET) ; Force on the other required bits
-                       rlwimi  r5,r4,0,MSR_FP_BIT,MSR_FP_BIT   ; Propagate guest FP
-                       rlwimi  r5,r4,0,MSR_VEC_BIT,MSR_VEC_BIT ; Propagate guest Vector        
-                       std             r5,savesrr1(r30)                                ; Set savearea srr1
-                       ld              r4,famguestXr0(r20)                             ; Load famguest ctx r0
-                       ld              r5,famguestXr1(r20)                             ; Load famguest ctx r1
-                       ld              r6,famguestXr2(r20)                             ; Load famguest ctx r2
-                       ld              r7,famguestXr3(r20)                             ; Load famguest ctx r3
-                       std             r4,saver0(r30)                                  ; Set savearea r0
-                       std             r5,saver1(r30)                                  ; Set savearea r1
-                       std             r6,saver2(r30)                                  ; Set savearea r2
-                       std             r7,saver3(r30)                                  ; Set savearea r3
-                       ld              r4,famguestXr4(r20)                             ; Load famguest ctx r4
-                       ld              r5,famguestXr5(r20)                             ; Load famguest ctx r5
-                       ld              r6,famguestXr6(r20)                             ; Load famguest ctx r6
-                       ld              r7,famguestXr7(r20)                             ; Load famguest ctx r7
-                       std             r4,saver4(r30)                                  ; Set savearea r4
-                       std             r5,saver5(r30)                                  ; Set savearea r5
-                       std             r6,saver6(r30)                                  ; Set savearea r6
-                       std             r7,saver7(r30)                                  ; Set savearea r7
-fgrret:
+                       stw             r4,saver4(r30)                                  ; Set savearea r4
+                       stw             r5,saver5(r30)                                  ; Set savearea r5
+                       stw             r6,saver6(r30)                                  ; Set savearea r6
+                       stw             r7,saver7(r30)                                  ; Set savearea r7
+
                        li              r3,1                                                    ; Show normal exit with check for AST
                        lwz             r16,ACT_THREAD(r26)                             ; Restore the thread pointer
                        b               EXT(ppcscret)                                   ; Go back to handler...
 
 ;
-;                      FAM Intercept exception handler
+;                      FAM Intercept handler
 ;
 
                        .align  5
-                       .globl  EXT(vmm_fam_exc)
-
-LEXT(vmm_fam_exc)
-                       lwz             r4,VMMXAFlgs(r2)                                ; Get the eXtended Architecture flags                   
-                       lwz             r1,pfAvailable(r2)                              ; Get the CPU features flags
-                       rlwinm. r4,r4,0,0,0                                             ; Are we doing a 64-bit virtual machine?                
-                       bne             fexcX
-                       lwz             r4,saver4+4(r13)                                ; Load savearea r4
+                       .globl  EXT(vmm_fam_handler)
+
+LEXT(vmm_fam_handler)
+                       lwz             r4,saver4(r13)                                  ; Load savearea r0
                        cmplwi  r11,T_ALIGNMENT                                 ; Alignment exception?
                        lwz             r3,VMMareaPhys(r2)                              ; Load phys state page addr
-                       mtcrf   0x02,r1                                                 ; Move pf64Bit to its normal place in CR6
                        cmplwi  cr1,r11,T_PROGRAM                               ; Exiting because of an PRG?
-            bt++    pf64Bitb,fexcVMareaPhys64          ; Go do this on a 64-bit machine...
-                       slwi    r3,r3,12                                                ; Change ppnum to physical address
-                       b               fexcVMareaPhysres
-fexcVMareaPhys64:
-                       mtxer   r5                                                              ; Restore xer
-                       lwz             r5,saver5+4(r13)                                ; Load savearea r5
-                       lwz             r6,saver6+4(r13)                                ; Load savearea r6
-                       sldi    r3,r3,12                                                ; Change ppnum to physical address
-fexcVMareaPhysres:
                        stw             r4,famguestr4(r3)                               ; Save r4 in famguest ctx
                        stw             r5,famguestr5(r3)                               ; Save r5 in famguest ctx
                        stw             r6,famguestr6(r3)                               ; Save r6 in famguest ctx
                        stw             r7,famguestr7(r3)                               ; Save r7 in famguest ctx
-                       lwz             r4,saver0+4(r13)                                ; Load savearea r0
-                       lwz             r5,saver1+4(r13)                                ; Load savearea r1
-                       lwz             r6,saver2+4(r13)                                ; Load savearea r2
-                       lwz             r7,saver3+4(r13)                                ; Load savearea r3
+                       lwz             r4,saver0(r13)                                  ; Load savearea r0
+                       lwz             r5,saver1(r13)                                  ; Load savearea r1
+                       lwz             r6,saver2(r13)                                  ; Load savearea r2
+                       lwz             r7,saver3(r13)                                  ; Load savearea r3
                        stw             r4,famguestr0(r3)                               ; Save r0 in famguest ctx
                        stw             r5,famguestr1(r3)                               ; Save r1 in famguest ctx
                        stw             r6,famguestr2(r3)                               ; Save r2 in famguest ctx
@@ -1794,25 +1076,24 @@ fexcVMareaPhysres:
                        mtsrr1  r6                                                              ; Set srr1
                        mr              r6,r3                                                   ; Set r6 with  phys state page addr
                        rlwinm  r7,r11,30,24,31                                 ; Convert exception to return code
-                       beq+    cr1,fexcPRG                                             ; We had a program exception...
-                       bne+    fexcret 
+                       beq+    cr1,famPRG                                              ; We had a program exception...
+                       bne+    famRet  
                                                                                                        ; We had an Alignment...
                        mfdar   r3                                                              ; Load dar
                        mfdsisr r4                                                              ; Load dsisr
                        stw             r3,famparam+0x4(r6)                             ; Set famparam 1 with dar
                        stw             r4,famparam+0x8(r6)                             ; Set famparam 2 with dsir
-                       b               fexcret                                                 ;
-fexcPRG:
+                       b               famRet                                                  ;
+famPRG:
                        stw             r4,famparam+0x4(r6)                             ; Set famparam 1 with srr1
                        mr              r3,r4                                                   ; Set r3 with dsisr
                        lwz             r4,famguestr4(r6)                               ; Load r4 from famguest context
-fexcret:
+famRet:
                        lwz             r5,famguestr5(r6)                               ; Load r5 from famguest context
                        lwz             r13,famhandler(r6)                              ; Load user address to resume
                        stw             r2,famparam(r6)                                 ; Set famparam 0 with srr0
                        stw             r7,famdispcode(r6)                              ; Save the exit code
                        lwz             r1,famrefcon(r6)                                ; load refcon
-            bt++    pf64Bitb,fexcrfi64                         ; Go do this on a 64-bit machine...
                        mtcr    r0                                                              ; Restore cr
                        mtsrr0  r13                                                             ; Load srr0
                        mr              r0,r7                                                   ; Set dispatch code
@@ -1821,191 +1102,63 @@ fexcret:
                        mfsprg  r13,2                                                   ; Restore r13
                        mfsprg  r11,3                                                   ; Restore r11
                        rfi
-fexcrfi64:
-                       mtcr    r0                                                              ; Restore cr
-                       mtsrr0  r13                                                             ; Load srr0
-                       mr              r0,r7                                                   ; Set dispatch code
-                       lwz             r7,famguestr7(r6)                               ; Load r7 from famguest context
-                       lwz             r6,famguestr6(r6)                               ; Load r6 from famguest context
-                       mfsprg  r13,2                                                   ; Restore r13
-                       mfsprg  r11,3                                                   ; Restore r11
-                       rfid
-fexcX:
-                       mtxer   r5                                                              ; Restore xer
-                       ld              r4,saver4(r13)                                  ; Load savearea r4
-                       ld              r5,saver5(r13)                                  ; Load savearea r5
-                       ld              r6,saver6(r13)                                  ; Load savearea r6
-                       cmplwi  r11,T_ALIGNMENT                                 ; Alignment exception?
-                       lwz             r3,VMMareaPhys(r2)                              ; Load phys state page addr
-                       mtcrf   0x02,r1                                                 ; Move pf64Bit to its normal place in CR6
-                       cmplwi  cr1,r11,T_PROGRAM                               ; Exiting because of an PRG?
-                       sldi    r3,r3,12                                                ; Change ppnum to physical address
-                       std             r4,famguestXr4(r3)                              ; Save r4 in famguest ctx
-                       std             r5,famguestXr5(r3)                              ; Save r5 in famguest ctx
-                       std             r6,famguestXr6(r3)                              ; Save r6 in famguest ctx
-                       std             r7,famguestXr7(r3)                              ; Save r7 in famguest ctx
-                       ld              r4,saver0(r13)                                  ; Load savearea r0
-                       ld              r5,saver1(r13)                                  ; Load savearea r1
-                       ld              r6,saver2(r13)                                  ; Load savearea r2
-                       ld              r7,saver3(r13)                                  ; Load savearea r3
-                       std             r4,famguestXr0(r3)                              ; Save r0 in famguest ctx
-                       std             r5,famguestXr1(r3)                              ; Save r1 in famguest ctx
-                       std             r6,famguestXr2(r3)                              ; Save r2 in famguest ctx
-                       std             r7,famguestXr3(r3)                              ; Save r3 in famguest ctx
-                       lwz             r4,spcFlags(r2)                                 ; Load per_proc spcFlags
-                       oris    r4,r4,hi16(FamVMmode)                   ; Set FAM mode
-                       stw             r4,spcFlags(r2)                                 ; Update per_proc spcFlags
-                       mfsrr0  r2                                                              ; Get the interrupt srr0
-                       mfsrr1  r4                                                              ; Get the interrupt srr1
-                       std             r2,famguestXpc(r3)                              ; Save srr0 in famguest ctx
-                       std             r4,famguestXmsr(r3)                             ; Save srr1 in famguest ctx
-                       li              r6,lo16(MASK(MSR_FE0)|MASK(MSR_SE)|MASK(MSR_BE)|MASK(MSR_FE1))
-                       andc    r6,r4,r6                                                ; Clear SE BE FE0 FE1
-                       mtsrr1  r6                                                              ; Set srr1
-                       mr              r6,r3                                                   ; Set r6 with  phys state page addr
-                       rlwinm  r7,r11,30,24,31                                 ; Convert exception to return code
-                       beq+    cr1,fexcXPRG                                    ; We had a program exception...
-                       bne+    fexcXret        
-                                                                                                       ; We had an Alignment...
-                       mfdar   r3                                                              ; Load dar
-                       mfdsisr r4                                                              ; Load dsisr
-                       std             r3,famparamX+0x8(r6)                    ; Set famparam 1 with dar
-                       std             r4,famparamX+0x10(r6)                   ; Set famparam 2 with dsir
-                       b               fexcXret
-fexcXPRG:
-                       std             r4,famparamX+0x8(r6)                    ; Set famparam 1 with srr1
-                       mr              r3,r4                                                   ; Set r3 with dsisr
-                       ld              r4,famguestXr4(r6)                              ; Load r4 from famguest context
-fexcXret:
-                       ld              r5,famguestXr5(r6)                              ; Load r5 from famguest context
-                       ld              r13,famhandlerX(r6)                             ; Load user address to resume
-                       std             r2,famparamX(r6)                                ; Set famparam 0 with srr0
-                       std             r7,famdispcodeX(r6)                             ; Save the exit code
-                       ld              r1,famrefconX(r6)                               ; load refcon
-                       mtcr    r0                                                              ; Restore cr
-                       mtsrr0  r13                                                             ; Load srr0
-                       mr              r0,r7                                                   ; Set dispatch code
-                       ld              r7,famguestXr7(r6)                              ; Load r7 from famguest context
-                       ld              r6,famguestXr6(r6)                              ; Load r6 from famguest context
-                       mfsprg  r13,2                                                   ; Restore r13
-                       mfsprg  r11,3                                                   ; Restore r11
-                       rfid
 
 ;
 ;                      FAM Intercept DSI ISI fault handler
 ;
 
                        .align  5
-                       .globl  EXT(vmm_fam_pf)
+                       .globl  EXT(vmm_fam_pf_handler)
 
-LEXT(vmm_fam_pf)
-                       lwz             r4,VMMXAFlgs(r2)                                ; Get the eXtended Architecture flags                   
+LEXT(vmm_fam_pf_handler)
                        lwz             r3,VMMareaPhys(r2)                              ; Load phys state page addr
-                       rlwinm. r4,r4,0,0,0                                             ; Are we doing a 64-bit virtual machine?                
-                       bne             fpfX
-                       lwz             r4,saver0+4(r13)                                ; Load savearea r0
-                       lwz             r5,saver1+4(r13)                                ; Load savearea r1
-                       lwz             r6,saver2+4(r13)                                ; Load savearea r2
-                       lwz             r7,saver3+4(r13)                                ; Load savearea r3
-            bt++    pf64Bitb,fpfVMareaPhys64           ; Go do this on a 64-bit machine...
-                       slwi    r3,r3,12                                                ; Change ppnum to physical address
-                       b               fpfVMareaPhysret
-fpfVMareaPhys64:
-                       sldi    r3,r3,12                                                ; Change ppnum to physical address
-fpfVMareaPhysret:
+                       lwz             r4,saver0(r13)                                  ; Load savearea r0
+                       lwz             r5,saver1(r13)                                  ; Load savearea r1
+                       lwz             r6,saver2(r13)                                  ; Load savearea r2
+                       lwz             r7,saver3(r13)                                  ; Load savearea r3
                        stw             r4,famguestr0(r3)                               ; Save r0 in famguest
                        stw             r5,famguestr1(r3)                               ; Save r1 in famguest
                        stw             r6,famguestr2(r3)                               ; Save r2 in famguest
                        stw             r7,famguestr3(r3)                               ; Save r3 in famguest
-                       lwz             r4,saver4+4(r13)                                ; Load savearea r0
-                       lwz             r5,saver5+4(r13)                                ; Load savearea r1
-                       lwz             r6,saver6+4(r13)                                ; Load savearea r2
-                       lwz             r7,saver7+4(r13)                                ; Load savearea r3
+                       lwz             r4,saver4(r13)                                  ; Load savearea r0
+                       lwz             r5,saver5(r13)                                  ; Load savearea r1
+                       lwz             r6,saver6(r13)                                  ; Load savearea r2
+                       lwz             r7,saver7(r13)                                  ; Load savearea r3
                        stw             r4,famguestr4(r3)                               ; Save r4 in famguest
                        lwz             r4,spcFlags(r2)                                 ; Load spcFlags
                        stw             r5,famguestr5(r3)                               ; Save r5 in famguest
-                       lwz             r5,savesrr0+4(r13)                              ; Get the interrupt srr0
+                       lwz             r5,savesrr0(r13)                                ; Get the interrupt srr0
                        stw             r6,famguestr6(r3)                               ; Save r6 in famguest
-                       lwz             r6,savesrr1+4(r13)                              ; Load srr1
+                       lwz             r6,savesrr1(r13)                                ; Load srr1
                        oris    r4,r4,hi16(FamVMmode)                   ; Set FAM mode
                        stw             r7,famguestr7(r3)                               ; Save r7 in famguest
                        stw             r4,spcFlags(r2)                                 ; Update spcFlags
                        lwz             r1,famrefcon(r3)                                ; Load refcon
                        lwz             r2,famhandler(r3)                               ; Load famhandler to resume
                        stw             r5,famguestpc(r3)                               ; Save srr0
-                       stw             r5,saver2+4(r13)                                ; Store srr0 in savearea r2
+                       stw             r5,saver2(r13)                                  ; Store srr0 in savearea r2
                        stw             r5,famparam(r3)                                 ; Store srr0 in fam param 0
                        stw             r6,famguestmsr(r3)                              ; Save srr1 in famguestmsr
                        cmplwi  cr1,r11,T_INSTRUCTION_ACCESS    ; Was this a ISI?
                        rlwinm  r7,r11,30,24,31                                 ; Convert exception to return code
-                       beq+    cr1,fpfISI                                              ; We had an ISI...
-; fpfDSI
-                       lwz             r6,savedar+4(r13)                               ; Load dar from savearea
+                       beq+    cr1,FamPfISI                                    ; We had an ISI...
+; FamPfDSI
+                       lwz             r6,savedar(r13)                                 ; Load dar from savearea
                        lwz             r4,savedsisr(r13)                               ; Load dsisr from savearea
                        stw             r6,famparam+0x4(r3)                             ; Store dar in fam param 1
-                       stw             r6,saver3+4(r13)                                ; Store dar in savearea r3
+                       stw             r6,saver3(r13)                                  ; Store dar in savearea r3
                        stw             r4,famparam+0x8(r3)                             ; Store dsisr in fam param 2
-                       stw             r4,saver4+4(r13)                                ; Store dsisr in savearea r4
-                       b               fpfret
-fpfISI:        
+                       stw             r4,saver4(r13)                                  ; Store dsisr in savearea r4
+                       b               FamPfRet
+FamPfISI:      
                        rlwinm  r6,r6,0,1,4                                             ; Save the bits that match the DSISR
                        stw             r6,famparam+0x4(r3)                             ; Store srr1 in fam param 1 
-                       stw             r6,saver3+4(r13)                                ; Store srr1 in savearea r3
-fpfret:
-                       stw             r7,saver0+4(r13)                                ; Set dispatch code
+                       stw             r6,saver3(r13)                                  ; Store srr1 in savearea r3
+FamPfRet:
+                       stw             r7,saver0(r13)                                  ; Set dispatch code
                        stw             r7,famdispcode(r3)                              ; Set dispatch code
-                       stw             r1,saver1+4(r13)                                ; Store refcon in savearea r1
-                       stw             r2,savesrr0+4(r13)                              ; Store famhandler in srr0
-                       blr
-fpfX:
-                       ld              r4,saver0(r13)                                  ; Load savearea r0
-                       ld              r5,saver1(r13)                                  ; Load savearea r1
-                       ld              r6,saver2(r13)                                  ; Load savearea r2
-                       ld              r7,saver3(r13)                                  ; Load savearea r3
-                       sldi    r3,r3,12                                                ; Change ppnum to physical address
-                       std             r4,famguestXr0(r3)                              ; Save r0 in famguest
-                       std             r5,famguestXr1(r3)                              ; Save r1 in famguest
-                       std             r6,famguestXr2(r3)                              ; Save r2 in famguest
-                       std             r7,famguestXr3(r3)                              ; Save r3 in famguest
-                       ld              r4,saver4(r13)                                  ; Load savearea r0
-                       ld              r5,saver5(r13)                                  ; Load savearea r1
-                       ld              r6,saver6(r13)                                  ; Load savearea r2
-                       ld              r7,saver7(r13)                                  ; Load savearea r3
-                       std             r4,famguestXr4(r3)                              ; Save r4 in famguest
-                       lwz             r4,spcFlags(r2)                                 ; Load spcFlags
-                       std             r5,famguestXr5(r3)                              ; Save r5 in famguest
-                       ld              r5,savesrr0(r13)                                ; Get the interrupt srr0
-                       std             r6,famguestXr6(r3)                              ; Save r6 in famguest
-                       ld              r6,savesrr1(r13)                                ; Load srr1
-                       oris    r4,r4,hi16(FamVMmode)                   ; Set FAM mode
-                       std             r7,famguestXr7(r3)                              ; Save r7 in famguest
-                       stw             r4,spcFlags(r2)                                 ; Update spcFlags
-                       ld              r1,famrefconX(r3)                               ; Load refcon
-                       ld              r2,famhandlerX(r3)                              ; Load famhandler to resume
-                       std             r5,famguestXpc(r3)                              ; Save srr0
-                       std             r5,saver2(r13)                                  ; Store srr0 in savearea r2
-                       std             r5,famparamX(r3)                                ; Store srr0 in fam param 0
-                       std             r6,famguestXmsr(r3)                             ; Save srr1 in famguestmsr
-                       cmplwi  cr1,r11,T_INSTRUCTION_ACCESS    ; Was this a ISI?
-                       rlwinm  r7,r11,30,24,31                                 ; Convert exception to return code
-                       beq+    cr1,fpfXISI                                             ; We had an ISI...
-; fpfXDSI
-                       ld              r6,savedar(r13)                                 ; Load dar from savearea
-                       lwz             r4,savedsisr(r13)                               ; Load dsisr from savearea
-                       std             r6,famparamX+0x8(r3)                    ; Store dar in fam param 1
-                       std             r6,saver3(r13)                                  ; Store dar in savearea r3
-                       std             r4,famparamX+0x10(r3)                           ; Store dsisr in fam param 2
-                       std             r4,saver4(r13)                                  ; Store dsisr in savearea r4
-                       b               fpfXret
-fpfXISI:       
-                       rlwinm  r6,r6,0,1,4                                             ; Save the bits that match the DSISR
-                       std             r6,famparamX+0x8(r3)                    ; Store srr1 in fam param 1 
-                       std             r6,saver3(r13)                                  ; Store srr1 in savearea r3
-fpfXret:
-                       std             r7,saver0(r13)                                  ; Set dispatch code
-                       std             r7,famdispcodeX(r3)                             ; Set dispatch code
-                       std             r1,saver1(r13)                                  ; Store refcon in savearea r1
-                       std             r2,savesrr0(r13)                                ; Store famhandler in srr0
+                       stw             r1,saver1(r13)                                  ; Store refcon in savearea r1
+                       stw             r2,savesrr0(r13)                                ; Store famhandler in srr0
                        blr
 
 ;
@@ -2017,325 +1170,92 @@ fpfXret:
 
 LEXT(vmm_ufp)
                        mfsprg  r3,0                                                    ; Get the per_proc area
-                       mr              r11,r13                                                 ; Saved cr in r11
-                       lwz             r13,VMMXAFlgs(r3)                               ; Get the eXtended Architecture flags                   
-                       rlwinm. r13,r13,0,0,0                                           ; Are we doing a 64-bit virtual machine?                
-                       lwz             r13,pfAvailable(r3)                             ; Get feature flags
-                       mtcrf   0x02,r13                                                ; Put pf64Bitb etc in cr6
-                       lwz             r13,VMMareaPhys(r3)                             ; Load fast assist area
-            bt++    pf64Bitb,ufpVMareaPhys64           ; Go do this on a 64-bit machine...
-                       slwi    r13,r13,12                                              ; Change ppnum to physical address
-                       b               ufpVMareaPhysret
-ufpVMareaPhys64:
-                       sldi    r13,r13,12                                              ; Change ppnum to physical address
-ufpVMareaPhysret:
-                       bne             ufpX
-                       bt              cr5_eq,ufpResumeGuest                   ; if kvmmResumeGuest, branch to ResumeGuest
+                       bt              cr5_eq,ResumeGuest                              ; if kvmmResumeGuest, branch to ResumeGuest
+                       lwz             r3,VMMareaPhys(r3)                              ; Load fast assist area
                        cmpwi   cr7,r4,0                                                ; Compare first arg with 0
                        cmpwi   cr5,r4,7                                                ; Compare first arg with 7
                        cror    cr1_eq,cr7_lt,cr5_gt                    ; Is it in 0 to 7 range
                        beq             cr1,ufpVMret                                    ; Return if not in the range
                        slwi    r4,r4,2                                                 ; multiply index by 4
-                       la              r3,famguestr0(r13)                              ; Load the base address
-                       bt              cr2_eq,ufpSetGuestReg                   ; Set/get selector
-; ufpGetGuestReg
+                       la              r3,famguestr0(r3)                               ; Load the base address
+                       bt              cr6_eq,SetGuestReg                              ; Set/get selector
+; GetGuestReg
                        lwzx    r3,r4,r3                                                ; Load the guest register
                        b               ufpVMret                                                ; Return
-ufpSetGuestReg:
+SetGuestReg:
                        stwx    r5,r4,r3                                                ; Update the guest register
                        li              r3,0                                                    ; Set return value
                        b               ufpVMret                                                ; Return
-ufpResumeGuest:
+ResumeGuest:
                        lwz             r7,spcFlags(r3)                                 ; Pick up the special flags
+                       lwz             r13,VMMareaPhys(r3)                             ; Load fast assist area
                        mtsrr0  r4                                                              ; Set srr0
                        rlwinm. r6,r6,0,vmmKeyb,vmmKeyb                 ; Check vmmKeyb in maskCntrl
                        rlwinm  r7,r7,0,FamVMmodebit+1,FamVMmodebit-1   ; Clear FamVMmodebit
-                       stw             r7,spcFlags(r3)                                 ; Update the special flags
-                       mfsrr1  r6                                                              ; Get the current MSR value
-
-                       lwz             r4,famguestmsr(r13)                             ; Load guest srr1
-                       lis             r1,hi16(MSR_IMPORT_BITS)                ; Get the MSR bits that are controllable by user
-                       ori             r1,r1,lo16(MSR_IMPORT_BITS)             ; Get the rest of the MSR bits that are controllable by user
-                       and             r4,r4,r1                                                ; Keep only the controllable bits
-                       oris    r4,r4,hi16(MSR_EXPORT_MASK_SET) ; Force on the required bits
-                       ori             r4,r4,lo16(MSR_EXPORT_MASK_SET) ; Force on the other required bits
-                       rlwimi  r4,r6,0,MSR_FP_BIT,MSR_FP_BIT   ; Propagate guest FP
-                       rlwimi  r4,r6,0,MSR_VEC_BIT,MSR_VEC_BIT ; Propagate guest Vector        
-                       beq             ufpnokey                                                ; Branch if not key switch
+                       beq             ResumeGuest_nokey                               ; Branch if not key switch
                        mr              r2,r7                                                   ; Save r7
                        rlwimi  r7,r5,32+vmmKeyb-userProtKeybit,userProtKeybit,userProtKeybit   ; Set the protection key
                        cmpw    cr0,r7,r2                                               ; Is userProtKeybit changed?                                            
-                       beq             ufpnokey                                                ; No, go to ResumeGuest_nokey
-                       mr              r5,r3                                                   ; Get the per_proc area
-                       stw             r7,spcFlags(r3)                                 ; Update the special flags
-
-            bt++    pf64Bitb,ufpsave64                 ; Go do this on a 64-bit machine...
-
-                       lwz             r3,next_savearea+4(r5)                  ; Get the exception save area
-                       stw             r8,saver8+4(r3)                                 ; Save r8
-                       stw             r9,saver9+4(r3)                                 ; Save r9
-                       stw             r10,saver10+4(r3)                               ; Save r10
-                       stw             r11,saver11+4(r3)                               ; Save r11
-                       stw             r12,saver12+4(r3)                               ; Save r12
-                       stw             r13,saver13+4(r3)                               ; Save r12
-                       stw             r14,saver14+4(r3)                               ; Save r14
-                       stw             r15,saver15+4(r3)                               ; Save r15
-                       stw             r16,saver16+4(r3)                               ; Save r16
-                       stw             r17,saver17+4(r3)                               ; Save r17
-                       stw             r18,saver18+4(r3)                               ; Save r18
-                       stw             r19,saver19+4(r3)                               ; Save r19
-                       stw             r20,saver20+4(r3)                               ; Save r20
-                       stw             r21,saver21+4(r3)                               ; Save r21
-                       stw             r22,saver22+4(r3)                               ; Save r22
-                       stw             r23,saver23+4(r3)                               ; Save r23
-                       stw             r24,saver24+4(r3)                               ; Save r24
-                       stw             r25,saver25+4(r3)                               ; Save r25
-                       stw             r26,saver26+4(r3)                               ; Save r26
-                       stw             r27,saver27+4(r3)                               ; Save r27
-                       stw             r28,saver28+4(r3)                               ; Save r28
-                       stw             r29,saver29+4(r3)                               ; Save r29
-                       stw             r30,saver30+4(r3)                               ; Save r30
-                       stw             r31,saver31+4(r3)                               ; Save r31
-                       b               ufpsaveres                                              ; Continue
-
-ufpsave64:
-                       ld              r3,next_savearea(r5)                    ; Get the exception save area
-                       std             r8,saver8(r3)                                   ; Save r8
-                       std             r9,saver9(r3)                                   ; Save r9
-                       std             r10,saver10(r3)                                 ; Save r10
-                       std             r11,saver11(r3)                                 ; Save r11
-                       std             r12,saver12(r3)                                 ; Save r12
-                       std             r13,saver13(r3)                                 ; Save r12
-                       std             r14,saver14(r3)                                 ; Save r14
-                       std             r15,saver15(r3)                                 ; Save r15
-                       std             r16,saver16(r3)                                 ; Save r16
-                       std             r17,saver17(r3)                                 ; Save r17
-                       std             r18,saver18(r3)                                 ; Save r18
-                       std             r19,saver19(r3)                                 ; Save r19
-                       std             r20,saver20(r3)                                 ; Save r20
-                       std             r21,saver21(r3)                                 ; Save r21
-                       std             r22,saver22(r3)                                 ; Save r22
-                       std             r23,saver23(r3)                                 ; Save r23
-                       std             r24,saver24(r3)                                 ; Save r24
-                       std             r25,saver25(r3)                                 ; Save r25
-                       std             r26,saver26(r3)                                 ; Save r26
-                       std             r27,saver27(r3)                                 ; Save r27
-                       std             r28,saver28(r3)                                 ; Save r28
-                       std             r29,saver29(r3)                                 ; Save r29
-                       mfxer   r2                                                              ; Get xer
-                       std             r30,saver30(r3)                                 ; Save r30
-                       std             r31,saver31(r3)                                 ; Save r31
-                       std             r2,savexer(r3)                                  ; Save xer
-
-ufpsaveres:
-                       mflr    r20                                                             ; Get lr
-                       li              r2,1                                                    ; Set to  1
-                       stw             r7,spcFlags(r5)                                 ; Update the special flags
-                       mr              r13,r3                                                  ; Set current savearea
-                       mr              r21,r4                                                  ; Save r4
-                       sth             r2,ppInvSeg(r5)                                 ; Force a reload of the SRs
-                       mr              r29,r5                                                  ; Get the per_proc area
-                       mr              r3,r4                                                   ; Set MSR value we going to
-                       bl              EXT(switchSegs)                                 ; Go handle the segment registers/STB
-                       mr              r3,r13                                                  ; Set current savearea
-                       mr              r4,r21                                                  ; Restore r4
-                       mtlr    r20                                                             ; Set lr
-
-            bt++    pf64Bitb,ufprestore64                      ; Go do this on a 64-bit machine...
-                       lwz             r8,saver8+4(r3)                                 ; Load r8
-                       lwz             r9,saver9+4(r3)                                 ; Load r9
-                       lwz             r10,saver10+4(r3)                               ; Load r10
-                       lwz             r11,saver11+4(r3)                               ; Load r11
-                       lwz             r12,saver12+4(r3)                               ; Load r12
-                       lwz             r13,saver13+4(r3)                               ; Load r12
-                       lwz             r14,saver14+4(r3)                               ; Load r14
-                       lwz             r15,saver15+4(r3)                               ; Load r15
-                       lwz             r16,saver16+4(r3)                               ; Load r16
-                       lwz             r17,saver17+4(r3)                               ; Load r17
-                       lwz             r18,saver18+4(r3)                               ; Load r18
-                       lwz             r19,saver19+4(r3)                               ; Load r19
-                       lwz             r20,saver20+4(r3)                               ; Load r20
-                       lwz             r21,saver21+4(r3)                               ; Load r21
-                       lwz             r22,saver22+4(r3)                               ; Load r22
-                       lwz             r23,saver23+4(r3)                               ; Load r23
-                       lwz             r24,saver24+4(r3)                               ; Load r24
-                       lwz             r25,saver25+4(r3)                               ; Load r25
-                       lwz             r26,saver26+4(r3)                               ; Load r26
-                       lwz             r27,saver27+4(r3)                               ; Load r27
-                       lwz             r28,saver28+4(r3)                               ; Load r28
-                       lwz             r29,saver29+4(r3)                               ; Load r29
-                       lwz             r30,saver30+4(r3)                               ; Load r30
-                       lwz             r31,saver31+4(r3)                               ; Load r31
-                       b               ufpnokey                                                ; Continue
-ufprestore64:
-                       ld              r2,savexer(r3)                                  ; Load xer
-                       ld              r8,saver8(r3)                                   ; Load r8
-                       ld              r9,saver9(r3)                                   ; Load r9
-                       ld              r10,saver10(r3)                                 ; Load r10
-                       mtxer   r2                                                              ; Restore xer
-                       ld              r11,saver11(r3)                                 ; Load r11
-                       ld              r12,saver12(r3)                                 ; Load r12
-                       ld              r13,saver13(r3)                                 ; Load r12
-                       ld              r14,saver14(r3)                                 ; Load r14
-                       ld              r15,saver15(r3)                                 ; Load r15
-                       ld              r16,saver16(r3)                                 ; Load r16
-                       ld              r17,saver17(r3)                                 ; Load r17
-                       ld              r18,saver18(r3)                                 ; Load r18
-                       ld              r19,saver19(r3)                                 ; Load r19
-                       ld              r20,saver20(r3)                                 ; Load r20
-                       ld              r21,saver21(r3)                                 ; Load r21
-                       ld              r22,saver22(r3)                                 ; Load r22
-                       ld              r23,saver23(r3)                                 ; Load r23
-                       ld              r24,saver24(r3)                                 ; Load r24
-                       ld              r25,saver25(r3)                                 ; Load r25
-                       ld              r26,saver26(r3)                                 ; Load r26
-                       ld              r27,saver27(r3)                                 ; Load r27
-                       ld              r28,saver28(r3)                                 ; Load r28
-                       ld              r29,saver29(r3)                                 ; Load r29
-                       ld              r30,saver30(r3)                                 ; Load r30
-                       ld              r31,saver31(r3)                                 ; Load r31
-ufpnokey:
-                       mfsprg  r3,0                                                    ; Get the per_proc area
-                       mtsrr1  r4                                                              ; Set srr1
+                       beq             ResumeGuest_nokey                               ; No, go to ResumeGuest_nokey
+                       lwz             r2,PP_USERPMAP(r3)                              ; Get user pmap phys addr
+                       rlwinm  r6,r7,userProtKeybit-2,2,2              ; Extract and shift the key bit
+                       lwz             r5,PMAP_SPACE(r2)                               ; Load the space id
+                       oris    r5,r5,hi16(SEG_REG_PROT)                ; Set the protection
+                       xor             r5,r5,r6                                                ; Flip to proper segment register key
+                       addis   r4,r5,0x0000                                    ; Get SR0 value
+                       mtsr    sr0,r4                                                  ; Load up the SR
+                       addis   r4,r5,0x0010                                    ; Get SR1 value
+                       mtsr    sr1,r4                                                  ; Load up the SR
+                       addis   r4,r5,0x0020                                    ; Get SR2 value
+                       mtsr    sr2,r4                                                  ; Load up the SR
+                       addis   r4,r5,0x0030                                    ; Get SR3 value
+                       mtsr    sr3,r4                                                  ; Load up the SR
+                       addis   r4,r5,0x0040                                    ; Get SR4 value
+                       mtsr    sr4,r4                                                  ; Load up the SR
+                       addis   r4,r5,0x0050                                    ; Get SR5 value
+                       mtsr    sr5,r4                                                  ; Load up the SR
+                       addis   r4,r5,0x0060                                    ; Get SR6 value
+                       mtsr    sr6,r4                                                  ; Load up the SR
+                       addis   r4,r5,0x0070                                    ; Get SR7 value
+                       mtsr    sr7,r4                                                  ; Load up the SR
+                       addis   r4,r5,0x0080                                    ; Get SR8 value
+                       mtsr    sr8,r4                                                  ; Load up the SR
+                       addis   r4,r5,0x0090                                    ; Get SR9 value
+                       mtsr    sr9,r4                                                  ; Load up the SR
+                       addis   r4,r5,0x00a0                                    ; Get SR10 value
+                       mtsr    sr10,r4                                                 ; Load up the SR
+                       addis   r4,r5,0x00b0                                    ; Get SR11 value
+                       mtsr    sr11,r4                                                 ; Load up the SR
+                       addis   r4,r5,0x00c0                                    ; Get SR12 value
+                       mtsr    sr12,r4                                                 ; Load up the SR
+                       addis   r4,r5,0x00d0                                    ; Get SR13 value
+                       mtsr    sr13,r4                                                 ; Load up the SR
+                       addis   r4,r5,0x00e0                                    ; Get SR14 value
+                       mtsr    sr14,r4                                                 ; Load up the SR
+                       addis   r4,r5,0x00f0                                    ; Get SR15 value
+                       mtsr    sr15,r4                                                 ; Load up the SR
+ResumeGuest_nokey:
+                       mfsrr1  r6                                                              ; Get the current MSR value
                        lwz             r0,famguestr0(r13)                              ; Load r0 
                        lwz             r1,famguestr1(r13)                              ; Load r1
+                       lwz             r4,famguestmsr(r13)                             ; Load guest srr1
+                       stw             r7,spcFlags(r3)                                 ; Update the special flags
+                       lis             r5,hi16(MSR_IMPORT_BITS)                ; Get the MSR bits that are controllable by user
                        lwz             r2,famguestr2(r13)                              ; Load r2
                        lwz             r3,famguestr3(r13)                              ; Load r3
+                       ori             r5,r5,lo16(MSR_IMPORT_BITS)             ; Get the rest of the MSR bits that are controllable by user
+                       and             r7,r4,r5                                                ; Keep only the controllable bits
                        lwz             r4,famguestr4(r13)                              ; Load r4
+                       oris    r7,r7,hi16(MSR_EXPORT_MASK_SET) ; Force on the required bits
                        lwz             r5,famguestr5(r13)                              ; Load r5
+                       ori             r7,r7,lo16(MSR_EXPORT_MASK_SET) ; Force on the other required bits
+                       rlwimi  r7,r6,0,MSR_FP_BIT,MSR_FP_BIT   ; Propagate guest FP
+                       rlwimi  r7,r6,0,MSR_VEC_BIT,MSR_VEC_BIT ; Propagate guest Vector        
+                       mtsrr1  r7                                                              ; Set srr1
                        lwz             r6,famguestr6(r13)                              ; Load r6
                        lwz             r7,famguestr7(r13)                              ; Load r7
 ufpVMret:
-                       mfsprg  r13,2                                                   ; Restore R13
-            bt++    pf64Bitb,ufpVMrfi64                                ; Go do this on a 64-bit machine...
-                       mtcrf   0xFF,r11                                                ; Restore CR
-                       mfsprg  r11,3                                                   ; Restore R11
-                       rfi                                                                             ; All done, go back...
-ufpVMrfi64:
                        mtcrf   0xFF,r11                                                ; Restore CR
                        mfsprg  r11,3                                                   ; Restore R11
-                       rfid
-
-ufpX:
-                       bt              cr5_eq,ufpXResumeGuest                  ; if kvmmResumeGuest, branch to ResumeGuest
-                       cmpwi   cr7,r4,0                                                ; Compare first arg with 0
-                       cmpwi   cr5,r4,7                                                ; Compare first arg with 7
-                       cror    cr1_eq,cr7_lt,cr5_gt                    ; Is it in 0 to 7 range
-                       beq             cr1,ufpXVMret                                   ; Return if not in the range
-                       slwi    r4,r4,3                                                 ; multiply index by 8
-                       la              r3,famguestXr0(r13)                             ; Load the base address
-                       bt              cr2_eq,ufpXSetGuestReg                  ; Set/get selector
-; ufpXGetGuestReg
-                       ldx     r3,r4,r3                                                        ; Load the guest register
-                       b                       ufpXVMret                                       ; Return
-ufpXSetGuestReg:
-                       stdx    r5,r4,r3                                                ; Update the guest register
-                       li              r3,0                                                    ; Set return value
-                       b               ufpXVMret                                               ; Return
-ufpXResumeGuest:
-                       lwz             r7,spcFlags(r3)                                 ; Pick up the special flags
-                       mtsrr0  r4                                                              ; Set srr0
-                       rlwinm. r6,r6,0,vmmKeyb,vmmKeyb                 ; Check vmmKeyb in maskCntrl
-                       rlwinm  r7,r7,0,FamVMmodebit+1,FamVMmodebit-1   ; Clear FamVMmodebit
-                       stw             r7,spcFlags(r3)                                 ; Update the special flags
-                       mfsrr1  r6                                                              ; Get the current MSR value
-
-                       ld              r4,famguestXmsr(r13)                    ; Load guest srr1
-                       lis             r1,hi16(MSR_IMPORT_BITS)                ; Get the MSR bits that are controllable by user
-                       ori             r1,r1,lo16(MSR_IMPORT_BITS)             ; Get the rest of the MSR bits that are controllable by user
-                       and             r4,r4,r1                                                ; Keep only the controllable bits
-                       oris    r4,r4,hi16(MSR_EXPORT_MASK_SET) ; Force on the required bits
-                       ori             r4,r4,lo16(MSR_EXPORT_MASK_SET) ; Force on the other required bits
-                       rlwimi  r4,r6,0,MSR_FP_BIT,MSR_FP_BIT   ; Propagate guest FP
-                       rlwimi  r4,r6,0,MSR_VEC_BIT,MSR_VEC_BIT ; Propagate guest Vector        
-                       beq             ufpXnokey                                               ; Branch if not key switch
-                       mr              r2,r7                                                   ; Save r7
-                       rlwimi  r7,r5,32+vmmKeyb-userProtKeybit,userProtKeybit,userProtKeybit   ; Set the protection key
-                       cmpw    cr0,r7,r2                                               ; Is userProtKeybit changed?                                            
-                       beq             ufpXnokey                                               ; No, go to ResumeGuest_nokey
-                       mr              r5,r3                                                   ; Get the per_proc area
-                       stw             r7,spcFlags(r3)                                 ; Update the special flags
-
-                       ld              r3,next_savearea(r5)                    ; Get the exception save area
-                       std             r8,saver8(r3)                                   ; Save r8
-                       std             r9,saver9(r3)                                   ; Save r9
-                       std             r10,saver10(r3)                                 ; Save r10
-                       std             r11,saver11(r3)                                 ; Save r11
-                       std             r12,saver12(r3)                                 ; Save r12
-                       std             r13,saver13(r3)                                 ; Save r12
-                       std             r14,saver14(r3)                                 ; Save r14
-                       std             r15,saver15(r3)                                 ; Save r15
-                       std             r16,saver16(r3)                                 ; Save r16
-                       std             r17,saver17(r3)                                 ; Save r17
-                       std             r18,saver18(r3)                                 ; Save r18
-                       std             r19,saver19(r3)                                 ; Save r19
-                       std             r20,saver20(r3)                                 ; Save r20
-                       std             r21,saver21(r3)                                 ; Save r21
-                       std             r22,saver22(r3)                                 ; Save r22
-                       std             r23,saver23(r3)                                 ; Save r23
-                       std             r24,saver24(r3)                                 ; Save r24
-                       std             r25,saver25(r3)                                 ; Save r25
-                       std             r26,saver26(r3)                                 ; Save r26
-                       std             r27,saver27(r3)                                 ; Save r27
-                       std             r28,saver28(r3)                                 ; Save r28
-                       std             r29,saver29(r3)                                 ; Save r29
-                       mfxer   r2                                                              ; Get xer
-                       std             r30,saver30(r3)                                 ; Save r30
-                       std             r31,saver31(r3)                                 ; Save r31
-                       std             r2,savexer(r3)                                  ; Save xer
-
-                       mflr    r20                                                             ; Get lr
-                       li              r2,1                                                    ; Set to  1
-                       stw             r7,spcFlags(r5)                                 ; Update the special flags
-                       mr              r13,r3                                                  ; Set current savearea
-                       mr              r21,r4                                                  ; Save r4
-                       sth             r2,ppInvSeg(r5)                                 ; Force a reload of the SRs
-                       mr              r29,r5                                                  ; Get the per_proc area
-                       mr              r3,r4                                                   ; Set MSR value we going to
-                       bl              EXT(switchSegs)                                 ; Go handle the segment registers/STB
-                       mr              r3,r13                                                  ; Set current savearea
-                       mr              r4,r21                                                  ; Restore r4
-                       mtlr    r20                                                             ; Set lr
-
-                       ld              r2,savexer(r3)                                  ; Load xer
-                       ld              r8,saver8(r3)                                   ; Load r8
-                       ld              r9,saver9(r3)                                   ; Load r9
-                       ld              r10,saver10(r3)                                 ; Load r10
-                       mtxer   r2                                                              ; Restore xer
-                       ld              r11,saver11(r3)                                 ; Load r11
-                       ld              r12,saver12(r3)                                 ; Load r12
-                       ld              r13,saver13(r3)                                 ; Load r12
-                       ld              r14,saver14(r3)                                 ; Load r14
-                       ld              r15,saver15(r3)                                 ; Load r15
-                       ld              r16,saver16(r3)                                 ; Load r16
-                       ld              r17,saver17(r3)                                 ; Load r17
-                       ld              r18,saver18(r3)                                 ; Load r18
-                       ld              r19,saver19(r3)                                 ; Load r19
-                       ld              r20,saver20(r3)                                 ; Load r20
-                       ld              r21,saver21(r3)                                 ; Load r21
-                       ld              r22,saver22(r3)                                 ; Load r22
-                       ld              r23,saver23(r3)                                 ; Load r23
-                       ld              r24,saver24(r3)                                 ; Load r24
-                       ld              r25,saver25(r3)                                 ; Load r25
-                       ld              r26,saver26(r3)                                 ; Load r26
-                       ld              r27,saver27(r3)                                 ; Load r27
-                       ld              r28,saver28(r3)                                 ; Load r28
-                       ld              r29,saver29(r3)                                 ; Load r29
-                       ld              r30,saver30(r3)                                 ; Load r30
-                       ld              r31,saver31(r3)                                 ; Load r31
-ufpXnokey:
-                       mtsrr1  r4                                                              ; Set srr1
-                       ld              r0,famguestXr0(r13)                             ; Load r0 
-                       ld              r1,famguestXr1(r13)                             ; Load r1
-                       ld              r2,famguestXr2(r13)                             ; Load r2
-                       ld              r3,famguestXr3(r13)                             ; Load r3
-                       ld              r4,famguestXr4(r13)                             ; Load r4
-                       ld              r5,famguestXr5(r13)                             ; Load r5
-                       ld              r6,famguestXr6(r13)                             ; Load r6
-                       ld              r7,famguestXr7(r13)                             ; Load r7
-ufpXVMret:
                        mfsprg  r13,2                                                   ; Restore R13
-                       mtcrf   0xFF,r11                                                ; Restore CR
-                       mfsprg  r11,3                                                   ; Restore R11
-                       rfid
-
+                       rfi                                                                             ; All done, go back...
index fe1642dd025bfd68d60bc621c7889f6be8ab6b50..133cb3a1be48708615ff3538b114f58b51bf479a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 65c6760a94a8022070e9d0fb0f854a4ac859ab1d..d4272c0538c39e83df0bf274f7cc9e493bdf566d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4bb803fd9aad9921bb4a94a4e5762201ca651526..80016e279c21505ec0e51a963e6b8cb3afdca54a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c7bcdb124450a3fac6637b8583681518bb510b09..7fa90283e42ed39773c163572c15564817fdde33 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 98095a0fa2527a9ee61e4962309c3ccf5badc3fa..c66d76ffc714e14affa489d9a669a742e95fdaa4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 905ed93849f0fe72d7d0aa02de2a0d0d9d95d535..d6b4fa4fd95dc55ef66e62230c9d51ce451049dd 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7846ad4f14e1ca2c6aeb0a305fb03c1d31c58e13..242d290e84673421d6377f5854c10c7457914fac 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index ccadc6f04ea1e3c393956911113eedae62ae03aa..e2eb6272a2ff8c627069660bb533e95e6948a219 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 900fa22df7b50e67b27b026b460c4a2a431ab300..84174f5992cb13c29acfd86e32b59f78018ea87b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 51756a87dfd4901f4ea4604a6710816525bd071e..89bf6681cc4ed634bee0a9429d4c0694522242ec 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 5d8a6a45502647c4eda2d669aa5673916c5a00b3..319b0e2e21fe674571d5b1b63b2aecbb741c8f15 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 260a6bee27f82361fe939398f47c7d940167d2ca..13d487ea6749a6aaaf2f3fe93bccbdb68236b797 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 9304b51182398d048516ec86c1929fb9ff695f02..ac6576c05555140a59cf738a566afba2437eedc3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a026d9acf87603cf30302c44fb841db8b5ae9e4d..aed42097fd63c34e27e19784b41844a64485bdc2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index fbc95ae9dfb72bc44f92e0648b077fd158f01ce8..f2fa500d9a0b83206079e453979bfa21c7390f97 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4081e6cbe560a2b1d03ce8b24fb5ead1d8c03501..db34b6f845cbc5c39538e5d2e2d417987b0d8564 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6919899fc02fbaef16d3db16eb9464fc67e57b02..e1e72d57673411ea75e4d6d181ba3e2b710b3c04 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8f26649ed051881fc6491a1c195c47f2c02c6aa4..19c3b94b9feca4903ee3f6d5dc3a6b138cb7375b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ * 
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4f2468581723c8e1c30dc4407007fd038a382317..fa9a638ba4f48ecd4eba3005f1f449fd09681d18 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 4db7b48bd59029380e0d2fd76e4b39a916bc23c7..c7136d470412511e48358d1764afb0a799d972ef 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3c2bb78ded81075dd6cf4689c91968cd6202c8ee..b84f9ffbdddec87624b61a486db69e1715ff5998 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index bbc1726db7007bb6eb0818001147c68348cc958c..59532b21d4775d26cb010edcb4b47fae892cdd54 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -202,7 +199,7 @@ kern_return_t
 device_pager_populate_object(
        memory_object_t         device,
        memory_object_offset_t  offset,
-       ppnum_t                 page_num,
+       vm_offset_t             phys_addr,
        vm_size_t               size)
 {
        device_pager_t  device_object;
@@ -221,7 +218,7 @@ device_pager_populate_object(
                return KERN_FAILURE;
 
        kr =  vm_object_populate_with_private(
-                               vm_object, offset, page_num, size);
+                               vm_object, offset, phys_addr, size);
        if(kr != KERN_SUCCESS)
                return kr;
 
index c3e0f22f0feeb67c633cc9dcec68adf2dc5a3357..b65cc99480d5e6c60a0794e350fbabfccfececae 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -135,7 +132,7 @@ vm_object_update(vm_object_t, vm_object_offset_t,
 
 #define        memory_object_should_return_page(m, should_return) \
     (should_return != MEMORY_OBJECT_RETURN_NONE && \
-     (((m)->dirty || ((m)->dirty = pmap_is_modified((m)->phys_page))) || \
+     (((m)->dirty || ((m)->dirty = pmap_is_modified((m)->phys_addr))) || \
       ((m)->precious && (should_return) == MEMORY_OBJECT_RETURN_ALL) || \
       (should_return) == MEMORY_OBJECT_RETURN_ANYTHING))
 
@@ -258,7 +255,7 @@ memory_object_lock_page(
 
        if (prot != VM_PROT_NO_CHANGE) {
                if ((m->page_lock ^ prot) & prot) {
-                       pmap_page_protect(m->phys_page, VM_PROT_ALL & ~prot);
+                       pmap_page_protect(m->phys_addr, VM_PROT_ALL & ~prot);
                }
 #if 0
                /* code associated with the vestigial 
@@ -303,7 +300,7 @@ memory_object_lock_page(
                vm_page_unlock_queues();
 
                if (!should_flush)
-                       pmap_page_protect(m->phys_page, VM_PROT_NONE);
+                       pmap_page_protect(m->phys_addr, VM_PROT_NONE);
 
                if (m->dirty)
                        return(MEMORY_OBJECT_LOCK_RESULT_MUST_CLEAN);
@@ -409,7 +406,7 @@ memory_object_lock_request(
        if ((prot & ~VM_PROT_ALL) != 0 && prot != VM_PROT_NO_CHANGE)
                return (KERN_INVALID_ARGUMENT);
 
-       size = round_page_64(size);
+       size = round_page(size);
 
        /*
         *      Lock the object, and acquire a paging reference to
@@ -963,7 +960,7 @@ vm_object_set_attributes_common(
                temporary = TRUE;
        if (cluster_size != 0) {
                int     pages_per_cluster;
-               pages_per_cluster = atop_32(cluster_size);
+               pages_per_cluster = atop(cluster_size);
                /*
                 * Cluster size must be integral multiple of page size,
                 * and be a power of 2 number of pages.
@@ -1099,7 +1096,7 @@ memory_object_change_attributes(
                 perf = (memory_object_perf_info_t) attributes;
 
                may_cache = perf->may_cache;
-               cluster_size = round_page_32(perf->cluster_size);
+               cluster_size = round_page(perf->cluster_size);
 
                break;
            }
@@ -1424,7 +1421,7 @@ host_default_memory_manager(
                        mutex_unlock(&memory_manager_default_lock);
                        return KERN_INVALID_ARGUMENT;
 #else
-                       cluster_size = round_page_32(cluster_size);
+                       cluster_size = round_page(cluster_size);
 #endif
                }
                memory_manager_default_cluster = cluster_size;
@@ -1551,12 +1548,12 @@ memory_object_deactivate_pages(
                                if ((m->wire_count == 0) && (!m->private) && (!m->gobbled) && (!m->busy)) {
 
                                        m->reference = FALSE;
-                                       pmap_clear_reference(m->phys_page);
+                                       pmap_clear_reference(m->phys_addr);
 
                                        if ((kill_page) && (object->internal)) {
                                                m->precious = FALSE;
                                                m->dirty = FALSE;
-                                               pmap_clear_modify(m->phys_page);
+                                               pmap_clear_modify(m->phys_addr);
                                                vm_external_state_clr(object->existence_map, offset);
                                        }
                                        VM_PAGE_QUEUES_REMOVE(m);
@@ -1610,7 +1607,7 @@ memory_object_page_op(
        memory_object_control_t control,
        memory_object_offset_t  offset,
        int                     ops,
-       ppnum_t                 *phys_entry,
+       vm_offset_t             *phys_entry,
        int                     *flags)
 {
        vm_object_t             object;
@@ -1626,8 +1623,8 @@ memory_object_page_op(
        if(ops & UPL_POP_PHYSICAL) {
                if(object->phys_contiguous) {
                        if (phys_entry) {
-                               *phys_entry = (ppnum_t)
-                                       (object->shadow_offset >> 12);
+                               *phys_entry = (vm_offset_t)
+                                               object->shadow_offset;
                        }
                        vm_object_unlock(object);
                        return KERN_SUCCESS;
@@ -1678,7 +1675,7 @@ memory_object_page_op(
                        if(dst_page->busy) *flags |= UPL_POP_BUSY;
                }
                if (phys_entry)
-                       *phys_entry = dst_page->phys_page;
+                       *phys_entry = dst_page->phys_addr;
        
                /* The caller should have made a call either contingent with */
                /* or prior to this call to set UPL_POP_BUSY */
index 1e328e979a3bd7bb6d8ecbc5dcd2a8fb56903f3c..a169bd3c3dfa259d3fa1fecb1844bedede9a0fd1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 02793058b89fcbe79d7cfcc6f8ac69bae7a1d27a..26337c7e7c589adb4c22bc1442f6438695bc1f1d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
  *     many address spaces.
  */
 
-/* Copy between a physical page and a virtual address */
-extern kern_return_t   copypv(
-                               addr64_t source, 
-                               addr64_t sink, 
-                               unsigned int size, 
-                               int which);     
-#define cppvPsnk       1
-#define cppvPsrc       2
-#define cppvFsnk       4
-#define cppvFsrc       8
-#define cppvNoModSnk   16
-#define cppvNoRefSrc   32
-#define cppvKmap       64      /* User the kernel's vm_map */
-
 #if !defined(MACH_KERNEL_PRIVATE)
 
 typedef void *pmap_t;
@@ -155,7 +138,7 @@ extern void         pmap_init(void);        /* Initialization,
  *     However, for best performance pmap_free_pages should be accurate.
  */
 
-extern boolean_t       pmap_next_page(ppnum_t *pnum);
+extern boolean_t       pmap_next_page(vm_offset_t *paddr);
                                                /* During VM initialization,
                                                 * return the next unused
                                                 * physical page.
@@ -182,14 +165,14 @@ extern void               pmap_switch(pmap_t);
 extern void            pmap_enter(     /* Enter a mapping */
                                pmap_t          pmap,
                                vm_offset_t     v,
-                               ppnum_t         pn,
+                               vm_offset_t     pa,
                                vm_prot_t       prot,
                                unsigned int    flags,
                                boolean_t       wired);
 
 extern void            pmap_remove_some_phys(
                                pmap_t          pmap,
-                               ppnum_t         pn);
+                               vm_offset_t     pa);
 
 
 /*
@@ -197,36 +180,36 @@ extern void               pmap_remove_some_phys(
  */
 
 extern void            pmap_page_protect(      /* Restrict access to page. */
-                               ppnum_t phys,
+                               vm_offset_t     phys,
                                vm_prot_t       prot);
 
 extern void            (pmap_zero_page)(
-                               ppnum_t         pn);
+                               vm_offset_t     phys);
 
 extern void            (pmap_zero_part_page)(
-                               ppnum_t         pn,
+                               vm_offset_t     p,
                                vm_offset_t     offset,
                                vm_size_t       len);
 
 extern void            (pmap_copy_page)(
-                               ppnum_t         src,
-                               ppnum_t         dest);
+                               vm_offset_t     src,
+                               vm_offset_t     dest);
 
 extern void            (pmap_copy_part_page)(
-                               ppnum_t         src,
+                               vm_offset_t     src,
                                vm_offset_t     src_offset,
-                               ppnum_t         dst,
+                               vm_offset_t     dst,
                                vm_offset_t     dst_offset,
                                vm_size_t       len);
 
 extern void            (pmap_copy_part_lpage)(
                                vm_offset_t     src,
-                               ppnum_t         dst,
+                               vm_offset_t     dst,
                                vm_offset_t     dst_offset,
                                vm_size_t       len);
 
 extern void            (pmap_copy_part_rpage)(
-                               ppnum_t         src,
+                               vm_offset_t     src,
                                vm_offset_t     src_offset,
                                vm_offset_t     dst,
                                vm_size_t       len);
@@ -235,7 +218,7 @@ extern void         (pmap_copy_part_rpage)(
  * debug/assertions. pmap_verify_free returns true iff
  * the given physical page is mapped into no pmap.
  */
-extern boolean_t       pmap_verify_free(ppnum_t pn);
+extern boolean_t       pmap_verify_free(vm_offset_t paddr);
 
 /*
  *     Statistics routines
@@ -283,8 +266,8 @@ extern kern_return_t        (pmap_attribute)(       /* Get/Set special memory
 
 extern kern_return_t   (pmap_attribute_cache_sync)(  /* Flush appropriate 
                                                       * cache based on
-                                                      * page number sent */
-                               ppnum_t         pn
+                                                      * phys addr sent */
+                               vm_offset_t     addr
                                vm_size_t       size, 
                                vm_machine_attribute_t attribute, 
                                vm_machine_attribute_val_t* value);
@@ -331,7 +314,7 @@ extern kern_return_t        (pmap_attribute_cache_sync)(  /* Flush appropriate
                pmap_enter(                                     \
                        (pmap),                                 \
                        (virtual_address),                      \
-                       (page)->phys_page,                      \
+                       (page)->phys_addr,                      \
                        (protection) & ~(page)->page_lock,      \
                        flags,                                  \
                        (wired)                                 \
@@ -345,15 +328,15 @@ extern kern_return_t      (pmap_attribute_cache_sync)(  /* Flush appropriate
  *     by the hardware.
  */
                                /* Clear reference bit */
-extern void            pmap_clear_reference(ppnum_t     pn);
+extern void            pmap_clear_reference(vm_offset_t paddr);
                                /* Return reference bit */
-extern boolean_t       (pmap_is_referenced)(ppnum_t     pn);
+extern boolean_t       (pmap_is_referenced)(vm_offset_t paddr);
                                /* Set modify bit */
-extern void             pmap_set_modify(ppnum_t         pn);
+extern void             pmap_set_modify(vm_offset_t paddr);
                                /* Clear modify bit */
-extern void            pmap_clear_modify(ppnum_t pn);
+extern void            pmap_clear_modify(vm_offset_t paddr);
                                /* Return modify bit */
-extern boolean_t       pmap_is_modified(ppnum_t pn);
+extern boolean_t       pmap_is_modified(vm_offset_t paddr);
 
 /*
  *     Routines that operate on ranges of virtual addresses.
@@ -408,9 +391,8 @@ extern void         pmap_change_wiring(     /* Specify pageability */
 
 extern void            pmap_remove(    /* Remove mappings. */
                                pmap_t          map,
-                               addr64_t        s,
-                               addr64_t        e);
-
+                               vm_offset_t     s,
+                               vm_offset_t     e);
 
 #endif  /* __APPLE_API_PRIVATE */
 
index 540c247e4d691246c176166345a3e72262bcffc9..90859e626204b8ab7148676931cf26220da475ec 100644 (file)
@@ -4,22 +4,19 @@ int   startup_miss = 0;
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -293,8 +290,8 @@ tws_hash_line_clear(
                                                        && (dump_pmap == 1)) {
                                                pmap_remove_some_phys((pmap_t)
                                                        vm_map_pmap(
-                                                               current_map()),
-                                                       p->phys_page);
+                                                               hash_ele->map),
+                                                       p->phys_addr);
                                        }
                                   }
                                   local_off += PAGE_SIZE_64;
@@ -325,7 +322,7 @@ tws_hash_line_clear(
 }
 
 kern_return_t
-tws_internal_lookup(
+tws_lookup(
        tws_hash_t              tws,    
        vm_object_offset_t      offset, 
        vm_object_t             object,
@@ -344,6 +341,10 @@ tws_internal_lookup(
        if(object->private)
                return KERN_SUCCESS;
 
+       if(!tws_lock_try(tws)) {
+               return KERN_FAILURE;
+       }
+
        index = do_tws_hash(object, offset, 
                        tws->number_of_elements, tws->number_of_lines);
        loop = 0;
@@ -356,6 +357,7 @@ tws_internal_lookup(
                age_of_cache = ((sched_tick 
                        - tws->time_of_creation) >> SCHED_TICK_SHIFT);
                        if (age_of_cache > 35) {
+                       tws_unlock(tws); 
                        return KERN_OPERATION_TIMED_OUT;
                }
        }
@@ -368,6 +370,7 @@ tws_internal_lookup(
                        age_of_cache = ((sched_tick 
                                - tws->time_of_creation) >> SCHED_TICK_SHIFT);
                        if (age_of_cache > 60) {
+                               tws_unlock(tws); 
                                return KERN_OPERATION_TIMED_OUT;
                        }
                }
@@ -382,32 +385,16 @@ tws_internal_lookup(
                set = cache_ele->element->line/tws->number_of_lines;
                ele_line = cache_ele->element->line - set;
                *line = &tws->cache[set][ele_line];
+               tws_unlock(tws);
                return KERN_SUCCESS;
        }
 
+       tws_unlock(tws);
        return KERN_FAILURE;
 
 
 }
 
-kern_return_t
-tws_lookup(
-       tws_hash_t              tws,    
-       vm_object_offset_t      offset, 
-       vm_object_t             object,
-       tws_hash_line_t          *line) 
-{
-       kern_return_t kr;
-
-       if(!tws_lock_try(tws)) {
-               return KERN_FAILURE;
-       }
-       kr = tws_internal_lookup(tws,
-               offset, object, line);
-       tws_unlock(tws);
-       return kr;
-}
-
 kern_return_t
 tws_expand_working_set(
        vm_offset_t     tws, 
@@ -582,7 +569,7 @@ printf("cache_lookup, result = 0x%x, addr = 0x%x, object 0x%x, offset 0x%x%x\n",
                        pmap_remove(map->pmap, 0, GLOBAL_SHARED_TEXT_SEGMENT);
                        pmap_remove(map->pmap, 
                                GLOBAL_SHARED_DATA_SEGMENT 
-                               + SHARED_DATA_REGION_SIZE, 0xFFFFFFFFFFFFF000);
+                               + SHARED_DATA_REGION_SIZE, 0xFFFFF000);
        }
 
        /* This next bit of code, the and alternate hash */
@@ -1039,8 +1026,8 @@ tws_build_cluster(
        int                     age_of_cache;
        int                     pre_heat_size;
        unsigned int            ele_cache;
-       unsigned int            end_cache = 0;
-       unsigned int            start_cache = 0;
+       unsigned int            end_cache = NULL;
+       unsigned int            start_cache = NULL;
 
        if((object->private) || !(object->pager))
                return;
@@ -1053,10 +1040,6 @@ tws_build_cluster(
                object_size = object->size;
        }
 
-       if((!tws) || (!tws_lock_try(tws))) {
-               return;
-       }
-
        age_of_cache = ((sched_tick 
                        - tws->time_of_creation) >> SCHED_TICK_SHIFT);
 
@@ -1086,7 +1069,7 @@ tws_build_cluster(
                        *start = *start & TWS_HASH_OFF_MASK;
                        *end = *start + (32 * PAGE_SIZE_64);
                        if(*end > object_size) {
-                               *end = trunc_page_64(object_size);
+                               *end = trunc_page(object_size);
                                max_length = 0;
                                if(before >= *end) {
                                        *end = after;
@@ -1109,7 +1092,7 @@ tws_build_cluster(
                                        *end = after + 
                                                (32 * PAGE_SIZE_64);
                                        if(*end > object_size) {
-                                               *end = trunc_page_64(object_size);
+                                               *end = trunc_page(object_size);
                                                max_length = 0;
                                                if(*start >= *end) {
                                                        *end = after;
@@ -1133,7 +1116,7 @@ tws_build_cluster(
                                        break;
                        }
 
-                       if(start_cache != 0) {
+                       if(start_cache != NULL) {
                                unsigned int mask;
 
                                for (mask = 1; mask != 0; mask = mask << 1) {
@@ -1145,7 +1128,7 @@ tws_build_cluster(
                                                break;
                                }
                        }
-                       if(end_cache != 0) {
+                       if(end_cache != NULL) {
                                unsigned int mask;
 
                                for (mask = 0x80000000; 
@@ -1162,7 +1145,6 @@ tws_build_cluster(
                        if (*start >= *end)
                          panic("bad clipping occurred\n");
 
-                       tws_unlock(tws);
                        return;
                }
        }
@@ -1171,12 +1153,12 @@ tws_build_cluster(
                (object_size >= 
                        (after + PAGE_SIZE_64))) {
                if(length >= pre_heat_size) {
-                  if(tws_internal_lookup(tws, after, object,
+                  if(tws_lookup(tws, after, object,
                                &line) != KERN_SUCCESS) {
                        vm_object_offset_t      extend;
                                
                        extend = after + PAGE_SIZE_64;
-                       if(tws_internal_lookup(tws, extend, object,
+                       if(tws_lookup(tws, extend, object,
                                                &line) != KERN_SUCCESS) {
                                break;
                        }
@@ -1230,7 +1212,7 @@ tws_build_cluster(
                before -= PAGE_SIZE_64;
 
                if(length >= pre_heat_size) {
-                  if(tws_internal_lookup(tws, before, object,
+                  if(tws_lookup(tws, before, object,
                                &line) != KERN_SUCCESS) {
                        vm_object_offset_t      extend;
                                
@@ -1238,7 +1220,7 @@ tws_build_cluster(
                        if (extend == 0)
                                break;
                        extend -= PAGE_SIZE_64;
-                       if(tws_internal_lookup(tws, extend, object,
+                       if(tws_lookup(tws, extend, object,
                                        &line) != KERN_SUCCESS) {
                                break;
                        }
@@ -1284,7 +1266,6 @@ tws_build_cluster(
                *start -= PAGE_SIZE_64;
                length += PAGE_SIZE;
        }
-       tws_unlock(tws);
 }
 
 tws_line_signal(
@@ -1854,39 +1835,6 @@ tws_read_startup_file(
 }
 
 
-void
-tws_hash_ws_flush(tws_hash_t tws) {
-       tws_startup_t           scache;
-       if(tws == NULL) {
-               return;
-       }
-       tws_lock(tws);
-       if(tws->startup_name != NULL) {
-               scache = tws_create_startup_list(tws);
-               if(scache == NULL) {
-                       /* dump the name cache, we'll */
-                       /* get it next time */
-                       kfree((vm_offset_t)     
-                               tws->startup_name, 
-                               tws->startup_name_length);
-                       tws->startup_name = NULL;
-                       tws_unlock(tws);
-                       return;
-               }
-               bsd_write_page_cache_file(tws->uid, tws->startup_name, 
-                               scache, scache->tws_hash_size, 
-                               tws->mod, tws->fid);
-               kfree((vm_offset_t)scache, 
-                               scache->tws_hash_size);
-               kfree((vm_offset_t) 
-                               tws->startup_name, 
-                               tws->startup_name_length);
-               tws->startup_name = NULL;
-       }
-       tws_unlock(tws);
-       return;
-}
-
 void
 tws_hash_destroy(tws_hash_t    tws)
 {
index 90af7ef03845a631a3ed7260a3f717259016f949..5c9e57f0ab82e97b347388ad30fd35b9601e6954 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -261,10 +258,6 @@ kern_return_t      tws_read_startup_file(
                tws_startup_t           startup,
                vm_offset_t             cache_size);
 
-void
-tws_hash_ws_flush(
-       tws_hash_t      tws);
-
 
 
 #endif  /* _VM_TASK_WORKING_SET_H_ */
index 87b81f23c6358792c5abfecade7942047bfd7c1f..bd78d02c4dc964bfea0e5caed476854fee7889ba 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -252,7 +249,7 @@ mach_vm_region_info(
 
                if (size != 0)
                        kmem_free(ipc_kernel_map, addr, size);
-               size = round_page_32(2 * used * sizeof(vm_info_object_t));
+               size = round_page(2 * used * sizeof(vm_info_object_t));
 
                kr = vm_allocate(ipc_kernel_map, &addr, size, TRUE);
                if (kr != KERN_SUCCESS)
@@ -272,7 +269,7 @@ mach_vm_region_info(
                        kmem_free(ipc_kernel_map, addr, size);
        } else {
                vm_size_t size_used =
-                       round_page_32(used * sizeof(vm_info_object_t));
+                       round_page(used * sizeof(vm_info_object_t));
 
                kr = vm_map_unwire(ipc_kernel_map, addr, addr + size_used, FALSE);
                assert(kr == KERN_SUCCESS);
@@ -451,7 +448,7 @@ mach_vm_region_info_64(
 
                if (size != 0)
                        kmem_free(ipc_kernel_map, addr, size);
-               size = round_page_32(2 * used * sizeof(vm_info_object_t));
+               size = round_page(2 * used * sizeof(vm_info_object_t));
 
                kr = vm_allocate(ipc_kernel_map, &addr, size, TRUE);
                if (kr != KERN_SUCCESS)
@@ -471,7 +468,7 @@ mach_vm_region_info_64(
                        kmem_free(ipc_kernel_map, addr, size);
        } else {
                vm_size_t size_used =
-                       round_page_32(used * sizeof(vm_info_object_t));
+                       round_page(used * sizeof(vm_info_object_t));
 
                kr = vm_map_unwire(ipc_kernel_map, addr, addr + size_used, FALSE);
                assert(kr == KERN_SUCCESS);
@@ -514,7 +511,7 @@ vm_mapped_pages_info(
 
        pmap = map->pmap;
        size = pmap_resident_count(pmap) * sizeof(vm_offset_t);
-       size = round_page_32(size);
+       size = round_page(size);
 
        for (;;) {
            (void) vm_allocate(ipc_kernel_map, &addr, size, TRUE);
@@ -537,7 +534,7 @@ vm_mapped_pages_info(
            /*
             * Try again, doubling the size
             */
-           size = round_page_32(actual * sizeof(vm_offset_t));
+           size = round_page(actual * sizeof(vm_offset_t));
        }
        if (actual == 0) {
            *pages = 0;
@@ -546,7 +543,7 @@ vm_mapped_pages_info(
        }
        else {
            *pages_count = actual;
-           size_used = round_page_32(actual * sizeof(vm_offset_t));
+           size_used = round_page(actual * sizeof(vm_offset_t));
            (void) vm_map_wire(ipc_kernel_map,
                                addr, addr + size, 
                                VM_PROT_READ|VM_PROT_WRITE, FALSE);
@@ -612,7 +609,7 @@ host_virtual_physical_table_info(
                if (info != *infop)
                        kmem_free(ipc_kernel_map, addr, size);
 
-               size = round_page_32(actual * sizeof *info);
+               size = round_page(actual * sizeof *info);
                kr = kmem_alloc_pageable(ipc_kernel_map, &addr, size);
                if (kr != KERN_SUCCESS)
                        return KERN_RESOURCE_SHORTAGE;
@@ -633,7 +630,7 @@ host_virtual_physical_table_info(
                vm_map_copy_t copy;
                vm_size_t used;
 
-               used = round_page_32(actual * sizeof *info);
+               used = round_page(actual * sizeof *info);
 
                if (used != size)
                        kmem_free(ipc_kernel_map, addr + used, size - used);
index 8a98bb8f2b74057a10659325137309929b4481b7..fee86f23ae95fdd879116f2d15ca443116b43de2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 555039930d9e031b20d3ecbaf230e6226533c68a..f5eca5ba51bd243121554bbba6ec29b74159c527 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -235,7 +232,7 @@ _vm_external_state_get(
 
        assert (map != VM_EXTERNAL_NULL);
 
-       bit = atop_32(offset);
+       bit = atop(offset);
        byte = bit >> 3;
        if (map[byte] & (1 << (bit & 07))) {
                return VM_EXTERNAL_STATE_EXISTS;
@@ -255,7 +252,7 @@ vm_external_state_set(
        if (map == VM_EXTERNAL_NULL)
                return;
 
-       bit = atop_32(offset);
+       bit = atop(offset);
        byte = bit >> 3;
        map[byte] |= (1 << (bit & 07));
 }
@@ -271,7 +268,7 @@ vm_external_state_clr(
        if (map == VM_EXTERNAL_NULL)
                return;
 
-       bit = atop_32(offset);
+       bit = atop(offset);
        byte = bit >> 3;
        map[byte] &= ~(1 << (bit & 07));
 }
index fd38ce62973fa185a4dec8f3c472ab05dee549ff..3b189e69efcf332fc50e67077b5d7df5a2f2dac0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -82,7 +79,7 @@ typedef int   vm_external_state_t;
 /*
  * Useful macros
  */
-#define stob(s)        ((atop_32((s)) + 07) >> 3)
+#define stob(s)        ((atop((s)) + 07) >> 3)
 
 /*
  *     Routines exported by this module.
index 0958f3cf09452218cca63a34b081252a536d9f07..14c503dbb65793b497d5b7007f0d80f1345289ea 100644 (file)
@@ -1,24 +1,22 @@
+
 /*
  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -79,6 +77,7 @@ extern int    device_pager_workaround;
 #include <kern/host.h>
 #include <kern/xpr.h>
 #include <ppc/proc_reg.h>
+#include <ppc/pmap_internals.h>
 #include <vm/task_working_set.h>
 #include <vm/vm_map.h>
 #include <vm/vm_object.h>
@@ -617,7 +616,6 @@ vm_fault_page(
                                                return(VM_FAULT_MEMORY_SHORTAGE);
                                        }
 
-
                                        XPR(XPR_VM_FAULT,
              "vm_f_page: zero obj 0x%X, off 0x%X, page 0x%X, first_obj 0x%X\n",
                                                (integer_t)object, offset,
@@ -663,7 +661,7 @@ vm_fault_page(
                                                }
                                                vm_object_lock(object);
                                        }
-                                       pmap_clear_modify(m->phys_page);
+                                       pmap_clear_modify(m->phys_addr);
                                        vm_page_lock_queues();
                                        VM_PAGE_QUEUES_REMOVE(m);
                                        m->page_ticket = vm_page_ticket;
@@ -1302,7 +1300,7 @@ no_clustering:
                        m->inactive = TRUE;
                        vm_page_inactive_count++;
                        vm_page_unlock_queues();
-                       pmap_clear_modify(m->phys_page);
+                       pmap_clear_modify(m->phys_addr);
                        break;
                }
                else {
@@ -1423,7 +1421,7 @@ no_clustering:
 
                        vm_page_lock_queues();
                        assert(!m->cleaning);
-                       pmap_page_protect(m->phys_page, VM_PROT_NONE);
+                       pmap_page_protect(m->phys_addr, VM_PROT_NONE);
                        vm_page_deactivate(m);
                        copy_m->dirty = TRUE;
                        /*
@@ -1614,7 +1612,7 @@ no_clustering:
 
                        vm_page_lock_queues();
                        assert(!m->cleaning);
-                       pmap_page_protect(m->phys_page, VM_PROT_NONE);
+                       pmap_page_protect(m->phys_addr, VM_PROT_NONE);
                        copy_m->dirty = TRUE;
                        vm_page_unlock_queues();
 
@@ -1837,6 +1835,7 @@ vm_fault(
        vm_prot_t               full_fault_type;
        
 
+
        KERNEL_DEBUG_CONSTANT((MACHDBG_CODE(DBG_MACH_VM, 0)) | DBG_FUNC_START,
                              vaddr,
                              0,
@@ -1844,6 +1843,7 @@ vm_fault(
                              0,
                              0);
 
+       cur_thread = current_thread();
        /* at present we do not fully check for execute permission */
        /* we generally treat it is read except in certain device  */
        /* memory settings */
@@ -1868,8 +1868,6 @@ vm_fault(
        /*
         * drop funnel if it is already held. Then restore while returning
         */
-       cur_thread = current_thread();
-
        if ((cur_thread->funnel_state & TH_FN_OWNED) == TH_FN_OWNED) {
                funnel_set = TRUE;
                curflock = cur_thread->funnel_lock;
@@ -2046,13 +2044,12 @@ FastPmapEnter:
                                        prot &= ~VM_PROT_WRITE;
 #endif /* MACH_KDB */
 #endif /* STATIC_CONFIG */
-                               cache_attr = ((unsigned int)m->object->wimg_bits) & VM_WIMG_MASK;
-                               if ((m->no_isync == TRUE) || 
-                                          (cache_attr != VM_WIMG_DEFAULT)) {
-                                       pmap_sync_caches_phys(m->phys_page);
+                               if (m->no_isync == TRUE) {
+                                       pmap_sync_caches_phys(m->phys_addr);
                                        m->no_isync = FALSE;
                                }
 
+                               cache_attr = ((unsigned int)m->object->wimg_bits) & VM_WIMG_MASK;
                                if(caller_pmap) {
                                        PMAP_ENTER(caller_pmap, 
                                                caller_pmap_addr, m, 
@@ -2238,7 +2235,7 @@ FastPmapEnter:
                        vm_page_lock_queues();
                        vm_page_deactivate(cur_m);
                        m->dirty = TRUE;
-                       pmap_page_protect(cur_m->phys_page,
+                       pmap_page_protect(cur_m->phys_addr,
                                                  VM_PROT_NONE);
                        vm_page_unlock_queues();
 
@@ -2666,7 +2663,7 @@ FastPmapEnter:
         */
        if (m != VM_PAGE_NULL) {
                if (m->no_isync == TRUE) {
-                       pmap_sync_caches_phys(m->phys_page);
+                       pmap_sync_caches_phys(m->phys_addr);
 
                        m->no_isync = FALSE;
                }
@@ -2732,6 +2729,7 @@ FastPmapEnter:
 
 #ifndef i386
                int                     memattr;
+               struct  phys_entry      *pp;
                vm_map_entry_t          entry;
                vm_offset_t             laddr;
                vm_offset_t             ldelta, hdelta;
@@ -2740,16 +2738,22 @@ FastPmapEnter:
                 * do a pmap block mapping from the physical address
                 * in the object 
                 */
+               if(pp = pmap_find_physentry(
+                       (vm_offset_t)object->shadow_offset)) {
+                       memattr = ((pp->pte1 & 0x00000078) >> 3); 
+               } else {
+                       memattr = VM_WIMG_MASK & (int)object->wimg_bits;
+               }
 
-               /* While we do not worry about execution protection in   */
-               /* general, certian pages may have instruction execution */
-               /* disallowed.  We will check here, and if not allowed   */
-               /* to execute, we return with a protection failure.      */
 
-               if((full_fault_type & VM_PROT_EXECUTE) &&
-                       (pmap_canExecute((ppnum_t)
-                               (object->shadow_offset >> 12)) < 1)) {
+               /* While we do not worry about execution protection in */
+               /* general, we may be able to read device memory and   */
+               /* still not be able to execute it.  Here we check for */
+               /* the guarded bit.  If its set and we are attempting  */
+               /* to execute, we return with a protection failure.    */
 
+               if((memattr & VM_MEM_GUARDED) &&
+                       (full_fault_type & VM_PROT_EXECUTE)) {
                        vm_map_verify_done(map, &version);
                        if(pmap_map != map)
                                vm_map_unlock(pmap_map);
@@ -2759,6 +2763,8 @@ FastPmapEnter:
                        goto done;
                }
 
+
+
                if(pmap_map != map) {
                        vm_map_unlock(pmap_map);
                }
@@ -2803,36 +2809,32 @@ FastPmapEnter:
 
 
                        if(caller_pmap) {
-                               /* Set up a block mapped area */
                                pmap_map_block(caller_pmap, 
-                                       (addr64_t)(caller_pmap_addr - ldelta)
-                                       (((vm_offset_t)
+                                       caller_pmap_addr - ldelta
+                                       ((vm_offset_t)
                                    (entry->object.vm_object->shadow_offset)) 
                                        + entry->offset + 
-                                       (laddr - entry->vme_start) 
-                                                       - ldelta)>>12,
+                                       (laddr - entry->vme_start) - ldelta, 
                                ldelta + hdelta, prot, 
-                               (VM_WIMG_MASK & (int)object->wimg_bits), 0);
-                       } else { 
-                               /* Set up a block mapped area */
-                               pmap_map_block(pmap_map->pmap, 
-                                  (addr64_t)(vaddr - ldelta), 
-                                  (((vm_offset_t)
+                               memattr, 0); /* Set up a block mapped area */
+                       } else {
+                               pmap_map_block(pmap_map->pmap, vaddr - ldelta, 
+                               ((vm_offset_t)
                                    (entry->object.vm_object->shadow_offset)) 
-                                      + entry->offset + 
-                                      (laddr - entry->vme_start) - ldelta)>>12,
-                                  ldelta + hdelta, prot, 
-                                  (VM_WIMG_MASK & (int)object->wimg_bits), 0);
+                                       + entry->offset + 
+                                       (laddr - entry->vme_start) - ldelta, 
+                               ldelta + hdelta, prot, 
+                               memattr, 0); /* Set up a block mapped area */
                        }
                }
 #else
 #ifdef notyet
                if(caller_pmap) {
                                pmap_enter(caller_pmap, caller_pmap_addr, 
-                               object->shadow_offset>>12, prot, 0, TRUE);
+                               object->shadow_offset, prot, 0, TRUE);
                } else {
                                pmap_enter(pmap, vaddr, 
-                               object->shadow_offset>>12, prot, 0, TRUE);
+                               object->shadow_offset, prot, 0, TRUE);
                }
                        /* Map it in */
 #endif
@@ -3047,7 +3049,7 @@ vm_fault_unwire(
                        result_object = result_page->object;
                        if (deallocate) {
                                assert(!result_page->fictitious);
-                               pmap_page_protect(result_page->phys_page,
+                               pmap_page_protect(result_page->phys_addr,
                                                VM_PROT_NONE);
                                VM_PAGE_FREE(result_page);
                        } else {
@@ -3227,7 +3229,7 @@ vm_fault_wire_fast(
         *      may cause other faults.   
         */
        if (m->no_isync == TRUE) {
-               pmap_sync_caches_phys(m->phys_page);
+               pmap_sync_caches_phys(m->phys_addr);
 
                m->no_isync = FALSE;
        }
index 65b60936e5208c0f503d9d10a8eb516b1e8ddd5a..8c9bd88f54e0ace06a73b96c50a9b593f9e13250 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 26bd959e51ec1e8f0c7c4a2c687c7c40400a6b31..d066f2f588ad08c4101ee89b3a8e7324abd28942 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -106,9 +103,8 @@ vm_mem_bootstrap(void)
        if (PE_parse_boot_arg("zsize", &zsize))
                zsize = zsize * 1024 * 1024;
        else {
-               zsize = sane_size >> 2;                         /* Get target zone size as 1/4 of physical memory */
+               zsize = mem_size >> 2;                  /* Get target zone size as 1/4 of physical memory */
        }
-
        if(zsize < ZONE_MAP_MIN) zsize = ZONE_MAP_MIN;  /* Clamp to min */
        if(zsize > ZONE_MAP_MAX) zsize = ZONE_MAP_MAX;  /* Clamp to max */
        zone_init(zsize);                                               /* Allocate address space for zones */
index 560b8a35b18de0b190ba4addf93511f44a31ade2..98733d845810b7e6f8848e9213156808105484cb 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8b9cda4d5017a76b07188e9ce17a991f41f35ee1..4d4ee31cb09e79d02445622f8f183333fb7c87f0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -120,7 +117,7 @@ kmem_alloc_contig(
                return KERN_INVALID_ARGUMENT;
        }
 
-       size = round_page_32(size);
+       size = round_page(size);
        if ((flags & KMA_KOBJECT) == 0) {
                object = vm_object_allocate(size);
                kr = vm_map_find_space(map, &addr, size, mask, &entry);
@@ -213,7 +210,7 @@ kernel_memory_allocate(
        vm_offset_t             i;
        kern_return_t           kr;
 
-       size = round_page_32(size);
+       size = round_page(size);
        if ((flags & KMA_KOBJECT) == 0) {
                /*
                 *      Allocate a new object.  We must do this before locking
@@ -356,10 +353,10 @@ kmem_realloc(
        vm_page_t       mem;
        kern_return_t   kr;
 
-       oldmin = trunc_page_32(oldaddr);
-       oldmax = round_page_32(oldaddr + oldsize);
+       oldmin = trunc_page(oldaddr);
+       oldmax = round_page(oldaddr + oldsize);
        oldsize = oldmax - oldmin;
-       newsize = round_page_32(newsize);
+       newsize = round_page(newsize);
 
 
        /*
@@ -506,7 +503,7 @@ kmem_alloc_pageable(
 #else
        addr = vm_map_min(map);
 #endif
-       kr = vm_map_enter(map, &addr, round_page_32(size),
+       kr = vm_map_enter(map, &addr, round_page(size),
                          (vm_offset_t) 0, TRUE,
                          VM_OBJECT_NULL, (vm_object_offset_t) 0, FALSE,
                          VM_PROT_DEFAULT, VM_PROT_ALL, VM_INHERIT_DEFAULT);
@@ -533,9 +530,8 @@ kmem_free(
 {
        kern_return_t kr;
 
-       kr = vm_map_remove(map, trunc_page_32(addr),
-                               round_page_32(addr + size), 
-                               VM_MAP_REMOVE_KUNWIRE);
+       kr = vm_map_remove(map, trunc_page(addr),
+                          round_page(addr + size), VM_MAP_REMOVE_KUNWIRE);
        if (kr != KERN_SUCCESS)
                panic("kmem_free");
 }
@@ -551,7 +547,7 @@ kmem_alloc_pages(
        register vm_size_t              size)
 {
 
-       size = round_page_32(size);
+       size = round_page(size);
         vm_object_lock(object);
        while (size) {
            register vm_page_t  mem;
@@ -618,9 +614,7 @@ kmem_remap_pages(
             *  but this shouldn't be a problem because it is wired.
             */
            PMAP_ENTER(kernel_pmap, start, mem, protection, 
-                       ((unsigned int)(mem->object->wimg_bits))
-                                       & VM_WIMG_MASK,
-                       TRUE);
+                               VM_WIMG_USE_DEFAULT, TRUE);
 
            start += PAGE_SIZE;
            offset += PAGE_SIZE;
@@ -654,7 +648,7 @@ kmem_suballoc(
        vm_map_t map;
        kern_return_t kr;
 
-       size = round_page_32(size);
+       size = round_page(size);
 
        /*
         *      Need reference on submap object because it is internal
@@ -726,9 +720,9 @@ kmem_init(
         /*
          * Account for kernel memory (text, data, bss, vm shenanigans).
          * This may include inaccessible "holes" as determined by what
-         * the machine-dependent init code includes in max_mem.
+         * the machine-dependent init code includes in mem_size.
          */
-        vm_page_wire_count = (atop_64(max_mem) - (vm_page_free_count
+        vm_page_wire_count = (atop(mem_size) - (vm_page_free_count
                                                 + vm_page_active_count
                                                 + vm_page_inactive_count));
 }
@@ -753,7 +747,7 @@ kmem_io_object_trunc(copy, new_size)
 
        old_size = (vm_size_t)round_page_64(copy->size);
        copy->size = new_size;
-       new_size = round_page_32(new_size);
+       new_size = round_page(new_size);
 
         vm_object_lock(copy->cpy_object);
         vm_object_page_remove(copy->cpy_object,
index fb14c54b5edf87fb033d66c9f7b3f295fff7f689..247448732dd1d2f4c02054640dc5e74969e6300f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 050faad8aa2558d4f5e37b5609bc1be5cac3e3c7..87b0b30db23af06e254b0e5903dcbea691790d51 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -84,7 +81,6 @@
 #include <mach/vm_map_server.h>
 #include <mach/mach_host_server.h>
 #include <ddb/tr.h>
-#include <machine/db_machdep.h>
 #include <kern/xpr.h>
 
 /* Internal prototypes
@@ -336,7 +332,7 @@ void
 vm_map_steal_memory(
        void)
 {
-       map_data_size = round_page_32(10 * sizeof(struct vm_map));
+       map_data_size = round_page(10 * sizeof(struct vm_map));
        map_data = pmap_steal_memory(map_data_size);
 
 #if 0
@@ -352,7 +348,7 @@ vm_map_steal_memory(
 
 
        kentry_data_size =
-               round_page_32(kentry_count * sizeof(struct vm_map_entry));
+               round_page(kentry_count * sizeof(struct vm_map_entry));
        kentry_data = pmap_steal_memory(kentry_data_size);
 }
 
@@ -478,8 +474,8 @@ first_free_is_valid(
                
        entry = vm_map_to_entry(map);
        next = entry->vme_next;
-       while (trunc_page_32(next->vme_start) == trunc_page_32(entry->vme_end) ||
-              (trunc_page_32(next->vme_start) == trunc_page_32(entry->vme_start) &&
+       while (trunc_page(next->vme_start) == trunc_page(entry->vme_end) ||
+              (trunc_page(next->vme_start) == trunc_page(entry->vme_start) &&
                next != vm_map_to_entry(map))) {
                entry = next;
                next = entry->vme_next;
@@ -509,10 +505,10 @@ MACRO_BEGIN                                                               \
        UFF_map = (map);                                                \
        UFF_first_free = (new_first_free);                              \
        UFF_next_entry = UFF_first_free->vme_next;                      \
-       while (trunc_page_32(UFF_next_entry->vme_start) ==              \
-              trunc_page_32(UFF_first_free->vme_end) ||                        \
-              (trunc_page_32(UFF_next_entry->vme_start) ==             \
-               trunc_page_32(UFF_first_free->vme_start) &&             \
+       while (trunc_page(UFF_next_entry->vme_start) ==                 \
+              trunc_page(UFF_first_free->vme_end) ||                   \
+              (trunc_page(UFF_next_entry->vme_start) ==                \
+               trunc_page(UFF_first_free->vme_start) &&                \
                UFF_next_entry != vm_map_to_entry(UFF_map))) {          \
                UFF_first_free = UFF_next_entry;                        \
                UFF_next_entry = UFF_first_free->vme_next;              \
@@ -658,8 +654,7 @@ vm_map_destroy(
                             map->max_offset, VM_MAP_NO_FLAGS);
        vm_map_unlock(map);
 
-       if(map->pmap)
-               pmap_destroy(map->pmap);
+       pmap_destroy(map->pmap);
 
        zfree(vm_map_zone, (vm_offset_t) map);
 }
@@ -1114,9 +1109,6 @@ vm_map_pmap_enter(
 {
        unsigned int            cache_attr;
 
-       if(map->pmap == 0)
-               return;
-
        while (addr < end_addr) {
                register vm_page_t      m;
 
@@ -1143,7 +1135,7 @@ vm_map_pmap_enter(
                m->busy = TRUE;
 
                if (m->no_isync == TRUE) {
-                       pmap_sync_caches_phys(m->phys_page);
+                       pmap_sync_caches_phys(m->phys_addr);
                        m->no_isync = FALSE;
                }
 
@@ -1453,14 +1445,14 @@ MACRO_BEGIN                                                             \
                        vm_offset_t     pmap_base_addr;                 \
                                                                        \
                        pmap_base_addr = 0xF0000000 & entry->vme_start; \
-                       pmap_unnest(map->pmap, (addr64_t)pmap_base_addr); \
+                       pmap_unnest(map->pmap, pmap_base_addr,          \
+                                                       0x10000000);    \
                        entry->use_pmap = FALSE;                        \
                } else if(entry->object.vm_object                       \
                        && !entry->is_sub_map                           \
                        && entry->object.vm_object->phys_contiguous) {  \
                        pmap_remove(map->pmap,                          \
-                               (addr64_t)(entry->vme_start),           \
-                               (addr64_t)(entry->vme_end));            \
+                               entry->vme_start, entry->vme_end);      \
                }                                                       \
                _vm_map_clip_start(&VMCS_map->hdr,VMCS_entry,VMCS_startaddr);\
        }                                                               \
@@ -1545,14 +1537,14 @@ MACRO_BEGIN                                                             \
                        vm_offset_t     pmap_base_addr;                 \
                                                                        \
                        pmap_base_addr = 0xF0000000 & entry->vme_start; \
-                       pmap_unnest(map->pmap, (addr64_t)pmap_base_addr); \
+                       pmap_unnest(map->pmap, pmap_base_addr,          \
+                                                       0x10000000);    \
                        entry->use_pmap = FALSE;                        \
                } else if(entry->object.vm_object                       \
                        && !entry->is_sub_map                           \
                        && entry->object.vm_object->phys_contiguous) {  \
                        pmap_remove(map->pmap,                          \
-                               (addr64_t)(entry->vme_start),           \
-                               (addr64_t)(entry->vme_end));            \
+                               entry->vme_start, entry->vme_end);      \
                }                                                       \
                _vm_map_clip_end(&VMCE_map->hdr,VMCE_entry,VMCE_endaddr); \
        }                                                               \
@@ -1746,32 +1738,25 @@ vm_map_submap(
            (object->copy == VM_OBJECT_NULL) &&
            (object->shadow == VM_OBJECT_NULL) &&
            (!object->pager_created)) {
-                       entry->offset = (vm_object_offset_t)offset;
-                       entry->object.vm_object = VM_OBJECT_NULL;
-                       vm_object_deallocate(object);
-                       entry->is_sub_map = TRUE;
-                       entry->object.sub_map = submap;
-                       vm_map_reference(submap);
+               entry->offset = (vm_object_offset_t)offset;
+               entry->object.vm_object = VM_OBJECT_NULL;
+               vm_object_deallocate(object);
+               entry->is_sub_map = TRUE;
+               vm_map_reference(entry->object.sub_map = submap);
 #ifndef i386
-                       if ((use_pmap) && (offset == 0)) {
-                               /* nest if platform code will allow */
-                               if(submap->pmap == NULL) {
-                                       submap->pmap = pmap_create((vm_size_t) 0);
-                                       if(submap->pmap == PMAP_NULL) {
-                                               return(KERN_NO_SPACE);
-                                       }
-                               }
-                               result = pmap_nest(map->pmap, (entry->object.sub_map)->pmap, 
-                                                               (addr64_t)start, (addr64_t)start, (uint64_t)(end - start));
-                               if(result)
-                                       panic("vm_map_submap: pmap_nest failed, rc = %08X\n", result);
-                               entry->use_pmap = TRUE;
-                       }
+               if ((use_pmap) && (offset == 0)) {
+                       /* nest if platform code will allow */
+                       result = pmap_nest(map->pmap, (entry->object.sub_map)->pmap, 
+                                                       start, end - start);
+                       if(result)
+                               panic("pmap_nest failed!");
+                       entry->use_pmap = TRUE;
+               }
 #endif
 #ifdef i386
-                       pmap_remove(map->pmap, (addr64_t)start, (addr64_t)end);
+               pmap_remove(map->pmap, start, end);
 #endif
-                       result = KERN_SUCCESS;
+               result = KERN_SUCCESS;
        }
        vm_map_unlock(map);
 
@@ -1923,7 +1908,8 @@ vm_map_protect(
                                local_entry->use_pmap = FALSE;
                                local_entry = local_entry->vme_next;
                           }
-                          pmap_unnest(map->pmap, (addr64_t)pmap_base_addr);
+                          pmap_unnest(map->pmap, pmap_base_addr,
+                                       (pmap_end_addr - pmap_base_addr) + 1);
 #endif
                   }
                   if (!(current->protection & VM_PROT_WRITE)) {
@@ -2923,8 +2909,7 @@ vm_map_submap_pmap_clean(
                                        VM_PROT_NONE);
                        } else {
                                pmap_remove(map->pmap, 
-                                       (addr64_t)start, 
-                                       (addr64_t)(start + remove_size));
+                                       start, start + remove_size);
                        }
                }
        }
@@ -2956,10 +2941,9 @@ vm_map_submap_pmap_clean(
                                        VM_PROT_NONE);
                        } else {
                                pmap_remove(map->pmap, 
-                                  (addr64_t)((start + entry->vme_start) 
-                                                               - offset),
-                                  (addr64_t)(((start + entry->vme_start) 
-                                       - offset) + remove_size));
+                                  (start + entry->vme_start) - offset,
+                                  ((start + entry->vme_start) 
+                                       - offset) + remove_size);
                        }
                }
                entry = entry->vme_next;
@@ -3216,7 +3200,8 @@ vm_map_delete(
                        if(entry->is_sub_map) {
                           if(entry->use_pmap) {
 #ifndef i386
-                               pmap_unnest(map->pmap, (addr64_t)entry->vme_start);
+                               pmap_unnest(map->pmap, entry->vme_start,
+                                       entry->vme_end - entry->vme_start);
 #endif
                                if((map->mapped) && (map->ref_count)) {
                                        /* clean up parent map/maps */
@@ -3243,8 +3228,8 @@ vm_map_delete(
                                                VM_PROT_NONE);
                                } else {
                                        pmap_remove(map->pmap, 
-                                               (addr64_t)(entry->vme_start)
-                                               (addr64_t)(entry->vme_end));
+                                               entry->vme_start
+                                               entry->vme_end);
                                }
                        }
                }
@@ -3458,7 +3443,7 @@ vm_map_overwrite_submap_recurse(
         *      splitting entries in strange ways.
         */
 
-       dst_end = round_page_32(dst_addr + dst_size);
+       dst_end = round_page(dst_addr + dst_size);
        vm_map_lock(dst_map);
 
 start_pass_1:
@@ -3467,7 +3452,7 @@ start_pass_1:
                return(KERN_INVALID_ADDRESS);
        }
 
-       vm_map_clip_start(dst_map, tmp_entry, trunc_page_32(dst_addr));
+       vm_map_clip_start(dst_map, tmp_entry, trunc_page(dst_addr));
 
        for (entry = tmp_entry;;) {
                vm_map_entry_t  next;
@@ -3688,7 +3673,7 @@ vm_map_copy_overwrite_nested(
                !page_aligned (dst_addr))
        {
                aligned = FALSE;
-               dst_end = round_page_32(dst_addr + copy->size);
+               dst_end = round_page(dst_addr + copy->size);
        } else {
                dst_end = dst_addr + copy->size;
        }
@@ -3700,7 +3685,7 @@ start_pass_1:
                vm_map_unlock(dst_map);
                return(KERN_INVALID_ADDRESS);
        }
-       vm_map_clip_start(dst_map, tmp_entry, trunc_page_32(dst_addr));
+       vm_map_clip_start(dst_map, tmp_entry, trunc_page(dst_addr));
        for (entry = tmp_entry;;) {
                vm_map_entry_t  next = entry->vme_next;
 
@@ -4185,7 +4170,7 @@ start_overwrite:
                                break;
                        }
                }
-               vm_map_clip_start(dst_map, tmp_entry, trunc_page_32(base_addr));
+               vm_map_clip_start(dst_map, tmp_entry, trunc_page(base_addr));
 
                entry = tmp_entry;
        } /* while */
@@ -4586,9 +4571,9 @@ vm_map_copy_overwrite_aligned(
                                                        entry->vme_start,
                                                        VM_PROT_NONE);
                                        } else {
-                                          pmap_remove(dst_map->pmap, 
-                                            (addr64_t)(entry->vme_start)
-                                            (addr64_t)(entry->vme_end));
+                                               pmap_remove(dst_map->pmap, 
+                                                       entry->vme_start
+                                                       entry->vme_end);
                                        }
                                        vm_object_deallocate(old_object);
                                }
@@ -4655,10 +4640,7 @@ vm_map_copy_overwrite_aligned(
                                        /* No isync here */
 
                                        PMAP_ENTER(pmap, va, m, prot, 
-                                               ((unsigned int)
-                                                       (m->object->wimg_bits)) 
-                                                       & VM_WIMG_MASK,
-                                               FALSE);
+                                               VM_WIMG_USE_DEFAULT, FALSE);
                
                                        vm_object_lock(object);
                                        vm_page_lock_queues();
@@ -4820,8 +4802,8 @@ vm_map_copyin_kernel_buffer(
                        VM_MAP_REMOVE_INTERRUPTIBLE;
        }
        if (src_destroy) {
-               (void) vm_map_remove(src_map, trunc_page_32(src_addr), 
-                                    round_page_32(src_addr + len),
+               (void) vm_map_remove(src_map, trunc_page(src_addr), 
+                                    round_page(src_addr + len),
                                     flags);
        }
        *copy_result = copy;
@@ -4857,7 +4839,7 @@ vm_map_copyout_kernel_buffer(
                *addr = 0;
                kr = vm_map_enter(map, 
                                  addr, 
-                                 round_page_32(copy->size),
+                                 round_page(copy->size),
                                  (vm_offset_t) 0, 
                                  TRUE,
                                  VM_OBJECT_NULL, 
@@ -4981,7 +4963,7 @@ vm_map_copyout(
                vm_object_offset_t      offset;
 
                offset = trunc_page_64(copy->offset);
-               size = round_page_32(copy->size + 
+               size = round_page(copy->size + 
                                (vm_size_t)(copy->offset - offset));
                *dst_addr = 0;
                kr = vm_map_enter(dst_map, dst_addr, size,
@@ -5012,7 +4994,7 @@ vm_map_copyout(
         */
 
        vm_copy_start = trunc_page_64(copy->offset);
-       size =  round_page_32((vm_size_t)copy->offset + copy->size) 
+       size =  round_page((vm_size_t)copy->offset + copy->size) 
                                                        - vm_copy_start;
 
  StartAgain: ;
@@ -5163,10 +5145,7 @@ vm_map_copyout(
                        vm_object_unlock(object);
 
                        PMAP_ENTER(dst_map->pmap, va, m, entry->protection, 
-                                               ((unsigned int)
-                                                       (m->object->wimg_bits)) 
-                                                       & VM_WIMG_MASK,
-                                               TRUE);
+                                               VM_WIMG_USE_DEFAULT, TRUE);
 
                        vm_object_lock(object);
                        PAGE_WAKEUP_DONE(m);
@@ -5216,9 +5195,7 @@ vm_map_copyout(
 
                                                PMAP_ENTER(dst_map->pmap, va, 
                                                        m, prot, 
-                                                       ((unsigned int)
-                                                       (m->object->wimg_bits)) 
-                                                          & VM_WIMG_MASK,
+                                                       VM_WIMG_USE_DEFAULT, 
                                                        FALSE);
 
                                                vm_object_lock(object);
@@ -5356,8 +5333,8 @@ vm_map_copyin_common(
         *      Compute start and end of region
         */
 
-       src_start = trunc_page_32(src_addr);
-       src_end = round_page_32(src_addr + len);
+       src_start = trunc_page(src_addr);
+       src_end = round_page(src_addr + len);
 
        XPR(XPR_VM_MAP, "vm_map_copyin_common map 0x%x addr 0x%x len 0x%x dest %d\n", (natural_t)src_map, src_addr, len, src_destroy, 0);
 
@@ -5486,14 +5463,13 @@ vm_map_copyin_common(
                        src_entry = tmp_entry;
                }
                if ((tmp_entry->object.vm_object != VM_OBJECT_NULL) && 
-                   (tmp_entry->object.vm_object->phys_contiguous)) {
-                       /* This is not, supported for now.In future */
-                       /* we will need to detect the phys_contig   */
-                       /* condition and then upgrade copy_slowly   */
-                       /* to do physical copy from the device mem  */
-                       /* based object. We can piggy-back off of   */
-                       /* the was wired boolean to set-up the      */
-                       /* proper handling */
+                   ((tmp_entry->object.vm_object->wimg_bits != VM_WIMG_DEFAULT) ||
+                   (tmp_entry->object.vm_object->phys_contiguous))) {
+                       /* This is not, cannot be supported for now */
+                       /* we need a description of the caching mode */
+                       /* reflected in the object before we can     */
+                       /* support copyin, and then the support will */
+                       /* be for direct copy */
                        RETURN(KERN_PROTECTION_FAILURE);
                }
                /*
@@ -5572,9 +5548,8 @@ RestartCopy:
                XPR(XPR_VM_MAP, "vm_map_copyin_common src_obj 0x%x ent 0x%x obj 0x%x was_wired %d\n",
                    src_object, new_entry, new_entry->object.vm_object,
                    was_wired, 0);
-               if ((src_object == VM_OBJECT_NULL ||
-                       (!was_wired && !map_share && !tmp_entry->is_shared)) &&
-                       vm_object_copy_quickly(
+               if (!was_wired &&
+                   vm_object_copy_quickly(
                                &new_entry->object.vm_object,
                                src_offset,
                                src_size,
@@ -5588,17 +5563,49 @@ RestartCopy:
                         */
 
                        if (src_needs_copy && !tmp_entry->needs_copy) {
-                               vm_object_pmap_protect(
-                                       src_object,
-                                       src_offset,
-                                       src_size,
-                                       (src_entry->is_shared ? 
-                                               PMAP_NULL
-                                               : src_map->pmap),
-                                       src_entry->vme_start,
-                                       src_entry->protection &
-                                               ~VM_PROT_WRITE);
-                               tmp_entry->needs_copy = TRUE;
+                               if (tmp_entry->is_shared  || 
+                                    tmp_entry->object.vm_object->true_share ||
+                                    map_share) {
+                                       vm_map_unlock(src_map);
+                                       new_entry->object.vm_object = 
+                                               vm_object_copy_delayed(
+                                                       src_object,
+                                                       src_offset,     
+                                                       src_size);
+                                       /* dec ref gained in copy_quickly */
+                                       vm_object_lock(src_object);
+                                       src_object->ref_count--;
+                                       assert(src_object->ref_count > 0);
+                                       vm_object_res_deallocate(src_object);
+                                       vm_object_unlock(src_object);
+                                       vm_map_lock(src_map);
+                                       /* 
+                                        * it turns out that we have
+                                        * finished our copy. No matter
+                                        * what the state of the map
+                                        * we will lock it again here
+                                        * knowing that if there is
+                                        * additional data to copy
+                                        * it will be checked at
+                                        * the top of the loop
+                                        *
+                                        * Don't do timestamp check
+                                        */
+                                       
+                               } else {
+                                       vm_object_pmap_protect(
+                                               src_object,
+                                               src_offset,
+                                               src_size,
+                                               (src_entry->is_shared ? 
+                                                       PMAP_NULL
+                                                       : src_map->pmap),
+                                               src_entry->vme_start,
+                                               src_entry->protection &
+                                                       ~VM_PROT_WRITE);
+
+                                       tmp_entry->needs_copy = TRUE;
+                               }
                        }
 
                        /*
@@ -5610,6 +5617,8 @@ RestartCopy:
                        goto CopySuccessful;
                }
 
+               new_entry->needs_copy = FALSE;
+
                /*
                 *      Take an object reference, so that we may
                 *      release the map lock(s).
@@ -5631,7 +5640,6 @@ RestartCopy:
                 */
 
                if (was_wired) {
-               CopySlowly:
                        vm_object_lock(src_object);
                        result = vm_object_copy_slowly(
                                        src_object,
@@ -5641,24 +5649,6 @@ RestartCopy:
                                        &new_entry->object.vm_object);
                        new_entry->offset = 0;
                        new_entry->needs_copy = FALSE;
-
-               }
-               else if (src_object->copy_strategy == MEMORY_OBJECT_COPY_SYMMETRIC &&
-                       (tmp_entry->is_shared  || map_share)) {
-                       vm_object_t new_object;
-
-                       vm_object_lock(src_object);
-                       new_object = vm_object_copy_delayed(
-                                       src_object,
-                                       src_offset,     
-                                       src_size);
-                       if (new_object == VM_OBJECT_NULL)
-                               goto CopySlowly;
-
-                       new_entry->object.vm_object = new_object;
-                       new_entry->needs_copy = TRUE;
-                       result = KERN_SUCCESS;
-
                } else {
                        result = vm_object_copy_strategically(src_object,
                                src_offset,
@@ -5668,6 +5658,7 @@ RestartCopy:
                                &new_entry_needs_copy);
 
                        new_entry->needs_copy = new_entry_needs_copy;
+                       
                }
 
                if (result != KERN_SUCCESS &&
@@ -5806,7 +5797,7 @@ RestartCopy:
         */
        if (src_destroy) {
                (void) vm_map_delete(src_map,
-                                    trunc_page_32(src_addr),
+                                    trunc_page(src_addr),
                                     src_end,
                                     (src_map == kernel_map) ?
                                        VM_MAP_REMOVE_KUNWIRE :
@@ -5893,9 +5884,8 @@ vm_map_fork_share(
                if(old_entry->use_pmap) {
                        result = pmap_nest(new_map->pmap, 
                                (old_entry->object.sub_map)->pmap, 
-                               (addr64_t)old_entry->vme_start,
-                               (addr64_t)old_entry->vme_start,
-                               (uint64_t)(old_entry->vme_end - old_entry->vme_start));
+                               old_entry->vme_start,
+                               old_entry->vme_end - old_entry->vme_start);
                        if(result)
                                panic("vm_map_fork_share: pmap_nest failed!");
                }
@@ -7641,8 +7631,7 @@ vm_region_look_for_page(
                        if (shadow && (max_refcnt == 1))
                                extended->pages_shared_now_private++;
 
-                       if (!p->fictitious && 
-                               (p->dirty || pmap_is_modified(p->phys_page)))
+                       if (p->dirty || pmap_is_modified(p->phys_addr))
                                extended->pages_dirtied++;
                        extended->pages_resident++;
 
@@ -7701,7 +7690,7 @@ vm_region_count_obj_refs(
            return(0);
 
         if (entry->is_sub_map)
-           return(0);
+           ref_count = vm_region_count_obj_refs((vm_map_entry_t)entry->object.sub_map, object);
        else {
            ref_count = 0;
 
@@ -7864,9 +7853,9 @@ vm_map_machine_attribute(
        }
 
        /* Get the starting address */
-       start = trunc_page_32(address);
+       start = trunc_page(address);
        /* Figure how much memory we need to flush (in page increments) */
-       sync_size = round_page_32(start + size) - start;        
+       sync_size = round_page(start + size) - start;   
 
 
        ret = KERN_SUCCESS;                                                                             /* Assume it all worked */
@@ -7909,7 +7898,7 @@ vm_map_machine_attribute(
        
                                                  ret = 
                                                     pmap_attribute_cache_sync(
-                                                       m->phys_page,   
+                                                       m->phys_addr, 
                                                        PAGE_SIZE, 
                                                        attribute, value);
                                                } else if (object->shadow) {
@@ -8039,7 +8028,7 @@ void
 vm_map_links_print(
        struct vm_map_links     *links)
 {
-       iprintf("prev = %08X  next = %08X  start = %08X  end = %08X\n",
+       iprintf("prev=0x%x, next=0x%x, start=0x%x, end=0x%x\n",
                links->prev,
                links->next,
                links->start,
@@ -8054,7 +8043,7 @@ vm_map_header_print(
        struct vm_map_header    *header)
 {
        vm_map_links_print(&header->links);
-       iprintf("nentries = %08X, %sentries_pageable\n",
+       iprintf("nentries=0x%x, %sentries_pageable\n",
                header->nentries,
                (header->entries_pageable ? "" : "!"));
 }
@@ -8069,7 +8058,7 @@ vm_follow_entry(
        extern int db_indent;
        int shadows;
 
-       iprintf("map entry %08X\n", entry);
+       iprintf("map entry 0x%x:\n", entry);
 
        db_indent += 2;
 
@@ -8090,20 +8079,20 @@ vm_map_entry_print(
        static char *inheritance_name[4] = { "share", "copy", "none", "?"};
        static char *behavior_name[4] = { "dflt", "rand", "seqtl", "rseqntl" };
        
-       iprintf("map entry %08X n", entry);
+       iprintf("map entry 0x%x:\n", entry);
 
        db_indent += 2;
 
        vm_map_links_print(&entry->links);
 
-       iprintf("start = %08X  end = %08X, prot=%x/%x/%s\n",
+       iprintf("start=0x%x, end=0x%x, prot=%x/%x/%s\n",
                entry->vme_start,
                entry->vme_end,
                entry->protection,
                entry->max_protection,
                inheritance_name[(entry->inheritance & 0x3)]);
 
-       iprintf("behavior = %s, wired_count = %d, user_wired_count = %d\n",
+       iprintf("behavior=%s, wired_count=%d, user_wired_count=%d\n",
                behavior_name[(entry->behavior & 0x3)],
                entry->wired_count,
                entry->user_wired_count);
@@ -8112,11 +8101,11 @@ vm_map_entry_print(
                (entry->needs_wakeup ? "" : "!"));
 
        if (entry->is_sub_map) {
-               iprintf("submap = %08X - offset=%08X\n",
+               iprintf("submap=0x%x, offset=0x%x\n",
                       entry->object.sub_map,
                       entry->offset);
        } else {
-               iprintf("object=%08X, offset=%08X, ",
+               iprintf("object=0x%x, offset=0x%x, ",
                        entry->object.vm_object,
                        entry->offset);
                printf("%sis_shared, %sneeds_copy\n",
@@ -8137,7 +8126,7 @@ vm_follow_map(
        register vm_map_entry_t entry;
        extern int db_indent;
 
-       iprintf("task map %08X\n", map);
+       iprintf("task map 0x%x:\n", map);
 
        db_indent += 2;
 
@@ -8155,29 +8144,26 @@ vm_follow_map(
  */
 void
 vm_map_print(
-       db_addr_t inmap)
+       register vm_map_t       map)
 {
        register vm_map_entry_t entry;
-       vm_map_t map;
        extern int db_indent;
        char *swstate;
 
-       map = (vm_map_t)inmap;                          /* Make sure we have the right type */
-
-       iprintf("task map %08X\n", map);
+       iprintf("task map 0x%x:\n", map);
 
        db_indent += 2;
 
        vm_map_header_print(&map->hdr);
 
-       iprintf("pmap = %08X, size = %08X, ref = %d, hint = %08X, first_free = %08X\n",
+       iprintf("pmap=0x%x, size=%d, ref=%d, hint=0x%x, first_free=0x%x\n",
                map->pmap,
                map->size,
                map->ref_count,
                map->hint,
                map->first_free);
 
-       iprintf("%swait_for_space, %swiring_required, timestamp = %d\n",
+       iprintf("%swait_for_space, %swiring_required, timestamp=%d\n",
                (map->wait_for_space ? "" : "!"),
                (map->wiring_required ? "" : "!"),
                map->timestamp);
@@ -8194,7 +8180,7 @@ vm_map_print(
                swstate = "????";
                break;
        }
-       iprintf("res = %d, sw_state = %s\n", map->res_count, swstate);
+       iprintf("res=%d, sw_state=%s\n", map->res_count, swstate);
 #endif /* TASK_SWAPPER */
 
        for (entry = vm_map_first_entry(map);
@@ -8214,15 +8200,12 @@ vm_map_print(
 
 void
 vm_map_copy_print(
-       db_addr_t       incopy)
+       vm_map_copy_t   copy)
 {
        extern int db_indent;
-       vm_map_copy_t copy;
        int i, npages;
        vm_map_entry_t entry;
 
-       copy = (vm_map_copy_t)incopy;   /* Make sure we have the right type */
-
        printf("copy object 0x%x\n", copy);
 
        db_indent += 2;
@@ -8279,13 +8262,10 @@ vm_map_copy_print(
  */
 vm_size_t
 db_vm_map_total_size(
-       db_addr_t       inmap)
+       vm_map_t        map)
 {
        vm_map_entry_t  entry;
        vm_size_t       total;
-       vm_map_t map;
-
-       map = (vm_map_t)inmap;  /* Make sure we have the right type */
 
        total = 0;
        for (entry = vm_map_first_entry(map);
@@ -8395,7 +8375,7 @@ vm_remap_extract(
        boolean_t               new_entry_needs_copy;
 
        assert(map != VM_MAP_NULL);
-       assert(size != 0 && size == round_page_32(size));
+       assert(size != 0 && size == round_page(size));
        assert(inheritance == VM_INHERIT_NONE ||
               inheritance == VM_INHERIT_COPY ||
               inheritance == VM_INHERIT_SHARE);
@@ -8403,8 +8383,8 @@ vm_remap_extract(
        /*
         *      Compute start and end of region.
         */
-       src_start = trunc_page_32(addr);
-       src_end = round_page_32(src_start + size);
+       src_start = trunc_page(addr);
+       src_end = round_page(src_start + size);
 
        /*
         *      Initialize map_header.
@@ -8724,7 +8704,7 @@ vm_remap(
                return KERN_INVALID_ARGUMENT;
        }
 
-       size = round_page_32(size);
+       size = round_page(size);
 
        result = vm_remap_extract(src_map, memory_address,
                                  size, copy, &map_header,
@@ -8742,7 +8722,7 @@ vm_remap(
         * Allocate/check a range of free virtual address
         * space for the target
         */
-       *address = trunc_page_32(*address);
+       *address = trunc_page(*address);
        vm_map_lock(target_map);
        result = vm_remap_range_allocate(target_map, address, size,
                                         mask, anywhere, &insp_entry);
index d0f12dacc8be1931e1ebb8b872af2ca286e7db91..c32c121be605b8468244793b1595f9a418d84df3 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -868,12 +865,6 @@ extern kern_return_t vm_map_region_replace(
                                vm_offset_t     start,  
                                vm_offset_t     end);
 
-extern boolean_t vm_map_check_protection(
-                               vm_map_t        map,
-                               vm_offset_t     start,
-                               vm_offset_t     end,
-                               vm_prot_t       protection);
-
 /*
  *     Macros to invoke vm_map_copyin_common.  vm_map_copyin is the
  *     usual form; it handles a copyin based on the current protection
index a0f8bff17e79b0a7a90a680f82b23ad172eed0fa..3e2579dbfb6da786030382b72335ac74b85b9bcf 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -409,8 +406,8 @@ vm_object_bootstrap(void)
        register        i;
 
        vm_object_zone = zinit((vm_size_t) sizeof(struct vm_object),
-                               round_page_32(512*1024),
-                               round_page_32(12*1024),
+                               round_page(512*1024),
+                               round_page(12*1024),
                                "vm objects");
 
        queue_init(&vm_object_cached_list);
@@ -418,8 +415,8 @@ vm_object_bootstrap(void)
 
        vm_object_hash_zone =
                        zinit((vm_size_t) sizeof (struct vm_object_hash_entry),
-                             round_page_32(512*1024),
-                             round_page_32(12*1024),
+                             round_page(512*1024),
+                             round_page(12*1024),
                              "vm object hash entries");
 
        for (i = 0; i < VM_OBJECT_HASH_COUNT; i++)
@@ -496,17 +493,10 @@ vm_object_bootstrap(void)
 
 /*
  *     Note that in the following size specifications, we need to add 1 because 
- *     VM_MAX_KERNEL_ADDRESS (vm_last_addr) is a maximum address, not a size.
+ *     VM_MAX_KERNEL_ADDRESS is a maximum address, not a size.
  */
-
-#ifdef ppc
-       _vm_object_allocate((vm_last_addr - VM_MIN_KERNEL_ADDRESS) + 1,
-                       kernel_object);
-#else
        _vm_object_allocate((VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) + 1,
                        kernel_object);
-#endif
-       kernel_object->copy_strategy = MEMORY_OBJECT_COPY_NONE;
 
        /*
         *      Initialize the "submap object".  Make it as large as the
@@ -514,15 +504,8 @@ vm_object_bootstrap(void)
         */
 
        vm_submap_object = &vm_submap_object_store;
-#ifdef ppc
-       _vm_object_allocate((vm_last_addr - VM_MIN_KERNEL_ADDRESS) + 1,
-                       vm_submap_object);
-#else
        _vm_object_allocate((VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) + 1,
                        vm_submap_object);
-#endif
-       vm_submap_object->copy_strategy = MEMORY_OBJECT_COPY_NONE;
-
        /*
         * Create an "extra" reference to this object so that we never
         * try to deallocate it; zfree doesn't like to be called with
@@ -938,7 +921,7 @@ vm_object_terminate(
                        panic("vm_object_terminate.4 0x%x 0x%x", object, p);
 
                if (!p->dirty)
-                       p->dirty = pmap_is_modified(p->phys_page);
+                       p->dirty = pmap_is_modified(p->phys_addr);
 
                if ((p->dirty || p->precious) && !p->error && object->alive) {
                        p->busy = TRUE;
@@ -1334,12 +1317,12 @@ vm_object_deactivate_pages(
                                if ((m->wire_count == 0) && (!m->private) && (!m->gobbled) && (!m->busy)) {
 
                                        m->reference = FALSE;
-                                       pmap_clear_reference(m->phys_page);
+                                       pmap_clear_reference(m->phys_addr);
 
                                        if ((kill_page) && (object->internal)) {
                                                m->precious = FALSE;
                                                m->dirty = FALSE;
-                                               pmap_clear_modify(m->phys_page);
+                                               pmap_clear_modify(m->phys_addr);
                                                vm_external_state_clr(object->existence_map, offset);
                                        }
                                        VM_PAGE_QUEUES_REMOVE(m);
@@ -1425,8 +1408,10 @@ vm_object_pmap_protect(
 
        vm_object_lock(object);
 
+       assert(object->copy_strategy == MEMORY_OBJECT_COPY_SYMMETRIC);
+
        while (TRUE) {
-           if (object->resident_page_count > atop_32(size) / 2 &&
+           if (object->resident_page_count > atop(size) / 2 &&
                    pmap != PMAP_NULL) {
                vm_object_unlock(object);
                pmap_protect(pmap, pmap_start, pmap_start + size, prot);
@@ -1436,7 +1421,7 @@ vm_object_pmap_protect(
            /* if we are doing large ranges with respect to resident */
            /* page count then we should interate over pages otherwise */
            /* inverse page look-up will be faster */
-           if ((object->resident_page_count / 4) <  atop_32(size)) {
+           if ((object->resident_page_count / 4) <  atop(size)) {
                vm_page_t               p;
                vm_object_offset_t      end;
 
@@ -1458,7 +1443,7 @@ vm_object_pmap_protect(
                    if (!p->fictitious &&
                        (offset <= p->offset) && (p->offset < end)) {
 
-                           pmap_page_protect(p->phys_page,
+                           pmap_page_protect(p->phys_addr,
                                              prot & ~p->page_lock);
                    }
                  }
@@ -1484,7 +1469,7 @@ vm_object_pmap_protect(
                        for(target_off = offset; 
                                target_off < end; target_off += PAGE_SIZE) {
                                if(p = vm_page_lookup(object, target_off)) {
-                                       pmap_page_protect(p->phys_page,
+                                       pmap_page_protect(p->phys_addr,
                                                      prot & ~p->page_lock);
                                }
                        }
@@ -1947,8 +1932,7 @@ static int copy_delayed_protect_lookup_wait = 0;
  *             the asymmetric copy-on-write algorithm.
  *
  *     In/out conditions:
- *             The src_object must be locked on entry.  It will be unlocked
- *             on exit - so the caller must also hold a reference to it.
+ *             The object must be unlocked on entry.
  *
  *             This routine will not block waiting for user-generated
  *             events.  It is not interruptible.
@@ -1962,7 +1946,7 @@ vm_object_copy_delayed(
        vm_object_t             new_copy = VM_OBJECT_NULL;
        vm_object_t             old_copy;
        vm_page_t               p;
-       vm_object_size_t        copy_size = src_offset + size;
+       vm_object_size_t        copy_size;
 
        int collisions = 0;
        /*
@@ -2005,13 +1989,8 @@ vm_object_copy_delayed(
         */
 
  Retry:
+       vm_object_lock(src_object);
  
-       /*
-        * Wait for paging in progress.
-        */
-       if (!src_object->true_share)
-               vm_object_paging_wait(src_object, THREAD_UNINT);
-
        /*
         *      See whether we can reuse the result of a previous
         *      copy operation.
@@ -2034,7 +2013,6 @@ vm_object_copy_delayed(
                        if (collisions > copy_delayed_max_collisions)
                                copy_delayed_max_collisions = collisions;
 
-                       vm_object_lock(src_object);
                        goto Retry;
                }
 
@@ -2049,66 +2027,52 @@ vm_object_copy_delayed(
                         *      It has not been modified.
                         *
                         *      Return another reference to
-                        *      the existing copy-object if
-                        *      we can safely grow it (if
-                        *      needed).
+                        *      the existing copy-object.
                         */
+                       assert(old_copy->ref_count > 0);
+                       old_copy->ref_count++;
+
+                       if (old_copy->size < src_offset+size)
+                               old_copy->size = src_offset+size;
+
+#if    TASK_SWAPPER
+                       /*
+                        * We have to reproduce some of the code from
+                        * vm_object_res_reference because we've taken
+                        * the locks out of order here, and deadlock
+                        * would result if we simply called that function.
+                        */
+                       if (++old_copy->res_count == 1) {
+                               assert(old_copy->shadow == src_object);
+                               vm_object_res_reference(src_object);
+                       }
+#endif /* TASK_SWAPPER */
+
+                       vm_object_unlock(old_copy);
+                       vm_object_unlock(src_object);
 
                        if (new_copy != VM_OBJECT_NULL) {
                                vm_object_unlock(new_copy);
                                vm_object_deallocate(new_copy);
                        }
 
-                       if (old_copy->size < copy_size) {
-                               /*
-                                * We can't perform a delayed copy if any of the
-                                * pages in the extended range are wired (because
-                                * we can't safely take write permission away from
-                                * wired pages).  If the pages aren't wired, then
-                                * go ahead and protect them.
-                                */
-                               copy_delayed_protect_iterate++;
-                               queue_iterate(&src_object->memq, p, vm_page_t, listq) {
-                                       if (!p->fictitious && 
-                                           p->offset >= old_copy->size && 
-                                           p->offset < copy_size) {
-                                               if (p->wire_count > 0) {
-                                                       vm_object_unlock(old_copy);
-                                                       vm_object_unlock(src_object);
-                                                       return VM_OBJECT_NULL;
-                                               } else {
-                                                       pmap_page_protect(p->phys_page, 
-                                                               (VM_PROT_ALL & ~VM_PROT_WRITE &
-                                                                ~p->page_lock));
-                                               }
-                                       }
-                               }
-                               old_copy->size = copy_size;
-                       }
-                               
-                       vm_object_reference_locked(old_copy);
-                       vm_object_unlock(old_copy);
-                       vm_object_unlock(src_object);
                        return(old_copy);
                }
-
-               /*
-                * Adjust the size argument so that the newly-created 
-                * copy object will be large enough to back either the
-                * old copy object or the new mapping.
-                */
-               if (old_copy->size > copy_size)
-                       copy_size = old_copy->size;
-
                if (new_copy == VM_OBJECT_NULL) {
                        vm_object_unlock(old_copy);
                        vm_object_unlock(src_object);
-                       new_copy = vm_object_allocate(copy_size);
-                       vm_object_lock(src_object);
+                       new_copy = vm_object_allocate(src_offset + size);
                        vm_object_lock(new_copy);
                        goto Retry;
                }
-               new_copy->size = copy_size;     
+
+               /*
+                * Adjust the size argument so that the newly-created 
+                * copy object will be large enough to back either the
+                * new old copy object or the new mapping.
+                */
+               if (old_copy->size > src_offset+size)
+                       size =  old_copy->size - src_offset;
 
                /*
                 *      The copy-object is always made large enough to
@@ -2120,44 +2084,6 @@ vm_object_copy_delayed(
                assert((old_copy->shadow == src_object) &&
                    (old_copy->shadow_offset == (vm_object_offset_t) 0));
 
-       } else if (new_copy == VM_OBJECT_NULL) {
-               vm_object_unlock(src_object);
-               new_copy = vm_object_allocate(copy_size);
-               vm_object_lock(src_object);
-               vm_object_lock(new_copy);
-               goto Retry;
-       }
-
-       /*
-        * We now have the src object locked, and the new copy object
-        * allocated and locked (and potentially the old copy locked).
-        * Before we go any further, make sure we can still perform
-        * a delayed copy, as the situation may have changed.
-        *
-        * Specifically, we can't perform a delayed copy if any of the
-        * pages in the range are wired (because we can't safely take
-        * write permission away from wired pages).  If the pages aren't
-        * wired, then go ahead and protect them.
-        */
-       copy_delayed_protect_iterate++;
-       queue_iterate(&src_object->memq, p, vm_page_t, listq) {
-               if (!p->fictitious && p->offset < copy_size) {
-                       if (p->wire_count > 0) {
-                               if (old_copy)
-                                       vm_object_unlock(old_copy);
-                               vm_object_unlock(src_object);
-                               vm_object_unlock(new_copy);
-                               vm_object_deallocate(new_copy);
-                               return VM_OBJECT_NULL;
-                       } else {
-                               pmap_page_protect(p->phys_page, 
-                                       (VM_PROT_ALL & ~VM_PROT_WRITE &
-                                        ~p->page_lock));
-                       }
-               }
-       }
-
-       if (old_copy != VM_OBJECT_NULL) {
                /*
                 *      Make the old copy-object shadow the new one.
                 *      It will receive no more pages from the original
@@ -2178,11 +2104,26 @@ vm_object_copy_delayed(
 #endif
 
                vm_object_unlock(old_copy);     /* done with old_copy */
+       } else if (new_copy == VM_OBJECT_NULL) {
+               vm_object_unlock(src_object);
+               new_copy = vm_object_allocate(src_offset + size);
+               vm_object_lock(new_copy);
+               goto Retry;
+       }
+
+       /*
+        * Readjust the copy-object size if necessary.
+        */
+       copy_size = new_copy->size;
+       if (copy_size < src_offset+size) {
+               copy_size = src_offset+size;
+               new_copy->size = copy_size;
        }
 
        /*
         *      Point the new copy at the existing object.
         */
+
        new_copy->shadow = src_object;
        new_copy->shadow_offset = 0;
        new_copy->shadowed = TRUE;      /* caller must set needs_copy */
@@ -2190,9 +2131,23 @@ vm_object_copy_delayed(
        src_object->ref_count++;
        VM_OBJ_RES_INCR(src_object);
        src_object->copy = new_copy;
-       vm_object_unlock(src_object);
        vm_object_unlock(new_copy);
 
+       /*
+        *      Mark all (current) pages of the existing object copy-on-write.
+        *      This object may have a shadow chain below it, but
+        *      those pages will already be marked copy-on-write.
+        */
+
+       vm_object_paging_wait(src_object, THREAD_UNINT);
+       copy_delayed_protect_iterate++;
+       queue_iterate(&src_object->memq, p, vm_page_t, listq) {
+           if (!p->fictitious)
+               pmap_page_protect(p->phys_addr, 
+                                 (VM_PROT_ALL & ~VM_PROT_WRITE &
+                                  ~p->page_lock));
+       }
+       vm_object_unlock(src_object);
        XPR(XPR_VM_OBJECT,
                "vm_object_copy_delayed: used copy object %X for source %X\n",
                (integer_t)new_copy, (integer_t)src_object, 0, 0, 0);
@@ -2252,18 +2207,6 @@ vm_object_copy_strategically(
         */
 
        switch (copy_strategy) {
-           case MEMORY_OBJECT_COPY_DELAY:
-               *dst_object = vm_object_copy_delayed(src_object,
-                                                    src_offset, size);
-               if (*dst_object != VM_OBJECT_NULL) {
-                       *dst_offset = src_offset;
-                       *dst_needs_copy = TRUE;
-                       result = KERN_SUCCESS;
-                       break;
-               }
-               vm_object_lock(src_object);
-               /* fall thru when delayed copy not allowed */
-
            case MEMORY_OBJECT_COPY_NONE:
                result = vm_object_copy_slowly(src_object, src_offset, size,
                                               interruptible, dst_object);
@@ -2282,6 +2225,15 @@ vm_object_copy_strategically(
                }
                break;
 
+           case MEMORY_OBJECT_COPY_DELAY:
+               vm_object_unlock(src_object);
+               *dst_object = vm_object_copy_delayed(src_object,
+                                                    src_offset, size);
+               *dst_offset = src_offset;
+               *dst_needs_copy = TRUE;
+               result = KERN_SUCCESS;
+               break;
+
            case MEMORY_OBJECT_COPY_SYMMETRIC:
                XPR(XPR_VM_OBJECT, "v_o_c_strategically obj 0x%x off 0x%x size 0x%x\n",(natural_t)src_object, src_offset, size, 0, 0);
                vm_object_unlock(src_object);
@@ -3478,7 +3430,7 @@ vm_object_page_remove(
         *      It balances vm_object_lookup vs iteration.
         */
 
-       if (atop_64(end - start) < (unsigned)object->resident_page_count/16) {
+       if (atop(end - start) < (unsigned)object->resident_page_count/16) {
                vm_object_page_remove_lookup++;
 
                for (; start < end; start += PAGE_SIZE_64) {
@@ -3486,7 +3438,7 @@ vm_object_page_remove(
                        if (p != VM_PAGE_NULL) {
                                assert(!p->cleaning && !p->pageout);
                                if (!p->fictitious)
-                                       pmap_page_protect(p->phys_page,
+                                       pmap_page_protect(p->phys_addr,
                                                          VM_PROT_NONE);
                                VM_PAGE_FREE(p);
                        }
@@ -3500,7 +3452,7 @@ vm_object_page_remove(
                        if ((start <= p->offset) && (p->offset < end)) {
                                assert(!p->cleaning && !p->pageout);
                                if (!p->fictitious)
-                                   pmap_page_protect(p->phys_page,
+                                   pmap_page_protect(p->phys_addr,
                                                      VM_PROT_NONE);
                                VM_PAGE_FREE(p);
                        }
@@ -3645,7 +3597,7 @@ vm_object_page_map(
        vm_page_t       old_page;
        vm_object_offset_t      addr;
 
-       num_pages = atop_64(size);
+       num_pages = atop(size);
 
        for (i = 0; i < num_pages; i++, offset += PAGE_SIZE_64) {
 
@@ -4010,24 +3962,27 @@ vm_object_find(
 
 kern_return_t
 vm_object_populate_with_private(
-               vm_object_t             object,
+               vm_object_t     object,
                vm_object_offset_t      offset,
-               ppnum_t                 phys_page,
-               vm_size_t               size)
+               vm_offset_t     phys_addr,
+               vm_size_t       size)
 {
-       ppnum_t                 base_page;
+       vm_offset_t             base_addr;
        vm_object_offset_t      base_offset;
 
 
        if(!object->private)
                return KERN_FAILURE;
 
-       base_page = phys_page;
+       if((base_addr = trunc_page(phys_addr)) != phys_addr) {
+               return KERN_FAILURE;
+       }
+
 
        vm_object_lock(object);
        if(!object->phys_contiguous) {
                vm_page_t       m;
-               if((base_offset = trunc_page_64(offset)) != offset) {
+               if((base_offset = trunc_page(offset)) != offset) {
                        vm_object_unlock(object);
                        return KERN_FAILURE;
                }
@@ -4039,7 +3994,7 @@ vm_object_populate_with_private(
                                        vm_page_lock_queues();
                                        m->fictitious = FALSE;
                                        m->private = TRUE;
-                                       m->phys_page = base_page;
+                                       m->phys_addr = base_addr;
                                        if(!m->busy) {
                                                m->busy = TRUE;
                                        }
@@ -4049,11 +4004,11 @@ vm_object_populate_with_private(
                                        }
                                        m->list_req_pending = TRUE;
                                        vm_page_unlock_queues();
-                               } else if (m->phys_page != base_page) {
+                               } else if (m->phys_addr != base_addr) {
                                        /* pmap call to clear old mapping */
-                                       pmap_page_protect(m->phys_page,
+                                       pmap_page_protect(m->phys_addr,
                                                                VM_PROT_NONE);
-                                       m->phys_page = base_page;
+                                       m->phys_addr = base_addr;
                                }
                        } else {
                                while ((m = vm_page_grab_fictitious()) 
@@ -4062,7 +4017,7 @@ vm_object_populate_with_private(
                                vm_page_lock_queues();
                                m->fictitious = FALSE;
                                m->private = TRUE;
-                               m->phys_page = base_page;
+                               m->phys_addr = base_addr;
                                m->list_req_pending = TRUE;
                                m->absent = TRUE;
                                m->unusual = TRUE;
@@ -4070,7 +4025,7 @@ vm_object_populate_with_private(
                                vm_page_unlock_queues();
                                vm_page_insert(m, object, base_offset);
                        }
-                       base_page++;                                                                    /* Go to the next physical page */
+                       base_addr += PAGE_SIZE;
                        base_offset += PAGE_SIZE;
                        size -= PAGE_SIZE;
                }
@@ -4083,7 +4038,7 @@ vm_object_populate_with_private(
                
                /* shadows on contiguous memory are not allowed */
                /* we therefore can use the offset field */
-               object->shadow_offset = (vm_object_offset_t)(phys_page << 12);
+               object->shadow_offset = (vm_object_offset_t)phys_addr;
                object->size = size;
        }
        vm_object_unlock(object);
@@ -4424,7 +4379,7 @@ vm_object_lock_request(
        if ((prot & ~VM_PROT_ALL) != 0 && prot != VM_PROT_NO_CHANGE)
                return (KERN_INVALID_ARGUMENT);
 
-       size = round_page_64(size);
+       size = round_page(size);
 
        /*
         *      Lock the object, and acquire a paging reference to
index dbfc2a85ec3a91b82acbe68be64bb57b0e8b16a8..679ea7eb98156178bd5fd516d8e5345b21081e4e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a449f5dfa06bcfed7cddca27cce22809c1c7130e..7ab8fe83eec4b930fa001c91633a4309ac64a3de 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -180,7 +177,7 @@ struct vm_page {
                                           /* a pageout candidate           */
         /* we've used up all 32 bits */
 
-       vm_offset_t     phys_page;      /* Physical address of page, passed
+       vm_offset_t     phys_addr;      /* Physical address of page, passed
                                         *  to pmap_enter (read-only) */
 };
 
@@ -276,8 +273,8 @@ extern void         vm_page_bootstrap(
 extern void            vm_page_module_init(void);
 
 extern void            vm_page_create(
-                                       ppnum_t         start,
-                                       ppnum_t         end);
+                                       vm_offset_t     start,
+                                       vm_offset_t     end);
 
 extern vm_page_t       vm_page_lookup(
                                        vm_object_t             object,
@@ -316,7 +313,7 @@ extern vm_page_t    vm_page_alloc(
 
 extern void            vm_page_init(
                                        vm_page_t       page,
-                                       ppnum_t         phys_page);
+                                       vm_offset_t     phys_addr);
 
 extern void            vm_page_free(
                                        vm_page_t       page);
index ab64d42ffcf5493c1e29e145dc1125532a59619d..3dee3f693dab3eb908d89e768c8f56b14ee8fe56 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -77,7 +74,6 @@
 #include <kern/thread.h>
 #include <kern/xpr.h>
 #include <vm/pmap.h>
-#include <vm/vm_fault.h>
 #include <vm/vm_map.h>
 #include <vm/vm_object.h>
 #include <vm/vm_page.h>
@@ -393,14 +389,14 @@ vm_pageout_object_terminate(
                         * from being dirtied after the pmap_is_modified() call
                         * returns.
                         */
-                       pmap_page_protect(m->phys_page, VM_PROT_NONE);
+                       pmap_page_protect(m->phys_addr, VM_PROT_NONE);
 
                        /*
                         * Since the page is left "dirty" but "not modifed", we
                         * can detect whether the page was redirtied during
                         * pageout by checking the modify state.
                         */
-                       m->dirty = pmap_is_modified(m->phys_page);
+                       m->dirty = pmap_is_modified(m->phys_addr);
 
                        if (m->dirty) {
                                CLUSTER_STAT(vm_pageout_target_page_dirtied++;)
@@ -438,7 +434,7 @@ vm_pageout_object_terminate(
                        /* out the pages but handling outside of this code */
                        /* will take care of resetting dirty. We clear the */
                        /* modify however for the Programmed I/O case.     */ 
-                       pmap_clear_modify(m->phys_page);
+                       pmap_clear_modify(m->phys_addr);
                        if(m->absent) {
                                m->absent = FALSE;
                                if(shadow_object->absent_count == 1)
@@ -465,7 +461,7 @@ vm_pageout_object_terminate(
                 * consulted if m->dirty is false.
                 */
 #if MACH_CLUSTER_STATS
-                       m->dirty = pmap_is_modified(m->phys_page);
+                       m->dirty = pmap_is_modified(m->phys_addr);
 
                        if (m->dirty)   vm_pageout_cluster_dirtied++;
                        else            vm_pageout_cluster_cleaned++;
@@ -476,6 +472,7 @@ vm_pageout_object_terminate(
                }
                m->cleaning = FALSE;
 
+
                /*
                 * Wakeup any thread waiting for the page to be un-cleaning.
                 */
@@ -569,7 +566,7 @@ vm_pageout_setup(
                /*
                 * Set up new page to be private shadow of real page.
                 */
-               new_m->phys_page = m->phys_page;
+               new_m->phys_addr = m->phys_addr;
                new_m->fictitious = FALSE;
                new_m->pageout = TRUE;
 
@@ -579,7 +576,7 @@ vm_pageout_setup(
                 * pageout (indicating that the page should be freed
                 * when the pageout completes).
                 */
-               pmap_clear_modify(m->phys_page);
+               pmap_clear_modify(m->phys_addr);
                vm_page_lock_queues();
                new_m->private = TRUE;
                vm_page_wire(new_m);
@@ -677,7 +674,7 @@ vm_pageclean_setup(
                (integer_t)old_object, m->offset, (integer_t)m, 
                (integer_t)new_m, new_offset);
 
-       pmap_clear_modify(m->phys_page);
+       pmap_clear_modify(m->phys_addr);
        vm_object_paging_begin(old_object);
 
        /*
@@ -702,7 +699,7 @@ vm_pageclean_setup(
        new_m->fictitious = FALSE;
        new_m->private = TRUE;
        new_m->pageout = TRUE;
-       new_m->phys_page = m->phys_page;
+       new_m->phys_addr = m->phys_addr;
        vm_page_wire(new_m);
 
        vm_page_insert(new_m, new_object, new_offset);
@@ -725,7 +722,7 @@ vm_pageclean_copy(
 
        assert(!new_m->private && !new_m->fictitious);
 
-       pmap_clear_modify(m->phys_page);
+       pmap_clear_modify(m->phys_addr);
 
        m->busy = TRUE;
        vm_object_paging_begin(m->object);
@@ -816,7 +813,7 @@ vm_pageout_initialize_page(
        holding_page = NULL;
        vm_object_lock(m->object);
        vm_page_lock_queues();
-       pmap_clear_modify(m->phys_page);
+       pmap_clear_modify(m->phys_addr);
        m->dirty = TRUE;
                m->busy = TRUE;
                m->list_req_pending = TRUE;
@@ -1154,7 +1151,7 @@ vm_pageout_cluster_page(
        assert(!m->private);
        assert(!m->fictitious);
 
-       if (!m->dirty) m->dirty = pmap_is_modified(m->phys_page);
+       if (!m->dirty) m->dirty = pmap_is_modified(m->phys_addr);
 
        if (precious_clean) {
                if (!m->precious || !m->dirty)
@@ -1642,7 +1639,7 @@ vm_pageout_scan(void)
                 *      (Fictitious pages are either busy or absent.)
                 */
 
-               if (m->reference || pmap_is_referenced(m->phys_page)) {
+               if (m->reference || pmap_is_referenced(m->phys_addr)) {
                        vm_pageout_inactive_used++;
                    reactivate_page:
 #if    ADVISORY_PAGEOUT
@@ -1732,10 +1729,10 @@ vm_pageout_scan(void)
                 */
 
                m->busy = TRUE;
-               pmap_page_protect(m->phys_page, VM_PROT_NONE);
+               pmap_page_protect(m->phys_addr, VM_PROT_NONE);
 
                if (!m->dirty)
-                       m->dirty = pmap_is_modified(m->phys_page);
+                       m->dirty = pmap_is_modified(m->phys_addr);
                /*
                 *      If it's clean and not precious, we can free the page.
                 */
@@ -1954,7 +1951,7 @@ vm_pageout_emergency_availability_request()
                        continue;
                }
                if (!m->dirty)
-                       m->dirty = pmap_is_modified(m->phys_page);
+                       m->dirty = pmap_is_modified(m->phys_addr);
                if(m->dirty || m->busy || m->wire_count  || m->absent
                                || m->precious || m->cleaning 
                                || m->dump_cleaning || m->error
@@ -1974,7 +1971,7 @@ vm_pageout_emergency_availability_request()
                                continue;
                        }
                        m->busy = TRUE;
-                       pmap_page_protect(m->phys_page, VM_PROT_NONE);
+                       pmap_page_protect(m->phys_addr, VM_PROT_NONE);
                        vm_page_free(m);
                        vm_object_unlock(object);
                        vm_page_unlock_queues();
@@ -1991,7 +1988,7 @@ vm_pageout_emergency_availability_request()
                        continue;
                }
                if (!m->dirty)
-                       m->dirty = pmap_is_modified(m->phys_page);
+                       m->dirty = pmap_is_modified(m->phys_addr);
                if(m->dirty || m->busy || m->wire_count || m->absent
                                || m->precious || m->cleaning 
                                || m->dump_cleaning || m->error
@@ -2011,7 +2008,7 @@ vm_pageout_emergency_availability_request()
                                continue;
                        }
                        m->busy = TRUE;
-                       pmap_page_protect(m->phys_page, VM_PROT_NONE);
+                       pmap_page_protect(m->phys_addr, VM_PROT_NONE);
                        vm_page_free(m);
                        vm_object_unlock(object);
                        vm_page_unlock_queues();
@@ -2026,23 +2023,16 @@ vm_pageout_emergency_availability_request()
 
 static upl_t
 upl_create(
-          int             flags,
+          boolean_t    internal,
            vm_size_t       size)
 {
        upl_t   upl;
-       int     page_field_size;  /* bit field in word size buf */
 
-       page_field_size = 0;
-       if (flags & UPL_CREATE_LITE) {
-               page_field_size = ((size/PAGE_SIZE) + 7) >> 3;
-               page_field_size = (page_field_size + 3) & 0xFFFFFFFC;
-       }
-       if(flags & UPL_CREATE_INTERNAL) {
+       if(internal) {
                upl = (upl_t)kalloc(sizeof(struct upl)
-                       + (sizeof(struct upl_page_info)*(size/PAGE_SIZE))
-                       + page_field_size);
+                       + (sizeof(struct upl_page_info)*(size/page_size)));
        } else {
-               upl = (upl_t)kalloc(sizeof(struct upl) + page_field_size);
+               upl = (upl_t)kalloc(sizeof(struct upl));
        }
        upl->flags = 0;
        upl->src_object = NULL;
@@ -2062,45 +2052,32 @@ static void
 upl_destroy(
        upl_t   upl)
 {
-       int     page_field_size;  /* bit field in word size buf */
 
 #ifdef UBC_DEBUG
        {
                upl_t   upl_ele;
-               vm_object_t     object;
-               if (upl->map_object->pageout) {
-                       object = upl->map_object->shadow;
-               } else {
-                       object = upl->map_object;
-               }
-               vm_object_lock(object);
-               queue_iterate(&object->uplq, upl_ele, upl_t, uplq) {
+               vm_object_lock(upl->map_object->shadow);
+               queue_iterate(&upl->map_object->shadow->uplq, 
+                                               upl_ele, upl_t, uplq) {
                        if(upl_ele == upl) {
-                               queue_remove(&object->uplq, 
-                                               upl_ele, upl_t, uplq);
+                               queue_remove(&upl->map_object->shadow->uplq, 
+                                       upl_ele, upl_t, uplq);
                                break;
                        }
                }
-               vm_object_unlock(object);
+               vm_object_unlock(upl->map_object->shadow);
        }
 #endif /* UBC_DEBUG */
-       /* drop a reference on the map_object whether or */
-       /* not a pageout object is inserted */
-       if(upl->map_object->pageout)
+#ifdef notdefcdy
+       if(!(upl->flags & UPL_DEVICE_MEMORY))
+#endif
                vm_object_deallocate(upl->map_object);
-
-       page_field_size = 0;
-       if (upl->flags & UPL_LITE) {
-               page_field_size = ((upl->size/PAGE_SIZE) + 7) >> 3;
-               page_field_size = (page_field_size + 3) & 0xFFFFFFFC;
-       }
        if(upl->flags & UPL_INTERNAL) {
                kfree((vm_offset_t)upl,
                        sizeof(struct upl) + 
-                       (sizeof(struct upl_page_info) * (upl->size/PAGE_SIZE))
-                       + page_field_size);
+                       (sizeof(struct upl_page_info) * (upl->size/page_size)));
        } else {
-               kfree((vm_offset_t)upl, sizeof(struct upl) + page_field_size);
+               kfree((vm_offset_t)upl, sizeof(struct upl));
        }
 }
 
@@ -2189,13 +2166,13 @@ vm_object_upl_request(
 
        vm_page_t               alias_page = NULL;
        int                     page_ticket; 
-       wpl_array_t             lite_list;
+
 
        page_ticket = (cntrl_flags & UPL_PAGE_TICKET_MASK)
                                        >> UPL_PAGE_TICKET_SHIFT;
 
-       if(((size/PAGE_SIZE) > MAX_UPL_TRANSFER) && !object->phys_contiguous) {
-               size = MAX_UPL_TRANSFER * PAGE_SIZE;
+       if(((size/page_size) > MAX_UPL_TRANSFER) && !object->phys_contiguous) {
+               size = MAX_UPL_TRANSFER * page_size;
        }
 
        if(cntrl_flags & UPL_SET_INTERNAL)
@@ -2212,99 +2189,52 @@ vm_object_upl_request(
        if((cntrl_flags & UPL_COPYOUT_FROM) && (upl_ptr == NULL)) {
                return KERN_SUCCESS;
        }
-
        if(upl_ptr) {
                if(cntrl_flags & UPL_SET_INTERNAL) {
-                       if(cntrl_flags & UPL_SET_LITE) {
-                               vm_offset_t page_field_size;
-                               upl = upl_create(
-                                       UPL_CREATE_INTERNAL | UPL_CREATE_LITE,
-                                       size);
-                               user_page_list = (upl_page_info_t *)
-                                  (((vm_offset_t)upl) + sizeof(struct upl));
-                               lite_list = (wpl_array_t)
-                                       (((vm_offset_t)user_page_list) + 
-                                       ((size/PAGE_SIZE) * 
-                                               sizeof(upl_page_info_t)));
-                               page_field_size = ((size/PAGE_SIZE) + 7) >> 3;
-                               page_field_size = 
-                                       (page_field_size + 3) & 0xFFFFFFFC;
-                               bzero((char *)lite_list, page_field_size);
-                               upl->flags = 
-                                       UPL_LITE | UPL_INTERNAL;
-                       } else {
-                               upl = upl_create(UPL_CREATE_INTERNAL, size);
-                               user_page_list = (upl_page_info_t *)
-                                       (((vm_offset_t)upl) 
-                                               + sizeof(struct upl));
-                               upl->flags = UPL_INTERNAL;
-                       }
+                       upl = upl_create(TRUE, size);
+                       user_page_list = (upl_page_info_t *)
+                               (((vm_offset_t)upl) + sizeof(struct upl));
+                       upl->flags |= UPL_INTERNAL;
                } else {
-                       if(cntrl_flags & UPL_SET_LITE) {
-                               vm_offset_t page_field_size;
-                               upl = upl_create(UPL_CREATE_LITE, size);
-                               lite_list = (wpl_array_t)
-                                  (((vm_offset_t)upl) + sizeof(struct upl));
-                               page_field_size = ((size/PAGE_SIZE) + 7) >> 3;
-                               page_field_size = 
-                                       (page_field_size + 3) & 0xFFFFFFFC;
-                               bzero((char *)lite_list, page_field_size);
-                               upl->flags = UPL_LITE;
-                       } else {
-                               upl = upl_create(UPL_CREATE_EXTERNAL, size);
-                               upl->flags = 0;
-                       }
+                       upl = upl_create(FALSE, size);
                }
-
                if(object->phys_contiguous) {
                        upl->size = size;
                        upl->offset = offset + object->paging_offset;
                        *upl_ptr = upl;
                        if(user_page_list) {
                                user_page_list[0].phys_addr = 
-                                  (offset + object->shadow_offset)>>12;
+                                       offset + object->shadow_offset;
                                user_page_list[0].device = TRUE;
                        }
-                       upl->map_object = object;
-                       /* don't need any shadow mappings for this one */
-                       /* since it is already I/O memory */
-                       upl->flags |= UPL_DEVICE_MEMORY;
-
-                       vm_object_lock(object);
-                       vm_object_paging_begin(object);
-                       vm_object_unlock(object);
-
-                       if(page_list_count != NULL) {
-                               if (upl->flags & UPL_INTERNAL) {
-                                       *page_list_count = 0;
-                               } else {
-                                       *page_list_count = 1;
-                               }
-                       }
-                       return KERN_SUCCESS;
-               }
-
-               if(cntrl_flags & UPL_SET_LITE) {
-                       upl->map_object = object;
-               } else {
                        upl->map_object = vm_object_allocate(size);
                        vm_object_lock(upl->map_object);
                        upl->map_object->shadow = object;
+                       upl->flags = UPL_DEVICE_MEMORY | UPL_INTERNAL;
                        upl->map_object->pageout = TRUE;
                        upl->map_object->can_persist = FALSE;
-                       upl->map_object->copy_strategy = 
-                                       MEMORY_OBJECT_COPY_NONE;
+                       upl->map_object->copy_strategy
+                                       MEMORY_OBJECT_COPY_NONE;
                        upl->map_object->shadow_offset = offset;
-                       upl->map_object->wimg_bits = object->wimg_bits;
                        vm_object_unlock(upl->map_object);
+                       return KERN_SUCCESS;
                }
+               
+                       
+               upl->map_object = vm_object_allocate(size);
+               vm_object_lock(upl->map_object);
+               upl->map_object->shadow = object;
                upl->size = size;
                upl->offset = offset + object->paging_offset;
+               upl->map_object->pageout = TRUE;
+               upl->map_object->can_persist = FALSE;
+               upl->map_object->copy_strategy = MEMORY_OBJECT_COPY_NONE;
+               upl->map_object->shadow_offset = offset;
+               upl->map_object->wimg_bits = object->wimg_bits;
+               vm_object_unlock(upl->map_object);
                *upl_ptr = upl;
        }
-       if (!(cntrl_flags & UPL_SET_LITE)) {
-               VM_PAGE_GRAB_FICTITIOUS(alias_page);
-       }
+       VM_PAGE_GRAB_FICTITIOUS(alias_page);
        vm_object_lock(object);
 #ifdef UBC_DEBUG
        if(upl_ptr)
@@ -2315,8 +2245,7 @@ vm_object_upl_request(
        if(cntrl_flags & UPL_COPYOUT_FROM) {
                upl->flags |= UPL_PAGE_SYNC_DONE;
                while (xfer_size) {
-                       if((alias_page == NULL) && 
-                               !(cntrl_flags & UPL_SET_LITE)) {
+                       if(alias_page == NULL) {
                                vm_object_unlock(object);
                                VM_PAGE_GRAB_FICTITIOUS(alias_page);
                                vm_object_lock(object);
@@ -2329,29 +2258,26 @@ vm_object_upl_request(
                                (dst_page->wire_count != 0 && 
                                                        !dst_page->pageout) ||
                                ((!(dst_page->dirty || dst_page->precious ||
-                                     pmap_is_modified(dst_page->phys_page)))
+                                     pmap_is_modified(dst_page->phys_addr)))
                                      && (cntrl_flags & UPL_RET_ONLY_DIRTY)) ||
                                ((!(dst_page->inactive))
                                        && (dst_page->page_ticket != page_ticket)
                                        && ((dst_page->page_ticket+1) != page_ticket)
-                                       && (cntrl_flags & UPL_FOR_PAGEOUT)) ||
+                                       && (cntrl_flags & UPL_PAGEOUT)) ||
                                ((!dst_page->list_req_pending) && 
                                        (cntrl_flags & UPL_RET_ONLY_DIRTY) &&
-                                       pmap_is_referenced(dst_page->phys_page))) {
-                               if(user_page_list) {
+                                       pmap_is_referenced(dst_page->phys_addr))) {
+                               if(user_page_list)
                                        user_page_list[entry].phys_addr = 0;
-                                       user_page_list[entry].device = FALSE;
-                               }
                        } else {
                                
                                if(dst_page->busy && 
                                        (!(dst_page->list_req_pending && 
                                                dst_page->pageout))) {
                                        if(cntrl_flags & UPL_NOBLOCK) {
-                                               if(user_page_list) {
-                                                       user_page_list[entry].phys_addr = 0;
-                                                       user_page_list[entry].device = FALSE;
-                                               }
+                                               if(user_page_list)
+                                                       user_page_list[entry]
+                                                               .phys_addr = 0;
                                                entry++;
                                                dst_offset += PAGE_SIZE_64;
                                                xfer_size -= PAGE_SIZE;
@@ -2366,10 +2292,8 @@ vm_object_upl_request(
                                if((dst_page->cleaning || dst_page->absent ||
                                        dst_page->wire_count != 0) && 
                                        !dst_page->list_req_pending) {
-                                  if(user_page_list) {
+                                  if(user_page_list)
                                           user_page_list[entry].phys_addr = 0;
-                                          user_page_list[entry].device = FALSE;
-                                  }
                                   entry++;
                                   dst_offset += PAGE_SIZE_64;
                                   xfer_size -= PAGE_SIZE;
@@ -2380,7 +2304,7 @@ vm_object_upl_request(
                                
                                vm_page_lock_queues();
                                if( !(cntrl_flags & UPL_FILE_IO)) {
-                                       pmap_page_protect(dst_page->phys_page, VM_PROT_NONE);
+                                       pmap_page_protect(dst_page->phys_addr, VM_PROT_NONE);
                                }
                                /* pageout statistics gathering.  count  */
                                /* all the pages we will page out that   */
@@ -2409,43 +2333,13 @@ vm_object_upl_request(
                                dst_page->busy = FALSE;
                                dst_page->cleaning = FALSE;
 
-                               dirty = pmap_is_modified(dst_page->phys_page);
+                               dirty = pmap_is_modified(dst_page->phys_addr);
                                dirty = dirty ? TRUE : dst_page->dirty;
 
-                               if(cntrl_flags & UPL_SET_LITE) {
-                                       int     pg_num;
-                                       pg_num = (dst_offset-offset)/PAGE_SIZE;
-                                       lite_list[pg_num>>5] |= 
-                                                       1 << (pg_num & 31);
-                                       pmap_clear_modify(dst_page->phys_page);
-                                       /*
-                                        * Record that this page has been 
-                                        * written out
-                                        */
-#if     MACH_PAGEMAP
-                                       vm_external_state_set(
-                                               object->existence_map, 
-                                               dst_page->offset);
-#endif  /*MACH_PAGEMAP*/
-
-                                       /*
-                                        * Mark original page as cleaning 
-                                        * in place.
-                                        */
-                                       dst_page->cleaning = TRUE;
-                                       dst_page->dirty = TRUE;
-                                       dst_page->precious = FALSE;
-                               } else {
-                                       /* use pageclean setup, it is more */
-                                       /* convenient even for the pageout */
-                                       /* cases here */
-                                       vm_pageclean_setup(dst_page, 
-                                               alias_page, upl->map_object, 
-                                               size - xfer_size);
-
-                                       alias_page->absent = FALSE;
-                                       alias_page = NULL;
-                               }
+                               /* use pageclean setup, it is more convenient */
+                               /* even for the pageout cases here */
+                               vm_pageclean_setup(dst_page, alias_page,
+                                       upl->map_object, size - xfer_size);
                                                
                                if(!dirty) {
                                        dst_page->dirty = FALSE;
@@ -2455,8 +2349,10 @@ vm_object_upl_request(
                                if(dst_page->pageout)
                                        dst_page->busy = TRUE;
 
+                               alias_page->absent = FALSE;
+                               alias_page = NULL;
                                if((!(cntrl_flags & UPL_CLEAN_IN_PLACE)) 
-                                       || (cntrl_flags & UPL_FOR_PAGEOUT)) {
+                                       || (cntrl_flags & UPL_PAGEOUT)) {
                                        /* deny access to the target page */
                                        /* while it is being worked on    */
                                        if((!dst_page->pageout) &&
@@ -2468,7 +2364,7 @@ vm_object_upl_request(
                                }
                                if(user_page_list) {
                                        user_page_list[entry].phys_addr
-                                               = dst_page->phys_page;
+                                               = dst_page->phys_addr;
                                        user_page_list[entry].dirty =   
                                                        dst_page->dirty;
                                        user_page_list[entry].pageout =
@@ -2477,8 +2373,6 @@ vm_object_upl_request(
                                                        dst_page->absent;
                                        user_page_list[entry].precious =
                                                        dst_page->precious;
-                                       user_page_list[entry].device = 
-                                                       FALSE;
                                }
 
                                vm_page_unlock_queues();
@@ -2489,8 +2383,7 @@ vm_object_upl_request(
                }
        } else {
                while (xfer_size) {
-                       if((alias_page == NULL) && 
-                               !(cntrl_flags & UPL_SET_LITE)) {
+                       if(alias_page == NULL) {
                                vm_object_unlock(object);
                                VM_PAGE_GRAB_FICTITIOUS(alias_page);
                                vm_object_lock(object);
@@ -2504,10 +2397,8 @@ vm_object_upl_request(
                                        /* requests.  we want to grab  */
                                        /* pages around some which are */
                                        /* already present.  */
-                                       if(user_page_list) {
+                                       if(user_page_list)
                                                user_page_list[entry].phys_addr = 0;
-                                               user_page_list[entry].device = FALSE;
-                                       }
                                        entry++;
                                        dst_offset += PAGE_SIZE_64;
                                        xfer_size -= PAGE_SIZE;
@@ -2548,10 +2439,9 @@ vm_object_upl_request(
                                         * physical page by asking the
                                         * backing device.
                                         */
-                                       if(user_page_list) {
-                                               user_page_list[entry].phys_addr = 0;
-                                               user_page_list[entry].device = FALSE;
-                                       }
+                                       if(user_page_list)
+                                               user_page_list[entry]
+                                                       .phys_addr = 0;
                                        entry++;
                                        dst_offset += PAGE_SIZE_64;
                                        xfer_size -= PAGE_SIZE;
@@ -2602,45 +2492,13 @@ vm_object_upl_request(
                                
                                vm_page_lock_queues();
                                if( !(cntrl_flags & UPL_FILE_IO)) {
-                                       pmap_page_protect(dst_page->phys_page, VM_PROT_NONE);
+                                       pmap_page_protect(dst_page->phys_addr, VM_PROT_NONE);
                                }
-                               dirty = pmap_is_modified(dst_page->phys_page);
+                               dirty = pmap_is_modified(dst_page->phys_addr);
                                dirty = dirty ? TRUE : dst_page->dirty;
 
-                               if(cntrl_flags & UPL_SET_LITE) {
-                                       int     pg_num;
-                                       pg_num = (dst_offset-offset)/PAGE_SIZE;
-                                       lite_list[pg_num>>5] |= 
-                                                       1 << (pg_num & 31);
-                                       pmap_clear_modify(dst_page->phys_page);
-                                       /*
-                                        * Record that this page has been 
-                                        * written out
-                                        */
-#if     MACH_PAGEMAP
-                                       vm_external_state_set(
-                                               object->existence_map, 
-                                               dst_page->offset);
-#endif  /*MACH_PAGEMAP*/
-
-                                       /*
-                                        * Mark original page as cleaning 
-                                        * in place.
-                                        */
-                                       dst_page->cleaning = TRUE;
-                                       dst_page->dirty = TRUE;
-                                       dst_page->precious = FALSE;
-                               } else {
-                                       /* use pageclean setup, it is more */
-                                       /* convenient even for the pageout */
-                                       /* cases here */
-                                       vm_pageclean_setup(dst_page, 
-                                               alias_page, upl->map_object, 
-                                               size - xfer_size);
-
-                                       alias_page->absent = FALSE;
-                                       alias_page = NULL;
-                               }
+                               vm_pageclean_setup(dst_page, alias_page,
+                                       upl->map_object, size - xfer_size);
 
                                if(cntrl_flags & UPL_CLEAN_IN_PLACE) {
                                        /* clean in place for read implies   */
@@ -2670,9 +2528,11 @@ vm_object_upl_request(
                                dst_page->precious = 
                                        (cntrl_flags & UPL_PRECIOUS) 
                                                        ? TRUE : FALSE;
+                               alias_page->absent = FALSE;
+                               alias_page = NULL;
                                if(user_page_list) {
                                        user_page_list[entry].phys_addr
-                                               = dst_page->phys_page;
+                                               = dst_page->phys_addr;
                                        user_page_list[entry].dirty =
                                                        dst_page->dirty;
                                        user_page_list[entry].pageout =
@@ -2681,12 +2541,9 @@ vm_object_upl_request(
                                                        dst_page->absent;
                                        user_page_list[entry].precious =
                                                        dst_page->precious;
-                                       user_page_list[entry].device = 
-                                                       FALSE;
                                }
                                vm_page_unlock_queues();
                        }
-
                        entry++;
                        dst_offset += PAGE_SIZE_64;
                        xfer_size -= PAGE_SIZE;
@@ -2831,7 +2688,7 @@ vm_object_super_upl_request(
                return KERN_FAILURE;
 
        offset = offset - object->paging_offset;
-       if(cntrl_flags & UPL_FOR_PAGEOUT) {
+       if(cntrl_flags & UPL_PAGEOUT) {
                if((target_page = vm_page_lookup(object, offset))
                                                        != VM_PAGE_NULL) {
                        ticket = target_page->page_ticket;
@@ -2899,78 +2756,6 @@ vm_upl_map(
                return KERN_FAILURE;
        }
 
-       if((!(upl->map_object->pageout)) &&     
-               !((upl->flags & (UPL_DEVICE_MEMORY | UPL_IO_WIRE)) ||
-                                       (upl->map_object->phys_contiguous))) {
-               vm_object_t             object;
-               vm_page_t               alias_page;
-               vm_object_offset_t      new_offset;
-               int                     pg_num;
-               wpl_array_t             lite_list;
-
-               if(upl->flags & UPL_INTERNAL) {
-                       lite_list = (wpl_array_t) 
-                               ((((vm_offset_t)upl) + sizeof(struct upl))
-                               + ((upl->size/PAGE_SIZE) 
-                                               * sizeof(upl_page_info_t)));
-               } else {
-                       lite_list = (wpl_array_t)
-                               (((vm_offset_t)upl) + sizeof(struct upl));
-               }
-               object = upl->map_object;
-               upl->map_object = vm_object_allocate(upl->size);
-               vm_object_lock(upl->map_object);
-               upl->map_object->shadow = object;
-               upl->map_object->pageout = TRUE;
-               upl->map_object->can_persist = FALSE;
-               upl->map_object->copy_strategy = 
-                               MEMORY_OBJECT_COPY_NONE;
-               upl->map_object->shadow_offset = 
-                               upl->offset - object->paging_offset;
-               upl->map_object->wimg_bits = object->wimg_bits;
-               vm_object_unlock(upl->map_object);
-               offset = upl->map_object->shadow_offset;
-               new_offset = 0;
-               size = upl->size;
-               vm_object_lock(object);
-               while(size) {
-                  pg_num = (new_offset)/PAGE_SIZE;
-                  if(lite_list[pg_num>>5] & (1 << (pg_num & 31))) {
-                       vm_object_unlock(object);
-                       VM_PAGE_GRAB_FICTITIOUS(alias_page);
-                       vm_object_lock(object);
-                       m = vm_page_lookup(object, offset);
-                       if (m == VM_PAGE_NULL) {
-                               panic("vm_upl_map: page missing\n");
-                       }
-
-                       vm_object_paging_begin(object);
-
-                       /*
-                       * Convert the fictitious page to a private 
-                        * shadow of the real page.
-                        */
-                       assert(alias_page->fictitious);
-                       alias_page->fictitious = FALSE;
-                       alias_page->private = TRUE;
-                       alias_page->pageout = TRUE;
-                       alias_page->phys_page = m->phys_page;
-                       vm_page_wire(alias_page);
-
-                       vm_page_insert(alias_page, 
-                                       upl->map_object, new_offset);
-                       assert(!alias_page->wanted);
-                       alias_page->busy = FALSE;
-                       alias_page->absent = FALSE;
-                  }
-
-                  size -= PAGE_SIZE;
-                  offset += PAGE_SIZE_64;
-                  new_offset += PAGE_SIZE_64;
-               }
-               vm_object_unlock(object);
-       }
-
        offset = 0;  /* Always map the entire object */
        size = upl->size;
        
@@ -3051,12 +2836,11 @@ upl_commit_range(
        boolean_t               *empty) 
 {
        vm_size_t               xfer_size = size;
-       vm_object_t             shadow_object;
+       vm_object_t             shadow_object = upl->map_object->shadow;
        vm_object_t             object = upl->map_object;
        vm_object_offset_t      target_offset;
+       vm_object_offset_t      page_offset;
        int                     entry;
-       wpl_array_t             lite_list;
-       int                     occupied;
 
        *empty = FALSE;
 
@@ -3066,15 +2850,7 @@ upl_commit_range(
        if (count == 0)
                page_list = NULL;
 
-       if(object->pageout) {
-               shadow_object = object->shadow;
-       } else {
-               shadow_object = object;
-       }
-
        upl_lock(upl);
-
-
        if(upl->flags & UPL_DEVICE_MEMORY) {
                xfer_size = 0;
        } else if ((offset + size) > upl->size) {
@@ -3082,15 +2858,6 @@ upl_commit_range(
                return KERN_FAILURE;
        }
 
-       if(upl->flags & UPL_INTERNAL) {
-               lite_list = (wpl_array_t) 
-                       ((((vm_offset_t)upl) + sizeof(struct upl))
-                       + ((upl->size/PAGE_SIZE) * sizeof(upl_page_info_t)));
-       } else {
-               lite_list = (wpl_array_t)
-                       (((vm_offset_t)upl) + sizeof(struct upl));
-       }
-
        vm_object_lock(shadow_object);
 
        entry = offset/PAGE_SIZE;
@@ -3099,211 +2866,148 @@ upl_commit_range(
                vm_page_t       t,m;
                upl_page_info_t *p;
 
-               m = VM_PAGE_NULL;
-               if(upl->flags & UPL_LITE) {
-                       int     pg_num;
-                       pg_num = target_offset/PAGE_SIZE;
-                       if(lite_list[pg_num>>5] & (1 << (pg_num & 31))) {
-                               lite_list[pg_num>>5] &= ~(1 << (pg_num & 31));
-                               m = vm_page_lookup(shadow_object,
-                                       target_offset + (upl->offset - 
-                                               shadow_object->paging_offset));
-                       }
-               }
-               if(object->pageout) {
-                       if ((t = vm_page_lookup(object, target_offset))
-                                                               != NULL) {
-                               t->pageout = FALSE;
-                               VM_PAGE_FREE(t);
-                               if(m == NULL) {
-                                       m = vm_page_lookup(
-                                           shadow_object, 
-                                           target_offset + 
-                                               object->shadow_offset);
-                               }
-                               if(m != VM_PAGE_NULL)
-                                       vm_object_paging_end(m->object);
-                       }
-               }
+               if((t = vm_page_lookup(object, target_offset)) != NULL) {
 
-               if(m != VM_PAGE_NULL) {
-                  if(upl->flags & UPL_IO_WIRE) {
-                       vm_page_lock_queues();
-                       vm_page_unwire(m);
-                       vm_page_unlock_queues();
-                       if(page_list) {
-                               page_list[entry].phys_addr = 0;
-                       }
-                       if (flags & UPL_COMMIT_SET_DIRTY) {
-                                m->dirty = TRUE;
-                       } else if ((upl->flags & UPL_CLEAR_DIRTY) ||
-                               (flags & UPL_COMMIT_CLEAR_DIRTY)) {
-                               pmap_clear_modify(m->phys_page);
+                       t->pageout = FALSE;
+                       page_offset = t->offset;
+                       VM_PAGE_FREE(t);
+                       t = VM_PAGE_NULL;
+                       m = vm_page_lookup(shadow_object, 
+                                       page_offset + object->shadow_offset);
+                       if(m != VM_PAGE_NULL) {
+                          vm_object_paging_end(shadow_object);
+                          vm_page_lock_queues();
+                          if ((upl->flags & UPL_CLEAR_DIRTY) ||
+                                       (flags & UPL_COMMIT_CLEAR_DIRTY)) {
+                               pmap_clear_modify(m->phys_addr);
                                m->dirty = FALSE;
-                       }
-                       if (flags & UPL_COMMIT_INACTIVATE) {
-                               vm_page_deactivate(m);
-                               m->reference = FALSE;
-                               pmap_clear_reference(m->phys_page);
-                       }
-                       target_offset += PAGE_SIZE_64;
-                       xfer_size -= PAGE_SIZE;
-                       entry++;
-                       continue;
-                  }
-                  vm_page_lock_queues();
-                  if ((upl->flags & UPL_CLEAR_DIRTY) ||
-                               (flags & UPL_COMMIT_CLEAR_DIRTY)) {
-                       pmap_clear_modify(m->phys_page);
-                       m->dirty = FALSE;
-                  }
-                  if(page_list) {
-                       p = &(page_list[entry]);
-                       if(p->phys_addr && p->pageout && !m->pageout) {
-                               m->busy = TRUE;
-                               m->pageout = TRUE;
-                               vm_page_wire(m);
-                       } else if (page_list[entry].phys_addr &&
-                                       !p->pageout && m->pageout &&
-                                       !m->dump_cleaning) {
-                               m->pageout = FALSE;
-                               m->absent = FALSE;
-                               m->overwriting = FALSE;
-                               vm_page_unwire(m);
-                               PAGE_WAKEUP_DONE(m);
-                       }
-                       page_list[entry].phys_addr = 0;
-                  }
-                  m->dump_cleaning = FALSE;
-                  if(m->laundry) {
-                     vm_page_laundry_count--;
-                     m->laundry = FALSE;
-                     if (vm_page_laundry_count < vm_page_laundry_min) {
-                        vm_page_laundry_min = 0;
-                        thread_wakeup((event_t) 
-                                    &vm_page_laundry_count);
-                     }
-                  }
-                  if(m->pageout) {
-                     m->cleaning = FALSE;
-                     m->pageout = FALSE;
+                          }
+                          if(page_list) {
+                               p = &(page_list[entry]);
+                               if(p->phys_addr && p->pageout && !m->pageout) {
+                                       m->busy = TRUE;
+                                       m->pageout = TRUE;
+                                       vm_page_wire(m);
+                               } else if (page_list[entry].phys_addr &&
+                                               !p->pageout && m->pageout &&
+                                               !m->dump_cleaning) {
+                                       m->pageout = FALSE;
+                                       m->absent = FALSE;
+                                       m->overwriting = FALSE;
+                                       vm_page_unwire(m);
+                                       PAGE_WAKEUP_DONE(m);
+                               }
+                               page_list[entry].phys_addr = 0;
+                          }
+                          m->dump_cleaning = FALSE;
+                          if(m->laundry) {
+                             vm_page_laundry_count--;
+                             m->laundry = FALSE;
+                             if (vm_page_laundry_count < vm_page_laundry_min) {
+                                vm_page_laundry_min = 0;
+                                thread_wakeup((event_t) 
+                                            &vm_page_laundry_count);
+                             }
+                          }
+                          if(m->pageout) {
+                             m->cleaning = FALSE;
+                             m->pageout = FALSE;
 #if MACH_CLUSTER_STATS
-                     if (m->wanted) vm_pageout_target_collisions++;
+                             if (m->wanted) vm_pageout_target_collisions++;
 #endif
-                     pmap_page_protect(m->phys_page, VM_PROT_NONE);
-                     m->dirty = pmap_is_modified(m->phys_page);
-                     if(m->dirty) {
-                        CLUSTER_STAT(
-                             vm_pageout_target_page_dirtied++;)
-                              vm_page_unwire(m);/* reactivates */
-                              VM_STAT(reactivations++);
-                              PAGE_WAKEUP_DONE(m);
-                     } else {
-                            CLUSTER_STAT(
-                                      vm_pageout_target_page_freed++;)
-                            vm_page_free(m);/* clears busy, etc. */
-                           VM_STAT(pageouts++);
-                             }
-                             vm_page_unlock_queues();
-                     target_offset += PAGE_SIZE_64;
-                     xfer_size -= PAGE_SIZE;
-                     entry++;
-                      continue;
-                  }
-                  if (flags & UPL_COMMIT_INACTIVATE) {
-                       vm_page_deactivate(m);
-                       m->reference = FALSE;
-                       pmap_clear_reference(m->phys_page);
-                  } else if (!m->active && !m->inactive) {
-                       if (m->reference)
-                               vm_page_activate(m);
-                       else
-                               vm_page_deactivate(m);
-                  }
+                             pmap_page_protect(m->phys_addr, VM_PROT_NONE);
+                             m->dirty = pmap_is_modified(m->phys_addr);
+                             if(m->dirty) {
+                                CLUSTER_STAT(
+                                     vm_pageout_target_page_dirtied++;)
+                                 vm_page_unwire(m);/* reactivates */
+                                 VM_STAT(reactivations++);
+                                 PAGE_WAKEUP_DONE(m);
+                                     } else {
+                                    CLUSTER_STAT(
+                                              vm_pageout_target_page_freed++;)
+                                    vm_page_free(m);/* clears busy, etc. */
+                                   VM_STAT(pageouts++);
+                                }
+                                vm_page_unlock_queues();
+                                target_offset += PAGE_SIZE_64;
+                                xfer_size -= PAGE_SIZE;
+                                entry++;
+                                 continue;
+                          }
+                             if (flags & UPL_COMMIT_INACTIVATE) {
+                                      vm_page_deactivate(m);
+                                     m->reference = FALSE;
+                                     pmap_clear_reference(m->phys_addr);
+                             } else if (!m->active && !m->inactive) {
+                                   if (m->reference)
+                                      vm_page_activate(m);
+                                   else
+                                      vm_page_deactivate(m);
+                              }
 #if MACH_CLUSTER_STATS
-                   m->dirty = pmap_is_modified(m->phys_page);
+                              m->dirty = pmap_is_modified(m->phys_addr);
 
-                   if (m->dirty)   vm_pageout_cluster_dirtied++;
-                   else            vm_pageout_cluster_cleaned++;
-                   if (m->wanted)  vm_pageout_cluster_collisions++;
+                              if (m->dirty)   vm_pageout_cluster_dirtied++;
+                              else            vm_pageout_cluster_cleaned++;
+                              if (m->wanted)  vm_pageout_cluster_collisions++;
 #else
-                   m->dirty = 0;
+                              m->dirty = 0;
 #endif
 
-                   if((m->busy) && (m->cleaning)) {
-                       /* the request_page_list case */
-                       if(m->absent) {
-                               m->absent = FALSE;
-                               if(shadow_object->absent_count == 1)
+                              if((m->busy) && (m->cleaning)) {
+                                 /* the request_page_list case */
+                               if(m->absent) {
+                                  m->absent = FALSE;
+                                  if(shadow_object->absent_count == 1)
                                      vm_object_absent_release(shadow_object);
-                               else
+                                  else
                                      shadow_object->absent_count--;
-                       }
-                       m->overwriting = FALSE;
-                        m->busy = FALSE;
-                        m->dirty = FALSE;
-                   } else if (m->overwriting) {
-                        /* alternate request page list, write to 
-                        /* page_list case.  Occurs when the original
-                        /* page was wired at the time of the list
-                        /* request */
-                        assert(m->wire_count != 0);
-                        vm_page_unwire(m);/* reactivates */
-                        m->overwriting = FALSE;
-                  }
-                   m->cleaning = FALSE;
-                  /* It is a part of the semantic of COPYOUT_FROM */
-                  /* UPLs that a commit implies cache sync           */
-                  /* between the vm page and the backing store    */
-                  /* this can be used to strip the precious bit   */
-                  /* as well as clean */
-                  if (upl->flags & UPL_PAGE_SYNC_DONE)
-                        m->precious = FALSE;
-
-                  if (flags & UPL_COMMIT_SET_DIRTY) {
-                        m->dirty = TRUE;
-                  }
-                   /*
-                    * Wakeup any thread waiting for the page to be un-cleaning.
-                    */
-                   PAGE_WAKEUP(m);
-                   vm_page_unlock_queues();
+                               }
+                                m->overwriting = FALSE;
+                                 m->busy = FALSE;
+                                 m->dirty = FALSE;
+                              }
+                             else if (m->overwriting) {
+                                /* alternate request page list, write to 
+                                /* page_list case.  Occurs when the original
+                                /* page was wired at the time of the list
+                                /* request */
+                                assert(m->wire_count != 0);
+                                vm_page_unwire(m);/* reactivates */
+                                m->overwriting = FALSE;
+                             }
+                              m->cleaning = FALSE;
+                             /* It is a part of the semantic of COPYOUT_FROM */
+                             /* UPLs that a commit implies cache sync        */
+                             /* between the vm page and the backing store    */
+                             /* this can be used to strip the precious bit   */
+                             /* as well as clean */
+                             if (upl->flags & UPL_PAGE_SYNC_DONE)
+                                m->precious = FALSE;
+
+                             if (flags & UPL_COMMIT_SET_DIRTY) {
+                                m->dirty = TRUE;
+                             }
+                              /*
+                               * Wakeup any thread waiting for the page to be un-cleaning.
+                               */
+                              PAGE_WAKEUP(m);
+                              vm_page_unlock_queues();
 
+                       }
                }
                target_offset += PAGE_SIZE_64;
                xfer_size -= PAGE_SIZE;
                entry++;
        }
 
-       occupied = 1;
-       if (upl->flags & UPL_DEVICE_MEMORY)  {
-               occupied = 0;
-       } else if (upl->flags & UPL_LITE) {
-               int     pg_num;
-               int     i;
-               pg_num = upl->size/PAGE_SIZE;
-               pg_num = (pg_num + 31) >> 5;
-               occupied = 0;
-               for(i= 0; i<pg_num; i++) {
-                       if(lite_list[i] != 0) {
-                               occupied = 1;
-                               break;
-                       }
-               }
-       } else {
-               if(queue_empty(&upl->map_object->memq)) {
-                       occupied = 0;
-               }
-       }
-
-       if(occupied == 0) {
-               if(upl->flags & UPL_COMMIT_NOTIFY_EMPTY) {
+       vm_object_unlock(shadow_object);
+       if(flags & UPL_COMMIT_NOTIFY_EMPTY) {
+               if((upl->flags & UPL_DEVICE_MEMORY) 
+                               || (queue_empty(&upl->map_object->memq)))
                        *empty = TRUE;
-               }
-               if(object == shadow_object)
-                       vm_object_paging_end(shadow_object);
        }
-       vm_object_unlock(shadow_object);
        upl_unlock(upl);
 
        return KERN_SUCCESS;
@@ -3318,31 +3022,17 @@ upl_abort_range(
        boolean_t               *empty) 
 {
        vm_size_t               xfer_size = size;
-       vm_object_t             shadow_object;
+       vm_object_t             shadow_object = upl->map_object->shadow;
        vm_object_t             object = upl->map_object;
        vm_object_offset_t      target_offset;
        vm_object_offset_t      page_offset;
        int                     entry;
-       wpl_array_t             lite_list;
-       int                     occupied;
 
        *empty = FALSE;
 
        if (upl == UPL_NULL)
                return KERN_INVALID_ARGUMENT;
 
-       if (upl->flags & UPL_IO_WIRE) {
-               return upl_commit_range(upl, 
-                       offset, size, 0, 
-                       NULL, 0, empty);
-       }
-
-       if(object->pageout) {
-               shadow_object = object->shadow;
-       } else {
-               shadow_object = object;
-       }
-
        upl_lock(upl);
        if(upl->flags & UPL_DEVICE_MEMORY) {
                xfer_size = 0;
@@ -3353,48 +3043,22 @@ upl_abort_range(
 
        vm_object_lock(shadow_object);
 
-       if(upl->flags & UPL_INTERNAL) {
-               lite_list = (wpl_array_t) 
-                       ((((vm_offset_t)upl) + sizeof(struct upl))
-                       + ((upl->size/PAGE_SIZE) * sizeof(upl_page_info_t)));
-       } else {
-               lite_list = (wpl_array_t) 
-                       (((vm_offset_t)upl) + sizeof(struct upl));
-       }
-
        entry = offset/PAGE_SIZE;
        target_offset = (vm_object_offset_t)offset;
        while(xfer_size) {
                vm_page_t       t,m;
                upl_page_info_t *p;
 
-               m = VM_PAGE_NULL;
-               if(upl->flags & UPL_LITE) {
-                       int     pg_num;
-                       pg_num = target_offset/PAGE_SIZE;
-                       if(lite_list[pg_num>>5] & (1 << (pg_num & 31))) {
-                               lite_list[pg_num>>5] &= ~(1 << (pg_num & 31));
-                               m = vm_page_lookup(shadow_object,
-                                       target_offset + (upl->offset - 
-                                               shadow_object->paging_offset));
-                       }
-               }
-               if(object->pageout) {
-                       if ((t = vm_page_lookup(object, target_offset))
-                                                               != NULL) {
-                               t->pageout = FALSE;
-                               VM_PAGE_FREE(t);
-                               if(m == NULL) {
-                                       m = vm_page_lookup(
-                                           shadow_object, 
-                                           target_offset + 
-                                               object->shadow_offset);
-                               }
-                               if(m != VM_PAGE_NULL)
-                                       vm_object_paging_end(m->object);
-                       }
-               }
-               if(m != VM_PAGE_NULL) {
+               if((t = vm_page_lookup(object, target_offset)) != NULL) {
+
+                       t->pageout = FALSE;
+                       page_offset = t->offset;
+                       VM_PAGE_FREE(t);
+                       t = VM_PAGE_NULL;
+                       m = vm_page_lookup(shadow_object, 
+                                       page_offset + object->shadow_offset);
+                  if(m != VM_PAGE_NULL) {
+                       vm_object_paging_end(m->object);
                        vm_page_lock_queues();
                        if(m->absent) {
                                /* COPYOUT = FALSE case */
@@ -3439,13 +3103,13 @@ upl_abort_range(
                                continue;
                        }
                        /*                          
-                       * Handle the trusted pager throttle.
-                       */                     
-                       if (m->laundry) {
+                        * Handle the trusted pager throttle.
+                        */                     
+                       if (m->laundry) { 
                                vm_page_laundry_count--;
                                m->laundry = FALSE;  
                                if (vm_page_laundry_count 
-                                       < vm_page_laundry_min) {
+                                               < vm_page_laundry_min) {
                                        vm_page_laundry_min = 0;
                                        thread_wakeup((event_t) 
                                                &vm_page_laundry_count); 
@@ -3467,45 +3131,23 @@ upl_abort_range(
 #endif /* MACH_PAGEMAP */
                        if(error & UPL_ABORT_DUMP_PAGES) {
                                vm_page_free(m);
-                               pmap_page_protect(m->phys_page, VM_PROT_NONE);
+                               pmap_page_protect(m->phys_addr, VM_PROT_NONE);
                        } else {
                                PAGE_WAKEUP(m);
                        }
                        vm_page_unlock_queues();
                }
-               target_offset += PAGE_SIZE_64;
-               xfer_size -= PAGE_SIZE;
-               entry++;
-       }
-       occupied = 1;
-       if (upl->flags & UPL_DEVICE_MEMORY)  {
-               occupied = 0;
-       } else if (upl->flags & UPL_LITE) {
-               int     pg_num;
-               int     i;
-               pg_num = upl->size/PAGE_SIZE;
-               pg_num = (pg_num + 31) >> 5;
-               occupied = 0;
-               for(i= 0; i<pg_num; i++) {
-                       if(lite_list[i] != 0) {
-                               occupied = 1;
-                               break;
-                       }
-               }
-       } else {
-               if(queue_empty(&upl->map_object->memq)) {
-                       occupied = 0;
-               }
+          }
+          target_offset += PAGE_SIZE_64;
+          xfer_size -= PAGE_SIZE;
+          entry++;
        }
-
-       if(occupied == 0) {
-               if(upl->flags & UPL_COMMIT_NOTIFY_EMPTY) {
+       vm_object_unlock(shadow_object);
+       if(error & UPL_ABORT_NOTIFY_EMPTY) {
+               if((upl->flags & UPL_DEVICE_MEMORY) 
+                               || (queue_empty(&upl->map_object->memq)))
                        *empty = TRUE;
-               }
-               if(object == shadow_object)
-                       vm_object_paging_end(shadow_object);
        }
-       vm_object_unlock(shadow_object);
        upl_unlock(upl);
        return KERN_SUCCESS;
 }
@@ -3521,20 +3163,11 @@ upl_abort(
        vm_object_offset_t      shadow_offset;
        vm_object_offset_t      target_offset;
        int                     i;
-       wpl_array_t             lite_list;
        vm_page_t               t,m;
-       int                     occupied;
 
        if (upl == UPL_NULL)
                return KERN_INVALID_ARGUMENT;
 
-       if (upl->flags & UPL_IO_WIRE) {
-               boolean_t       empty;
-               return upl_commit_range(upl, 
-                       0, upl->size, 0, 
-                       NULL, 0, &empty);
-       }
-
        upl_lock(upl);
        if(upl->flags & UPL_DEVICE_MEMORY) {
                upl_unlock(upl);
@@ -3549,49 +3182,15 @@ upl_abort(
                return KERN_INVALID_ARGUMENT;
        }
 
-       if(object->pageout) {
-               shadow_object = object->shadow;
-               shadow_offset = object->shadow_offset;
-       } else {
-               shadow_object = object;
-               shadow_offset = upl->offset - object->paging_offset;
-       }
-
-       if(upl->flags & UPL_INTERNAL) {
-               lite_list = (wpl_array_t)
-                       ((((vm_offset_t)upl) + sizeof(struct upl))
-                       + ((upl->size/PAGE_SIZE) * sizeof(upl_page_info_t)));
-       } else {
-               lite_list = (wpl_array_t)
-                       (((vm_offset_t)upl) + sizeof(struct upl));
-       }
+       shadow_object = upl->map_object->shadow;
+       shadow_offset = upl->map_object->shadow_offset;
        offset = 0;
        vm_object_lock(shadow_object);
        for(i = 0; i<(upl->size); i+=PAGE_SIZE, offset += PAGE_SIZE_64) {
-               m = VM_PAGE_NULL;
-               target_offset = offset + shadow_offset;
-               if(upl->flags & UPL_LITE) {
-                       int     pg_num;
-                       pg_num = offset/PAGE_SIZE;
-                       if(lite_list[pg_num>>5] & (1 << (pg_num & 31))) {
-                               lite_list[pg_num>>5] &= ~(1 << (pg_num & 31));
-                               m = vm_page_lookup(
-                                       shadow_object, target_offset);
-                       }
-               }
-               if(object->pageout) {
-                       if ((t = vm_page_lookup(object, offset)) != NULL) {
-                               t->pageout = FALSE;
-                               VM_PAGE_FREE(t);
-                               if(m == NULL) {
-                                       m = vm_page_lookup(
-                                           shadow_object, target_offset);
-                               }
-                               if(m != VM_PAGE_NULL)
-                                       vm_object_paging_end(m->object);
-                       }
-               }
-               if(m != VM_PAGE_NULL) {
+           if((t = vm_page_lookup(object,offset)) != NULL) {
+               target_offset = t->offset + shadow_offset;
+               if((m = vm_page_lookup(shadow_object, target_offset)) != NULL) {
+                       vm_object_paging_end(m->object);
                        vm_page_lock_queues();
                        if(m->absent) {
                                /* COPYOUT = FALSE case */
@@ -3659,39 +3258,29 @@ upl_abort(
 #endif /* MACH_PAGEMAP */
                        if(error & UPL_ABORT_DUMP_PAGES) {
                                vm_page_free(m);
-                               pmap_page_protect(m->phys_page, VM_PROT_NONE);
+                               pmap_page_protect(m->phys_addr, VM_PROT_NONE);
                        } else {
                                PAGE_WAKEUP(m);
                        }
                        vm_page_unlock_queues();
                }
+          }
        }
-       occupied = 1;
-       if (upl->flags & UPL_DEVICE_MEMORY)  {
-               occupied = 0;
-       } else if (upl->flags & UPL_LITE) {
-               int     pg_num;
-               int     i;
-               pg_num = upl->size/PAGE_SIZE;
-               pg_num = (pg_num + 31) >> 5;
-               occupied = 0;
-               for(i= 0; i<pg_num; i++) {
-                       if(lite_list[i] != 0) {
-                               occupied = 1;
-                               break;
-                       }
-               }
-       } else {
-               if(queue_empty(&upl->map_object->memq)) {
-                       occupied = 0;
-               }
-       }
+       vm_object_unlock(shadow_object);
+       /* Remove all the pages from the map object so */
+       /* vm_pageout_object_terminate will work properly. */
+       while (!queue_empty(&upl->map_object->memq)) {
+               vm_page_t p;
+
+               p = (vm_page_t) queue_first(&upl->map_object->memq);
+
+               assert(p->private);
+               assert(p->pageout);
+               p->pageout = FALSE;
+               assert(!p->cleaning);
 
-       if(occupied == 0) {
-               if(object == shadow_object)
-                       vm_object_paging_end(shadow_object);
+               VM_PAGE_FREE(p);
        }
-       vm_object_unlock(shadow_object);
        upl_unlock(upl);
        return KERN_SUCCESS;
 }
@@ -3706,21 +3295,52 @@ upl_commit(
        if (upl == UPL_NULL)
                return KERN_INVALID_ARGUMENT;
 
-       if(upl->flags & (UPL_LITE | UPL_IO_WIRE)) {
-               boolean_t       empty;
-               return upl_commit_range(upl, 0, upl->size, 0, 
-                                       page_list, count, &empty);
-       }
-
        if (count == 0)
                page_list = NULL;
 
        upl_lock(upl);
        if (upl->flags & UPL_DEVICE_MEMORY)
                page_list = NULL;
-
        if ((upl->flags & UPL_CLEAR_DIRTY) ||
-               (upl->flags & UPL_PAGE_SYNC_DONE) || page_list) {
+               (upl->flags & UPL_PAGE_SYNC_DONE)) {
+               vm_object_t     shadow_object = upl->map_object->shadow;
+               vm_object_t     object = upl->map_object;
+               vm_object_offset_t target_offset;
+               vm_size_t       xfer_end;
+
+               vm_page_t       t,m;
+
+               vm_object_lock(shadow_object);
+
+               target_offset = object->shadow_offset;
+               xfer_end = upl->size + object->shadow_offset;
+
+               while(target_offset < xfer_end) {
+                       if ((t = vm_page_lookup(object, 
+                               target_offset - object->shadow_offset))
+                               != NULL) {
+                               m = vm_page_lookup(
+                                       shadow_object, target_offset);
+                               if(m != VM_PAGE_NULL) {
+                                       if (upl->flags & UPL_CLEAR_DIRTY) {
+                                               pmap_clear_modify(m->phys_addr);
+                                               m->dirty = FALSE;
+                                       }
+                                       /* It is a part of the semantic of */
+                                       /* COPYOUT_FROM UPLs that a commit */
+                                       /* implies cache sync between the  */
+                                       /* vm page and the backing store   */
+                                       /* this can be used to strip the   */
+                                       /* precious bit as well as clean   */
+                                       if (upl->flags & UPL_PAGE_SYNC_DONE)
+                                               m->precious = FALSE;
+                               }
+                       }
+                       target_offset += PAGE_SIZE_64;
+               }
+               vm_object_unlock(shadow_object);
+       }
+       if (page_list) {
                vm_object_t     shadow_object = upl->map_object->shadow;
                vm_object_t     object = upl->map_object;
                vm_object_offset_t target_offset;
@@ -3748,29 +3368,15 @@ upl_commit(
 
                        m = vm_page_lookup(shadow_object, target_offset);
                        if(m != VM_PAGE_NULL) {
-                           if (upl->flags & UPL_CLEAR_DIRTY) {
-                               pmap_clear_modify(m->phys_page);
-                               m->dirty = FALSE;
-                           }
-                           /* It is a part of the semantic of */
-                           /* COPYOUT_FROM UPLs that a commit */
-                           /* implies cache sync between the  */
-                           /* vm page and the backing store   */
-                           /* this can be used to strip the   */
-                           /* precious bit as well as clean   */
-                           if (upl->flags & UPL_PAGE_SYNC_DONE)
-                               m->precious = FALSE;
-
-                          if(page_list) {
-                               p = &(page_list[entry]);
-                               if(page_list[entry].phys_addr &&
+                          p = &(page_list[entry]);
+                          if(page_list[entry].phys_addr &&
                                                p->pageout && !m->pageout) {
                                        vm_page_lock_queues();
                                        m->busy = TRUE;
                                        m->pageout = TRUE;
                                        vm_page_wire(m);
                                        vm_page_unlock_queues();
-                               } else if (page_list[entry].phys_addr &&
+                          } else if (page_list[entry].phys_addr &&
                                                !p->pageout && m->pageout &&
                                                !m->dump_cleaning) {
                                        vm_page_lock_queues();
@@ -3780,9 +3386,8 @@ upl_commit(
                                        vm_page_unwire(m);
                                        PAGE_WAKEUP_DONE(m);
                                        vm_page_unlock_queues();
-                               }
-                               page_list[entry].phys_addr = 0;
                           }
+                          page_list[entry].phys_addr = 0;
                        }
                        target_offset += PAGE_SIZE_64;
                        entry++;
@@ -3790,358 +3395,10 @@ upl_commit(
 
                vm_object_unlock(shadow_object);
        }
-       if (upl->flags & UPL_DEVICE_MEMORY)  {
-               vm_object_lock(upl->map_object->shadow);
-               if(upl->map_object == upl->map_object->shadow)
-                       vm_object_paging_end(upl->map_object->shadow);
-               vm_object_unlock(upl->map_object->shadow);
-       }
        upl_unlock(upl);
        return KERN_SUCCESS;
 }
 
-
-
-kern_return_t
-vm_object_iopl_request(
-       vm_object_t             object,
-       vm_object_offset_t      offset,
-       vm_size_t               size,
-       upl_t                   *upl_ptr,
-       upl_page_info_array_t   user_page_list,
-       unsigned int            *page_list_count,
-       int                     cntrl_flags)
-{
-       vm_page_t               dst_page;
-       vm_object_offset_t      dst_offset = offset;
-       vm_size_t               xfer_size = size;
-       upl_t                   upl = NULL;
-       int                     entry;
-       wpl_array_t             lite_list;
-       int                     page_field_size;
-
-       vm_page_t               alias_page = NULL;
-       kern_return_t           ret;
-       vm_prot_t               prot;
-
-
-       if(cntrl_flags & UPL_COPYOUT_FROM) {
-               prot = VM_PROT_READ;
-       } else {
-               prot = VM_PROT_READ | VM_PROT_WRITE;
-       }
-
-       if(((size/page_size) > MAX_UPL_TRANSFER) && !object->phys_contiguous) {
-               size = MAX_UPL_TRANSFER * page_size;
-       }
-
-       if(cntrl_flags & UPL_SET_INTERNAL)
-               if(page_list_count != NULL)
-                       *page_list_count = MAX_UPL_TRANSFER;
-       if(((cntrl_flags & UPL_SET_INTERNAL) && !(object->phys_contiguous)) &&
-          ((page_list_count != NULL) && (*page_list_count != 0)
-                               && *page_list_count < (size/page_size)))
-               return KERN_INVALID_ARGUMENT;
-
-       if((!object->internal) && (object->paging_offset != 0))
-               panic("vm_object_upl_request: vnode object with non-zero paging offset\n");
-
-       if(object->phys_contiguous) {
-               /* No paging operations are possible against this memory */
-               /* and so no need for map object, ever */
-               cntrl_flags |= UPL_SET_LITE;
-       }
-
-       if(upl_ptr) {
-               if(cntrl_flags & UPL_SET_INTERNAL) {
-                       if(cntrl_flags & UPL_SET_LITE) {
-                               upl = upl_create(
-                                       UPL_CREATE_INTERNAL | UPL_CREATE_LITE,
-                                       size);
-                               user_page_list = (upl_page_info_t *)
-                                  (((vm_offset_t)upl) + sizeof(struct upl));
-                               lite_list = (wpl_array_t)
-                                       (((vm_offset_t)user_page_list) + 
-                                       ((size/PAGE_SIZE) * 
-                                               sizeof(upl_page_info_t)));
-                               page_field_size = ((size/PAGE_SIZE) + 7) >> 3;
-                               page_field_size = 
-                                       (page_field_size + 3) & 0xFFFFFFFC;
-                               bzero((char *)lite_list, page_field_size);
-                               upl->flags = 
-                                       UPL_LITE | UPL_INTERNAL | UPL_IO_WIRE;
-                       } else {
-                               upl = upl_create(UPL_CREATE_INTERNAL, size);
-                               user_page_list = (upl_page_info_t *)
-                                       (((vm_offset_t)upl) 
-                                               + sizeof(struct upl));
-                               upl->flags = UPL_INTERNAL | UPL_IO_WIRE;
-                       }
-               } else {
-                       if(cntrl_flags & UPL_SET_LITE) {
-                               upl = upl_create(UPL_CREATE_LITE, size);
-                               lite_list = (wpl_array_t)
-                                  (((vm_offset_t)upl) + sizeof(struct upl));
-                               page_field_size = ((size/PAGE_SIZE) + 7) >> 3;
-                               page_field_size = 
-                                       (page_field_size + 3) & 0xFFFFFFFC;
-                               bzero((char *)lite_list, page_field_size);
-                               upl->flags = UPL_LITE | UPL_IO_WIRE;
-                       } else {
-                               upl = upl_create(UPL_CREATE_EXTERNAL, size);
-                               upl->flags = UPL_IO_WIRE;
-                       }
-               }
-
-               if(object->phys_contiguous) {
-                       upl->size = size;
-                       upl->offset = offset + object->paging_offset;
-                       *upl_ptr = upl;
-                       if(user_page_list) {
-                               user_page_list[0].phys_addr = 
-                                 (offset + object->shadow_offset)>>12;
-                               user_page_list[0].device = TRUE;
-                       }
-                       upl->map_object = object;
-                       /* don't need any shadow mappings for this one */
-                       /* since it is already I/O memory */
-                       upl->flags |= UPL_DEVICE_MEMORY;
-
-                       vm_object_lock(object);
-                       vm_object_paging_begin(object);
-                       vm_object_unlock(object);
-
-                       if(page_list_count != NULL) {
-                               if (upl->flags & UPL_INTERNAL) {
-                                       *page_list_count = 0;
-                               } else {
-                                       *page_list_count = 1;
-                               }
-                       }
-                       return KERN_SUCCESS;
-               }
-
-                       
-               if(cntrl_flags & UPL_SET_LITE) {
-                       upl->map_object = object;
-               } else {
-                       upl->map_object = vm_object_allocate(size);
-                       vm_object_lock(upl->map_object);
-                       upl->map_object->shadow = object;
-                       upl->map_object->pageout = TRUE;
-                       upl->map_object->can_persist = FALSE;
-                       upl->map_object->copy_strategy = 
-                                       MEMORY_OBJECT_COPY_NONE;
-                       upl->map_object->shadow_offset = offset;
-                       upl->map_object->wimg_bits = object->wimg_bits;
-                       vm_object_unlock(upl->map_object);
-               }
-               upl->size = size;
-               upl->offset = offset + object->paging_offset;
-               *upl_ptr = upl;
-       }
-       vm_object_lock(object);
-
-       if (!object->phys_contiguous) {
-               /* Protect user space from future COW operations */
-               object->true_share = TRUE;
-               if (object->copy_strategy == MEMORY_OBJECT_COPY_SYMMETRIC)
-                       object->copy_strategy = MEMORY_OBJECT_COPY_DELAY;
-       }
-
-#ifdef UBC_DEBUG
-       if(upl_ptr)
-               queue_enter(&object->uplq, upl, upl_t, uplq);
-#endif /* UBC_DEBUG */
-       vm_object_paging_begin(object);
-       entry = 0;
-       while (xfer_size) {
-               if((alias_page == NULL) && !(cntrl_flags & UPL_SET_LITE)) {
-                       vm_object_unlock(object);
-                       VM_PAGE_GRAB_FICTITIOUS(alias_page);
-                       vm_object_lock(object);
-               }
-               dst_page = vm_page_lookup(object, dst_offset);
-               if ((dst_page == VM_PAGE_NULL) || (dst_page->busy) ||
-                       (dst_page->unusual && (dst_page->error || 
-                               dst_page->restart || dst_page->absent ||
-                               dst_page->fictitious ||
-                               prot & dst_page->page_lock))) {
-                       vm_fault_return_t       result;
-                  do {
-                       vm_page_t       top_page;
-                       kern_return_t   error_code;
-                       int             interruptible;
-
-                       vm_object_offset_t      lo_offset = offset;
-                       vm_object_offset_t      hi_offset = offset + size;
-
-
-
-                       if(cntrl_flags & UPL_SET_INTERRUPTIBLE) {
-                               interruptible = THREAD_ABORTSAFE;
-                       } else {
-                               interruptible = THREAD_UNINT;
-                       }
-
-                       result = vm_fault_page(object, dst_offset,
-                               prot | VM_PROT_WRITE, FALSE, 
-                               interruptible,
-                               lo_offset, hi_offset,
-                               VM_BEHAVIOR_SEQUENTIAL,
-                               &prot, &dst_page, &top_page,
-                               (int *)0,
-                               &error_code, FALSE, FALSE, NULL, 0);
-
-                       switch(result) {
-                       case VM_FAULT_SUCCESS:
-
-                               PAGE_WAKEUP_DONE(dst_page);
-
-                               /*
-                                *      Release paging references and
-                                *      top-level placeholder page, if any.
-                                */
-
-                               if(top_page != VM_PAGE_NULL) {
-                                       vm_object_t local_object;
-                                       local_object = 
-                                               top_page->object;
-                                       if(top_page->object 
-                                               != dst_page->object) {
-                                               vm_object_lock(
-                                                       local_object);
-                                               VM_PAGE_FREE(top_page);
-                                               vm_object_paging_end(
-                                                       local_object);
-                                               vm_object_unlock(
-                                                       local_object);
-                                       } else {
-                                               VM_PAGE_FREE(top_page);
-                                               vm_object_paging_end(
-                                                       local_object);
-                                       }
-                               }
-
-                               break;
-                       
-                               
-                       case VM_FAULT_RETRY:
-                               vm_object_lock(object);
-                               vm_object_paging_begin(object);
-                               break;
-
-                       case VM_FAULT_FICTITIOUS_SHORTAGE:
-                               vm_page_more_fictitious();
-                               vm_object_lock(object);
-                               vm_object_paging_begin(object);
-                               break;
-
-                       case VM_FAULT_MEMORY_SHORTAGE:
-                               if (vm_page_wait(interruptible)) {
-                                       vm_object_lock(object);
-                                       vm_object_paging_begin(object);
-                                       break;
-                               }
-                               /* fall thru */
-
-                       case VM_FAULT_INTERRUPTED:
-                               error_code = MACH_SEND_INTERRUPTED;
-                       case VM_FAULT_MEMORY_ERROR:
-                               ret = (error_code ? error_code:
-                                       KERN_MEMORY_ERROR);
-                               vm_object_lock(object);
-                               for(; offset < dst_offset;
-                                               offset += PAGE_SIZE) {
-                                  dst_page = vm_page_lookup(
-                                               object, offset);
-                                  if(dst_page == VM_PAGE_NULL)
-                                       panic("vm_object_iopl_request: Wired pages missing. \n");
-                                  vm_page_lock_queues();
-                                  vm_page_unwire(dst_page);
-                                  vm_page_unlock_queues();
-                                  VM_STAT(reactivations++);
-                               }
-                               vm_object_unlock(object);
-                               upl_destroy(upl);
-                               return ret;
-                       }
-                  } while ((result != VM_FAULT_SUCCESS) 
-                               || (result == VM_FAULT_INTERRUPTED));
-               }
-
-               vm_page_lock_queues();
-               vm_page_wire(dst_page);
-               vm_page_unlock_queues();
-
-               if(upl_ptr) {
-
-                       vm_page_lock_queues();
-                       if(cntrl_flags & UPL_SET_LITE) {
-                               int     pg_num;
-                               pg_num = (dst_offset-offset)/PAGE_SIZE;
-                               lite_list[pg_num>>5] |= 1 << (pg_num & 31);
-                       } else {
-                               /*
-                                * Convert the fictitious page to a 
-                                * private shadow of the real page.
-                                */
-                               assert(alias_page->fictitious);
-                               alias_page->fictitious = FALSE;
-                               alias_page->private = TRUE;
-                               alias_page->pageout = TRUE;
-                               alias_page->phys_page = dst_page->phys_page;
-                               vm_page_wire(alias_page);
-
-                               vm_page_insert(alias_page, 
-                                       upl->map_object, size - xfer_size);
-                               assert(!alias_page->wanted);
-                               alias_page->busy = FALSE;
-                               alias_page->absent = FALSE;
-                       }
-
-                       /* expect the page to be used */
-                       dst_page->reference = TRUE;
-                       if (!(cntrl_flags & UPL_COPYOUT_FROM))
-                               dst_page->dirty = TRUE;
-                       alias_page = NULL;
-
-                       if(user_page_list) {
-                               user_page_list[entry].phys_addr
-                                       = dst_page->phys_page;
-                               user_page_list[entry].dirty =
-                                               dst_page->dirty;
-                               user_page_list[entry].pageout =
-                                               dst_page->pageout;
-                               user_page_list[entry].absent =
-                                               dst_page->absent;
-                               user_page_list[entry].precious =
-                                               dst_page->precious;
-                       }
-                       vm_page_unlock_queues();
-               }
-               entry++;
-               dst_offset += PAGE_SIZE_64;
-               xfer_size -= PAGE_SIZE;
-       }
-
-       if (upl->flags & UPL_INTERNAL) {
-               if(page_list_count != NULL)
-                       *page_list_count = 0;
-       } else if (*page_list_count > entry) {
-               if(page_list_count != NULL)
-                       *page_list_count = entry;
-       }
-
-       if(alias_page != NULL) {
-               vm_page_lock_queues();
-               vm_page_free(alias_page);
-               vm_page_unlock_queues();
-       }
-
-       vm_object_unlock(object);
-       return KERN_SUCCESS;
-}
 vm_size_t
 upl_get_internal_pagelist_offset()
 {
index 0d3fa62fbf426851203ca93b88fd87f301152d9c..853719b7ce8cc74fe3adc1b67bb291a959c27cb9 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -158,23 +155,13 @@ struct upl {
 #define UPL_PAGE_SYNC_DONE     0x20
 #define UPL_DEVICE_MEMORY      0x40
 #define UPL_PAGEOUT            0x80
-#define UPL_LITE               0x100
-#define UPL_IO_WIRE            0x200
 
 #define        UPL_PAGE_TICKET_MASK    0xF00
 #define UPL_PAGE_TICKET_SHIFT  8
 
 
 
-/* flags for upl_create flags parameter */
-#define UPL_CREATE_EXTERNAL    0
-#define UPL_CREATE_INTERNAL    0x1
-#define UPL_CREATE_LITE                0x2
-
-
 
-/* wired  page list structure */
-typedef unsigned long *wpl_array_t;
 
         
 
index 6fce7c7bd77135caa6619642dec5fe7cd99fd5f1..dbb76c48a1dc979d1aa19b4588bc8f8233ee0a4d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #define        VM_PRINT_H
 
 #include <vm/vm_map.h>
-#include <machine/db_machdep.h>
 
 extern void    vm_map_print(
-                       db_addr_t       map);
+                       vm_map_t        map);
 
 extern void    vm_map_copy_print(
-                       db_addr_t       copy);
+                       vm_map_copy_t   copy);
 
 #include <vm/vm_object.h>
 
@@ -65,6 +61,6 @@ extern void vm_external_print(
 extern void    db_vm(void);
 
 extern vm_size_t db_vm_map_total_size(
-                       db_addr_t       map);
+                       vm_map_t        map);
 
 #endif /* VM_PRINT_H */
index f3a762d1f1841a977c5622a7dcd88a7399bbb43d..bf946edce24b9c5fdfd9e03a0d1b0c16750e7b4e 100644 (file)
@@ -1,24 +1,21 @@
 /*
- * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -77,9 +74,6 @@
 #include <kern/misc_protos.h>
 #include <zone_debug.h>
 #include <vm/cpm.h>
-#include <ppc/mappings.h>              /* (BRINGUP) */
-#include <pexpert/pexpert.h>   /* (BRINGUP) */
-
 
 /*     Variables used to indicate the relative age of pages in the
  *     inactive list
@@ -122,7 +116,6 @@ vm_page_bucket_t *vm_page_buckets;          /* Array of buckets */
 unsigned int   vm_page_bucket_count = 0;       /* How big is array? */
 unsigned int   vm_page_hash_mask;              /* Mask for hash function */
 unsigned int   vm_page_hash_shift;             /* Shift for hash function */
-uint32_t               vm_page_bucket_hash;    /* Basic bucket hash */
 decl_simple_lock_data(,vm_page_bucket_lock)
 
 #if    MACH_PAGE_HASH_STATS
@@ -175,10 +168,6 @@ hash_debug(void)
 vm_size_t      page_size  = 4096;
 vm_size_t      page_mask  = 4095;
 int            page_shift = 12;
-#else
-vm_size_t      page_size  = PAGE_SIZE;
-vm_size_t      page_mask  = PAGE_MASK;
-int            page_shift = PAGE_SHIFT;
 #endif /* PAGE_SIZE_FIXED */
 
 /*
@@ -220,7 +209,7 @@ decl_mutex_data(,vm_page_zero_fill_lock)
 
 /*
  *     Fictitious pages don't have a physical address,
- *     but we must initialize phys_page to something.
+ *     but we must initialize phys_addr to something.
  *     For debugging, this should be a strange value
  *     that the pmap module can recognize in assertions.
  */
@@ -358,7 +347,7 @@ vm_page_bootstrap(
        m->restart = FALSE;
        m->zero_fill = FALSE;
 
-       m->phys_page = 0;               /* reset later */
+       m->phys_addr = 0;               /* reset later */
 
        m->page_lock = VM_PROT_NONE;
        m->unlock_request = VM_PROT_NONE;
@@ -424,10 +413,6 @@ vm_page_bootstrap(
        for (log2 = 0; size > 1; log2++) 
                size /= 2;
        vm_page_hash_shift = log1/2 - log2 + 1;
-       
-       vm_page_bucket_hash = 1 << ((log1 + 1) >> 1);           /* Get (ceiling of sqrt of table size) */
-       vm_page_bucket_hash |= 1 << ((log1 + 1) >> 2);          /* Get (ceiling of quadroot of table size) */
-       vm_page_bucket_hash |= 1;                                                       /* Set bit and add 1 - always must be 1 to insure unique series */
 
        if (vm_page_hash_mask & vm_page_bucket_count)
                printf("vm_page_bootstrap: WARNING -- strange page hash\n");
@@ -455,8 +440,8 @@ vm_page_bootstrap(
         */
 
        pmap_startup(&virtual_space_start, &virtual_space_end);
-       virtual_space_start = round_page_32(virtual_space_start);
-       virtual_space_end = trunc_page_32(virtual_space_end);
+       virtual_space_start = round_page(virtual_space_start);
+       virtual_space_end = trunc_page(virtual_space_end);
 
        *startp = virtual_space_start;
        *endp = virtual_space_end;
@@ -468,7 +453,7 @@ vm_page_bootstrap(
         *      wired, they nonetheless can't be moved. At this moment,
         *      all VM managed pages are "free", courtesy of pmap_startup.
         */
-       vm_page_wire_count = atop_64(max_mem) - vm_page_free_count;     /* initial value */
+       vm_page_wire_count = atop(mem_size) - vm_page_free_count;       /* initial value */
 
        printf("vm_page_bootstrap: %d free pages\n", vm_page_free_count);
        vm_page_free_count_minimum = vm_page_free_count;
@@ -484,8 +469,7 @@ vm_offset_t
 pmap_steal_memory(
        vm_size_t size)
 {
-       vm_offset_t addr, vaddr;
-       ppnum_t phys_page;
+       vm_offset_t addr, vaddr, paddr;
 
        /*
         *      We round the size to a round multiple.
@@ -506,8 +490,8 @@ pmap_steal_memory(
                 *      we don't trust the pmap module to do it right.
                 */
 
-               virtual_space_start = round_page_32(virtual_space_start);
-               virtual_space_end = trunc_page_32(virtual_space_end);
+               virtual_space_start = round_page(virtual_space_start);
+               virtual_space_end = trunc_page(virtual_space_end);
        }
 
        /*
@@ -523,10 +507,10 @@ pmap_steal_memory(
         *      Allocate and map physical pages to back new virtual pages.
         */
 
-       for (vaddr = round_page_32(addr);
+       for (vaddr = round_page(addr);
             vaddr < addr + size;
             vaddr += PAGE_SIZE) {
-               if (!pmap_next_page(&phys_page))
+               if (!pmap_next_page(&paddr))
                        panic("pmap_steal_memory");
 
                /*
@@ -534,7 +518,7 @@ pmap_steal_memory(
                 *      but some pmap modules barf if they are.
                 */
 
-               pmap_enter(kernel_pmap, vaddr, phys_page,
+               pmap_enter(kernel_pmap, vaddr, paddr,
                           VM_PROT_READ|VM_PROT_WRITE, 
                                VM_WIMG_USE_DEFAULT, FALSE);
                /*
@@ -552,19 +536,18 @@ pmap_startup(
        vm_offset_t *startp,
        vm_offset_t *endp)
 {
-       unsigned int i, npages, pages_initialized, fill, fillval;
-       vm_page_t       pages;
-       ppnum_t         phys_page;
-       addr64_t        tmpaddr;
+       unsigned int i, npages, pages_initialized;
+       vm_page_t pages;
+       vm_offset_t paddr;
 
        /*
         *      We calculate how many page frames we will have
         *      and then allocate the page structures in one chunk.
         */
 
-       tmpaddr = (addr64_t)pmap_free_pages() * (addr64_t)PAGE_SIZE;    /* Get the amount of memory left */
-       tmpaddr = tmpaddr + (addr64_t)(round_page_32(virtual_space_start) - virtual_space_start);       /* Account for any slop */
-       npages = (unsigned int)(tmpaddr / (addr64_t)(PAGE_SIZE + sizeof(*pages)));      /* Figure size of all vm_page_ts, including enough to hold the vm_page_ts */
+       npages = ((PAGE_SIZE * pmap_free_pages() +
+                  (round_page(virtual_space_start) - virtual_space_start)) /
+                 (PAGE_SIZE + sizeof *pages));
 
        pages = (vm_page_t) pmap_steal_memory(npages * sizeof *pages);
 
@@ -573,10 +556,10 @@ pmap_startup(
         */
 
        for (i = 0, pages_initialized = 0; i < npages; i++) {
-               if (!pmap_next_page(&phys_page))
+               if (!pmap_next_page(&paddr))
                        break;
 
-               vm_page_init(&pages[i], phys_page);
+               vm_page_init(&pages[i], paddr);
                vm_page_pages++;
                pages_initialized++;
        }
@@ -588,60 +571,16 @@ pmap_startup(
         * they require several consecutive pages.
         */
 
-/*
- *             Check if we want to initialize pages to a known value
- */
-       
-       fill = 0;                                                                                                       /* Assume no fill */
-       if (PE_parse_boot_arg("fill", &fillval)) fill = 1;                      /* Set fill */
-       
        for (i = pages_initialized; i > 0; i--) {
-               extern void fillPage(ppnum_t phys_page, unsigned int fillval);
-               if(fill) fillPage(pages[i - 1].phys_page, fillval);             /* Fill the page with a know value if requested at boot */                      
                vm_page_release(&pages[i - 1]);
        }
 
-#if 0
-       {
-               vm_page_t xx, xxo, xxl;
-               int j, k, l;
-       
-               j = 0;                                                                                                  /* (BRINGUP) */
-               xxl = 0;
-               
-               for(xx = vm_page_queue_free; xx; xxl = xx, xx = xx->pageq.next) {       /* (BRINGUP) */
-                       j++;                                                                                            /* (BRINGUP) */
-                       if(j > vm_page_free_count) {                                            /* (BRINGUP) */
-                               panic("pmap_startup: too many pages, xx = %08X, xxl = %08X\n", xx, xxl);
-                       }
-                       
-                       l = vm_page_free_count - j;                                                     /* (BRINGUP) */
-                       k = 0;                                                                                          /* (BRINGUP) */
-                       
-                       if(((j - 1) & 0xFFFF) == 0) kprintf("checking number %d of %d\n", j, vm_page_free_count);
-
-                       for(xxo = xx->pageq.next; xxo; xxo = xxo->pageq.next) { /* (BRINGUP) */
-                               k++;
-                               if(k > l) panic("pmap_startup: too many in secondary check %d %d\n", k, l);
-                               if((xx->phys_page & 0xFFFFFFFF) == (xxo->phys_page & 0xFFFFFFFF)) {     /* (BRINGUP) */
-                                       panic("pmap_startup: duplicate physaddr, xx = %08X, xxo = %08X\n", xx, xxo);
-                               }
-                       }
-               }
-               
-               if(j != vm_page_free_count) {                                           /* (BRINGUP) */
-                       panic("pmap_startup: vm_page_free_count does not match, calc =  %d, vm_page_free_count = %08X\n", j, vm_page_free_count);
-               }
-       }
-#endif
-
-
        /*
         *      We have to re-align virtual_space_start,
         *      because pmap_steal_memory has been using it.
         */
 
-       virtual_space_start = round_page_32(virtual_space_start);
+       virtual_space_start = round_page(virtual_space_start);
 
        *startp = virtual_space_start;
        *endp = virtual_space_end;
@@ -690,20 +629,20 @@ vm_page_module_init(void)
 
 void
 vm_page_create(
-       ppnum_t start,
-       ppnum_t end)
+       vm_offset_t start,
+       vm_offset_t end)
 {
-       ppnum_t         phys_page;
-       vm_page_t       m;
+       vm_offset_t paddr;
+       vm_page_t m;
 
-       for (phys_page = start;
-            phys_page < end;
-            phys_page++) {
+       for (paddr = round_page(start);
+            paddr < trunc_page(end);
+            paddr += PAGE_SIZE) {
                while ((m = (vm_page_t) vm_page_grab_fictitious())
                        == VM_PAGE_NULL)
                        vm_page_more_fictitious();
 
-               vm_page_init(m, phys_page);
+               vm_page_init(m, paddr);
                vm_page_pages++;
                vm_page_release(m);
        }
@@ -714,10 +653,11 @@ vm_page_create(
  *
  *     Distributes the object/offset key pair among hash buckets.
  *
- *     NOTE:   The bucket count must be a power of 2
+ *     NOTE:   To get a good hash function, the bucket count should
+ *             be a power of two.
  */
 #define vm_page_hash(object, offset) (\
-       ( (natural_t)((uint32_t)object * vm_page_bucket_hash) + ((uint32_t)atop_64(offset) ^ vm_page_bucket_hash))\
+       ( ((natural_t)(vm_offset_t)object<<vm_page_hash_shift) + (natural_t)atop(offset))\
         & vm_page_hash_mask)
 
 /*
@@ -968,7 +908,6 @@ vm_page_lookup(
                        break;
        }
        simple_unlock(&vm_page_bucket_lock);
-
        return(mem);
 }
 
@@ -1013,10 +952,10 @@ vm_page_rename(
 void
 vm_page_init(
        vm_page_t       mem,
-       ppnum_t phys_page)
+       vm_offset_t     phys_addr)
 {
        *mem = vm_page_template;
-       mem->phys_page = phys_page;
+       mem->phys_addr = phys_addr;
 }
 
 /*
@@ -1057,7 +996,7 @@ vm_page_release_fictitious(
        assert(!m->free);
        assert(m->busy);
        assert(m->fictitious);
-       assert(m->phys_page == vm_page_fictitious_addr);
+       assert(m->phys_addr == vm_page_fictitious_addr);
 
        c_vm_page_release_fictitious++;
 
@@ -1182,7 +1121,7 @@ vm_page_convert(
        if (real_m == VM_PAGE_NULL)
                return FALSE;
 
-       m->phys_page = real_m->phys_page;
+       m->phys_addr = real_m->phys_addr;
        m->fictitious = FALSE;
        m->no_isync = TRUE;
 
@@ -1193,7 +1132,7 @@ vm_page_convert(
                vm_page_inactive_count++;
        vm_page_unlock_queues();
 
-       real_m->phys_page = vm_page_fictitious_addr;
+       real_m->phys_addr = vm_page_fictitious_addr;
        real_m->fictitious = TRUE;
 
        vm_page_release_fictitious(real_m);
@@ -1292,7 +1231,7 @@ wakeup_pageout:
             (vm_page_inactive_count < vm_page_inactive_target)))
                thread_wakeup((event_t) &vm_page_free_wanted);
 
-//     dbgLog(mem->phys_page, vm_page_free_count, vm_page_wire_count, 4);      /* (TEST/DEBUG) */
+//     dbgLog(mem->phys_addr, vm_page_free_count, vm_page_wire_count, 4);      /* (TEST/DEBUG) */
 
        return mem;
 }
@@ -1307,21 +1246,9 @@ void
 vm_page_release(
        register vm_page_t      mem)
 {
-
-#if 0
-       unsigned int pindex;
-       phys_entry *physent;
-
-       physent = mapping_phys_lookup(mem->phys_page, &pindex);         /* (BRINGUP) */
-       if(physent->ppLink & ppN) {                                                                                     /* (BRINGUP) */
-               panic("vm_page_release: already released - %08X %08X\n", mem, mem->phys_page);
-       }
-       physent->ppLink = physent->ppLink | ppN;                                                        /* (BRINGUP) */
-#endif
-
        assert(!mem->private && !mem->fictitious);
 
-//     dbgLog(mem->phys_page, vm_page_free_count, vm_page_wire_count, 5);      /* (TEST/DEBUG) */
+//     dbgLog(mem->phys_addr, vm_page_free_count, vm_page_wire_count, 5);      /* (TEST/DEBUG) */
 
        mutex_lock(&vm_page_queue_free_lock);
        if (mem->free)
@@ -1471,7 +1398,7 @@ vm_page_free(
        assert(!mem->free);
        assert(!mem->cleaning);
        assert(!mem->pageout);
-       assert(!vm_page_free_verify || pmap_verify_free(mem->phys_page));
+       assert(!vm_page_free_verify || pmap_verify_free(mem->phys_addr));
 
        if (mem->tabled)
                vm_page_remove(mem);    /* clears tabled, object, offset */
@@ -1527,7 +1454,7 @@ vm_page_free(
        if (mem->private) {
                mem->private = FALSE;
                mem->fictitious = TRUE;
-               mem->phys_page = vm_page_fictitious_addr;
+               mem->phys_addr = vm_page_fictitious_addr;
        }
        if (mem->fictitious) {
                vm_page_release_fictitious(mem);
@@ -1537,7 +1464,7 @@ vm_page_free(
                        vm_zf_count-=1;
                        mem->zero_fill = FALSE;
                }
-               vm_page_init(mem, mem->phys_page);
+               vm_page_init(mem, mem->phys_addr);
                vm_page_release(mem);
        }
 }
@@ -1646,7 +1573,7 @@ vm_page_deactivate(
 {
        VM_PAGE_CHECK(m);
 
-//     dbgLog(m->phys_page, vm_page_free_count, vm_page_wire_count, 6);        /* (TEST/DEBUG) */
+//     dbgLog(m->phys_addr, vm_page_free_count, vm_page_wire_count, 6);        /* (TEST/DEBUG) */
 
        /*
         *      This page is no longer very interesting.  If it was
@@ -1666,7 +1593,7 @@ vm_page_deactivate(
                return;
        if (m->active || (m->inactive && m->reference)) {
                if (!m->fictitious && !m->absent)
-                       pmap_clear_reference(m->phys_page);
+                       pmap_clear_reference(m->phys_addr);
                m->reference = FALSE;
                VM_PAGE_QUEUES_REMOVE(m);
        }
@@ -1757,7 +1684,7 @@ vm_page_part_zero_fill(
 
        VM_PAGE_CHECK(m);
 #ifdef PMAP_ZERO_PART_PAGE_IMPLEMENTED
-       pmap_zero_part_page(m->phys_page, m_pa, len);
+       pmap_zero_part_page(m->phys_addr, m_pa, len);
 #else
        while (1) {
                        tmp = vm_page_grab();
@@ -1798,8 +1725,7 @@ vm_page_zero_fill(
 
        VM_PAGE_CHECK(m);
 
-//     dbgTrace(0xAEAEAEAE, m->phys_page, 0);          /* (BRINGUP) */
-       pmap_zero_page(m->phys_page);
+       pmap_zero_page(m->phys_addr);
 }
 
 /*
@@ -1819,8 +1745,8 @@ vm_page_part_copy(
        VM_PAGE_CHECK(src_m);
        VM_PAGE_CHECK(dst_m);
 
-       pmap_copy_part_page(src_m->phys_page, src_pa,
-                       dst_m->phys_page, dst_pa, len);
+       pmap_copy_part_page(src_m->phys_addr, src_pa,
+                       dst_m->phys_addr, dst_pa, len);
 }
 
 /*
@@ -1843,7 +1769,7 @@ vm_page_copy(
        VM_PAGE_CHECK(src_m);
        VM_PAGE_CHECK(dest_m);
 
-       pmap_copy_page(src_m->phys_page, dest_m->phys_page);
+       pmap_copy_page(src_m->phys_addr, dest_m->phys_addr);
 }
 
 /*
@@ -1911,11 +1837,11 @@ vm_page_free_list_sort(void)
        while (m != VM_PAGE_NULL) {
                cpm_counter(++vpfls_pages_handled);
                next_m = NEXT_PAGE(m);
-               if (m->phys_page < sort_list->phys_page) {
+               if (m->phys_addr < sort_list->phys_addr) {
                        cpm_counter(++vpfls_head_insertions);
                        SET_NEXT_PAGE(m, sort_list);
                        sort_list = m;
-               } else if (m->phys_page > sort_list_end->phys_page) {
+               } else if (m->phys_addr > sort_list_end->phys_addr) {
                        cpm_counter(++vpfls_tail_insertions);
                        SET_NEXT_PAGE(sort_list_end, m);
                        SET_NEXT_PAGE(m, VM_PAGE_NULL);
@@ -1925,7 +1851,7 @@ vm_page_free_list_sort(void)
                        /* general sorted list insertion */
                        prev = &sort_list;
                        for (m1=sort_list; m1!=VM_PAGE_NULL; m1=NEXT_PAGE(m1)) {
-                               if (m1->phys_page > m->phys_page) {
+                               if (m1->phys_addr > m->phys_addr) {
                                        if (*prev != m1)
                                                panic("vm_sort_free_list: ugh");
                                        SET_NEXT_PAGE(m, *prev);
@@ -1944,11 +1870,11 @@ vm_page_free_list_sort(void)
         */
        for (m = sort_list, npages = 0; m != VM_PAGE_NULL; m = NEXT_PAGE(m)) {
                if (m != sort_list &&
-                   m->phys_page <= addr) {
+                   m->phys_addr <= addr) {
                        printf("m 0x%x addr 0x%x\n", m, addr);
                        panic("vm_sort_free_list");
                }
-               addr = m->phys_page;
+               addr = m->phys_addr;
                ++npages;
        }
        if (old_free_count != vm_page_free_count)
@@ -1977,16 +1903,16 @@ vm_page_verify_contiguous(
        unsigned int            page_count;
        vm_offset_t             prev_addr;
 
-       prev_addr = pages->phys_page;
+       prev_addr = pages->phys_addr;
        page_count = 1;
        for (m = NEXT_PAGE(pages); m != VM_PAGE_NULL; m = NEXT_PAGE(m)) {
-               if (m->phys_page != prev_addr + 1) {
+               if (m->phys_addr != prev_addr + page_size) {
                        printf("m 0x%x prev_addr 0x%x, current addr 0x%x\n",
-                              m, prev_addr, m->phys_page);
+                              m, prev_addr, m->phys_addr);
                        printf("pages 0x%x page_count %d\n", pages, page_count);
                        panic("vm_page_verify_contiguous:  not contiguous!");
                }
-               prev_addr = m->phys_page;
+               prev_addr = m->phys_addr;
                ++page_count;
        }
        if (page_count != npages) {
@@ -2016,18 +1942,18 @@ vm_page_find_contiguous(
        int             npages)
 {
        vm_page_t       m, *contig_prev, *prev_ptr;
-       ppnum_t         prev_page;
+       vm_offset_t     prev_addr;
        unsigned int    contig_npages;
        vm_page_t       list;
 
        if (npages < 1)
                return VM_PAGE_NULL;
 
-       prev_page = vm_page_queue_free->phys_page - 2;
+       prev_addr = vm_page_queue_free->phys_addr - (page_size + 1);
        prev_ptr = &vm_page_queue_free;
        for (m = vm_page_queue_free; m != VM_PAGE_NULL; m = NEXT_PAGE(m)) {
 
-               if (m->phys_page != prev_page + 1) {
+               if (m->phys_addr != prev_addr + page_size) {
                        /*
                         *      Whoops!  Pages aren't contiguous.  Start over.
                         */
@@ -2062,7 +1988,7 @@ vm_page_find_contiguous(
 
                assert(contig_npages < npages);
                prev_ptr = (vm_page_t *) &m->pageq.next;
-               prev_page = m->phys_page;
+               prev_addr = m->phys_addr;
        }
        cpm_counter(++vpfc_failed);
        return VM_PAGE_NULL;
@@ -2246,7 +2172,7 @@ vm_page_print(
                (p->restart ? "" : "!"),
                (p->unusual ? "" : "!"));
 
-       iprintf("phys_page=0x%x", p->phys_page);
+       iprintf("phys_addr=0x%x", p->phys_addr);
        printf(", page_error=0x%x", p->page_error);
        printf(", page_lock=0x%x", p->page_lock);
        printf(", unlock_request=%d\n", p->unlock_request);
index 734fccf2c3322b6affc42fca805a62a607d3e882..c685c5418d13e1a528a7781d13fc9b887927a0b2 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -55,7 +52,6 @@ static load_struct_t  *
 lsf_hash_lookup(   
         queue_head_t                   *hash_table,
         void                           *file_object,  
-        vm_offset_t                     recognizableOffset,
         int                            size,
        boolean_t                       alternate,
        shared_region_task_mappings_t   sm_info);
@@ -99,34 +95,13 @@ vm_offset_t         shared_file_data_region;
 ipc_port_t             shared_text_region_handle;
 ipc_port_t             shared_data_region_handle;
 vm_offset_t            shared_file_mapping_array = 0;
-
-shared_region_mapping_t default_environment_shared_regions = NULL;
-static decl_mutex_data(,default_regions_list_lock_data)
-
-#define default_regions_list_lock()            \
-               mutex_lock(&default_regions_list_lock_data)
-#define default_regions_list_lock_try()        \
-               mutex_try(&default_regions_list_lock_data)
-#define default_regions_list_unlock()  \
-               mutex_unlock(&default_regions_list_lock_data)
-
+shared_region_mapping_t        system_shared_region = NULL;
 
 ipc_port_t             sfma_handle = NULL;
 zone_t                 lsf_zone;
 
 int            shared_file_available_hash_ele;
 
-/* com region support */
-ipc_port_t             com_region_handle = NULL;
-vm_map_t               com_region_map = NULL;
-vm_size_t              com_region_size = 0x7000;
-shared_region_mapping_t        com_mapping_resource = NULL;
-
-#define                GLOBAL_COM_REGION_BASE 0xFFFF8000
-
-/* called for the non-default, private branch shared region support */
-/* system default fields for fs_base and system supported are not   */
-/* relevant as the system default flag is not set */
 kern_return_t
 shared_file_create_system_region(
                shared_region_mapping_t *shared_region)
@@ -148,215 +123,20 @@ shared_file_create_system_region(
        kret = shared_region_mapping_create(text_handle,
                        text_size, data_handle, data_size, mapping_array,
                        GLOBAL_SHARED_TEXT_SEGMENT, shared_region, 
-                       SHARED_ALTERNATE_LOAD_BASE, SHARED_ALTERNATE_LOAD_BASE);
+                       0x9000000, 0x9000000);
        if(kret)
                return kret;
        (*shared_region)->flags = 0;
-       if(com_mapping_resource) {
-               shared_region_mapping_ref(com_mapping_resource);
-               (*shared_region)->next = com_mapping_resource;
-       }
-
        return KERN_SUCCESS;
 }
 
-/*
- * load a new default for a specified environment into the default share
- * regions list.  If a previous default exists for the envrionment specification
- * it is returned along with its reference.  It is expected that the new
- * sytem region structure passes a reference.
- */
-
-shared_region_mapping_t
-update_default_shared_region(
-               shared_region_mapping_t new_system_region)
-{
-       shared_region_mapping_t old_system_region;
-       unsigned int fs_base;
-       unsigned int system;
-
-       fs_base = new_system_region->fs_base;
-       system = new_system_region->system;
-       new_system_region->flags |= SHARED_REGION_SYSTEM;
-       default_regions_list_lock();
-       old_system_region = default_environment_shared_regions;
-
-       if((old_system_region != NULL) && 
-               (old_system_region->fs_base == fs_base) &&
-                       (old_system_region->system == system)) {
-               new_system_region->default_env_list =
-                       old_system_region->default_env_list;
-               default_environment_shared_regions = new_system_region;
-               default_regions_list_unlock();
-               old_system_region->flags |= SHARED_REGION_STALE;
-               return old_system_region;
-       }
-       if (old_system_region) {
-          while(old_system_region->default_env_list != NULL) {
-               if((old_system_region->default_env_list->fs_base == fs_base) &&
-                     (old_system_region->default_env_list->system == system)) {
-                       new_system_region->default_env_list =
-                                       old_system_region->default_env_list
-                                               ->default_env_list;
-                       old_system_region->default_env_list = 
-                                       new_system_region;
-                       default_regions_list_unlock();
-                       old_system_region->flags |= SHARED_REGION_STALE;
-                       return old_system_region;
-               }
-               old_system_region = old_system_region->default_env_list;
-          }
-       }
-       /* If we get here, we are at the end of the system list and we */
-       /* did not find a pre-existing entry */
-       if(old_system_region) {
-               old_system_region->default_env_list = new_system_region;
-       } else {
-               default_environment_shared_regions = new_system_region;
-       }
-       default_regions_list_unlock();
-       return NULL;
-}
-
-/* 
- * lookup a system_shared_region for the environment specified.  If one is
- * found, it is returned along with a reference against the structure
- */
-
-shared_region_mapping_t
-lookup_default_shared_region(
-               unsigned int fs_base,
-               unsigned int system)
-{
-       shared_region_mapping_t system_region;
-       default_regions_list_lock();
-       system_region = default_environment_shared_regions;
-
-       while(system_region != NULL) {
-               if((system_region->fs_base == fs_base) &&
-                       (system_region->system == system)) {
-                       break;
-               }
-               system_region = system_region->default_env_list;
-       }
-       if(system_region)
-               shared_region_mapping_ref(system_region);
-       default_regions_list_unlock();
-       return system_region;
-}
-
-/*
- * remove a system_region default if it appears in the default regions list. 
- * Drop a reference on removal.
- */
-
-void
-remove_default_shared_region(
-               shared_region_mapping_t system_region)
-{
-       shared_region_mapping_t old_system_region;
-       unsigned int fs_base;
-       unsigned int system;
-
-       default_regions_list_lock();
-       old_system_region = default_environment_shared_regions;
-
-       if(old_system_region == NULL) {
-               default_regions_list_unlock();
-               return;
-       }
-
-       if (old_system_region == system_region) {
-               default_environment_shared_regions 
-                       = old_system_region->default_env_list;
-               old_system_region->flags |= SHARED_REGION_STALE;
-                       shared_region_mapping_dealloc(old_system_region);
-               default_regions_list_unlock();
-               return;
-       }
-
-       while(old_system_region->default_env_list != NULL) {
-               if(old_system_region->default_env_list == system_region) {
-                       shared_region_mapping_t dead_region;
-                       dead_region = old_system_region->default_env_list;
-                       old_system_region->default_env_list = 
-                               old_system_region->default_env_list->default_env_list;
-                       dead_region->flags |= SHARED_REGION_STALE;
-                               shared_region_mapping_dealloc(dead_region);
-                       default_regions_list_unlock();
-                       return;
-               }
-               old_system_region = old_system_region->default_env_list;
-       }
-       default_regions_list_unlock();
-}
-
-void
-remove_all_shared_regions()
-{
-       shared_region_mapping_t system_region;
-       shared_region_mapping_t next_system_region;
-
-       default_regions_list_lock();
-       system_region = default_environment_shared_regions;
-
-       if(system_region == NULL) {
-               default_regions_list_unlock();
-               return;
-       }
-
-       while(system_region != NULL) {
-               next_system_region = system_region->default_env_list;
-               system_region->flags |= SHARED_REGION_STALE;
-                       shared_region_mapping_dealloc(system_region);
-               system_region = next_system_region;
-       }
-       default_environment_shared_regions = NULL;
-       default_regions_list_unlock();
-}
-               
-/* shared_com_boot_time_init initializes the common page shared data and */
-/* text region.  This region is semi independent of the split libs       */
-/* and so its policies have to be handled differently by the code that   */
-/* manipulates the mapping of shared region environments.  However,      */
-/* the shared region delivery system supports both */
-shared_com_boot_time_init()
-{
-       kern_return_t            kret;
-       vm_named_entry_t        named_entry;
-
-       if(com_region_handle) {
-               panic("shared_com_boot_time_init: "
-                       "com_region_handle already set\n");
-       }
-
-       /* create com page region */
-       if(kret = vm_region_object_create(kernel_map, 
-                       com_region_size, 
-                       &com_region_handle)) {
-               panic("shared_com_boot_time_init: "
-                               "unable to create comm page\n");
-               return;
-       }
-       /* now set export the underlying region/map */
-       named_entry = (vm_named_entry_t)com_region_handle->ip_kobject;
-       com_region_map = named_entry->backing.map;
-       /* wrap the com region in its own shared file mapping structure */
-       shared_region_mapping_create(com_region_handle,
-               com_region_size, NULL, 0, 0,
-               GLOBAL_COM_REGION_BASE, &com_mapping_resource,
-               0, 0);
-
-}
-
 shared_file_boot_time_init(
-               unsigned int fs_base, 
-               unsigned int system)
+)
 {
        long                    shared_text_region_size;
        long                    shared_data_region_size;
        shared_region_mapping_t new_system_region;
-       shared_region_mapping_t old_default_env;
+       shared_region_mapping_t old_system_region;
 
        shared_text_region_size = 0x10000000;
        shared_data_region_size = 0x10000000;
@@ -368,26 +148,20 @@ shared_file_boot_time_init(
                shared_text_region_size, shared_data_region_handle,
                shared_data_region_size, shared_file_mapping_array,
                GLOBAL_SHARED_TEXT_SEGMENT, &new_system_region,
-               SHARED_ALTERNATE_LOAD_BASE, SHARED_ALTERNATE_LOAD_BASE);
-
-       new_system_region->fs_base = fs_base;
-       new_system_region->system = system;
-       new_system_region->flags = SHARED_REGION_SYSTEM;
-
-       /* grab an extra reference for the caller */
-       /* remember to grab before call to update */
-       shared_region_mapping_ref(new_system_region);
-       old_default_env = update_default_shared_region(new_system_region);
+               0x9000000, 0x9000000);
+       old_system_region = system_shared_region;
+       system_shared_region = new_system_region;
+       system_shared_region->flags = SHARED_REGION_SYSTEM;
+        /* consume the reference held because this is the  */
+        /* system shared region */
+       if(old_system_region) {
+                shared_region_mapping_dealloc(old_system_region);
+       }
        /* hold an extra reference because these are the system */
        /* shared regions. */
-       if(old_default_env)
-               shared_region_mapping_dealloc(old_default_env);
-       if(com_mapping_resource == NULL) {
-               shared_com_boot_time_init();
-       }
-       shared_region_mapping_ref(com_mapping_resource);
-       new_system_region->next = com_mapping_resource;
-       vm_set_shared_region(current_task(), new_system_region);
+       shared_region_mapping_ref(system_shared_region);
+       vm_set_shared_region(current_task(), system_shared_region);
+
 }
 
 
@@ -452,7 +226,7 @@ shared_file_init(
 
                for (b = *mapping_array, alloced = 0; 
                           alloced < (hash_size +
-                               round_page_32(sizeof(struct sf_mapping)));
+                               round_page(sizeof(struct sf_mapping)));
                           alloced += PAGE_SIZE,  b += PAGE_SIZE) {
                        vm_object_lock(buf_object);
                        p = vm_page_alloc(buf_object, alloced);
@@ -461,11 +235,9 @@ shared_file_init(
                        }       
                        p->busy = FALSE;
                        vm_object_unlock(buf_object);
-                       pmap_enter(kernel_pmap, b, p->phys_page,
+                       pmap_enter(kernel_pmap, b, p->phys_addr,
                                VM_PROT_READ | VM_PROT_WRITE, 
-                               ((unsigned int)(p->object->wimg_bits)) 
-                                                       & VM_WIMG_MASK,
-                               TRUE);
+                               VM_WIMG_USE_DEFAULT, TRUE);
                }
 
 
@@ -485,24 +257,20 @@ shared_file_init(
 
                if (vm_map_wire(kernel_map, *mapping_array, 
                        *mapping_array + 
-                          (hash_size + round_page_32(sizeof(struct sf_mapping))),
+                          (hash_size + round_page(sizeof(struct sf_mapping))),
                        VM_PROT_DEFAULT, FALSE) != KERN_SUCCESS) {
                        panic("shared_file_init: No memory for data table");
                }
 
                lsf_zone = zinit(sizeof(struct load_file_ele), 
                        data_table_size - 
-                          (hash_size + round_page_32(sizeof(struct sf_mapping))),
+                          (hash_size + round_page(sizeof(struct sf_mapping))),
                        0, "load_file_server"); 
 
                zone_change(lsf_zone, Z_EXHAUST, TRUE);
                zone_change(lsf_zone, Z_COLLECT, FALSE);
                zone_change(lsf_zone, Z_EXPAND, FALSE);
                zone_change(lsf_zone, Z_FOREIGN, TRUE);
-
-               /* initialize the global default environment lock */
-               mutex_init(&default_regions_list_lock_data, ETAP_NO_TRACE);
-
        } else {
                *mapping_array = shared_file_mapping_array;
        }
@@ -565,7 +333,7 @@ copyin_shared_file(
                hash_table_size = (shared_file_header->hash_size) 
                                                * sizeof(struct queue_entry);
                hash_table_offset = hash_table_size + 
-                                       round_page_32(sizeof(struct sf_mapping));
+                                       round_page(sizeof(struct sf_mapping));
                for (i = 0; i < shared_file_header->hash_size; i++)
                        queue_init(&shared_file_header->hash[i]);
 
@@ -628,7 +396,7 @@ copyin_shared_file(
        alternate = (*flags & ALTERNATE_LOAD_SITE) ? TRUE : FALSE;
 
        if (file_entry = lsf_hash_lookup(shared_file_header->hash, 
-                       (void *) file_object, mappings[0].file_offset, shared_file_header->hash_size, 
+                       (void *) file_object, shared_file_header->hash_size, 
                        alternate, sm_info)) {
                /* File is loaded, check the load manifest for exact match */
                /* we simplify by requiring that the elements be the same  */
@@ -681,27 +449,18 @@ copyin_shared_file(
                *flags = 0;
                if(ret == KERN_NO_SPACE) {
                        shared_region_mapping_t regions;
-                       shared_region_mapping_t system_region;
                        regions = (shared_region_mapping_t)sm_info->self;
                        regions->flags |= SHARED_REGION_FULL;
-                       system_region = lookup_default_shared_region(
-                               regions->fs_base, regions->system);
-                       if(system_region == regions) {
+                       if(regions == system_shared_region) {
                                shared_region_mapping_t new_system_shared_regions;
-                               shared_file_boot_time_init(
-                                       regions->fs_base, regions->system);
+                               shared_file_boot_time_init();
                                /* current task must stay with its current */
                                /* regions, drop count on system_shared_region */
                                /* and put back our original set */
-                               vm_get_shared_region(current_task(), 
-                                               &new_system_shared_regions);
-                               shared_region_mapping_dealloc(
-                                               new_system_shared_regions);
+                               vm_get_shared_region(current_task(), &new_system_shared_regions);
+                               shared_region_mapping_dealloc(new_system_shared_regions);
                                vm_set_shared_region(current_task(), regions);
                        }
-                       if(system_region != NULL) {
-                               shared_region_mapping_dealloc(system_region);
-                       }
                }
                mutex_unlock(&shared_file_header->lock);
                return ret;
@@ -715,7 +474,6 @@ static load_struct_t  *
 lsf_hash_lookup(
        queue_head_t                    *hash_table,
        void                            *file_object,
-  vm_offset_t                           recognizableOffset,
        int                             size,
        boolean_t                       alternate,
        shared_region_task_mappings_t   sm_info)
@@ -729,12 +487,7 @@ lsf_hash_lookup(
        for (entry = (load_struct_t *)queue_first(bucket);
                !queue_end(bucket, &entry->links);
                entry = (load_struct_t *)queue_next(&entry->links)) {
-
-               if ((entry->file_object == (int) file_object) &&
-                    (entry->file_offset != recognizableOffset)) {
-                }
-               if ((entry->file_object == (int)file_object) &&
-                    (entry->file_offset == recognizableOffset)) {
+               if (entry->file_object == (int)file_object) {
                   target_region = (shared_region_mapping_t)sm_info->self;
                   depth = target_region->depth;
                   while(target_region) {
@@ -888,7 +641,6 @@ lsf_load(
        entry->links.next = (queue_entry_t) 0;
        entry->regions_instance = (shared_region_mapping_t)sm_info->self;
        entry->depth=((shared_region_mapping_t)sm_info->self)->depth;
-        entry->file_offset = mappings[0].file_offset;
 
        lsf_hash_insert(entry, sm_info);
        tptr = &(entry->mappings);
@@ -912,12 +664,12 @@ lsf_load(
                                                + mappings[i].size;
                        }
                }
-               if((alternate_load_next + round_page_32(max_loadfile_offset)) >=
+               if((alternate_load_next + round_page(max_loadfile_offset)) >=
                        (sm_info->data_size - (sm_info->data_size>>9))) {
 
                        return KERN_NO_SPACE;
                }
-               alternate_load_next += round_page_32(max_loadfile_offset);
+               alternate_load_next += round_page(max_loadfile_offset);
 
        } else {
                if (((*base_address) & SHARED_TEXT_REGION_MASK) > 
@@ -931,49 +683,6 @@ lsf_load(
 
        entry->base_address = (*base_address) & SHARED_TEXT_REGION_MASK;
 
-        // Sanity check the mappings -- make sure we don't stray across the
-        // alternate boundary.  If any bit of a library that we're not trying
-        // to load in the alternate load space strays across that boundary,
-        // return KERN_INVALID_ARGUMENT immediately so that the caller can
-        // try to load it in the alternate shared area.  We do this to avoid
-        // a nasty case: if a library tries to load so that it crosses the
-        // boundary, it'll occupy a bit of the alternate load area without
-        // the kernel being aware.  When loads into the alternate load area
-        // at the first free address are tried, the load will fail.
-        // Thus, a single library straddling the boundary causes all sliding
-        // libraries to fail to load.  This check will avoid such a case.
-        
-        if (!(flags & ALTERNATE_LOAD_SITE)) {
-         for (i = 0; i<map_cnt;i++) {
-            vm_offset_t region_mask;
-            vm_address_t region_start;
-            vm_address_t region_end;
-            if ((mappings[i].protection & VM_PROT_WRITE) == 0) {
- // mapping offsets are relative to start of shared segments.
-              region_mask = SHARED_TEXT_REGION_MASK;
-              region_start = (mappings[i].mapping_offset & region_mask)+entry->base_address;
-              region_end = (mappings[i].size + region_start);
-              if (region_end >= SHARED_ALTERNATE_LOAD_BASE) {
-                // No library is permitted to load so any bit of it is in the 
-                // shared alternate space.  If they want it loaded, they can put
-                // it in the alternate space explicitly.
-printf("Library trying to load across alternate shared region boundary -- denied!\n");
-                return KERN_INVALID_ARGUMENT;
-              }
-            } else {
-              // rw section?
-              region_mask = SHARED_DATA_REGION_MASK;
-              region_start = (mappings[i].mapping_offset & region_mask)+entry->base_address;
-              region_end = (mappings[i].size + region_start);
-              if (region_end >= SHARED_ALTERNATE_LOAD_BASE) {
-printf("Library trying to load across alternate shared region boundary-- denied!\n");
-               return KERN_INVALID_ARGUMENT;
-              }
-            } // write?
-          } // for
-        } // if not alternate load site.
        /* copyin mapped file data */
        for(i = 0; i<map_cnt; i++) {
                vm_offset_t     target_address;
@@ -1018,7 +727,7 @@ printf("Library trying to load across alternate shared region boundary-- denied!
                if(!(mappings[i].protection & VM_PROT_ZF)) {
                   if(vm_map_copyin(current_map(), 
                        mapped_file + mappings[i].file_offset, 
-                       round_page_32(mappings[i].size), FALSE, &copy_object)) {
+                       round_page(mappings[i].size), FALSE, &copy_object)) {
                        vm_deallocate(((vm_named_entry_t)local_map->ip_kobject)
                              ->backing.map, target_address, mappings[i].size);
                        lsf_unload(file_object, entry->base_address, sm_info);
@@ -1035,13 +744,13 @@ printf("Library trying to load across alternate shared region boundary-- denied!
                }
                vm_map_protect(((vm_named_entry_t)local_map->ip_kobject)
                                ->backing.map, target_address,
-                               round_page_32(target_address + mappings[i].size),
+                               round_page(target_address + mappings[i].size),
                                (mappings[i].protection & 
                                        (VM_PROT_READ | VM_PROT_EXECUTE)),
                                TRUE);
                vm_map_protect(((vm_named_entry_t)local_map->ip_kobject)
                                ->backing.map, target_address,
-                               round_page_32(target_address + mappings[i].size),
+                               round_page(target_address + mappings[i].size),
                                (mappings[i].protection & 
                                        (VM_PROT_READ | VM_PROT_EXECUTE)),
                                FALSE);
index f831023e2b2b6019c7b7165d0e333bc317df6f6a..259be7ea12d780b4cf7a11b2e37ad6cdbb65141b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -55,21 +52,12 @@ struct shared_region_task_mappings {
        vm_offset_t             client_base;
        vm_offset_t             alternate_base;
        vm_offset_t             alternate_next;
-       unsigned int            fs_base;
-       unsigned int            system;
        int                     flags;
        vm_offset_t             self;
 };
 
-#define SHARED_REGION_SYSTEM   0x1 // Default env for system and fs_root
-#define SHARED_REGION_FULL     0x2 // Shared regions are full
-#define SHARED_REGION_STALE    0x4 // Indicates no longer in default list
-
-
-/* defines for default environment, and co-resident systems */
-
-#define ENV_DEFAULT_SYSTEM     0
-#define ENV_DEFAULT_ROOT       0
+#define SHARED_REGION_SYSTEM   0x1
+#define SHARED_REGION_FULL     0x2
 
 typedef        struct shared_region_task_mappings *shared_region_task_mappings_t;
 typedef struct shared_region_mapping *shared_region_mapping_t;
@@ -102,7 +90,6 @@ struct load_struct {
        vm_offset_t             base_address;
        int                     mapping_cnt;
        loaded_mapping_t        *mappings;
-        vm_offset_t             file_offset; // start of file we mapped in
 };
 
 typedef struct load_struct load_struct_t;
@@ -135,8 +122,6 @@ typedef struct shared_region_object_chain *shared_region_object_chain_t;
 struct shared_region_mapping {
         decl_mutex_data(,       Lock)   /* Synchronization */
        int                     ref_count;
-       unsigned int            fs_base;
-       unsigned int            system;
        mach_port_t             text_region;
        vm_size_t               text_size;
        mach_port_t             data_region;
@@ -147,7 +132,6 @@ struct shared_region_mapping {
        vm_offset_t             alternate_next;
        int                     flags;
        int                     depth;
-       shared_region_mapping_t default_env_list;
        shared_region_object_chain_t object_chain;
        shared_region_mapping_t self;
        shared_region_mapping_t next;
@@ -184,8 +168,6 @@ extern kern_return_t shared_region_mapping_info(
                                vm_offset_t             *client_base,
                                vm_offset_t             *alternate_base,
                                vm_offset_t             *alternate_next,
-                               unsigned int            *fs_base,
-                               unsigned int            *system,
                                int                     *flags,
                                shared_region_mapping_t *next);
 
@@ -218,16 +200,6 @@ extern kern_return_t vm_set_shared_region(
                                task_t  task,
                                shared_region_mapping_t shared_region);
 
-extern shared_region_mapping_t update_default_shared_region(
-                               shared_region_mapping_t new_system_region);
-
-extern shared_region_mapping_t lookup_default_shared_region(
-                               unsigned int fs_base,
-                               unsigned int system);
-
-extern void remove_default_shared_region(
-                               shared_region_mapping_t system_region);
-
 extern unsigned int lsf_mapping_pool_gauge();
 
 #endif /* __APPLE_API_PRIVATE */
index 44a32ca173a3adc7a4681e00de36d8ea77c71223..ede0d2591b220df0c51b21de7eafb6ce0fbaa2d4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -117,8 +114,8 @@ vm_allocate(
        if (anywhere)
                *addr = vm_map_min(map);
        else
-               *addr = trunc_page_32(*addr);
-       size = round_page_32(size);
+               *addr = trunc_page(*addr);
+       size = round_page(size);
        if (size == 0) {
          return(KERN_INVALID_ARGUMENT);
        }
@@ -155,8 +152,8 @@ vm_deallocate(
        if (size == (vm_offset_t) 0)
                return(KERN_SUCCESS);
 
-       return(vm_map_remove(map, trunc_page_32(start),
-                            round_page_32(start+size), VM_MAP_NO_FLAGS));
+       return(vm_map_remove(map, trunc_page(start),
+                            round_page(start+size), VM_MAP_NO_FLAGS));
 }
 
 /*
@@ -177,8 +174,8 @@ vm_inherit(
                 return(KERN_INVALID_ARGUMENT);
 
        return(vm_map_inherit(map,
-                             trunc_page_32(start),
-                             round_page_32(start+size),
+                             trunc_page(start),
+                             round_page(start+size),
                              new_inheritance));
 }
 
@@ -200,8 +197,8 @@ vm_protect(
                return(KERN_INVALID_ARGUMENT);
 
        return(vm_map_protect(map,
-                             trunc_page_32(start),
-                             round_page_32(start+size),
+                             trunc_page(start),
+                             round_page(start+size),
                              new_protection,
                              set_maximum));
 }
@@ -458,8 +455,8 @@ vm_map_64(
                        vm_map_entry_t          map_entry;
 
                        named_entry_unlock(named_entry);
-                       *address = trunc_page_32(*address);
-                       size = round_page_64(size);
+                       *address = trunc_page(*address);
+                       size = round_page(size);
                        vm_object_reference(vm_submap_object);
                        if ((result = vm_map_enter(target_map,
                                address, size, mask, flags,
@@ -504,79 +501,31 @@ vm_map_64(
                        vm_object_reference(named_entry->object);
                        object = named_entry->object;
                } else {
-                       unsigned int            access;
-                       vm_prot_t               protections;
-                       unsigned int            wimg_mode;
-                       boolean_t       cache_attr;
-
-                       protections = named_entry->protection 
-                                                       & VM_PROT_ALL;
-                       access = GET_MAP_MEM(named_entry->protection);
-
-                       object = vm_object_enter(
-                               named_entry->backing.pager, 
-                               named_entry->size, 
-                               named_entry->internal, 
-                               FALSE,
-                               FALSE);
+                       object = vm_object_enter(named_entry->backing.pager, 
+                                       named_entry->size, 
+                                       named_entry->internal, 
+                                       FALSE,
+                                       FALSE);
                        if (object == VM_OBJECT_NULL) {
                                named_entry_unlock(named_entry);
                                return(KERN_INVALID_OBJECT);
                        }
-
-                       vm_object_lock(object);
-
-                       /* create an extra ref for the named entry */
-                       vm_object_reference_locked(object);
+                       object->true_share = TRUE;
                        named_entry->object = object;
                        named_entry_unlock(named_entry);
-
-                       wimg_mode = object->wimg_bits;
-                       if(access == MAP_MEM_IO) {
-                               wimg_mode = VM_WIMG_IO;
-                       } else if (access == MAP_MEM_COPYBACK) {
-                               wimg_mode = VM_WIMG_USE_DEFAULT;
-                       } else if (access == MAP_MEM_WTHRU) {
-                               wimg_mode = VM_WIMG_WTHRU;
-                       } else if (access == MAP_MEM_WCOMB) {
-                               wimg_mode = VM_WIMG_WCOMB;
-                       }
-                       if ((wimg_mode == VM_WIMG_IO)
-                               || (wimg_mode == VM_WIMG_WCOMB))
-                               cache_attr = TRUE;
-                       else 
-                               cache_attr = FALSE;
-
-                       if (named_entry->backing.pager) {
-                               /* wait for object (if any) to be ready */
+                       /* create an extra reference for the named entry */
+                       vm_object_reference(named_entry->object);
+                       /* wait for object (if any) to be ready */
+                       if (object != VM_OBJECT_NULL) {
+                               vm_object_lock(object);
                                while (!object->pager_ready) {
                                        vm_object_wait(object,
-                                                  VM_OBJECT_EVENT_PAGER_READY,
-                                                  THREAD_UNINT);
+                                               VM_OBJECT_EVENT_PAGER_READY,
+                                               THREAD_UNINT);
                                        vm_object_lock(object);
                                }
+                               vm_object_unlock(object);
                        }
-                       if(object->wimg_bits != wimg_mode) {
-                               vm_page_t p;
-
-                               vm_object_paging_wait(object, THREAD_UNINT);
-
-                               object->wimg_bits = wimg_mode;
-                               queue_iterate(&object->memq, p, vm_page_t, listq) {
-                                       if (!p->fictitious) {
-                                               pmap_page_protect(
-                                                       p->phys_page, 
-                                                       VM_PROT_NONE);
-                                               if(cache_attr)
-                                                       pmap_sync_caches_phys(
-                                                               p->phys_page);
-                                       }
-                               }
-                       }
-                       object->true_share = TRUE;
-                       if (object->copy_strategy == MEMORY_OBJECT_COPY_SYMMETRIC)
-                               object->copy_strategy = MEMORY_OBJECT_COPY_DELAY;
-                       vm_object_unlock(object);
                }
        } else if (ip_kotype(port) == IKOT_MEMORY_OBJECT) {
                /*
@@ -613,8 +562,8 @@ vm_map_64(
                return (KERN_INVALID_OBJECT);
        }
 
-       *address = trunc_page_32(*address);
-       size = round_page_64(size);
+       *address = trunc_page(*address);
+       size = round_page(size);
 
        /*
         *      Perform the copy if requested
@@ -677,7 +626,6 @@ vm_map_64(
 }
 
 /* temporary, until world build */
-kern_return_t
 vm_map(
        vm_map_t                target_map,
        vm_offset_t             *address,
@@ -691,7 +639,7 @@ vm_map(
        vm_prot_t               max_protection,
        vm_inherit_t            inheritance)
 {
-       return vm_map_64(target_map, address, size, mask, flags, 
+       vm_map_64(target_map, address, size, mask, flags, 
                        port, (vm_object_offset_t)offset, copy,
                        cur_protection, max_protection, inheritance);
 }
@@ -731,11 +679,11 @@ vm_wire(
                return KERN_INVALID_ARGUMENT;
 
        if (access != VM_PROT_NONE) {
-               rc = vm_map_wire(map, trunc_page_32(start),
-                                round_page_32(start+size), access, TRUE);
+               rc = vm_map_wire(map, trunc_page(start),
+                                round_page(start+size), access, TRUE);
        } else {
-               rc = vm_map_unwire(map, trunc_page_32(start),
-                                  round_page_32(start+size), TRUE);
+               rc = vm_map_unwire(map, trunc_page(start),
+                                  round_page(start+size), TRUE);
        }
        return rc;
 }
@@ -796,8 +744,8 @@ vm_msync(
        /*
         * align address and size on page boundaries
         */
-       size = round_page_32(address + size) - trunc_page_32(address);
-       address = trunc_page_32(address);
+       size = round_page(address + size) - trunc_page(address);
+       address = trunc_page(address);
 
         if (map == VM_MAP_NULL)
                 return(KERN_INVALID_TASK);
@@ -1055,8 +1003,8 @@ vm_behavior_set(
        if (map == VM_MAP_NULL)
                return(KERN_INVALID_ARGUMENT);
 
-       return(vm_map_behavior_set(map, trunc_page_32(start), 
-                                  round_page_32(start+size), new_behavior));
+       return(vm_map_behavior_set(map, trunc_page(start), 
+                                  round_page(start+size), new_behavior));
 }
 
 #if    VM_CPM
@@ -1123,8 +1071,8 @@ vm_allocate_cpm(
        if (anywhere)
                *addr = vm_map_min(map);
        else
-               *addr = trunc_page_32(*addr);
-       size = round_page_32(size);
+               *addr = trunc_page(*addr);
+       size = round_page(size);
 
        if ((kr = cpm_allocate(size, &pages, TRUE)) != KERN_SUCCESS)
                return kr;
@@ -1152,7 +1100,7 @@ vm_allocate_cpm(
                assert(!m->pageout);
                assert(!m->tabled);
                assert(m->busy);
-               assert(m->phys_page>=avail_start && m->phys_page<=avail_end);
+               assert(m->phys_addr>=avail_start && m->phys_addr<=avail_end);
 
                m->busy = FALSE;
                vm_page_insert(m, cpm_obj, offset);
@@ -1227,8 +1175,7 @@ vm_allocate_cpm(
                vm_object_unlock(cpm_obj);
                assert(m != VM_PAGE_NULL);
                PMAP_ENTER(pmap, va, m, VM_PROT_ALL,    
-                       ((unsigned int)(m->object->wimg_bits)) & VM_WIMG_MASK,
-                       TRUE);
+                                               VM_WIMG_USE_DEFAULT, TRUE);
        }
 
 #if    MACH_ASSERT
@@ -1253,7 +1200,7 @@ vm_allocate_cpm(
                assert(!m->precious);
                assert(!m->clustered);
                if (offset != 0) {
-                       if (m->phys_page != prev_addr + 1) {
+                       if (m->phys_addr != prev_addr + PAGE_SIZE) {
                                printf("start 0x%x end 0x%x va 0x%x\n",
                                       start, end, va);
                                printf("obj 0x%x off 0x%x\n", cpm_obj, offset);
@@ -1262,7 +1209,7 @@ vm_allocate_cpm(
                                panic("vm_allocate_cpm:  pages not contig!");
                        }
                }
-               prev_addr = m->phys_page;
+               prev_addr = m->phys_addr;
        }
 #endif /* MACH_ASSERT */
 
@@ -1302,7 +1249,6 @@ mach_memory_object_memory_entry_64(
        memory_object_t         pager,
        ipc_port_t              *entry_handle)
 {
-       unsigned int            access;
        vm_named_entry_t        user_object;
        ipc_port_t              user_handle;
        ipc_port_t              previous;
@@ -1339,9 +1285,7 @@ mach_memory_object_memory_entry_64(
        user_object->size = size;
        user_object->offset = 0;
        user_object->backing.pager = pager;
-       user_object->protection = permission & VM_PROT_ALL;
-       access = GET_MAP_MEM(permission);
-       SET_MAP_MEM(access, user_object->protection);
+       user_object->protection = permission;
        user_object->internal = internal;
        user_object->is_sub_map = FALSE;
        user_object->ref_count = 1;
@@ -1404,85 +1348,10 @@ mach_make_memory_entry_64(
        vm_object_size_t        mappable_size;
        vm_object_size_t        total_size;
 
-       unsigned int                    access;
-       vm_prot_t                       protections;
-       unsigned int                    wimg_mode;
-       boolean_t                       cache_attr;
-
-       protections = permission & VM_PROT_ALL;
-       access = GET_MAP_MEM(permission);
-
 
        offset = trunc_page_64(offset);
        *size = round_page_64(*size);
-
-       if((parent_entry != NULL)
-               && (permission & MAP_MEM_ONLY)) {
-               vm_named_entry_t        parent_object;
-               if(ip_kotype(parent_entry) != IKOT_NAMED_ENTRY) {
-                       return KERN_INVALID_ARGUMENT;
-               }
-               parent_object = (vm_named_entry_t)parent_entry->ip_kobject;
-               object = parent_object->object;
-               if(object != VM_OBJECT_NULL)
-                       wimg_mode = object->wimg_bits;
-               if((access != GET_MAP_MEM(parent_object->protection)) &&
-                               !(parent_object->protection & VM_PROT_WRITE)) { 
-                       return KERN_INVALID_RIGHT;
-               }
-               if(access == MAP_MEM_IO) {
-                  SET_MAP_MEM(access, parent_object->protection);
-                  wimg_mode = VM_WIMG_IO;
-               } else if (access == MAP_MEM_COPYBACK) {
-                  SET_MAP_MEM(access, parent_object->protection);
-                  wimg_mode = VM_WIMG_DEFAULT;
-               } else if (access == MAP_MEM_WTHRU) {
-                  SET_MAP_MEM(access, parent_object->protection);
-                  wimg_mode = VM_WIMG_WTHRU;
-               } else if (access == MAP_MEM_WCOMB) {
-                  SET_MAP_MEM(access, parent_object->protection);
-                  wimg_mode = VM_WIMG_WCOMB;
-               }
-               if(object &&
-                       (access != MAP_MEM_NOOP) && 
-                       (!(object->nophyscache))) {
-                       if(object->wimg_bits != wimg_mode) {
-                          vm_page_t p;
-                          if ((wimg_mode == VM_WIMG_IO)
-                               || (wimg_mode == VM_WIMG_WCOMB))
-                               cache_attr = TRUE;
-                          else 
-                               cache_attr = FALSE;
-                          vm_object_lock(object);
-                          while(object->paging_in_progress) {
-                               vm_object_unlock(object);
-                               vm_object_wait(object,
-                                  VM_OBJECT_EVENT_PAGING_IN_PROGRESS,
-                                  THREAD_UNINT);
-                               vm_object_lock(object);
-                          }
-                          object->wimg_bits = wimg_mode;
-                          queue_iterate(&object->memq, 
-                                               p, vm_page_t, listq) {
-                               if (!p->fictitious) {
-                                       pmap_page_protect(
-                                               p->phys_page, 
-                                               VM_PROT_NONE);
-                                        if(cache_attr)
-                                           pmap_sync_caches_phys(
-                                                       p->phys_page);
-                               }
-                          }
-                          vm_object_unlock(object);
-                       }
-               }
-               return KERN_SUCCESS;
-       }
-
-       if(permission & MAP_MEM_ONLY) {
-               return KERN_INVALID_ARGUMENT;
-       }
-
+       
        user_object = (vm_named_entry_t) 
                        kalloc(sizeof (struct vm_named_entry));
        if(user_object == NULL)
@@ -1510,28 +1379,11 @@ mach_make_memory_entry_64(
        user_object->backing.pager = NULL;
        user_object->ref_count = 1;
 
-       if(permission & MAP_MEM_NAMED_CREATE) {
-               user_object->object = NULL;
-               user_object->internal = TRUE;
-               user_object->is_sub_map = FALSE;
-               user_object->offset = 0;
-               user_object->protection = protections;
-               SET_MAP_MEM(access, user_object->protection);
-               user_object->size = *size;
-
-               /* user_object pager and internal fields are not used */
-               /* when the object field is filled in.                */
-
-               ipc_kobject_set(user_handle, (ipc_kobject_t) user_object,
-                                                       IKOT_NAMED_ENTRY);
-               *object_handle = user_handle;
-               return KERN_SUCCESS;
-       }
-
        if(parent_entry == NULL) {
        /* Create a named object based on address range within the task map */
        /* Go find the object at given address */
 
+               permission &= VM_PROT_ALL;
                vm_map_lock_read(target_map);
 
                /* get the object associated with the target address */
@@ -1539,14 +1391,14 @@ mach_make_memory_entry_64(
                /* that requested by the caller */
 
                kr = vm_map_lookup_locked(&target_map, offset, 
-                               protections, &version,
+                               permission, &version,
                                &object, &obj_off, &prot, &wired, &behavior,
                                &lo_offset, &hi_offset, &pmap_map);
                if (kr != KERN_SUCCESS) {
                        vm_map_unlock_read(target_map);
                        goto make_mem_done;
                }
-               if (((prot & protections) != protections
+               if (((prot & permission) != permission
                                        || (object == kernel_object)) {
                        kr = KERN_INVALID_RIGHT;
                        vm_object_unlock(object);
@@ -1594,7 +1446,6 @@ redo_lookup:
                          goto make_mem_done;
                      }
                      if(map_entry->wired_count) {
-                        /* JMM - The check below should be reworked instead. */
                         object->true_share = TRUE;
                      }
                      break;
@@ -1611,7 +1462,7 @@ redo_lookup:
                        local_offset += map_entry->offset;
                   }
                }
-               if(((map_entry->max_protection) & protections) != protections) {
+               if(((map_entry->max_protection) & permission) != permission) {
                         kr = KERN_INVALID_RIGHT;
                          vm_object_unlock(object);
                          vm_map_unlock_read(target_map);
@@ -1638,12 +1489,9 @@ redo_lookup:
                                           (next_entry->vme_prev->vme_end - 
                                           next_entry->vme_prev->vme_start))) {
                                        if(((next_entry->max_protection) 
-                                               & protections) != protections) {
+                                               & permission) != permission) {
                                                break;
                                        }
-                                       if (next_entry->needs_copy !=
-                                           map_entry->needs_copy)
-                                               break;
                                        mappable_size += next_entry->vme_end
                                                - next_entry->vme_start;
                                        total_size += next_entry->vme_end
@@ -1671,13 +1519,7 @@ redo_lookup:
                                        goto redo_lookup;
                                }
 
-                               /* 
-                                * JMM - We need to avoid coming here when the object
-                                * is wired by anybody, not just the current map.  Why
-                                * couldn't we use the standard vm_object_copy_quickly()
-                                * approach here?
-                                */
-                                
+
                                /* create a shadow object */
                                vm_object_shadow(&map_entry->object.vm_object,
                                                &map_entry->offset, total_size);
@@ -1735,47 +1577,9 @@ redo_lookup:
                /* target of ipc's, etc.  The code above, protecting    */
                /* against delayed copy, etc. is mostly defensive.      */
 
-               wimg_mode = object->wimg_bits;
-               if(!(object->nophyscache)) {
-                       if(access == MAP_MEM_IO) {
-                               wimg_mode = VM_WIMG_IO;
-                       } else if (access == MAP_MEM_COPYBACK) {
-                               wimg_mode = VM_WIMG_USE_DEFAULT;
-                       } else if (access == MAP_MEM_WTHRU) {
-                               wimg_mode = VM_WIMG_WTHRU;
-                       } else if (access == MAP_MEM_WCOMB) {
-                               wimg_mode = VM_WIMG_WCOMB;
-                       }
-               }
 
-               object->true_share = TRUE;
-               if (object->copy_strategy == MEMORY_OBJECT_COPY_SYMMETRIC)
-                       object->copy_strategy = MEMORY_OBJECT_COPY_DELAY;
 
-               /* we now point to this object, hold on to it */
-               vm_object_reference_locked(object);
-               vm_map_unlock_read(target_map);
-               if(pmap_map != target_map)
-                       vm_map_unlock_read(pmap_map);
-
-               if(object->wimg_bits != wimg_mode) {
-                       vm_page_t p;
-
-                       vm_object_paging_wait(object, THREAD_UNINT);
-
-                       queue_iterate(&object->memq, 
-                                               p, vm_page_t, listq) {
-                               if (!p->fictitious) {
-                                       pmap_page_protect(
-                                               p->phys_page, 
-                                               VM_PROT_NONE);
-                                        if(cache_attr)
-                                           pmap_sync_caches_phys(
-                                                       p->phys_page);
-                               }
-                       }
-                       object->wimg_bits = wimg_mode;
-               }
+               object->true_share = TRUE;
                user_object->object = object;
                user_object->internal = object->internal;
                user_object->is_sub_map = FALSE;
@@ -1796,10 +1600,15 @@ redo_lookup:
                /* user_object pager and internal fields are not used */
                /* when the object field is filled in.                */
 
+               object->ref_count++; /* we now point to this object, hold on */
+               vm_object_res_reference(object);
                vm_object_unlock(object);
                ipc_kobject_set(user_handle, (ipc_kobject_t) user_object,
                                                        IKOT_NAMED_ENTRY);
                *object_handle = user_handle;
+               vm_map_unlock_read(target_map);
+               if(pmap_map != target_map)
+                       vm_map_unlock_read(pmap_map);
                return KERN_SUCCESS;
        } else {
 
@@ -1811,6 +1620,10 @@ redo_lookup:
                        goto make_mem_done;
                }
                parent_object =  (vm_named_entry_t)parent_entry->ip_kobject;
+               if(permission & parent_object->protection != permission) {
+                       kr = KERN_INVALID_ARGUMENT;
+                       goto make_mem_done;
+               }
                if((offset + *size) > parent_object->size) {
                        kr = KERN_INVALID_ARGUMENT;
                        goto make_mem_done;
@@ -1819,12 +1632,7 @@ redo_lookup:
                user_object->object = parent_object->object;
                user_object->size = *size;
                user_object->offset = parent_object->offset + offset;
-               user_object->protection = parent_object->protection;
-               user_object->protection &= ~VM_PROT_ALL;
-               user_object->protection = permission & VM_PROT_ALL;
-               if(access != MAP_MEM_NOOP) {
-                       SET_MAP_MEM(access, user_object->protection);
-               }
+               user_object->protection = permission;
                if(parent_object->is_sub_map) {
                   user_object->backing.map = parent_object->backing.map;
                   vm_map_lock(user_object->backing.map);
@@ -1842,10 +1650,6 @@ redo_lookup:
                        vm_object_reference(parent_object->object); 
                        vm_object_lock(parent_object->object);
                        parent_object->object->true_share = TRUE;
-                       if (parent_object->object->copy_strategy == 
-                           MEMORY_OBJECT_COPY_SYMMETRIC)
-                               parent_object->object->copy_strategy =
-                                       MEMORY_OBJECT_COPY_DELAY;
                        vm_object_unlock(parent_object->object);
                }
                ipc_kobject_set(user_handle, (ipc_kobject_t) user_object,
@@ -1895,12 +1699,16 @@ vm_region_object_create(
        ipc_port_t              user_handle;
        kern_return_t           kr;
 
+       pmap_t          new_pmap = pmap_create((vm_size_t) 0);
        ipc_port_t      previous;
        vm_map_t        new_map;
        
+       if(new_pmap == PMAP_NULL)
+               return KERN_FAILURE;
        user_object = (vm_named_entry_t) 
                        kalloc(sizeof (struct vm_named_entry));
        if(user_object == NULL) {
+               pmap_destroy(new_pmap);
                return KERN_FAILURE;
        }
        named_entry_lock_init(user_object);
@@ -1927,7 +1735,7 @@ vm_region_object_create(
 
        /* Create a named object based on a submap of specified size */
 
-       new_map = vm_map_create(0, 0, size, TRUE);
+       new_map = vm_map_create(new_pmap, 0, size, TRUE);
        user_object->backing.map = new_map;
 
 
@@ -1990,15 +1798,7 @@ kern_return_t vm_map_region_replace(
                        vm_map_unlock(target_map);
                        return KERN_SUCCESS;
                }
-       }
-       if ((entry->use_pmap) && 
-                       (new_submap->pmap == NULL)) {
-               new_submap->pmap = pmap_create((vm_size_t) 0);
-               if(new_submap->pmap == PMAP_NULL) {
-                       vm_map_unlock(old_submap);
-                       vm_map_unlock(target_map);
-                       return(KERN_NO_SPACE);
-               }
+               vm_map_lookup_entry(target_map, addr, &entry);
        }
        addr = entry->vme_start;
        vm_map_reference(old_submap);
@@ -2007,7 +1807,7 @@ kern_return_t vm_map_region_replace(
                if((entry->is_sub_map) && 
                        (entry->object.sub_map == old_submap)) {
                        if(entry->use_pmap) {
-                               if((start & 0x0fffffff) || 
+                               if((start & 0xfffffff) || 
                                        ((end - start) != 0x10000000)) {
                                        vm_map_unlock(old_submap);
                                        vm_map_deallocate(old_submap);
@@ -2025,15 +1825,14 @@ kern_return_t vm_map_region_replace(
        }
        if(nested_pmap) {
 #ifndef i386
-               pmap_unnest(target_map->pmap, (addr64_t)start);
+               pmap_unnest(target_map->pmap, start, end - start);
                if(target_map->mapped) {
                        vm_map_submap_pmap_clean(target_map,
                                start, end, old_submap, 0);
                }
                pmap_nest(target_map->pmap, new_submap->pmap, 
-                               (addr64_t)start, (addr64_t)start, 
-                               (addr64_t)(end - start));
-#endif /* i386 */
+                                               start, end - start);
+#endif i386
        } else {
                vm_map_submap_pmap_clean(target_map,
                                start, end, old_submap, 0);
@@ -2144,12 +1943,12 @@ restart_page_query:
 
        if (m->dirty)
                *disposition |= VM_PAGE_QUERY_PAGE_DIRTY;
-       else if(pmap_is_modified(m->phys_page))
+       else if(pmap_is_modified(m->phys_addr))
                *disposition |= VM_PAGE_QUERY_PAGE_DIRTY;
 
        if (m->reference)
                *disposition |= VM_PAGE_QUERY_PAGE_REF;
-       else if(pmap_is_referenced(m->phys_page))
+       else if(pmap_is_referenced(m->phys_addr))
                *disposition |= VM_PAGE_QUERY_PAGE_REF;
 
        vm_object_unlock(object);
@@ -2250,10 +2049,6 @@ REDISCOVER_ENTRY:
                        entry->offset = 0;
                }
                if (!(caller_flags & UPL_COPYOUT_FROM)) {
-                       if (!(entry->protection & VM_PROT_WRITE)) {
-                               vm_map_unlock(map);
-                               return KERN_PROTECTION_FAILURE;
-                       }
                        if (entry->needs_copy)  {
                                vm_map_t                local_map;
                                vm_object_t             object;
@@ -2413,27 +2208,14 @@ REDISCOVER_ENTRY:
                local_start = entry->vme_start;
                vm_object_reference(local_object);
                vm_map_unlock(map);
-               if(caller_flags & UPL_SET_IO_WIRE) {
-                       ret = (vm_object_iopl_request(local_object, 
-                               (vm_object_offset_t)
-                                  ((offset - local_start) 
-                                               + local_offset),
-                               *upl_size,
-                               upl,
-                               page_list,
-                               count,
-                               caller_flags));
-               } else {
-                       ret = (vm_object_upl_request(local_object, 
-                               (vm_object_offset_t)
-                                  ((offset - local_start) 
-                                               + local_offset),
-                               *upl_size,
-                               upl,
-                               page_list,
-                               count,
-                               caller_flags));
-               }
+               ret = (vm_object_upl_request(local_object, 
+                       (vm_object_offset_t)
+                               ((offset - local_start) + local_offset),
+                       *upl_size,
+                       upl,
+                       page_list,
+                       count,
+                       caller_flags));
                vm_object_deallocate(local_object);
                return(ret);
        } 
@@ -2562,8 +2344,6 @@ shared_region_mapping_info(
        vm_offset_t             *client_base,
        vm_offset_t             *alt_base,
        vm_offset_t             *alt_next,
-       unsigned int            *fs_base,
-       unsigned int            *system,
        int                     *flags,
        shared_region_mapping_t *next)
 {
@@ -2578,8 +2358,6 @@ shared_region_mapping_info(
        *alt_base = shared_region->alternate_base;
        *alt_next = shared_region->alternate_next;
        *flags = shared_region->flags;
-       *fs_base = shared_region->fs_base;
-       *system = shared_region->system;
        *next = shared_region->next;
 
        shared_region_mapping_unlock(shared_region);
@@ -2626,8 +2404,6 @@ shared_region_mapping_create(
        shared_region_mapping_lock_init((*shared_region));
        (*shared_region)->text_region = text_region;
        (*shared_region)->text_size = text_size;
-       (*shared_region)->fs_base = ENV_DEFAULT_ROOT;
-       (*shared_region)->system = ENV_DEFAULT_SYSTEM;
        (*shared_region)->data_region = data_region;
        (*shared_region)->data_size = data_size;
        (*shared_region)->region_mappings = region_mappings;
@@ -2638,7 +2414,6 @@ shared_region_mapping_create(
        (*shared_region)->self = *shared_region;
        (*shared_region)->flags = 0;
        (*shared_region)->depth = 0;
-       (*shared_region)->default_env_list = NULL;
        (*shared_region)->alternate_base = alt_base;
        (*shared_region)->alternate_next = alt_next;
        return KERN_SUCCESS;
@@ -2669,11 +2444,9 @@ shared_region_mapping_dealloc(
 {
        struct shared_region_task_mappings sm_info;
        shared_region_mapping_t next = NULL;
-       int ref_count;
 
        while (shared_region) {
-               if ((ref_count = 
-                         hw_atomic_sub(&shared_region->ref_count, 1)) == 0) {
+               if (hw_atomic_sub(&shared_region->ref_count, 1) == 0) {
                        shared_region_mapping_lock(shared_region);
 
                        sm_info.text_region = shared_region->text_region;
@@ -2687,21 +2460,14 @@ shared_region_mapping_dealloc(
                        sm_info.flags = shared_region->flags;
                        sm_info.self = (vm_offset_t)shared_region;
 
-                       if(shared_region->region_mappings) {
-                               lsf_remove_regions_mappings(shared_region, &sm_info);
-                       }
-                       if(((vm_named_entry_t)
-                               (shared_region->text_region->ip_kobject))
-                                                        ->backing.map->pmap) {
-                           pmap_remove(((vm_named_entry_t)
+                       lsf_remove_regions_mappings(shared_region, &sm_info);
+                       pmap_remove(((vm_named_entry_t)
                                (shared_region->text_region->ip_kobject))
                                                        ->backing.map->pmap, 
                                sm_info.client_base, 
                                sm_info.client_base + sm_info.text_size);
-                       }
                        ipc_port_release_send(shared_region->text_region);
-                       if(shared_region->data_region)
-                               ipc_port_release_send(shared_region->data_region);
+                       ipc_port_release_send(shared_region->data_region);
                        if (shared_region->object_chain) {
                                next = shared_region->object_chain->object_chain_region;
                                kfree((vm_offset_t)shared_region->object_chain,
@@ -2714,20 +2480,13 @@ shared_region_mapping_dealloc(
                                sizeof (struct shared_region_mapping));
                        shared_region = next;
                } else {
-                       /* Stale indicates that a system region is no */
-                       /* longer in the default environment list.    */
-                       if((ref_count == 1) && 
-                         (shared_region->flags & SHARED_REGION_SYSTEM)
-                         && (shared_region->flags & ~SHARED_REGION_STALE)) {
-                               remove_default_shared_region(shared_region);
-                       }
                        break;
                }
        }
        return KERN_SUCCESS;
 }
 
-ppnum_t
+vm_offset_t
 vm_map_get_phys_page(
        vm_map_t        map,
        vm_offset_t     offset)
@@ -2735,7 +2494,7 @@ vm_map_get_phys_page(
        vm_map_entry_t  entry;
        int             ops;
        int             flags;
-       ppnum_t         phys_page = 0;
+       vm_offset_t     phys_addr = 0;
        vm_object_t     object;
 
        vm_map_lock(map);
@@ -2768,9 +2527,7 @@ vm_map_get_phys_page(
                                continue;
                        }
                        offset = entry->offset + (offset - entry->vme_start);
-                       phys_page = (ppnum_t)
-                               ((entry->object.vm_object->shadow_offset 
-                                                       + offset) >> 12);
+                       phys_addr = entry->object.vm_object->shadow_offset + offset;
                        break;
                        
                }
@@ -2792,7 +2549,7 @@ vm_map_get_phys_page(
                                        break;
                                }
                        } else {
-                               phys_page = (ppnum_t)(dst_page->phys_page);
+                               phys_addr = dst_page->phys_addr;
                                vm_object_unlock(object);
                                break;
                        }
@@ -2802,98 +2559,6 @@ vm_map_get_phys_page(
        } 
 
        vm_map_unlock(map);
-       return phys_page;
-}
-
-kern_return_t
-kernel_object_iopl_request(
-       vm_named_entry_t        named_entry,
-       memory_object_offset_t  offset,
-       vm_size_t               size,
-       upl_t                   *upl_ptr,
-       upl_page_info_array_t   user_page_list,
-       unsigned int            *page_list_count,
-       int                     cntrl_flags)
-{
-       vm_object_t             object;
-       kern_return_t           ret;
-
-
-       /* a few checks to make sure user is obeying rules */
-       if(size == 0) {
-               if(offset >= named_entry->size)
-                       return(KERN_INVALID_RIGHT);
-               size = named_entry->size - offset;
-       }
-       if(cntrl_flags & UPL_COPYOUT_FROM) {
-               if((named_entry->protection & VM_PROT_READ) 
-                                       != VM_PROT_READ) {
-                       return(KERN_INVALID_RIGHT);
-               }
-       } else {
-               if((named_entry->protection & 
-                       (VM_PROT_READ | VM_PROT_WRITE)) 
-                       != (VM_PROT_READ | VM_PROT_WRITE)) {
-                       return(KERN_INVALID_RIGHT);
-               }
-       }
-       if(named_entry->size < (offset + size))
-               return(KERN_INVALID_ARGUMENT);
-
-       /* the callers parameter offset is defined to be the */
-       /* offset from beginning of named entry offset in object */
-       offset = offset + named_entry->offset;
-
-       if(named_entry->is_sub_map) 
-               return (KERN_INVALID_ARGUMENT);
-               
-       named_entry_lock(named_entry);
-
-       if(named_entry->object) {
-               /* This is the case where we are going to map */
-               /* an already mapped object.  If the object is */
-               /* not ready it is internal.  An external     */
-               /* object cannot be mapped until it is ready  */
-               /* we can therefore avoid the ready check     */
-               /* in this case.  */
-               vm_object_reference(named_entry->object);
-               object = named_entry->object;
-               named_entry_unlock(named_entry);
-       } else {
-               object = vm_object_enter(named_entry->backing.pager, 
-                               named_entry->size, 
-                               named_entry->internal, 
-                               FALSE,
-                               FALSE);
-               if (object == VM_OBJECT_NULL) {
-                       named_entry_unlock(named_entry);
-                       return(KERN_INVALID_OBJECT);
-               }
-               vm_object_lock(object);
-
-               /* create an extra reference for the named entry */
-               vm_object_reference_locked(object);
-               named_entry->object = object;
-               named_entry_unlock(named_entry);
-
-               /* wait for object (if any) to be ready */
-               while (!object->pager_ready) {
-                       vm_object_wait(object,
-                               VM_OBJECT_EVENT_PAGER_READY,
-                               THREAD_UNINT);
-                       vm_object_lock(object);
-               }
-               vm_object_unlock(object);
-       }
-
-       ret = vm_object_iopl_request(object,
-                                    offset,
-                                    size,
-                                    upl_ptr,
-                                    user_page_list,
-                                    page_list_count,
-                                    cntrl_flags);
-       vm_object_deallocate(object);
-       return ret;
+       return phys_addr;
 }
 #endif /* VM_CPM */
index 45a4fb75db864000d01701c0f7a51864bd4daabf..00750edc07d6415dcc07ae0351e9397b0222b7ba 100644 (file)
@@ -1 +1 @@
-8
+3
index 7ed6ff82de6bcc2a78243fc9c54d3ef5ac14da69..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1 +0,0 @@
-5
index d7311efd8da78e0534d209d64131c68eeaaa571f..70463e769e39773a568186f3f22e1ec7b9dafafc 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -175,12 +172,6 @@ getval(
                                c -= 'a' - 10;
                        else if ((c >= 'A') && (c <= 'F'))
                                c -= 'A' - 10;
-                       else if (c == 'k' || c == 'K')
-                               { sign *= 1024; break; }
-                       else if (c == 'm' || c == 'M')
-                               { sign *= 1024 * 1024; break; }
-                       else if (c == 'g' || c == 'G')
-                               { sign *= 1024 * 1024 * 1024; break; }
                        else if (isargsep(c))
                                break;
                        else
index eb09004c96af903e01e94750a4211dc6f985a2f9..a26878559dfa3810a7ece9aecabb89153810e018 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3cab8c57819771b2c4ef95e98e8544628427b2e3..2d96feadf29cebed6d5aeee025de489692eb8ecc 100644 (file)
@@ -2,24 +2,21 @@
  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ *
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
+ *
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
+ *
  * @APPLE_LICENSE_HEADER_END@
  */
 /*
index 716a4635d28d7fb1e1ae1082683c07484d03ce45..761c82979879c49a25717bf7261e73b59126bab4 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 0fae65b2a5453d6ff6a04bfd085209cfb814e16b..93c83ee7b5150edc076ecf92c004c5e5881cdc4b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7df60ccc5ba427b7f491e4f54789dfd1dc55453b..40300fbb318f85276e134e7bd8d5ce82ee8c6525 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c8fa2320d54c8ab143b3aafbd5ab03ecdd80cf19..2f0fef6653d0759a7843bcf22ce06ce06cb4e753 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e65dc01cac21686da540f9797cd3f02b6ae86f1d..0e8dd758f1c654e5791c975813037988b085516d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 68421862f55b08ed3c0571337a1732bfe20d0721..2b9fa2bcdacb18785340098802b3558156edf0bf 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cbc426cdf3d88638c4bd083dce2155106c97e7f6..fa80f5dbf849fb3971bab17b9a14c5abc5dbaa74 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 83b28849e7a21b779cf9753c06d093512d6f1052..c8ecface51b406a9e4beb012c18d0fb1be0bf148 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -43,18 +40,9 @@ void pe_identify_machine(boot_args *args)
   bzero((void *)&gPEClockFrequencyInfo, sizeof(clock_frequency_info_t));
   
   // Start with default values.
-  gPEClockFrequencyInfo.timebase_frequency_hz =  25000000;
-  gPEClockFrequencyInfo.bus_frequency_hz      = 100000000;
-  gPEClockFrequencyInfo.cpu_frequency_hz      = 300000000;
-  
-  gPEClockFrequencyInfo.bus_frequency_min_hz = gPEClockFrequencyInfo.bus_frequency_hz;
-  gPEClockFrequencyInfo.bus_frequency_max_hz = gPEClockFrequencyInfo.bus_frequency_hz;
-  gPEClockFrequencyInfo.cpu_frequency_min_hz = gPEClockFrequencyInfo.cpu_frequency_hz;
-  gPEClockFrequencyInfo.cpu_frequency_max_hz = gPEClockFrequencyInfo.cpu_frequency_hz;
-  
-  gPEClockFrequencyInfo.dec_clock_rate_hz = gPEClockFrequencyInfo.timebase_frequency_hz;
-  gPEClockFrequencyInfo.bus_clock_rate_hz = gPEClockFrequencyInfo.bus_frequency_hz;
-  gPEClockFrequencyInfo.cpu_clock_rate_hz = gPEClockFrequencyInfo.cpu_frequency_hz;
+  gPEClockFrequencyInfo.bus_clock_rate_hz = 100000000;
+  gPEClockFrequencyInfo.cpu_clock_rate_hz = 300000000;
+  gPEClockFrequencyInfo.dec_clock_rate_hz =  25000000;
   
   // Get real number from some where.
   
index dfe65ebaf1bcae2cdfd5f85e6796ea53fcdd9bb6..6e8001e6fc30b1a7325ced4815e5d12a42d6427b 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2040b0e4690f93bb2fae0aa9612ca269a5ffc125..a3d3a3a64d230c1edf0884c816da23f1b735255f 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 3d00e68f969108423ab6e95d2c66f18b2b5f90c6..e7601e780322dfa2cb89568e6eb2b4449458de81 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 6ee731cd13a25d7b7b9561cdf465ad69ed62a9f5..0759794a4248599983f4af917e8d2b155af5df32 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 2fe7d6ae6e1aa01870bb638c63b0d5a5a8f14bc0..3e247bc5603e9dc43b012911ab4a2a8501e1aa08 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index bbad4ebd67249369e091de15c20a08bd6284773e..e35d50a8dcbdde10e8811b54cb2486dc5e274eaf 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 1309560052fa6a4d893384146501c34144603bca..ccf059efff65515ad52878c6e1baef64f0eb660d 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a22a9d5090f41b707ff32b4d3bcf65d9dbe5073e..d703fb7c6d8a0be770f936f71428a8749ef2b93e 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index c009d596fc51020ab28d7ea3fe13d491619c13ed..8a124e529cc89cc0e29c583efdc5cb758d937f9a 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 8b93ca597361072e9cdc1e5daa6ddba71c6584db..f41b3ec8c59e7f6e0bd0e9742f65afc544109414 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index cb97bf45de3a1023f747bca73376a84a8d0db42a..b4dc941320fadb350c1b75bd31943521098cffff 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 685e190c4347452032e39611ee47c88e915779dc..f3b328a77170baa7422284ddc948031d56b321bf 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 293515749cd14ee51b10ad643b2f0b63d9ac85d4..2cdfd0aa9df7638728c6c9ae639450c3dbb8ea88 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 990c60e72f24f0acc9279137d932d498099e8d18..09857c7db9306050c3069aca773958f07053f977 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index e633471a987e1f2d7179501917be4322bf189dfc..e6e841f6500c04f0037e83fa068a7e183ab565e6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 7d005b13e46f549d204295bfc49029dd6d84df25..520daef6976b585142aa54580d0eb0da7d6c4f67 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 92c741007cb2047898a64d235a525d8edbeb5f81..8fdab2dea7409d0b41eefb1103d26ea777097e74 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index fcb9435c1ce609315a7ab1d2a89e0824d611f19c..6078e3c2c852d050e06effddc7a83a35d0af24a6 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -57,8 +54,6 @@ void PE_init_platform(
 void PE_init_kprintf(
        boolean_t vm_initialized);
 
-unsigned int PE_init_taproot(vm_offset_t *taddr);
-
 extern void (*PE_kputc)(char c);
 
 void PE_init_printf(
@@ -79,15 +74,6 @@ struct clock_frequency_info_t {
   unsigned long bus_to_cpu_rate_den;
   unsigned long bus_to_dec_rate_num;
   unsigned long bus_to_dec_rate_den;
-  unsigned long timebase_frequency_hz;
-  unsigned long timebase_frequency_num;
-  unsigned long timebase_frequency_den;
-  unsigned long long bus_frequency_hz;
-  unsigned long long bus_frequency_min_hz;
-  unsigned long long bus_frequency_max_hz;
-  unsigned long long cpu_frequency_hz;
-  unsigned long long cpu_frequency_min_hz;
-  unsigned long long cpu_frequency_max_hz;
 };
 
 typedef struct clock_frequency_info_t clock_frequency_info_t;
@@ -115,6 +101,8 @@ void kprintf(
 void init_display_putc(unsigned char *baseaddr, int rowbytes, int height);
 void display_putc(char c);
 
+boolean_t PE_init_ethernet_debugger( void );
+
 enum {
     kPEReadTOD,
     kPEWriteTOD
index 498b4e0f99b132028967c842143fe6f96b7f97b5..0c74f8eb683a2ed7162fed5d66912f09ba26a675 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -60,9 +57,8 @@ typedef struct DRAMBank DRAMBank;
 
 /* Boot argument structure - passed into Mach kernel at boot time.
  */
+#define kBootArgsVersion               1
 #define kBootArgsRevision              1
-#define kBootArgsVersion1              1
-#define kBootArgsVersion2              2
 
 typedef struct boot_args {
   unsigned short       Revision;       /* Revision of boot_args structure */
index 12c47f2413b30a0ba28ba18dc8e85e294bb89b09..eac44d6cdd3515fe60386b1e18b77673318e7af0 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index a54cba183013f4cc467f6907c011a562ae1a9b14..14a0ea7d57eda0627c1356d2d4c9f357a1ecb974 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 03cfb409e1e19bc08b3350ca889a9537e7fa8ba5..aed753792ea1cff69c67a8ab5d34de153d163472 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 668a4ac36c2c4132b37bcc02a618343b48ae02ac..f9bb037c1ca2be5df059342f9f43148b94cb3fcd 100644 (file)
@@ -3,27 +3,36 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
 #ifndef _PEXPERT_PPC_PROTOS_H_
 #define _PEXPERT_PPC_PROTOS_H_
+
+#define mtibatu(n, reg) __asm__ volatile("mtibatu " # n ", %0" : : "r" (reg))
+#define mtibatl(n, reg) __asm__ volatile("mtibatl " # n ", %0" : : "r" (reg))
+#define mtdbatu(n, reg) __asm__ volatile("mtdbatu " # n ", %0" : : "r" (reg))
+#define mtdbatl(n, reg) __asm__ volatile("mtdbatl " # n ", %0" : : "r" (reg))
+  
+#define mfibatu(reg, n) __asm__ volatile("mfibatu %0, " # n : "=r" (reg))
+#define mfibatl(reg, n) __asm__ volatile("mfibatl %0, " # n : "=r" (reg))
+#define mfdbatu(reg, n) __asm__ volatile("mfdbatu %0, " # n : "=r" (reg))
+#define mfdbatl(reg, n) __asm__ volatile("mfdbatl %0, " # n : "=r" (reg))
  
 #define mtsprg(n, reg)  __asm__ volatile("mtsprg  " # n ", %0" : : "r" (reg))
 #define mfsprg(reg, n)  __asm__ volatile("mfsprg  %0, " # n : "=r" (reg))
@@ -74,6 +83,10 @@ static __inline__ unsigned int byte_reverse_word(unsigned int word) {
 extern void initialize_serial(void * scc_phys_base);
 
 
+//------------------------------------------------------------------------
+// from ppc/POWERMAC/device_tree.h
+extern void ofw_init(void *);
+
 //------------------------------------------------------------------------
 // from osfmk/ppc/POWERMAC/video_console.c
 
@@ -90,6 +103,32 @@ extern void vc_display_icon( void * desc,
 extern int  switch_to_serial_console(void);
 extern void switch_to_old_console(int old_console);
 
+//------------------------------------------------------------------------
+// from ppc/spl.h
+ /* Note also : if any new SPL's are introduced, please add to debugging list*/
+#define SPLOFF          0       /* all interrupts disabled TODO NMGS  */
+#define SPLPOWER        1       /* power failure (unused) */
+#define SPLHIGH         2       /* TODO NMGS any non-zero, non-INTPRI value */
+#define SPLSCHED        SPLHIGH
+#define SPLCLOCK        SPLSCHED /* hard clock */
+#define SPLVM           4       /* pmap manipulations */
+#define SPLBIO          8       /* block I/O */
+#define SPLIMP          8       /* network & malloc */
+#define SPLTTY          16      /* TTY */
+#define SPLNET          24      /* soft net */
+#define SPLSCLK         27      /* soft clock */
+#define SPLLO           32      /* no interrupts masked */
+
+/* internal - masked in to spl level if ok to lower priority (splx, splon)
+ * the mask bit is never seen externally
+ */
+#define SPL_LOWER_MASK  0x8000
+
+#define SPL_CMP_GT(a, b)        ((unsigned)(a) >  (unsigned)(b))
+#define SPL_CMP_LT(a, b)        ((unsigned)(a) <  (unsigned)(b))
+#define SPL_CMP_GE(a, b)        ((unsigned)(a) >= (unsigned)(b))
+#define SPL_CMP_LE(a, b)        ((unsigned)(a) <= (unsigned)(b))
+
 typedef unsigned spl_t;
 
 //------------------------------------------------------------------------
@@ -105,38 +144,60 @@ extern void            cninit(void);
  *     Temporarily stolen from Firmware.h
  */
 
+void dbgDisp(unsigned int port, unsigned int id, unsigned int data);
+void dbgDispLL(unsigned int port, unsigned int id, unsigned int data);
+void fwSCCinit(unsigned int port);
+
 extern void dbgTrace(unsigned int item1, unsigned int item2, unsigned int item3);
 #if 1          /* (TEST/DEBUG) - eliminate inline */
 extern __inline__ void dbgTrace(unsigned int item1, unsigned int item2, unsigned int item3) {
  
-       __asm__ volatile("mr   r3,%0" : : "r" (item1) : "r3");
-       __asm__ volatile("mr   r4,%0" : : "r" (item2) : "r4");
-       __asm__ volatile("mr   r5,%0" : : "r" (item3) : "r5");
-       __asm__ volatile("lis  r0,hi16(CutTrace)" : : : "r0");
-       __asm__ volatile("ori  r0,r0,lo16(CutTrace)" : : : "r0");
-       __asm__ volatile("sc");
-       return;
+               __asm__ volatile("mr   r3,%0" : : "r" (item1) : "r3");
+               __asm__ volatile("mr   r4,%0" : : "r" (item2) : "r4");
+               __asm__ volatile("mr   r5,%0" : : "r" (item3) : "r5");
+#ifdef __ELF__
+        __asm__ volatile("lis  r0,CutTrace@h" : : : "r0");
+        __asm__ volatile("ori  r0,r0,CutTrace@l" : : : "r0");
+#else
+        __asm__ volatile("lis  r0,hi16(CutTrace)" : : : "r0");
+        __asm__ volatile("ori  r0,r0,lo16(CutTrace)" : : : "r0");
+#endif
+        __asm__ volatile("sc");
+               return;
 }
 #endif
 
 extern void DoPreempt(void);
 extern __inline__ void DoPreempt(void) {
-       __asm__ volatile("lis  r0,hi16(DoPreemptCall)" : : : "r0");
-       __asm__ volatile("ori  r0,r0,lo16(DoPreemptCall)" : : : "r0");
-       __asm__ volatile("sc");
-       return;
+#ifdef __ELF__
+        __asm__ volatile("lis  r0,DoPreemptCall@h" : : : "r0");
+        __asm__ volatile("ori  r0,r0,DoPreemptCall@l" : : : "r0");
+#else
+        __asm__ volatile("lis  r0,hi16(DoPreemptCall)" : : : "r0");
+        __asm__ volatile("ori  r0,r0,lo16(DoPreemptCall)" : : : "r0");
+#endif
+        __asm__ volatile("sc");
+               return;
 }
 
 extern void CreateFakeIO(void);
 extern __inline__ void CreateFakeIO(void) {
-       __asm__ volatile("lis  r0,hi16(CreateFakeIOCall)" : : : "r0");
-       __asm__ volatile("ori  r0,r0,lo16(CreateFakeIOCall)" : : : "r0");
-       __asm__ volatile("sc");
+#ifdef __ELF__
+        __asm__ volatile("lis  r0,CreateFakeIOCall@h" : : : "r0");
+        __asm__ volatile("ori  r0,r0,CreateFakeIOCall@l" : : : "r0");
+#else
+        __asm__ volatile("lis  r0,hi16(CreateFakeIOCall)" : : : "r0");
+        __asm__ volatile("ori  r0,r0,lo16(CreateFakeIOCall)" : : : "r0");
+#endif
+         __asm__ volatile("sc");
                return;
 }
 
 extern void StoreReal(unsigned int val, unsigned int addr);
 extern void ReadReal(unsigned int raddr, unsigned int *vaddr);
+extern void ClearReal(unsigned int addr, unsigned int lgn);
+extern void LoadDBATs(unsigned int *bat);
+extern void LoadIBATs(unsigned int *bat);
 extern unsigned int LLTraceSet(unsigned int tflags);
 extern void GratefulDebInit(void);
 extern void GratefulDebDisp(unsigned int coord, unsigned int data);
index 8bd07d0ec5495fd288a4cf0e430bd148e870522e..79848c30a9c6737aec9e09217f154249afe33b20 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 55a26c7cb7c86d834d4e2801d0058b2ea7a10f92..cf67d7205c08126f6bd51469f4477fd0d75f1cb7 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 92a9d8d87408765545fb1b97d4e264b59741962a..61f6c8dffd7a4dcab73bdc91aa79b92f07d79f28 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -26,7 +23,7 @@
  *  pe_clock_speed.c - Determine the best guess for the processor and bus
  *                     speed buy using the values returned by run_clock_test.
  *
- *  (c) Apple Computer, Inc. 1998-2002
+ *  (c) Apple Computer, Inc. 1998-2000
  *
  *  Writen by:   Josh de Cesare
  *
@@ -84,22 +81,10 @@ void PE_Determine_Clock_Speeds(unsigned int via_addr, int num_speeds,
   gPEClockFrequencyInfo.bus_to_dec_rate_num = 1;
   gPEClockFrequencyInfo.bus_to_dec_rate_den = 4;
   
-  // Assume that the timebase frequency is derived from the bus clock.
-  gPEClockFrequencyInfo.timebase_frequency_num = bus_freq_num;
-  gPEClockFrequencyInfo.timebase_frequency_den = bus_freq_den * 4;
-  
   // Set the truncated numbers in gPEClockFrequencyInfo.
   gPEClockFrequencyInfo.bus_clock_rate_hz = tmp_bus_speed;
   gPEClockFrequencyInfo.cpu_clock_rate_hz = tmp_cpu_speed;
   gPEClockFrequencyInfo.dec_clock_rate_hz = tmp_bus_speed / 4;
-  gPEClockFrequencyInfo.timebase_frequency_hz = tmp_bus_speed / 4;
-  
-  gPEClockFrequencyInfo.bus_frequency_hz = tmp_bus_speed;
-  gPEClockFrequencyInfo.bus_frequency_min_hz = tmp_bus_speed;
-  gPEClockFrequencyInfo.bus_frequency_max_hz = tmp_bus_speed;
-  gPEClockFrequencyInfo.cpu_frequency_hz = tmp_cpu_speed;
-  gPEClockFrequencyInfo.cpu_frequency_min_hz = tmp_cpu_speed;
-  gPEClockFrequencyInfo.cpu_frequency_max_hz = tmp_cpu_speed;
   
   PE_call_timebase_callback();
 }
index 7c6054a2432aab999352d80ae9cdd75d0a253c3f..dfcd81a64795964a086446956eb04c9f08f9a301 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
index 558d6bd6550b2aa22e8789f755569e7ab783a874..092d1926f3c7fdcea768e4a7eb727189898807c1 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -46,61 +43,32 @@ void pe_identify_machine(void)
   bzero((void *)&gPEClockFrequencyInfo, sizeof(clock_frequency_info_t));
   
   // Start with default values.
-  gPEClockFrequencyInfo.timebase_frequency_hz = 25000000;
-  gPEClockFrequencyInfo.bus_clock_rate_hz     = 100000000;
-  gPEClockFrequencyInfo.cpu_clock_rate_hz     = 300000000;
-
+  gPEClockFrequencyInfo.bus_clock_rate_hz = 100000000;
+  gPEClockFrequencyInfo.cpu_clock_rate_hz = 300000000;
+  gPEClockFrequencyInfo.dec_clock_rate_hz =  25000000;
+  
   // Try to get the values from the device tree.
   if (DTFindEntry("device_type", "cpu", &cpu) == kSuccess) {
-    // Find the time base frequency first.
-    if (DTGetProperty(cpu, "timebase-frequency", (void **)&value, &size) == kSuccess) {
-      // timebase_frequency_hz is only 32 bits, and the device tree should never provide 64 bits
-      // so this if should never be taken.
-      if (size == 8) gPEClockFrequencyInfo.timebase_frequency_hz = *(unsigned long long *)value;
-      else gPEClockFrequencyInfo.timebase_frequency_hz = *value;
-    }
-    gPEClockFrequencyInfo.dec_clock_rate_hz = gPEClockFrequencyInfo.timebase_frequency_hz;
-    
-    // Find the bus frequency next.  Try the cpu node, then the root.
-    if (DTGetProperty(cpu, "bus-frequency", (void **)&value, &size) == kSuccess) {
-      if (size == 8) gPEClockFrequencyInfo.bus_frequency_hz = *(unsigned long long *)value;
-      else gPEClockFrequencyInfo.bus_frequency_hz = *value;
-    } else {
-      if (DTLookupEntry(0, "/", &root) == kSuccess) {
-       if (DTGetProperty(root, "clock-frequency", (void **)&value, &size) == kSuccess) {
-         if (size == 8) gPEClockFrequencyInfo.bus_frequency_hz = *(unsigned long long *)value;
-         else gPEClockFrequencyInfo.bus_frequency_hz = *value;
-       }
-      }
-    }
-    
-    gPEClockFrequencyInfo.bus_frequency_min_hz = gPEClockFrequencyInfo.bus_frequency_hz;
-    gPEClockFrequencyInfo.bus_frequency_max_hz = gPEClockFrequencyInfo.bus_frequency_hz;
-    
-    if (gPEClockFrequencyInfo.bus_frequency_hz < 0x100000000ULL)
-      gPEClockFrequencyInfo.bus_clock_rate_hz = gPEClockFrequencyInfo.bus_frequency_hz;
-    else
-      gPEClockFrequencyInfo.bus_clock_rate_hz = 0xFFFFFFFF;
-    
-    // Find the cpu frequency last.
-    if (DTGetProperty(cpu, "clock-frequency", (void **)&value, &size) == kSuccess) {
-      if (size == 8) gPEClockFrequencyInfo.cpu_frequency_hz = *(unsigned long long *)value;
-      else gPEClockFrequencyInfo.cpu_frequency_hz = *value;
+    if (DTGetProperty(cpu, "bus-frequency",
+                     (void **)&value, &size) == kSuccess)
+      gPEClockFrequencyInfo.bus_clock_rate_hz = *value;
+    else {
+      if (DTLookupEntry(0, "/", &root) == kSuccess)
+       if (DTGetProperty(root, "clock-frequency",
+                         (void **)&value, &size) == kSuccess)
+         gPEClockFrequencyInfo.bus_clock_rate_hz = *value;
     }
     
-    gPEClockFrequencyInfo.cpu_frequency_min_hz = gPEClockFrequencyInfo.cpu_frequency_hz;
-    gPEClockFrequencyInfo.cpu_frequency_max_hz = gPEClockFrequencyInfo.cpu_frequency_hz;
+    if (DTGetProperty(cpu, "clock-frequency",
+                     (void **)&value, &size) == kSuccess)
+      gPEClockFrequencyInfo.cpu_clock_rate_hz = *value;
     
-    if (gPEClockFrequencyInfo.cpu_frequency_hz < 0x100000000ULL)
-      gPEClockFrequencyInfo.cpu_clock_rate_hz = gPEClockFrequencyInfo.cpu_frequency_hz;
-    else
-      gPEClockFrequencyInfo.cpu_clock_rate_hz = 0xFFFFFFFF;
+    if (DTGetProperty(cpu, "timebase-frequency",
+                     (void **)&value, &size) == kSuccess)
+      gPEClockFrequencyInfo.dec_clock_rate_hz = *value;
   }
   
   // Set the num / den pairs form the hz values.
-  gPEClockFrequencyInfo.timebase_frequency_num = gPEClockFrequencyInfo.timebase_frequency_hz;
-  gPEClockFrequencyInfo.timebase_frequency_den = 1;
-  
   gPEClockFrequencyInfo.bus_clock_rate_num = gPEClockFrequencyInfo.bus_clock_rate_hz;
   gPEClockFrequencyInfo.bus_clock_rate_den = 1;
   
@@ -138,51 +106,50 @@ vm_offset_t get_io_base_addr(void)
   return 0;
 }
 
-vm_offset_t PE_find_scc(void)
+boolean_t PE_init_ethernet_debugger(void)
 {
-       vm_offset_t io, sccadd;
-       DTEntry     entryP;
-       vm_offset_t *sccregs;
-       unsigned int sccrsize;
-       
-       if(!(io = get_io_base_addr())) {                /* Get the I/O controller base address */
-               return (vm_offset_t)0;                          /* Hmmm, no I/O??? What gives??? How'd we even boot? */
-       }
-
-       
-/*     Note: if we find a escc-legacy, we need to kind of hack because it can be either an offset
-       into the iobase or the actual address itself.  ORint the two should provide the correct 
-       for either */
-
-       sccadd = 0;                                                             /* Assume none for now */
-
-       if(DTFindEntry("name", "escc-legacy", &entryP) == kSuccess)     {       /* Find the old fashioned serial port */
-               if (DTGetProperty(entryP, "reg", (void **)&sccregs, &sccrsize) == kSuccess) {   /* Do we have some registers? */
-                       sccadd = ((vm_offset_t)*sccregs | io);  /* Get the address */
-               }
-       }
-       
-       if(DTFindEntry("name", "escc", &entryP) == kSuccess) {  /* Well, see if we just have the new fangled one */
-               sccadd = io + 0x12000;                          /* Yeah, but still return the oldie goldie... */
-       }
-       
-       return sccadd;                                                  /* Return it if you found it */
+  boolean_t result;
+#if 0
+  DTEntry       entryP;
+  vm_offset_t   *address;
+  unsigned char *netAddr;
+  int           size;
+  vm_offset_t   io;
+  
+  if ((io = get_io_base_addr())
+      && (DTFindEntry("name", "mace", &entryP) == kSuccess)
+      && (DTGetProperty(entryP, "local-mac-address", (void **)&netAddr, &size) == kSuccess)
+      && (DTGetProperty(entryP, "reg", (void **)&address, &size) == kSuccess)
+      && (size == (2 * 3 * sizeof(vm_offset_t)) ))
+    {
+      extern boolean_t kdp_mace_init(void *baseAddresses[3],
+                                    unsigned char *netAddr);
+      void *maceAddrs[3];
+      
+      // address calculation not correct
+      maceAddrs[0] = (void *) io_map(io + address[0], address[1]);
+      maceAddrs[1] = (void *) io_map(io + address[2], 0x1000);
+      maceAddrs[2] = (void *) (((vm_offset_t)maceAddrs[1])
+                              + address[4] - address[2]);
+      result = kdp_mace_init( maceAddrs, netAddr );
+      
+    } else
+#endif
+      result = FALSE;
+  
+  return result;
 }
 
-unsigned int PE_init_taproot(vm_offset_t *taddr)
+vm_offset_t PE_find_scc(void)
 {
-       DTEntry     entryP;
-       vm_offset_t *tappdata;
-       unsigned int tappsize;
-       
-       
-       if(DTFindEntry("name", "memory-map", &entryP) != kSuccess) return 0;    /* no memory map */
-
-       if (DTGetProperty(entryP, "TapRoot", (void **)&tappdata, &tappsize) != kSuccess) return 0;      /* No TapRoot */
-
-       tappdata[1] = (tappdata[1] + 4095 ) & -4096;    /* Make sure this is a whole page */
-
-       *taddr = io_map_spec(tappdata[0], tappdata[1]);         /* Map it in and return the address */
-       tappdata[0] = *taddr;                                   /* Also change property */
-       return tappdata[1];                                             /* And the size */
+  vm_offset_t io;
+  DTEntry     entryP;
+  
+  if ((io = get_io_base_addr())
+      && (DTFindEntry("name", "escc", &entryP) == kSuccess))
+    io += 0x12000; /* Offset to legacy SCC Registers */
+  else
+    io = 0;
+  
+  return io;
 }
index 478455a006b07f444795b26c1574301eab02aef5..afffd30bf7a92965902435199afa44fcfaa14030 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -128,6 +125,10 @@ void PE_init_iokit(void)
     PE_init_kprintf(TRUE);
     PE_init_printf(TRUE);
 
+    // init this now to get mace debugger for iokit startup
+    PE_init_ethernet_debugger();
+
+    
     if( kSuccess == DTLookupEntry(0, "/chosen/memory-map", &entry)) {
 
        boot_progress_element * bootPict;
@@ -200,7 +201,6 @@ void PE_create_console( void )
 int PE_current_console( PE_Video * info )
 {
     *info = PE_state.video;
-    info->v_baseAddr = 0;
     return( 0);
 }
 
@@ -245,8 +245,8 @@ void PE_call_timebase_callback(void)
   struct timebase_freq_t timebase_freq;
   unsigned long          num, den, cnt;
   
-  num = gPEClockFrequencyInfo.timebase_frequency_num;
-  den = gPEClockFrequencyInfo.timebase_frequency_den;
+  num = gPEClockFrequencyInfo.bus_clock_rate_num * gPEClockFrequencyInfo.bus_to_dec_rate_num;
+  den = gPEClockFrequencyInfo.bus_clock_rate_den * gPEClockFrequencyInfo.bus_to_dec_rate_den;
   
   cnt = 2;
   while (cnt <= den) {
index 02a62efd6d471a2898f2b4d8da6ea04b4a3948a6..6ecfacbe8ec88b59c1650086e0f6199c281d8994 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */
@@ -48,28 +45,34 @@ void (*PE_kputc)(char c) = 0;
 
 unsigned int disableSerialOuput = TRUE;
 
-vm_offset_t    scc = 0;
 
-struct slock kprintf_lock;
+static struct slock kprintf_lock;
 
 void PE_init_kprintf(boolean_t vm_initialized)
 {
+       static vm_offset_t      scc;
        unsigned int    boot_arg;
 
        if (PE_state.initialized == FALSE)
                panic("Platform Expert not initialized");
 
-       if (PE_parse_boot_arg("debug", &boot_arg)) 
-               if(boot_arg & DB_KPRT) disableSerialOuput = FALSE; 
+       if (!vm_initialized)
+       {
+           if (PE_parse_boot_arg("debug", &boot_arg)) 
+               if(boot_arg & DB_KPRT) disableSerialOuput = FALSE; 
 
-       if( (scc = PE_find_scc())) {                            /* See if we can find the serial port */
-               scc = io_map_spec(scc, 0x1000);                 /* Map it in */
-               initialize_serial((void *)scc);                 /* Start up the serial driver */
+           if( (scc = PE_find_scc()))
+            {
+               initialize_serial( (void *) scc );
                PE_kputc = serial_putc;
 
                simple_lock_init(&kprintf_lock, 0);
-       } else
-                       PE_kputc = cnputc;
+            } else
+               PE_kputc = cnputc;
+
+       } else if( scc){
+               initialize_serial( (void *) io_map( scc, 0x1000) );
+       }
 
 #if 0
        /*
index 2eb47ad71fbaa948b163f07e399b318452d84f87..8cda8649fc6b0d647f3a935d9a285fde03982cfa 100644 (file)
@@ -3,22 +3,19 @@
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
+ * The contents of this file constitute Original Code as defined in and
+ * are subject to the Apple Public Source License Version 1.1 (the
+ * "License").  You may not use this file except in compliance with the
+ * License.  Please obtain a copy of the License at
+ * http://www.apple.com/publicsource and read it before using this file.
  * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this
- * file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * This Original Code and all software distributed under the License are
+ * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
+ * License for the specific language governing rights and limitations
+ * under the License.
  * 
  * @APPLE_LICENSE_HEADER_END@
  */